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.

Event stuck in QUEUED

Featured Replies

So I am currently trying to create an event that runs all the time

I created a class that extends 'Event'

I created an instance of the class, initialized it and then called the execute method with the object.

As you can see here:

event = new MyEventClass();
event.exchangeContext(bot);
event.setAsync();
execute(event);

this piece of code is called in the 'onStart()' method of the script.

the execute method of the event consists of the following code:

@Override
public int execute() throws InterruptedException {
	log("checking for threat");
	if (hasThreat()) {
		log("has threat. Hopping!");
		interruptAnyActions();
		hopToNonPVPWorld();
	}
	return random(100, 200);
}

I am calling the 'event.getStatus()' method in my 'onLoop()' method which outputs the following:

[INFO][Bot #1][04/15 08:13:55 PM]: QUEUED
[INFO][Bot #1][04/15 08:13:56 PM]: QUEUED
[INFO][Bot #1][04/15 08:13:58 PM]: QUEUED
[INFO][Bot #1][04/15 08:13:59 PM]: QUEUED
[INFO][Bot #1][04/15 08:14:00 PM]: QUEUED
[INFO][Bot #1][04/15 08:14:01 PM]: QUEUED

So somehow, the execution doesn't start but I have no idea why. 

My custom login event also basically uses the same 'settings' but works flawlessly. It's just that this event doesn't want to work.

Sounds like the EventExecutor is busy running other events that are never completing. Your custom loginhandler maybe?

  • Author

The event had the exact same behavior before I even added the loginhandler.

Furthermore, it also gets called before the login handler but still never gets executed.

1 hour ago, goldKeeper said:

The event had the exact same behavior before I even added the loginhandler.

Furthermore, it also gets called before the login handler but still never gets executed.

Try running the client in debug mode to see if any errors are thrown in onStart as you submit the event.
Also, there's no need to call exchangeContext. This is done internally by the EventExecutor

  • Author

worked around it with a thread that runs all the time.

Whenever i come across this again I will try what you just said though.

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.