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.

Talking with NPCs

Featured Replies

I'm trying to make a simple blast furnace script for myself and friends to use, i.e. no paint & bare bones code. When it talks to the foreman, I just hard-coded a simple 3-second sleep after every command. Is there a method in the API that can tell when the next dialogue has not yet appeared and it's still waiting for the next one? My current code is like so:

dialogues.clickContinue();
sleep(3000);
dialogues.selectOption("What?");
sleep(3000);
dialogues.clickContinue();
sleep(3000);
dialogues.clickContinue();
sleep(3000);
dialogues.selectOption("Can I use the furnace to smelt ore?");
sleep(3000);

I would prefer it to be like this:

dialogues.clickContinue();
while(/*is waiting for the next prompt*/){
   sleep(250);
}
dialogues.selectOption("What?");
while(/*is waiting for the next prompt*/){
   sleep(250);
}
dialogues.clickContinue();
while(/*is waiting for the next prompt*/){
   sleep(250);
}
dialogues.clickContinue();
while(/*is waiting for the next prompt*/){
   sleep(250);
}
dialogues.selectOption("Can I use the furnace to smelt ore?");
while(/*is waiting for the next prompt*/){
   sleep(250);
}

Thanks, BTheBrave

Edited by bthebrave

I wouldn't do this. This will be really buggy and hardly work. Use if-else method and get the ids for every widget; by that you can check if a widget is null or not.

 

For instance:

if(widget1 != null) {
    do action
      for(int i = 0; i < 100 && widget1 != null; i++) {
             sleep(random(4, 8));   // will sleep random 400-800 ms since 4*100=400 and 8*100=800, or till widget1 == null
      }
} else {
    talk to foreman and wait for widget1 using dynamic sleep like a for-loop
}

and so on

Edited by Woody

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.