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.

Local scripts not showing up

Featured Replies

Hey there, started to play around with scripting, although I can't find where to test my script, nothing is shown within the client, i'm assuming something is not right with my script manifest?, my code;

import org.osbot.rs07.api.model.NPC;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;

@ScriptManifest(name = "Cow Killer", author = "programer", version = 1.0, info = "", logo = "")
public class CowKiller extends Script{

    private String message;

    @Override
    public void onStart() throws InterruptedException {
        for(NPC n : npcs.getAll()){
            if(n != null)
                message = n.getName() + ", " + n.getId();
                System.out.println(message);
        }
    }

    @Override
    public int onLoop() throws InterruptedException {
        return 0;
    }
}


import org.osbot.rs07.script.Script;

import org.osbot.rs07.script.ScriptManifest;

import java.awt.*;

@ScriptManifest(name = "Cow Killer", author = "programer", version = 1.0, info = "", logo = "")

public class CowKiller extends Script {

private String message;

@Override

public void onStart() {

//Code here will execute before the loop is started

}

@Override

public void onExit() {

//Code here will execute after the script ends

}

@Override

public int onLoop() {

for(NPC n : npcs.getAll())

{

if(n != null)

message = n.getName() + ", " + n.getId();

System.out.println(message);

}

return 100; //The amount of time in milliseconds before the loop starts over

}

@Override

public void onPaint(Graphics2D g) {

//This is where you will put your code for paint(s)

}

}

Edited by twin 763

  • Author

That's not my issue, also the information im gathering really only needs to sit within the onStart method as it is only needed to run once, for data collection, not repetitively 

Okay so I am not too familiar with eclipse or OSbot so my answer may sound very stupid or may be hard to follow... however i encountered the same problem, but messed with setting inside eclipse and then it suddenly loaded my local scripts after exporting my script for the 20th time hahahah. So my advice may be completely garbage to you, but this is what i did.

 

I freshly installed eclipse, made my basic script (used multiple templates and none would load in my local scripts in OSbot directory after exporting)

I began getting very frustrated and figured something had to be messed up with how it was compiling, so I clicked on my PROJECT folder(NOT the main.java file or whatever name you chose) then went to the FILE tab on the top left, then clicked PROPERTIES, and then a window will pop up.

 

From there i clicked on Java Compiler and unchecked the 2nd box from the top so that it would allow me to manually change the settings to 1.7 for the first 2 boxes, then decided to apply those settings.

 

Finally I clicked the box that makes it so i cant change those settings (2nd box from top) then hit apply again.

 

Whenever i hit apply the first time it had to change my project around and ever since i did that i could export fine and it would read my scripts. I think this had something to do with eclipse, i had set setting to 1.7 when i created my project however it didn't set it up that way i guess and when i applied the settings after messing with compiler it worked.

 

I know my directions are confusing and seem pointless because technically all i did was change the settings a bit then change them back, but it worked for me and i hope it helps you hahahahaha, otherwise i am just going to sound way stupider than i already do mellow.png

 


BTW i compiled your script as well and it loaded in my directory so your script itself is fine. it has to be your compiling options or you're not exporting it to the OSbot/scripts folder

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.