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.

Bots start breaking when run in low cpu mode

Featured Replies

I would really rather not post the code as this is the method i'm currently running but the script i made breaks working I put it into low cpu mode. It isnt something that needs a high frame rate to run but it really just will continuously hop worlds when on low cpu (its a shop buyer) it tries to open the shop but then it just hops worlds. are there any known issues with low cpu mode with known or unknown fixes?

Edit:here is the code of the buy method i made

NPC buyGuy = npcs.closest(here is the npc);
        if(buyGuy != null && buyGuy.exists()) {
            buyGuy.interact("Trade");
            Sleep.sleepUntil(() -> store.isOpen(), 20000); //after rerererereading the code i have a feeling it is something to do with me do store.isOpen() here any ideas on what it should be
            try {
                sleep(random(100, 590));
                
                
                
                    sleep(random(132, 459));
                    getStore().buy("item", 10);
                    sleep(random(9, 898));
                    getStore().close();
                    Sleep.sleepUntil(() -> getStore().close(), 4000);
                    sleep(random(1000,2345));
                    if(!inventory.isFull())
                        getWorlds().hop(nextWorldInOrder(true));
            
                    sleep(random(100, 1523));

Edited by Zor

  • Author
Just now, Gunman said:

1 interaction per onloop. It will still break a bit but it should be more stable

I'm really hoping this isn't a complete noob but what do you mean by onloop

13 minutes ago, Zor said:

I'm really hoping this isn't a complete noob but what do you mean by onloop

Oops sorry. 1 interaction per iteration of the onloop.

EDIT: Also increasing sleep times would probably help.

Edited by Gunman

  • Author
27 minutes ago, Gunman said:

Oops sorry. 1 interaction per iteration of the onloop.

EDIT: Also increasing sleep times would probably help.

as in change this method so that it only handles opening the shop and then another method to buy and another to close?

  • Author
37 minutes ago, Gunman said:

Yes, this should help.

similar to this? 

    public int onLoop() throws InterruptedException {
        if(!genArea.contains(myPlayer())) { 
            state = "Walking there";
            walkThere();
        }else if(inventory.isFull()) {
            state = "Banking";
            bank();
        }else if(inventory.isEmptyExcept(995) && !buy.contains(myPosition())) {
            state ="Running to shop";
            runToShop();
        }else if(buy.contains(myPosition()) && !inventory.isFull() && !getStore().isOpen()) {
            state = "Trading";
            trade();
        }else if(buy.contains(myPosition()) && !inventory.isFull() && getStore().isOpen() && getStore().contains("item name")) {
            state= "Buying";
            buy();
            bought = true;
        }else if(buy.contains(myPosition()) && store.isOpen() && getStore().isOpen() && bought && !hop) {
            state = "Closing Store";
            closeStore();
            hop = true;
        }else if(hop && bought) {
            hopWorlds();
            hop = false;
            bought = false;
        }
edit:doing getStore().contains("item name") broke it is there an instock method

edit2:fixed previous edit and for anyone looking the method is getAmount("item name")

Edited by Zor

  • Author
15 minutes ago, Gunman said:

Gonna say yes didn't fully read it though. And try using widgets for the store thing. 

will do 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.