Jump to content

empathy

Trade With Caution
  • Posts

    110
  • Joined

  • Last visited

  • Feedback

    66.7%

Posts posted by empathy

  1. 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.

  2. 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.

     

  3. 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

     

     

×
×
  • Create New...