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 Trail

Featured Replies

Was trying to figure this out and stumbled upon an old thread on another botting site with the code. All credit goes to a member over there by the name of Enfilade.

 

Needed variable in your main class (where you'll be doing the painting):

private final LinkedList<MousePathPoint> mousePath = new LinkedList<MousePathPoint>();

The MousePathPoint class (could also of course just be made into an inner class):

import java.awt.Point;

//ALL CREDITS TO ENFILADE

class MousePathPoint extends Point {

	private long finishTime;
	private double lastingTime;

	public MousePathPoint(int x, int y, int lastingTime) {
		super(x, y);
		this.lastingTime = lastingTime;
		finishTime = System.currentTimeMillis() + lastingTime;
	}

	public boolean isUp() {
		return System.currentTimeMillis() > finishTime;
	}
	
}

And the code that should go into your onPaint method:

while (!mousePath.isEmpty() && mousePath.peek().isUp())
	mousePath.remove();
Point clientCursor = client.getMousePosition();
MousePathPoint mpp = new MousePathPoint(clientCursor.x, clientCursor.y, 300); //1000 = lasting time/MS
if (mousePath.isEmpty() || !mousePath.getLast().equals(mpp))
	mousePath.add(mpp);
MousePathPoint lastPoint = null;
for (MousePathPoint a : mousePath) {
	if (lastPoint != null) {
		g.setColor(Color.YELLOW); //trail color
		g.drawLine(a.x, a.y, lastPoint.x, lastPoint.y);
	}
lastPoint = a;
}

f206f227f732fcdec98e33db76cc84f1.gif

Edited by Swizzbeat

  • 2 months later...

MousePath can't be resolved?
?

 

Good work wink.png

 

do you even script?

?

do you even script?

?

Probably just wants the post count or something.

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.