Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Try asking for help in the chatbox
  • Incoming trade message listener


    slasso
     Share

    Recommended Posts

    How can check if I have an incoming trade? I checked every message listener and none of them are executed when I get a purple trade message "soandso wishes to trade with you". Isn't it supposed to be onTradeMessage?

    Link to comment
    Share on other sites

    Don't use AdvancedMessageListener it didn't work for me when running it through the SDN

     

    anyways, the easy way out is just using onMessage

    Link to comment
    Share on other sites

    if (message.getMessage().contains("wishes to trade")) {

                message.getUsername();

                getTrade().tradeWithPlayer(message.getUsername());

                sleep(4000,6000);

                getTrade().acceptTrade();

                sleep(4000,6000);

                getTrade().acceptTrade();

            }

        }
    Link to comment
    Share on other sites

    I feel like that's something you should tell the devs :o

     

    Yea the normal one worked.

    Don't use AdvancedMessageListener it didn't work for me when running it through the SDN

     

    anyways, the easy way out is just using onMessage

    Yea, onTradeMessage() worked with normal MessageListener

     

     

    if (message.getMessage().contains("wishes to trade")) {
                message.getUsername();
                getTrade().tradeWithPlayer(message.getUsername());
                sleep(4000,6000);
                getTrade().acceptTrade();
                sleep(4000,6000);
                getTrade().acceptTrade();
            }
        }

     

    I know how to use it if it worked.

    Link to comment
    Share on other sites

     

    if (message.getMessage().contains("wishes to trade")) {
                message.getUsername();
                getTrade().tradeWithPlayer(message.getUsername());
                sleep(4000,6000);
                getTrade().acceptTrade();
                sleep(4000,6000);
                getTrade().acceptTrade();
            }
        }

     

     

    Lol

    Link to comment
    Share on other sites

     Share

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.