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.

MessageListener

Featured Replies

Does it work lol?

 

I am positive I have the code correctly, but it doesn't work. And the debug logger doesnt even log, which leads me to believe it isn't working atm. If I am doing something wrong please let me know!

 

    @Override
    public void onMessage(Message m) {
        Logger.GLOBAL_LOGGER.debug("" + m.getMessage() + " Type: " + m.getType().getId());
        if (m.getType() == Message.MessageType.GAME) {
            if (m.getMessage().contains("cut the")) {
                Variables.cutGems++;
            }
        }
    }

 

Thanks,

Empathy

 

 

  • Author

You can just use log("....")

Can you post your imports?

 

import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics2D;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import org.empathy.skilling.crafting.gemcutting.data.Timer;
import org.empathy.skilling.crafting.gemcutting.data.Variables;
import org.empathy.skilling.crafting.gemcutting.gui.Gui;
import org.empathy.skilling.crafting.gemcutting.nodehandler.Node;
import org.empathy.skilling.crafting.gemcutting.nodes.BankNode;
import org.empathy.skilling.crafting.gemcutting.nodes.CraftGem;
import org.osbot.rs07.api.ui.Message;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;
import org.osbot.utility.Logger;

 

I don't think I need to implement messageListener, due to it already being implemented in the Script class (alongside Painter and other classes, and my paint works).

 

I am also not getting an errors in eclipse.

 

What's that logging code? Might it be throwing the error?

 

Try surrounding all of it in a try-catch, and use the default osbot logger to log the error

  • Author

What's that logging code? Might it be throwing the error?

 

Try surrounding all of it in a try-catch, and use the default osbot logger to log the error

 

There's no error. It just doesn't work.

There's no error. It just doesn't work.

 

Are you certain of that, tho?

It might be silently caught out back

 

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.