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.

java.security.AccessControlException: access denied ("java.awt.AWTPermission" "createRobot")

Featured Replies

  • Author

Here is the code I have so far:

 

    public void click(int x, int y, int xT, int yT, boolean button) {
        x = mX = dev(x, xT);
        y = mY = dev(y, yT);

        int b0 = button ? MouseEvent.BUTTON1 : MouseEvent.BUTTON2;
        long t0 = System.currentTimeMillis(), t1 = t0;
        t0 -= dev(1, 80F);

        Component c = bot.getCanvas();

        MouseEvent evt = new MouseEvent(c, MouseEvent.MOUSE_MOVED, t0, 0, x, y, 1, false, b0);
        bot.getMouseEventHandler().mouseMoved(evt);
        evt = new MouseEvent(c, MouseEvent.MOUSE_PRESSED, t0, 0, x, y, 1, false, b0);
        bot.getMouseEventHandler().mousePressed(evt);
        evt = new MouseEvent(c, MouseEvent.MOUSE_RELEASED, t1, 0, x, y, 1, false, b0);
        bot.getMouseEventHandler().mouseReleased(evt);
        evt = new MouseEvent(c, MouseEvent.MOUSE_CLICKED, t1, 0, x, y, 1, false, b0);
        bot.getMouseEventHandler().mouseClicked(evt);
    }

I am painting mX and mY and it's definitely on the game screen yet it is not registering as a click, not walking or even showing hover options when the mouse event is fired over an object. Any ideas?

EDIT: The code DOES work but only when human input is ENABLED in the gui. Upon disabling human input, the code no longer clicks. How can I bypass this?

Edited by colby__

Here is the code I have so far:

 

    public void click(int x, int y, int xT, int yT, boolean button) {
        x = mX = dev(x, xT);
        y = mY = dev(y, yT);

        int b0 = button ? MouseEvent.BUTTON1 : MouseEvent.BUTTON2;
        long t0 = System.currentTimeMillis(), t1 = t0;
        t0 -= dev(1, 80F);

        Component c = bot.getCanvas();

        MouseEvent evt = new MouseEvent(c, MouseEvent.MOUSE_MOVED, t0, 0, x, y, 1, false, b0);
        bot.getMouseEventHandler().mouseMoved(evt);
        evt = new MouseEvent(c, MouseEvent.MOUSE_PRESSED, t0, 0, x, y, 1, false, b0);
        bot.getMouseEventHandler().mousePressed(evt);
        evt = new MouseEvent(c, MouseEvent.MOUSE_RELEASED, t1, 0, x, y, 1, false, b0);
        bot.getMouseEventHandler().mouseReleased(evt);
        evt = new MouseEvent(c, MouseEvent.MOUSE_CLICKED, t1, 0, x, y, 1, false, b0);
        bot.getMouseEventHandler().mouseClicked(evt);
    }

I am painting mX and mY and it's definitely on the game screen yet it is not registering as a click, not walking or even showing hover options when the mouse event is fired over an object. Any ideas?

EDIT: The code DOES work but only when human input is ENABLED in the gui. Upon disabling human input, the code no longer clicks. How can I bypass this?

 

Incase any1 else wonder;

It can be 'fixed' by setting botInput to true

 

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.