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.

Help with runtime scripts

Featured Replies

So I made scheme in java its a flavor of lips (Lost in Stupid Parentheses). The programing language looks terrible for someone that used to java but whatever.  The beauty of it is that you can make new run time programs. So I have a way to update programs over sockets ( they cost alot in ram) and don’t know anything about swing/awt. I would like to click a button on the botscreen that would update the code from a file or just automaticly after code goes into a file.

[example code makes glass orbs]

(define makepart
  (lambda ()
    (cond
      ((bankopen?)(closebank))
      ((Animation?)(wait))
      ((makeall?)(makeall 7))
      ((not (use? 1785) )(interact 1785))
      (else (interact 567)))))
            
(define bankpart
  (lambda ()
    (if(not (bankopen?))
       (bankopen)
       (and (getitem? 1785 1)(getitem 567 "all") )

(define loop
  (lambda ()
    (if (not (invhas? 567 ))
        (makepart)
        (bankpart))))

my java code (not alot of help)

import com.bacon.bot.scheme.Scheme;
import org.osbot.rs07.script.Script;
import com.bacon.bot.network.Client_sock;
import org.osbot.rs07.script.ScriptManifest;

import java.io.StringReader;

@ScriptManifest(author = "Bacon", name = "lisp" + ScemeBot.VERSION, info = "Runtime bots", version = 0, logo = "")

public class ScemeBot extends Script {
    static final String VERSION = " 0.0023";
    Scheme  x ;
    Client_sock xx = new Client_sock(8888);

    @Override
    public void onStart() throws InterruptedException {
        x =new Scheme(this);
        log( x.eval("(define test" +
                "    (lambda () \n" +
                "    (if (bankopen?)\n" +
                "           (bankclose)\n" +
                "           (bankopen)\n" +
                "            )))"));
        log(x.eval("(test)"));
        log("bot works");
        log(x.eval("(start)"));
    }


    @Override
    public int onLoop() throws InterruptedException {

        if(xx.hasUpdate()){

            x.eval(xx.update());
        }

      log(x.eval("(Loop)"));


       return 700;
    }




    @Override
    public void pause() {
        log(x.eval("(pause)"));
    }

    @Override
    public void resume() {
        log(x.eval("(resume)"));
    }

    @Override
    public void onExit() {
        log(x.eval("(exit)"));
    }

}

The automatic code reading would be the best so i dont have to fuck with GUI'S.

Thanks.

 

Edited by Nbacon
Error

  • Author

Amazing Quote.❤️

dreameo  I have used Event Handlers when making my muti-boxer. I thought you could just add a button to the bot screen (but thats not the case?). So the only way to add the button is to draw a rectangle and do some math that says clicked in side x,y and x',y'.  

I came up this that checks for updates evey 5 ish min and everytime you pause.

  @Override
    public void onStart() throws InterruptedException {
		...
        fileShit();
    }
    int counter= 0;
    @Override
    public int onLoop() throws InterruptedException {
        if (counter%450==0){
            fileShit();
        }
        counter++;
		log(x.eval("(loop)"));
        return 700;
    }
    private long size=0;
    private long amount=0;
    private void fileShit(){
        File folder = new File(getDirectoryData() + File.separator + "bacon_runtime");
        File[] files = folder.listFiles();
        long sizeHolder =0;
        long amountHolder =files.length;
        for (File file : files) {
            sizeHolder  +=file.length();
        }
        if (sizeHolder!=size || amount !=amountHolder){
            x.reset();
            size=sizeHolder;
            amount=amountHolder;
			BufferedReader br = null;
            for (File file : files) {
                try {
                    br = new BufferedReader(new FileReader(file));
                    String st;
                    while ((st = br.readLine()) != null) {
                        log(x.eval(st));
                    }
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }

    }


    @Override
    public void pause() {
        fileShit();
        log(x.eval("(pause)"));
    }

 

 

 

@Override
  public void onStart() throws InterruptedException {
  getBot().getMouseListeners().add(new BotMouseListener() {
    @Override
      public void checkMouseEvent(MouseEvent mouseEvent) {
      // on shift + left click
      if(mouseEvent.getModifiersEx() == 1088){

      }
    }
  });
}

 

Didn't find any documentation but this will do (for win 10 at least).

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.