dmc12321 0 Share Posted May 7, 2020 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 More sharing options...
AsBakedAsCake 202 Share Posted May 7, 2020 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 More sharing options...
NovaGTX 106 Share Posted May 8, 2020 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.