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.

event.execute always giving me an NPE

Featured Replies

NPC storeGuy = script.getNpcs().closest("Store");
if(storeGuy != null){
	script.log("Trading store guy");
	InteractionEvent e = new InteractionEvent(storeGuy, "Trade");
	e.setMaximumAttempts(2);
	e.execute(); //line 67

https://gyazo.com/8ec12a4cb9a91d57d032238ad0df094f

Seems to happen every time I do event.execute (not alone to this type of event)

Event execute() is an internal method used by the event executor. You can use either

bot.getEventExecutor().execute(event) or the wrapper method which is simply "execute(Event)"

therefore

execute(e); will work

2 hours ago, Alek said:

Event execute() is an internal method used by the event executor. You can use either

bot.getEventExecutor().execute(event) or the wrapper method which is simply "execute(Event)"

therefore

execute(e); will work

Hi,

Might be a good idea to put this in the docs.
Also, since you probably can't hide this method from the public API, could be a good idea to return an error with a message containing what you just explained whenever the method is called 'inappropriately'.

I remember this part of the API causing me so many headaches back in the day.

Bye

Create an account or sign in to comment

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.