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.

World Hop Not Working?

Featured Replies

I have created a small test script to see how world hop function works. I have created the below script however when it is logged into world 308 and needs to swap to 316 it just picks random worlds, i.e. 504. Any advice?

 

@Override
public int onLoop() throws InterruptedException {

    if (worlds.getCurrentWorld() == 308){ //F2p world
        // complete action
        // after action is complete then world hop to the next world in the line
        worlds.hop(316); //F2p world
    } else {
        if (worlds.getCurrentWorld() == 316) { //F2p world
            // complete action 
            // after action is complete then world hop to the next world in the line
            worlds.hop(326); //F2p world

        }
    }




    return 0;
}
  • Author
Just now, FuryShark said:

Have you clicked refresh before selected your script?

that did it.. I though I had.. thank you!

World hop method works fine. 

Some issues with your code. 
No sleep condition. Your return value is 0. You are running hundreds of loops a second... A script should run like 1 loop a second. 
If you had a condition sleep, you would only run 1 loop for like 3-4 seconds

Given that apparently refreshing the scripts fixed your problem I'd still like to add a suggestion, you aren't sleeping or checking on the worlds.hop() method in any way. Although what you did can and does for the most part work fine assuming no lag it still can be problematic and be something you need to check on. 

Edited by luciuspragg

  • Author

Thank you, sorry I had not got around to adding the sleep and the return values. I was looking more at the use of the world hop function itself.

 

I have now added both into the script so it isnt running so many :) thank you!

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.