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
  • Tradining between people (just came to dreambot)


    dmc12321

    Recommended Posts

    Just starting to script on dream bot, wondering if anyone has a script laying around with trading back players that trade it.

    or if someone can write me up the code for that. once I get that I can implement it into the script im trying to write.

    thanks in advance,

     

    If you may have a script laying around that I can pick through that trading is already implemented and its open source, that would be wonderful aswell.

    Link to comment
    Share on other sites

    25 minutes ago, dmc12321 said:

    Just starting to script on dream bot, wondering if anyone has a script laying around with trading back players that trade it.

    or if someone can write me up the code for that. once I get that I can implement it into the script im trying to write.

    thanks in advance,

     

    If you may have a script laying around that I can pick through that trading is already implemented and its open source, that would be wonderful aswell.

    I'm pretty sure you can do this with widgets. If you grab the trade widget from the chat box you can interact with that and accomplish your needs.

    May not be the best way, but would probably work.

    Link to comment
    Share on other sites

    class Script extends AbstractScript implements AdvancedMessageListener {
    ...
    	onTradeMessage(Message m){
    		if(getPlayers().closest(m.getUsername()) != null && getTrade().tradeWithPlayer(m.getUsername())){
    	
    		}
    	}
    }

    Well, you really shouldnt do anything in that method but that's a start for you to build on.

    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.