Jump to content

Script stopped working after this 2.4.126 update


domp

Recommended Posts

		// 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 by domp
  • Like 1
Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...