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.

Mouse Control Questions

Featured Replies

This thread can be deleted. Starting with a different approach

Edited by Page27

  • Author

Thanks Explv.

I know a lot of what I'm looking for are probably very obviously seeming to find with a click and scroll to the API page, but It's really not out of laziness :P. I know a lot of you are very experienced coders that have identified problems in your scripts that you suspect have caused bans.

 

I have another question someone might be able to help with at the moment. I'm looking for a way to record raw mouse data from the OSBot clients cursor.

My first goal is to get a strong model of my own mouse movement during an activity over a long period of time and replicating it as closely as possible. When I make some progress I'll be making a dedicated thread for sharing my work.

@Page27

If you mean collect mouse data while you play legit, then you could do something like:

import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;

import java.awt.Point;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.ArrayList;
import java.util.List;

@ScriptManifest(name = "Mouse Tracker", author = "Explv", info = "", version = 0.1, logo = "")
public class MouseExample extends Script {

    private final List<Point> mouseClickPoints = new ArrayList<>();
    private final List<Point> mouseMovedPoints = new ArrayList<>();

    @Override
    public void onStart() {
        bot.getCanvas().addMouseListener(new MouseAdapter() {
            @Override
            public void mouseReleased(MouseEvent e) {
                super.mouseClicked(e);
                mouseClickPoints.add(e.getPoint());
            }
        });
        bot.getCanvas().addMouseMotionListener(new MouseAdapter() {
            @Override
            public void mouseMoved(MouseEvent e) {
                super.mouseMoved(e);
                mouseMovedPoints.add(e.getPoint());
            }
        });
    }

    @Override
    public int onLoop() throws InterruptedException {
        return 1000;
    }

    @Override
    public void onExit() {
        // Output the mouse data
    }
}

 

Edited by Explv

  • Author

@Explv

I was actually looking for gathering data while a script is running since it doesn't use my actual USB mouse. Is this able to record the bot cursor or just input from the actual mouse? This looks extremely useful, thanks the contribution.

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.