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.

Linux - Incredibly slow mouse movements

Featured Replies

Edit: Using Ubuntu 14.04.2 32 bit.

 

So, I am testing my own little combat script, and it seems that it can take anywhere between 1 second to a minute to hover over an NPC. The screenshot below shows this (explanation below)

36424b3ac5d1cdfb509e76390a78cbb0.png

Code snippet:

if (npcViable(npc) && npc.getAnimation() != 361) {
						log("Found npc " + npc);
						npc.hover();
						while (!getMouse().isOnCursor(npc) && npcViable(npc)) { npc.hover(); sleep(focusRand(100, 250)); }
						if (npcViable(npc)) {
							if (getMouse().getOnCursorCount() > 1) {
								npc.interact("Attack");
								log("Attack by interact");
							}
							else {
								getMouse().click(false);
								log("Attack by click");
							}
							sleep(focusRand(450, 750));
							target = npc;
						}
						else {
							target = null;
						}
					}

It gets stuck in the while loop for the duration.

On the npc.hover() function, it will move a pixel or so for each iteration.

I can tell because of the time difference between the "Found npc" and "Attack by interact/click", as there is no computing heavy code between those log functions (and it will work flawlessly on windows)

I know that Linux is a work in progress and so forth, but otherwise it's flawless smile.png Seen no differences between Windows and Linux and it seems to use just as many resources too! biggrin.png You did a good job on the new mirror mode update

Edited by Bobrocket

Please don't use custom methods as a basis for bug reports. Test against either:

 

MoveMouseEvent

or

InteractionEvent

 

This will help both MGI and myself find and test specific parts of code.

  • Author

Please don't use custom methods as a basis for bug reports. Test against either:

 

MoveMouseEvent

or

InteractionEvent

 

This will help both MGI and myself find and test specific parts of code.

 

Switching from interactable.hover to a MoveMouseEvent, give me a bit of time to push the changes to my VPS.

MoveMouseEvent code:

public void hover(NPC n) throws InterruptedException {
        if (n != null) {
            EntityDestination ed = new EntityDestination(getBot(), n);
            MoveMouseEvent mme = new MoveMouseEvent(ed);
            mme.execute();
        }
    }

Seems that I get NullPointerExceptions at mme.execute();, not entirely sure why as I have never used events before (kept to the methods like hover/interact etc.) Sorry!

  • Author

Pinned it down to either Bot or ClientMouseEventHandler returning null. Directing to MGI.

 

Glad I could help :)

I got this other completely random error while running my combat script:

http://pastebin.com/41FqgA7S

 

I never call anything to do with a GroundItem, so I'm not 100% sure why this happened. Hopefully it will help.

  • Developer

Pinned it down to either Bot or ClientMouseEventHandler returning null. Directing to MGI.

 

That is certainly impossible.

Glad I could help smile.png

I got this other completely random error while running my combat script:

http://pastebin.com/41FqgA7S

 

I never call anything to do with a GroundItem, so I'm not 100% sure why this happened. Hopefully it will help.

 

Those errors happen because the model of ground item is being 'uploaded' but the ground item data itself is not yet available to client.

Just ignore them for now

  • Author

That is certainly impossible.

 

Those errors happen because the model of ground item is being 'uploaded' but the ground item data itself is not yet available to client.

Just ignore them for now

 

Alright, sorry. I was just babysitting the script and I saw an error so I thought I should report it :)

Mirror mode seems to be working brilliantly otherwise, good job :D

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.