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.

Custom mouse movement

Featured Replies

Hallo i would like to try to make my own custom mouse movement in osbot

Anyone has tips or other stuff that helps me with making this? 

Create an algorithm for a line, use that algorithm to determine all the x,y points between the start and finish. Create AWT MouseEvents for every point on the line and use getBot().sendAppletEvent(); to send them to the client.

On 7/15/2018 at 10:37 PM, IDontEB said:

Create an algorithm for a line, use that algorithm to determine all the x,y points between the start and finish. Create AWT MouseEvents for every point on the line and use getBot().sendAppletEvent(); to send them to the client.

Yo, I tried to make a basic proof of concept:

int x = 12;

@Override
public int onLoop() {
    log("loop");

    x++;
    int y = 172;

    getBot().sendAppletEvent(new MouseEvent(getBot().getCanvas(),
            MouseEvent.MOUSE_MOVED,
            System.currentTimeMillis(),
            MouseEvent.NOBUTTON,
            x, y,
            0,
            false));

    return 500;

But when I run this, nothing happens. Im debugging mouse position and mouse trail, but it stays at -1, -1. Logging just keeps saying "loop" without exceptions.

What am I doing wrong?

 

Edit:

This did work:

getBot().getMouseEventHandler().generateBotMouseEvent(MouseEvent.MOUSE_MOVED, System.currentTimeMillis(),
        0, x, y, 0, false, MouseEvent.NOBUTTON, true);

Might be inefficient for entire paths though, not sure if this is the right way to do it.

Edited by ChrisJ

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.