Code: Select all
function checkskilllvl()
for k,v in pairs(settings.profile.skills) do
minsklvl = (player.Level + 1)
if v.minxx == player.Class1 and minsklvl > v.minlvl then
settings.profile.skills[k].AutoUse = true
else
settings.profile.skills[k].AutoUse = false
end
if v.minxx == player.Class2 and minsklvl > v.minlvl then
settings.profile.skills[k].AutoUse = true
end
if v.minxx == player.Class2 and v.primxx == 2 then
settings.profile.skills[k].AutoUse = false
end
end
end
So calling this function onload and onlevelup makes the bot check the skills and dissable ones it can't use.
Doing this you can now have a high lvl skill in your profile and the bot won't try to keep using it before it can actually use the skill in game. Also if you don't have your second class activated then it won't try to use any of the second class skills named in profile either.
So yeah trouble is I am calling for attributes from the settings.lua and I want a way to do it without needing to change settings.lua.