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
  • Random events


    Skarp1214

    Recommended Posts

    I am very new to scripting.

    I have made some "antiban" commands, I am just having trouble finding a way to have them trigger randomly, without effecting the script. Anythings helps, thanks. 

    Link to comment
    Share on other sites

    for some of my more basic scripts I just randomly trigger them every 30 or so seconds +/-5 it will have a 5% chance to trigger antiban and if it does hit that 5% it will then randomly select from a few different antiban methods.  Its all some tinfoil hat shit on my end but seemed to work for some of my more basic farming scripts.

    Link to comment
    Share on other sites

    You can place your anti-ban methods inside the block of code that's safe to execute in.

    For example, if you want to rotate your camera or move your mouse off the screen in a woodcutting script, best time to do this would be when your localplayer is animating, that is cutting down trees already.

     

    Side note: I don't personally believe moving the camera randomly or mouse helps with lowering bans.

     

    This guide may help you:

     

    Link to comment
    Share on other sites

    • 1 month later...

    I know this is a few months old, but I wanted to give example;

    I use Timers, first set the Timer to random time (usually in milliseconds) then somewhere in your loop check if the Timer is Finished, if so, do your stuff and reset the timer (to a different random time)

    //includes
    //...
    import org.dreambot.api.utilities.Timer;
    import org.dreambot.api.methods.Calculations;
    //...
    
    //Probably onStart
    //...
    plzDontBan = new Timer();	//init Timer
    plzDontBan.setRunTime(Calculations.random(35000,69000));	//Set it for random x - y seconds (35 - 69 in this case)
    //...
    
    //onLoop or any loop that's going to happen in your script
    //...
    if (plzDontBan.finished()) {	//The Timer has a "finished" method to check if time set has passed
    	doSuperDopeAntiBan();	//do your stuff here
    	plzDontBan.setRunTime(Calculations.random(25000,69000));	//reset the timer so you don't get inf loop 
    																//(because timer will always be finished, until reset)
    }
    //...

    -sorry if the spacing got a little weird...

    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.