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
  • Accept Trade/Send Trade


    Banker

    Recommended Posts

    Okay so i am trying to make my bot accept trades that have been sent and so far i have currently got this:

     

    (implementing AdvancedMessageListener)

    public void onTradeMessage(Message message) {
    
    String trader= message.getUsername();
    getTrade().tradeWithPlayer(trader);
    
    }

    When i send a trade request to the bot, instead of sending a request back to me it simply walks onto the tile that i am on, i cant see why it would do this.

     

    Any help is appreciated, Thanks.

    Link to comment
    Share on other sites

    Isn't there an API for trading?

     

    I'm not sure, ive looked in the Docs at the Trade section but i cant seem to find anything to actually initialise the trade.

    Link to comment
    Share on other sites

    That's what im currently using but it isnt actually starting the trade, its just walking onto the tile that the 'trader' is on

    Does it leftclick the tile or does it select "Walk here" from the menu?

    Link to comment
    Share on other sites

    Does it leftclick the tile or does it select "Walk here" from the menu?

     

    I think I did this before and it wasn't working because there were spaces in my username.

     

     

    No, it clicks the minimap where i player is located.

     

    And my username has no spaces at all :/

    Link to comment
    Share on other sites

    No, it clicks the minimap where i player is located.

     

    And my username has no spaces at all :/

    Have you definetly typed the name exactly as it appears, also you could try that with another method to have it interact using trade

    Link to comment
    Share on other sites

    Have you definetly typed the name exactly as it appears, also you could try that with another method to have it interact using trade

     

    It gets the username from the trademessage

     

    message.getUsername()

    Link to comment
    Share on other sites

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • 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.