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.

I'm stupid - Script wont start

Featured Replies

I'm trying to follow Chris' tutorials on Youtube to hopefully get started so I can make some scripts, however for some reason when I try and run the script it doesn't do anything and I also can't click on anything in Runescape

https://streamable.com/j65s5

 

Here is what I have in IntelliJ:

// CTRL + O to implement methods

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

import java.awt.*;

public class ChocolateCrusher {
    @ScriptManifest(author = "Eldrism", name = "Chocolate Crusher", info = "Crush Chocolate Bars into Chocolate Dust.", version = 0.1, logo = "https://i.imgur.com/WPGHQcY.png")



    public final class Main extends Script {

        @Override
        public final void onStart() {
            log("This will be printed to the logger when the script starts");
            // Anything written in here will only run once.
        }


        @Override
        public final int onLoop() throws InterruptedException {
            //Anything in here will keep on looping (every 600 - 1200 milliseconds).


            NPC npc = getNpcs().closest("Goblin");

            if (npc.isVisible()) {
                //if it is true then it will run the code here
                log("Goblin exists!");
            }
            return (600);

        }


        @Override
        public final void onExit() {
            //Anything written in here will only run once (when the script is stopped).
            log("This will be printed to the logger when the script exits");
        }

        @Override
        public void onPaint(final Graphics2D g) {
            g.drawString("Chocolate Crusher",12,130);
        }



    }
}

 

  • Author
35 minutes ago, Eagle Scripts said:

Why do you have a class in a class? Try moving it out of the ChocolateCrusher class.

I think I must be blind, I can't believe I didn't see that. I'm 10/10 stupid for that, thanks dude.

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.