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.

onMessage() not firing

Featured Replies

My onMessage method isn't firing.

@Override
	public void onMessage(Message m) {
		log("onMessage 1");
		fr.onMessage(m);
	}

Nothing gets printed to log on any form of message in the chatbox (game, player, trade etc)

9 minutes ago, ThatGamerBlue said:

My onMessage method isn't firing.


@Override
	public void onMessage(Message m) {
		log("onMessage 1");
		fr.onMessage(m);
	}

Nothing gets printed to log on any form of message in the chatbox (game, player, trade etc)

??

What is fr.onMessage?

Where are you declaring the method?

lol im guessing fr is the instance of the class and hes calling onMessage?

  • Author
2 hours ago, Explv said:

??

What is fr.onMessage?

Where are you declaring the method?

sry, forgot to mention, fr is an instance of the friends api i wrote, this was the easiest way i could think of to pass the message to update its status, declaring the method in the op in the class extending script

2 hours ago, The Undefeated said:

If you wanna log the message you should do this:


	public void onMessage(Message m) {
		log(m.getMessage());
	}

 

i tried this, still nothing gets logged, i think the method isnt even getting called

Edited by ThatGamerBlue

9 hours ago, ThatGamerBlue said:

sry, forgot to mention, fr is an instance of the friends api i wrote, this was the easiest way i could think of to pass the message to update its status, declaring the method in the op in the class extending script

i tried this, still nothing gets logged, i think the method isnt even getting called

The friends chat has to be included in the normal chat itself, not above the chat. There's an option for that.

  • Author
3 hours ago, The Undefeated said:

The friends chat has to be included in the normal chat itself, not above the chat. There's an option for that.

should've been more specific, in the api i'm listening for the message "Unable to add friend - unknown player." that the game sends in the "game" tab, but i found somebody else's api that does what i want using widgets rather than my pixel area clicking

10 hours ago, ThatGamerBlue said:

should've been more specific, in the api i'm listening for the message "Unable to add friend - unknown player." that the game sends in the "game" tab, but i found somebody else's api that does what i want using widgets rather than my pixel area clicking

fr.log(m.getMessage());

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.