Closed CoericK closed 11 years ago
Show your code.You're probably adding event listeners in the wrong place.
Nevermind was my mistake. yes i did i was setting the listener of sessionStart inside of the listener of tradeProposed.
I have another question.
i didt this:
var bot = {}; bot.steam = new Steam.SteamClient(); bot.steamTrade = new SteamTrade(); bot.steam.on('sessionStart', function(otherClient) { inventory = []; scrap = []; weapons = 0; addedScrap = []; client = otherClient; console.log('trading ' + bot.steam.users[client].playerName); bot.steamTrade.open(otherClient); });
bot.steamTrade.on('ready', function() {
console.log('readying');
bot.steamTrade.ready(function() {
console.log('confirming');
bot.steamTrade.confirm();
});
});
My question is, this is setting to accept and confirm all the trades comming right? What if the bot sent a trade to a user and, the bot just want to accept if the offer is valid ?
Sorry, but the issue tracker isn't a good place to ask how to write code. Maybe try asking in #opensteamworks on irc.gamesurge.net, there might be node-steam-trade users there willing to help.
Hey there, i am new with this stuff of bots and i hope someone help me. I can run the bot and all ok, i configurated the bot to just accept the trades from 1 admin, so its working ok but i just noticed something in the console. First time:
All fine. Now
Second time:
If i do this a third time i will get: tradeProposed trading ADMINNICK trading ADMINNICK trading ADMINNICK Then trade cancelled trade cancelled trade cancelled
Seems like by each trade is being save somewhere and when a new trade is proposed its calls the sessionStart event, also i tested this when i accept the trade and secont trade propose and the bot accept it prints on console: tradeProposed trading ADMINNICK trading ADMINNICK readying readying confirming confirming trade complete trade complete.
Its not the big deal but is that ok? or its just me?