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.

Player#getActions() is always null

Featured Replies

1. OSBot Version (do NOT put "current version", be specific) 2.4.62

2. A description of the issue. Include relevant logs.

Player p = players.getAll().stream().filter(x -> !x.getName().equals(myPlayer().getName())).findFirst().get();
log(p.getName());
log(p.getActions() == null);
log(p.getActions().length);
for (String action : p.getActions()) {
	log(action);
}

prints

[INFO][Bot #1][06/08 06:00:38 PM]: Kenzo Kush
[INFO][Bot #1][06/08 06:00:38 PM]: true
[INFO][Bot #1][06/08 06:00:38 PM]: java.lang.NullPointerException
	at main.Core.onLoop(Core.java:23)
	at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(hj:81)
	at java.lang.Thread.run(Unknown Source)

where line 23 is

log(p.getActions().length); 

getActions() works for everything else (Item, NPC, RS2Object etc) but not for Player.

 

3. Are you receiving any errors in the client canvas or the logger? ^

4. How can you replicate the issue? ^

5. Has this issue persisted through multiple versions? If so, how far back? Idk

  • 2 weeks later...

Not sure why you would test like this, it's only going to complicate things.

 

myPlayer().getActions() < a lot easier

 

In any event, Players specifically do not have getActions() or getModelIds(). I updated the API and the documentation to reflect this. It's in there because of inheritance.

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.