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.

Trying to use Paint but the guides scuffed and Ima noob

Featured Replies

Trying to make my first script

  • Looked at lots of post from 2014-2017 on the forum
  • Has basic understanding of java
  • Stolen some scripts to try reverse engineer then gave up because its not THA WAE:gnome:
  • Checked API but couldnt find anything because its my first time working with an api
  • Followed @Explv Paint guide which is seemed to be the most credible but the code won't run

 

Can someone please tell me why i get the error
Error:(23, 9) java: 'catch' without 'try'

 

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


@ScriptManifest(
    author = "Elixar",
    name = "F2p King",
    info = "Eats ass",
    version = 1.0,
    logo = "https://i.imgur.com/a4BQ0h2.png")



public class F2pKing2 extends Script {
    BufferedImage background;
    @Override
    public void onStart() {
        {
            background = ImageIO.read(F2pKing2.class.getResourceAsStream("/resources/background.png"));
        }
        catch(IOException e){
            log(e);
        }
    }
    @Override
    public int onLoop(){
                if (getInventory().contains("Fly fishing rod", "Feather")) {
                    NPC spot = getNpcs().closest("Lure");
                }
        return 1000;
    }
    @Override
    public void onExit(){
        this.log ("Shutting Down F2p King");
    }
    @Override
    public void onPaint(Graphics2D g) {
        if(background != null){

            g.drawImage(background, null, x, y);
        }

    }
}

I assume theirs a problem with the 'Catch" method or whatever it is,

Is their a library I'm missing that contains this code?

Do i need some kind of java Import?

Is catch Deprecated?!

  • Author

Omfg I forgot the Try
delet this. :(

ima kill myself
:boge::boge::boge::boge::boge::boge::boge::boge::boge::boge::boge::boge::boge::boge::boge::boge::boge::boge:


Sorry everyone.

AND I DIDNT EVEN IMPORT

  • import javax.imageio.ImageIO;
    import java.io.IOException;
    import java.awt.image.BufferedImage;

Learn from my pain children of the future:gnome::gnome::sanic::feels::kappa:

Edited by Elixar

  • Alek locked this topic
Guest
This topic is now closed to further replies.

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.