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.

Writing my first script - logs don't appear in the console

Featured Replies

I just started writing my first script and followed @Token's tutorial part 1 (see below)

This is my script so far, just logs for now to test if it works.


import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;

@ScriptManifest(author = "Me", info = "Test", logo = "", name = "Example Script", version = 1)
public class ExampleScript extends Script {

    @Override
    public void onStart() {
        log("Starting the script.");
    }

    @Override
    public int onLoop() throws InterruptedException {
        log("loop");
        return random(200, 300);
    }

    @Override
    public void onExit() {
        log("Exiting the script.");
    }
}

I can build the jar and run it in osbot. But nothing is being printed in the console. Does anyone have an idea what could be the issue?

  • Author
1 hour ago, Token said:

Open the client logger, bottom right corner

Thanks but I already had it open. It's showing some logs but none of my script. 

Gif 76e2a4201fcbd113acd903e130be6f9a.gif

7 minutes ago, Carrera said:

Thanks but I already had it open. It's showing some logs but none of my script. 

Gif 76e2a4201fcbd113acd903e130be6f9a.gif

So from what I saw earlier is that you every time you build the .jar file, you most refresh scripts to update the script.

Edited by Articuz

  • Author
25 minutes ago, Articuz said:

So from what I saw earlier is that you every time you build the .jar file, you most refresh scripts to update the script.

Refreshing the scripts fixed it, thank you!

1 hour ago, Carrera said:

Refreshing the scripts fixed it, thank you!

Glad it worked man, good luck on your journey with writing scripts and don't quit if it get hard. Trial and error can be pain so don't forget to take breaks so you don't burn out and end up losing motivation!
 

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.