domp Posted May 24, 2017 Share Posted May 24, 2017 (edited) // flick on if (this.timer == this.random) { if (this.prayer.open()) { this.status = "Flicking on"; this.prayer.set(PrayerButton.RAPID_HEAL, true); } else { this.prayer.open(); } this.timer = 0L; this.random = random(32, 45); } else { sleep(random(972, 1028)); this.timer += 1L; antiban(); } This used to work flawlessly and now when antiban(); gets called, either the timer stops completely or it will continue until it equals the random number and then just stop. My flicking off code is if (this.prayer.isActivated(PrayerButton.RAPID_HEAL)) { this.status = "Flicking off"; this.prayer.set(PrayerButton.RAPID_HEAL, false); } antiban code-- per alek's request private void antiban() throws InterruptedException { //beginTime = System.currentTimeMillis(); this.AB = random(1, 200); if (this.AB == 1) { this.status = "Anti-ban"; this.camera.movePitch(random(0, 360)); } if (this.AB == 2) { this.status = "Anti-ban"; this.mouse.moveOutsideScreen(); } if (this.AB == 3) { this.status = "Anti-ban"; this.mouse.moveOutsideScreen(); } if (this.AB == 4) { this.status = "Anti-ban"; this.mouse.moveOutsideScreen(); } if (this.AB == 5) { this.status = "Anti-ban"; this.skills.hoverSkill(Skill.HITPOINTS); } if (this.AB == 25) { this.status = "Anti-ban"; this.skills.hoverSkill(Skill.RANGED); } if (this.AB == 10) { this.status = "Anti-ban"; this.skills.hoverSkill(Skill.RANGED); } if (this.AB == 15) { this.status = "Anti-ban"; this.camera.moveYaw(random(0, 360)); } if (this.AB == 28) { this.status = "Anti-ban"; this.mouse.moveOutsideScreen(); } if (this.AB == 27) { this.status = "Anti-ban"; this.mouse.moveOutsideScreen(); } if (this.AB == 26) { this.status = "Anti-ban"; this.mouse.moveOutsideScreen(); } if (this.AB == 20) { this.status = "Anti-ban"; this.mouse.moveRandomly(); } if (this.AB == 19) { this.status = "Anti-ban"; this.mouse.moveRandomly(); } if (this.AB == 18) { this.status = "Anti-ban"; this.mouse.moveRandomly(); } if (this.AB == 17) { this.status = "Anti-ban"; this.mouse.moveRandomly(); } } Any help would be great Edited May 24, 2017 by domp 1 Quote Link to comment Share on other sites More sharing options...
Mordred Posted May 24, 2017 Share Posted May 24, 2017 @Chris 1 Quote Link to comment Share on other sites More sharing options...
Alek Posted May 24, 2017 Share Posted May 24, 2017 I don't think you really understand what you are doing. At a very rudimentary level, most methods in OSBot you can test because they return as a boolean. Second, you state that after "antiban()" is called your "timer stops completely" but you don't show your "antiban" method. Finally, your script will not perfectly execute your code in the exact same amount of time every time; and your client will not send packets on a consistent exact latency, and the server will not accept and process your requests exactly the same every single time. Let's say we live in your perfect world where all of that is true (or there is some way to find out), with some middle school statistics we can find your upper and lower bounds along with your mean over the course of your script running. TLDR: You didn't give us any information, post your "antiban" code and test what your OSBot API methods are returning. Also, you didn't really mention if a stack trace was generated, I'm going to assume not. Quote Link to comment Share on other sites More sharing options...
Hayase Posted May 24, 2017 Share Posted May 24, 2017 mouse.moveRandomly(); This function was removed. If you try and compile your script it should say that. Quote Link to comment Share on other sites More sharing options...
domp Posted May 24, 2017 Author Share Posted May 24, 2017 51 minutes ago, Hayase said: mouse.moveRandomly(); This function was removed. If you try and compile your script it should say that. Bless you. All is fixed. I apologize for not posting the ab code at first Quote Link to comment Share on other sites More sharing options...