Bl1zzard 4 Share Posted September 6, 2020 Today my combat, woodcutting and fishing scripts were suddenly broken. I tried adding a log method at the start of the onLoop method but when the script broke, the log method is never called again. I managed to debug it to the root cause, normally before I attack an NPC, I will call the isOnScreen method, if it is false, I will rotate my camera towards that NPC. But the isOnScreen method always return true regardless, hence my camera never rotates if the NPC is out of my screen. When that happens, the interact method bugs out and completely halts the script. Appreciate any help on this matter, thanks. Link to comment Share on other sites More sharing options...
Bl1zzard 4 Author Share Posted September 6, 2020 log(1); if (!npc.isOnScreen()) { log(2); Camera.keyboardRotateToEntity(npc); this.METHODCONTEXT.sleep(Calculations.random(Calculations.random(Configuration.SLEEP_FLOOR, Configuration.SLEEP_CEILING))); Walking.walk(npc.getTile().getRandomizedTile()); this.METHODCONTEXT.sleep(Calculations.random(Calculations.random(Configuration.SLEEP_FLOOR, Configuration.SLEEP_CEILING))); } log(3); Sorry I can't find the edit button, the console log shows that it stalls after log(1). Link to comment Share on other sites More sharing options...
Pseudo 179 Share Posted September 7, 2020 I assume you're definitely getting a valid instance of the npc object before trying to interact with it? Link to comment Share on other sites More sharing options...
Bl1zzard 4 Author Share Posted September 8, 2020 19 hours ago, Pseudo said: I assume you're definitely getting a valid instance of the npc object before trying to interact with it? Yep, I have a validation check before the interaction logic. Issue has been fixed in the latest Dreambot version 3, think I was encountering the same issue as everyone else 😀 Link to comment Share on other sites More sharing options...
LordJashin32 54 Share Posted September 14, 2020 On 9/8/2020 at 1:15 AM, Bl1zzard said: Yep, I have a validation check before the interaction logic. Issue has been fixed in the latest Dreambot version 3, think I was encountering the same issue as everyone else 😀 yup use Dreambot 3. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.