Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Dynamic Sleeping

Featured Replies

Hello everyone,

 

I am currently not planning on writing any scripts for OSBOT at this current moment in time but I may consider scripting in the upcoming months.

 

One thing I have realised in almost every script I have tested is that there is almost no bot that uses dynamic sleeping.

Runescape detects patterns in bots and bans the accounts associated if they detect a pattern.

 

Now I am no runescape botting veteran but if I'm correct a static sleep time will enable Jagex to detect a pattern so I thought I would quickly just include a small snippet for dynamic sleeps for all the devs out there.

 

*By sleep times I am referring to the wait time between different interactions.

private void randomSleep()
{
    int i;
    i = Random.nextInt(450,3000);
    try {
       ConditionalSleep(i);
    } catch (InterruptedException e) {
        e.printStackTrace();
    }
}

Thank you everyone for such a nice welcome and I should be seeing everyone else around the forums a lot more.

James

 

**Special thanks to www.krimsky.net for improving the function.

Edited by Jamesmallon1

 

:') i'm sure most people just do this

sleep(random(450,3000));

Edited by Isolate

  • Author

Please enlighten me, I know simply nothing about this API, however I have worked in partnership with firms such as google and amazon developing software. So I can tell you that I am well versed in Java, JavaScript, C++ and C sharp

 

Please try not to patronise and deter new developers and users from posting or using the software.

 

** I was simply trying to draw developers attention to the fact that there are too many static sleeps.

 

James

Edited by Jamesmallon1

Please enlighten me, I know simply nothing about this API, however I have worked in partnership with firms such as google and amazon developing software. So I can tell you that I am well versed in Java, JavaScript, C++ and C sharp

 

Please try not to patronise and deter new developers and users from posting or using the software.

 

James

 

Don't show up somewhere you don't know acting like you know how it works.

for (int i = 0; i < 40 && myPlayer().isMoving(); i++)
    sleep(100);

That will check every 100ms that the player is moving, and if either 40 loops (~4 seconds) or the player stops moving it will stop.

Edited by dudeami

Don't show up somewhere you don't know acting like you know how it works.

for (int i = 0; i < 40 && myPlayer().isMoving(); i++)
    sleep(100);

That will check every 100ms that the player is moving, and if either 40 loops (~4 seconds) or the player stops moving it will stop.

give him a break geez

give him a break geez

 

Well he acted like I gave a damn where he worked before, maybe he should ask for help instead of just posting misleading code that could actually harm new developers.

 

This is a dynamic (aka conditional) sleep: http://osbot.org/api/org/osbot/rs07/utility/ConditionalSleep.html

 

 

That is also another valid way ^^ I like my for loops though :p

Edited by dudeami

That's not really dynamic because it still creates a pattern. Furthermore I would be safe to say that a majority of bans stem from either client detection (which we are working on), average bot play time vs average human play time, account age, and activities that you are botting. 

 

In regards to what sleeps you should be using here at OSBot (or botting in general), it should be conditional. What happens if you get a lag spike and your sleep time of 1kms isn't enough before the next action? Either it will fail the next action or loop through your logic again. 

 

Take a look here: http://osbot.org/api/org/osbot/rs07/utility/ConditionalSleep.html

That's not really dynamic because it still creates a pattern. Furthermore I would be safe to say that a majority of bans stem from either client detection (which we are working on), average bot play time vs average human play time, account age, and activities that you are botting. 

 

In regards to what sleeps you should be using here at OSBot (or botting in general), it should be conditional. What happens if you get a lag spike and your sleep time of 1kms isn't enough before the next action? Either it will fail the next action or loop through your logic again. 

 

Take a look here: http://osbot.org/api/org/osbot/rs07/utility/ConditionalSleep.html

Would be great if things like this were put in api checks though....

 

  • Author

Never at any point did I pretend I knew anything about "how it works". 

 

 

 

Now I am no runescape botting veteran but if I'm correct a static sleep time will enable Jagex to detect a pattern so I thought I would quickly just include a small snippet for dynamic sleeps for all the devs out there.

 

I simply don't understand when all I am trying to do is improve peoples scripts that I get slated. Programming is no competition it is the combination of many skill sets that creates great code. I still stand by my sleep function as anyone is able to implement the raw function or its concept.

 

I only want to help, and by no means I do not believe the knowledge I have from a computer science degree and 8 years in the industry is going to hinder people. Please do not treat this as a competition,


That's not really dynamic because it still creates a pattern. Furthermore I would be safe to say that a majority of bans stem from either client detection (which we are working on), average bot play time vs average human play time, account age, and activities that you are botting. 

 

In regards to what sleeps you should be using here at OSBot (or botting in general), it should be conditional. What happens if you get a lag spike and your sleep time of 1kms isn't enough before the next action? Either it will fail the next action or loop through your logic again. 

 

Take a look here: http://osbot.org/api/org/osbot/rs07/utility/ConditionalSleep.html

 

 

This user here is brilliant, He critiqued me and gave a brilliant explanation of why my sleep method wasn't up to scratch and helped me improve.

 

Thank you,

James 

 

 

By posting the code saying its a Dynamic Sleep (with really not knowing what it means in the context of botting), in the tutorial section, seems to me your stating this is how sleeps should be done (when its not). If you don't have experience in coding for bots, why are you posting tutorials? If your looking for critique, you should post in a proper forum.

 

Sorry, I'm not a nice person like Alek.

  • Author

hahah jeese alright mate.

 

All I'm saying is that function that I wrote will improve all of the static sleep functions that I am consistently seeing in many bots and snippets.

 

it might not be the optimum way but its a hell of an improvement from the majority of what I've seen

 

Some people just want to watch the world burn I guess.

Edited by Jamesmallon1

Burn Burn! biggrin.png

 

Conditional sleeps to stronk biggrin.png

If you would read the APi for 2 minutes you would have found there was a object called Contional sleep biggrin.png

Where you can pass a time + condition to sleep wink.png

 

+ I'm pretty sure almost every script here uses random sleep times...

 

 

Edit your first post to the perfect way, instead leaving it there in the wrong way ;)

misleads new scripters ^^

Edited by Khaleesi

  • Author

hahaah,

 

Okay mate I will in future, fuck it I'll have a good crack at writing my own script for something just so i don't look like a twat in future.

 

Ill go have a wee look in the in the requests section.

 

Cheers

 

** will do

 

Edited by Jamesmallon1

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.