So im writing a script that trains couple skills randomly, but its not functioning properly at all.
Here are some things that arent working properly:
-When mining, my sleepUntil never escapes on condition (checking both mined rocks ids on that position or player animation)
-Detects that it doesnt have pickaxe, runs to bank (printing on logger), logger says that it arrived to the destination (osbots print), and 70% of the time it does a 360 and starts running to the mining area, while still printing "Going to bank"
-Not sure about this, gonna have to recheck it later, but the getWalking().webwalk(bank1, bank2) might made me walk to the 2nd closest bank
-Config 43 returns 4, while on config debugger its 100 (either air strike or a magic spell selected on attack tab)
-Config 108 returns 3, while on debugger its 11 (same as above)
if dangerArea contains player
// run to tile x
else if...
else if trainingArea contains player
// attack npc
else
// walk to trainingArea
it does its thing, then attacks the npc, ignores the sleepUntil, and runs to tile x. On the same loop above the npc.interact(), the distance between player and danger returns around 90, and if he was infact in the dangerArea it shouldnt even skip the first if.
I need help, ive been working for like 3 days on that, and im just trashing my code and filling it with random comments. Ive got no idea whats wrong or what to do