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.

[VIDEO] Tutorial to create your first script! |Introduction to task based scripts|

Featured Replies

This guide is basically for you who never created a script before, I want to show you that its possible to create a simple script without almost no Java knowledge at all. Basically I just want to introduce more people into scripting.

 

First video:

 

 

 

Alright so my name is William and I've been playing around with Java and OSBots api for some months now. I feel that teaching is one of the best ways of learning so thats why I am creating this guide. I will try to upload atleast 1-2 clips per day and as soon as I am done with the "Create your first script" Series I will create a new series where Ill teach you how to "improve" your script, add a GUI, add some cool paint and much more.

 

As I am fairly new to scripting, you ( who are experienced) probably have better solutions than I do, please share them with us! I would be great if you could leave a comment (in the youtube video) with some suggestion. Dont just comment ("you suck"), tell me what I can do better!

 

 

 

Thank you for reading this and I really hope you will learn something!

 

Please watch the video on youtube so you can also leave a comment or just drop a like if you feel that you learned something!

Edited by Sumo

"with no java knowledge at all" so basically you are encouraging skidding, right? doge.png

Plus, fairly bad code design you are showing for the plebs sad.png

 

You could have done:

public abstract class Task{
    protected Script script;
    public Task(Script script){
        this.script = script;
    }
 
    public abstract boolean active();
    public abstract void execute();
 
    public void run(){
        if (active())
            execute();
    }
} 

and just in the main class did:

public int onLoop(){
tasks.forEach(task -> task.run());
return 100;
}

Edited by Vilius

  • Author

 

"with no java knowledge at all" so basically you are encouraging skidding, right? doge.png

Plus, fairly bad code design you are showing for the plebs sad.png

 

You could have done:

public abstract class Task{
    protected Main script;
    public Task(Main script){
        this.script = script;
    }
 
    public abstract boolean active();
    public abstract void execute();
 
    public void run(){
        if (active())
            execute();
    }
} 

and just in the main class did:

public int onLoop(){
tasks.forEach(task -> task.run());
return 100;
}

 

Brilliant! Thats the type of feedback im looking for, thank you very much!

Thank you! Appreciate it.

 

Subbed.

Edited by Animos

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.