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.

Nothing happening?

Featured Replies

So i wrote a simple guild ranger script. No errors when compiling, shows up on script loader. But when I start it nothing happens.

 

 

Source:

 import org.osbot.rs07.api.map.Position;
import org.osbot.rs07.api.model.NPC;
import org.osbot.rs07.api.model.RS2Object;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;
 
import org.osbot.rs07.utility.Area;
 
 
import java.awt.*;
 
        @ScriptManifest(author = "system64", info = "range guild", name = "range Guild", version = 0, logo = "")
        public class range extends Script {
 
 
        private enum State {
                SHOOT_TARGET
        };
 
        private State getState() {
                if(!myPlayer().isAnimating())
 SHOOT_TARGET
                        return State.SHOOT_TARGET;
 
         return State.SHOOT_TARGET;
   }
   
public int onLoop() throws InterruptedException {
     switch(getState()) {
     
     case SHOOT_TARGET:
         interactWithJudge();
         playMinigame();
     break;
   
     }
     return random(200, 300);
}
 
 
private void playMinigame() throws InterruptedException {
          RS2Object target = getObjects().closest("Target");
                if(target != null) {
                        for(int x = 1; x >= 10; x ++) {
                                if(target.interact("fire at target")) {
                                        sleep(100);
                                }
                        }
                }
        }
 
 
private void interactWithJudge() throws InterruptedException {
    NPC judge = getNpcs().closest("Competetion Judge");
    if(judge != null){
        judge.interact("Talk-to");
        sleep(500);
    }
 
    if(getInterfaces().getChild(548, 116).isVisible()) {
        sleep(random(600, 1000));
        dialogues.clickContinue();
        sleep(random(600, 1000));
        dialogues.selectOption("Sure I'll give it a go");
        sleep(random(600, 1000));
    }
}
 
}

Edited by system64

Not sure what is wrong, but have you checked any of these?

 

Judge is null?

Wrong interface?

Interface is not visible?

 

Since you said nothing is happening, my best guess is the Judge is null.

Edited by BotRS123

  • Author

Not sure what is wrong, but have you checked any of these?

 

Judge is null?

Wrong interface?

Interface is not visible?

 

Since you said nothing is happening, my best guess is the Judge is null.

 

I start the script infront of the judge

I start the script infront of the judge

I found the issue lol

 

The judge is null. Just look at the code closely and see if you can figure out why it is null. I don't want to give you the answer immediately, but if you really can't figure it out, tell me.

  • Author

I found the issue lol

 

The judge is null. Just look at the code closely and see if you can figure out why it is null. I don't want to give you the answer immediately, but if you really can't figure it out, tell me.

haha i have no idea been trying to figure it out for a while now. 

haha i have no idea been trying to figure it out for a while now. 

Here is another hint.

 

Look at this line and look in game at the NPC.

NPC judge = getNpcs().closest("Competetion Judge");
  • Author

 

Here is another hint.

 

Look at this line and look in game at the NPC.

NPC judge = getNpcs().closest("Competetion Judge");

 

WOOOO it works!! thanks man smile.png

 

 

Edited by system64

  • Author

Alright, it successfully has the conversation with the competition judge.


 


But doesn't seem to attack the target. 


Guest
This topic is now closed to further replies.

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.