Skip 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.

[SUGGESTION] magic.castSpell click area reduction

Featured Replies

hey

 

i'm doing 

 
if (getMagic().castSpell(NormalSpells.HIGH_LEVEL_ALCHEMY)) {
 
and my users are reporting that it is clicking other spells (e.g. superheat), so is there a way to reduce the click area of the spells so that misclicking happens less, my users are getting angry :(

I have a similar problem with interacting (2.3.75), and I wrote a custom method to stop it.

You could do something like this until it gets fixed:

RS2Widget widget = getWidgets().get(218, 35); //HLA
Rectangle widgetRect = widget.getBounds();

int newWidth = widgetRect.width - 2; //2 px inside boundaries so no chance of misclick
int newHeight = widgetRect.height - 2;
int newX = widgetRect.x - 1; //Get in the middle of the 2px boundary
int newY =widgetRect.y - 1;

Point pointToClick = new Point(random(newX, (newX + newWidth)), random(newY, (newY + newHeight))); //Random point within the bounds

while (!getMouse().getPosition().equals(pointToClick)) { getMouse().move(pointToClick.getX(), pointToClick.getY()); } //Move mouse
getMouse().click(false); //Left click
//Click the inventory item or whatever

Good luck!

WidgetDestination extends MouseDestination. From there we analyze the shape and select a point based on a custom distribution. Mouse.move() utilizes PointDestination which also extends MouseDestination except it skips a step in the conversion process (everything else gets converted into a point destination first and then is executed). The reasoning behind this is that all other destinations which extend from MouseDestination base their evaluations off of checking if a point is part of a shape. With PointDestination the evaluation is based off of distance, this prevents interactions/movements returning instantly when entering a shape (hence clicking on the edge of a widget).

 

Try testing this out with 2.3.77; script developers need to be using the latest versions. Stable builds are meant for botters. In the meantime I'll take a quick look at the code later tonight.

Could not replicate this bug using Version 2.3.77.

@Override
    public int onLoop() throws InterruptedException {
    System.out.println(magic.castSpell(Spells.NormalSpells.BIND));
        return 5000;
    }

 

[iNFO][06/28 12:45:31 AM]: Started bot #1

[iNFO][bot #1][06/28 12:49:26 AM]: Loaded 4 built-in random solvers!
[iNFO][bot #1][06/28 12:49:26 AM]: Started script : Skeletor
true
true
true
true
true
true
true
true
true
true
true
true
[iNFO][bot #1][06/28 12:50:29 AM]: Terminating script Skeletor...
[iNFO][bot #1][06/28 12:50:30 AM]: Script Skeletor has exited!

 

 

Guest
This topic is now closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

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.