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.

My Scripting Journey

Featured Replies

  • Author

Will be updating this upcoming Sunday evening. Sorry for no updates yet!

  • Author

UPDATE END OF WEEK #1

I have been trying to use all my spare hours between class, work & fiance too get in as much information I can from all my resources to learn Java. I have been using multiple things to teach me Java as quick and efficiently as possible.

What I have been using:

  1. Code Academy - I have been looking over many threads and many scriptwriters recommended Code Academy, so I went ahead and started doing that and I am currently 50% done (Object Oriented Java) and will be resuming it starting Monday as I need a break from my week.
  2. SoloLearn - I downloaded this app on my phone and its almost exactly the same as Code Academy but phone friendly and it seems more informative then Code Academy. I have been learning lots but there is way more on this app too learn and it goes much slower. I am currently at 4/8 on the Basic Concepts and there's 6 more categories with 8 sections in each so I have a long way too go in this app.
  3. OSBOT Guide #1 - I have been reading over @Apaec "A Beginners Guide to Writing OSBOT Scripts" and it has helped me a lot, I have yet to make a script a full script that works but I am very close too, just want to be able to program the bot to bank within @Apaec script example.
  4. OSBOT Guide #2 - I have also been reading over @Explv "Explv's Scripting 101" which seems a bit more advanced and more information so I suggest you read @Apaec guide first before moving to this but it has helped me a lot as well and takes you to the next stage in a way about learning the API for OSBOT.
  5. OSBOT Open Source Script - I have been mainly looking at @kadiem "F2PChopper" but I am just trying to make it chop the tree rather then bank or anything more the just swinging an axe and dropping.

I have been trying to code a script that just takes the Jug inside of lumbridge castle, in the kitchen off the table and drops it and repeats. I have been having a slow start trying to figure this out and feel horrible because I feel like I should be able to somewhat do this but I am determined to get this obstacle out of my way and start up on the tree cutter.

Here is my code:

Spoiler

import org.osbot.rs07.api.model.Entity;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;
import org.osbot.rs07.api.model.RS2Object; 
 
import java.awt.*;


 
@ScriptManifest(author = "Toxic", info = "My first script", name = "Lumbridge Jug Stealer", version = 0, logo = "")
public class Main extends Script {
 
    @Override
    public void onStart() {
        log("Welcome to Toxic's Jug Stealer.");
        log("This is my first sript ever, hope you enjoy!");
    }
    
    private enum State {
        STEAL, DROP, WAIT
    };
    
    private State getState() {
        RS2Object table = getObjects().closest("Jug");
        if (!inventory.isEmpty())
            return State.DROP;
    if (table != null)
            return State.STEAL;
        return State.WAIT;
    }
 
    @Override
    public int onLoop() throws InterruptedException {
        switch (getState()) {
        case STEAL:
            RS2Object table = getObjects().closest("Jug");
            
            if (table != null) {
                    table.interact("Take");
            }
            break;
        case DROP:
                inventory.dropAll();
                break;
        case WAIT:
                sleep(random(500, 700));
                break;
        }
        return random(200, 300);
    }
 
    @Override
    public void onExit() {
        log("Thanks for running my Jug Stealer!");
    }
 
    @Override
    public void onPaint(Graphics2D g) {
        g.drawString("Hello Jugs!", 50, 50);
    }
 
}

This has been a bit of a slow start and I am kind of disappointed in myself and how hard I am struggling but I do not plan on giving up and will keep going head strong into this. If anyone has any advice...it would help me so much! Thanks for reading and see you all next weekend :D 

 

P.S. I will check this topic everday for any advice or replies!

Wherever you're learning from, you should have an IDE open so that you can actively try out everything you've learned. Watching videos or reading a book solely isn't really sufficient.  

Be care with open source since there's a chance that it might be poorly written. 

Don't get caught up in the Osbot API. Learn how Java works then try out your skills on scripts. 

  • Author
51 minutes ago, dreameo said:

Wherever you're learning from, you should have an IDE open so that you can actively try out everything you've learned. Watching videos or reading a book solely isn't really sufficient.  

Be care with open source since there's a chance that it might be poorly written. 

Don't get caught up in the Osbot API. Learn how Java works then try out your skills on scripts. 

Got it!

- Have IDE open and try out everything while I am in these lessons

@dreameo Do you have any suggestions on a decent-good open source I can refer too?

Got it, Yea I was looking at the Osbot API and it looks like a lot hahaha

 

Thanks!!!

41 minutes ago, Toxic said:

Do you have any suggestions on a decent-good open source I can refer too?

Not really. I haven't looked at any around. Try to code without them. Once you see an example, they do tend to overshadow creativity. 

  • Author
5 minutes ago, dreameo said:

Not really. I haven't looked at any around. Try to code without them. Once you see an example, they do tend to overshadow creativity. 

Got it, Thanks!

Good luck friend! If you need any help with anything, don't hesitate to ask me / drop me a PM

... I really need to get around to finishing the re-write for the guide, I'm trying to make it as beginner friendly as possible but there's just so much to cover!

Apa

  • Author
4 hours ago, Apaec said:

Good luck friend! If you need any help with anything, don't hesitate to ask me / drop me a PM

... I really need to get around to finishing the re-write for the guide, I'm trying to make it as beginner friendly as possible but there's just so much to cover!

Apa

Thank you for your guide, it has helped me a lot and I have figured out a lot of different things just reading your guide. It's perfect and short :D

 

I will thank you!

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.