Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Script to avoid logging out


    dzihaad

    Recommended Posts

    Hello.

    I was wondering if someone could write this easy script to avoid logging out.
    For example, every 4-4.5 minutes it would press random F button  (F1 - F12) to avoid 5 min. log out timer.

    If someone would have time to do this, i would be very thankful.

    Link to comment
    Share on other sites

    Timer timer = new Timer(0);
    int r = Random.nextInt(240000, 300000);
    
    if (timer.getElapsed() > r) {
    	Keyboard.typeSpecialKey(KeyEvent.VK_F1);
    	timer.reset();
    	}

     

    Something like that should do you.

    Link to comment
    Share on other sites

    On 4/7/2020 at 5:54 PM, Pseudo said:

     

    
    Timer timer = new Timer(0);
    int r = Random.nextInt(240000, 300000);
    
    if (timer.getElapsed() > r) {
    	Keyboard.typeSpecialKey(KeyEvent.VK_F1);
    	timer.reset();
    	}

     

     

    Something like that should do you.

    So, if i would use script template from another thread, where should I paste it?

     

    import org.dreambot.api.methods.Calculations;
    import org.dreambot.api.script.AbstractScript;
    import org.dreambot.api.script.ScriptManifest;
    import org.dreambot.api.script.Category;
    
    @ScriptManifest(author = "You", name = "My First Script", version = 1.0, description = "Simple Tea Thiever", category = Category.THIEVING)
    public class main extends AbstractScript {
    
    public void onStart() {
    
    }
    
    public void onExit() {
    
    }
    
    @Override
    public int onLoop() {
    
    return Calculations.random(500, 600);
    }
    }

     

    Link to comment
    Share on other sites

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.