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


    dmc12321
     Share

    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.

    Edited by NovaGTX
    Link to comment
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
     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.