Jump to content

Idle avoider


Recommended Posts

Posted (edited)

I have something just move the mouse on or off the screen every 0-3 minutes. 

import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;

@ScriptManifest(author = "apa", info = "Afks", logo = "", name = "AFK", version = 1.0)
public class Main extends Script {
	
	public void onStart(){
	}
	
	public int waitTime(int min, int max) {
		return (int)(Math.random() * (max - min)) + min;
	}
	
	public int onLoop() throws InterruptedException {
		if (mouse.isOnScreen()) {
			mouse.moveOutsideScreen();
		} else {
			mouse.move((int)(100 + (Math.random() * 660)), (int)(100 + (Math.random() * 400)));
		}
		
		return waitTime(1000, 240000); //1 sec to 4 mins.
	}

}

 

Edited by apa
Posted
1 hour ago, Malcolm_OS said:

I don't think this would avoid the 5 minute AFK timer because you're not actually interacting with anything in the game. 

I use it in one of my scripts and it doesn't logout. You only need to move your mouse over the client to stay logged in. 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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