AbrarK Posted July 13, 2016 Report Posted July 13, 2016 (edited) Here is my current Code http://pastebin.com/0Ezn6rNY So far everything works, however I'm wondering, how do I check if a trade has been acceppted? I want to make it so I can do something like php code:'socket.emit("getTrade", tradeid)'nodejs code:'socket.on('getTrade', function(steamid, tradeid) {'GET TRADE STATUS HERE'}' But i also want it so the bot automatically polls and checks the trade status so if the trade gets acceppted/declined the node js bot will do something(I want it so this doesn't require me to send getTrade to the bot and it just automatically checks if the bot acceppts so the bot can update sql records without having to keep clicking 'check trade') so how shall I get the bot to automatically check if a trade has been acceppted after sending? I've had a look at the documentation and I still couldn't seem to get it, so help would be appreciated Edited July 13, 2016 by AbrarK Quote
Dr. McKay Posted July 13, 2016 Report Posted July 13, 2016 https://github.com/DoctorMcKay/node-steam-tradeoffer-manager/wiki/TradeOfferManager#sentofferchangedhttps://github.com/DoctorMcKay/node-steam-tradeoffer-manager/wiki/TradeOfferManager#receivedofferchanged Quote
AbrarK Posted July 14, 2016 Author Report Posted July 14, 2016 https://github.com/DoctorMcKay/node-steam-tradeoffer-manager/wiki/TradeOfferManager#sentofferchangedhttps://github.com/DoctorMcKay/node-steam-tradeoffer-manager/wiki/TradeOfferManager#receivedofferchangedSo would I do manager.on('sentOfferChanged', updateSQL); function updateSQL() {//code} Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.