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.

A Beginners Guide to Writing OSBot Scripts (where to get started!) by Apaec

Featured Replies

Did you export it like I showed, into the correct folder? Ensure its a Jar file, not a runnable jar file too. 

 

It needs to go in users/osbot/scripts, and ensure that there are no osbot1 local scripts in that folder as they cannot co-exist.

 

apaec

 

I did all of the such, ill paste my code into here, nd and I did make sure its not an executable as I heard that would cause problems.

I will also delete the contents of my script folder real quick, and retry the export and post the situtation that occurs with a picture.

 

package com.embah.PowerMiner;

import java.awt.Graphics2D;

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

@ScriptManifest(author = "Boyyo11", info = "Simple powerminer", name = "PowerMiner", version = 0, logo = "boobs")
public class PowerMiner extends Script{
    private static final int rock_id = 14864;
    private static final int ore_id = 438;
    
    @Override
    public void onStart() {
        log("Starting Embah Powermine, please enjoy.");
    }

    @Override
    public int onLoop() throws InterruptedException {
        if(!myPlayer().isAnimating()){
            if(inventory.isFull()){
                inventory.dropAll(ore_id);
            }
            Entity rocks = objects.closest(rock_id);
            if(rocks != null){
                rocks.interact("Mine");
                sleep(random(25, 30));
            }
        }
        return random(200, 300);
    }

    @Override
    public void onExit() {
        log("Thanks for using Embah Powermine, have a great day.");
    }

    @Override
    public void onPaint(Graphics2D g) {
            
    }
}

 

Umm very weird, seems now after I redeleted, and recompiled and exported that it seemed to work once I downloaded the newest client and ran it, maybe I was just having a problem while it was up, it didnt want to refresh. Thank you so much, im sure ill be back for more little api help, hopefully sooner in the script release part of the forums.

  • 2 weeks later...

Very simple guide that is helpful and easy for beginners to follow. Well done.

  • 1 month later...

edit: figured it out. Ugh new eclipse is so weird ):

Edited by tmanowen

  • Author

Due to a (bug?) with the forums to do with following posts timing , sometimes I don't get a notification if you reply here. If I do not respond, feel free to PM me or like the original post - both of which will give me notifications.

 

Happy scripting!

Due to a (bug?) with the forums to do with following posts timing , sometimes I don't get a notification if you reply here. If I do not respond, feel free to PM me or like the original post - both of which will give me notifications.

 

Happy scripting!

 

thanks apaec! Through your enhanced skele i was able to make a working(pretty awful) powercutting script and i appreciate the work you put in to making this thread. I have lots more questions but i'm going to do what i can through searches on the forum before i come crawling back to you guys for assistance! (:

  • 1 month later...

Thanks for the guide it was really useful, I did not realize all the programming is just telling the bot client how to interact with the game itself, but more manual click commands etc!

I might not need help by the time some one replies but I'm trying to learn myself a few things and so far this guide is awesome I understand like 80% I want to know what the different coloured text means. Like the yellow blue and green. 

Thanks.

I might not need help by the time some one replies but I'm trying to learn myself a few things and so far this guide is awesome I understand like 80% I want to know what the different coloured text means. Like the yellow blue and green. 

Thanks.

edit: assuming you mean the way that the forum displays pasted code

Edited by Isolate

Yea I noticed that after I posted. Why even take the time to point that out? how does that answer my question?

I was going to add something then realized i'd never even thought about why it colors it that way.

I did edit it from a question though, it would have mode more sense for me to leave original post

then edit in under it what i changed it to :D

Blue appears to be when it's anything callable.

Red/pink is the color of strings.

green appears to be initializing words.

and yellow seems to be @'s and numbers

  • 3 weeks later...
  • Author

Thank you dude.

Also if someone could explain this simply that would rule Y7WzV8h.png

 

Hi, sorry for the incredibly late reply lol, for some reason I got unfollowed from the thread so I didnt get a notification when you posted.

 

Anyway, that's importing. When you see those black symbols infront of the error when u hover over it, that just means you're trying to access something which isnt in your code unless you link it to your code, so you have to import it. For things which you got from the API (runescape things), its the osbot import (second one down).

 

Apaec

Hi, sorry for the incredibly late reply lol, for some reason I got unfollowed from the thread so I didnt get a notification when you posted.

 

Anyway, that's importing. When you see those black symbols infront of the error when u hover over it, that just means you're trying to access something which isnt in your code unless you link it to your code, so you have to import it. For things which you got from the API (runescape things), its the osbot import (second one down).

 

Apaec

Why eclipse over IntelliJ?

  • Author

Why eclipse over IntelliJ?

 

In general? no reason really.

I just prefer eclipse after having tried both, but they are both good at most things anyways

inside your tutorial its shown how to take an item but how do you keep the item you want and drop the items that is not needed?

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.