Jump to content
McKay Development

Vanilla

Member
  • Posts

    73
  • Joined

  • Last visited

Everything posted by Vanilla

  1. https://github.com/DoctorMcKay/node-steamcommunity/wiki/CSteamUser#invitetogroupgroupid-callback
  2. using 'item.appid' https://github.com/DoctorMcKay/node-steamcommunity/wiki/CEconItem#appid
  3. Using steamcommunity editProfile.https://github.com/DoctorMcKay/node-steamcommunity/wiki/SteamCommunity#editprofilesettings-callback
  4. That means, tradeoffer-manager have invalid cookies, and you need to refresh cookies if that happened. Use steamcommunity "sessionExpired" event to refresh tradeoffer-manager cookies When you get "Error: Not Logged In", steamcommunity "sessionExpired" event will fired. community.on("sessionExpired", function(err) { client.webLogOn(); //relogin to Steam or refresh tradeoffer-manager cookies //add your handling code here, for example: if (sendofferError == true){ //do stuff } } Edit: If you want to kill cookies for testing purposes, you can add this in your code: setTimeout(function(){ //for debugging purposes, kill cookies after 10 second console.log("rip cookies :("); community.setCookies(["steamLogin=1||invalid", "steamLoginSecure=1||invalid"]); manager.setCookies(["steamLogin=1||invalid", "steamLoginSecure=1||invalid"]); }, 10000);
  5. https://github.com/DoctorMcKay/node-steamcommunity/wiki/CEconItem#tags You need to get individual item from offer, and after that just call "item.tags". Since tags is an array, you might want to use loop to check if an item contain "Craft Item"
  6. If you use steam-user, those code should be works. Don't forget that you need to logged in to chat so bot will listen to chat command. client.setPersona(5); //put this on: client.on('loggedOn', function (details) {
  7. Did you forgot to change identity secret / shared secret? Also can you send trade offer manually?
  8. Use 'newConfirmation' event to accept trade offer https://github.com/DoctorMcKay/node-steamcommunity/wiki/Steam-Confirmation-Polling
  9. Yes, only happens sometimes.I can't also reproduce this, i'm not really sure what's happen tbh.. Additionally, is there other way to check if an item marketable or not other than using 'item.marketable'?
  10. Hello, it's happening again: http://i.imgur.com/QGThmOj.png 21/05/17 - 14:10:52 - Rejecting Trade Offer from 76561198367819501 - Reason: Cross-Set 21/05/17 - 14:10:52 - [INFO] givenlength: (2) receivelength: (2) tagged: (0) nonmarketable1: (2) nonmarketable2: (0) The offer object is in attachment. Looks like both cards in "itemsToGive" is marketable false. But the item is actually marketable http://steamcommunity.com/market/listings/753/639900-Mysterious%20Card%203 http://steamcommunity.com/market/listings/753/639900-Mysterious%20Card%2010 offer.txt
  11. Thanks, I didn't save the full JSON dump when it happen I will reply this post when it's happening again. edit: typo
  12. Hello there, I found a weird problem when checking if an item is marketable or not I'm running 1:1 Card Trade (same-set) bot, and additionaly also accept 1:1 from non-marketable cards. The code I use to check if an item is marketable or not is something like this offer.itemsToReceive.forEach(function(item) { if ((item.type.includes("Trading Card") == true) && (item.marketable == false)){ itemBotReceive.push("Non-Marketable Trading Cards"); //Non-marketable cards will be pushed to new array } }); The problem is, when using above code, sometimes marketable cards will goes to non-marketable cards This screenshot is perfect example for what I mean: As you can see above, one of them is accepted, while the other one is rejected. Both trades come from same person When I check the log it say: 21/05/17 - 05:18:07 - Accepting (1:1) Trade Offer #2227108866 : (SteamID) 21/05/17 - 05:18:15 - Confirmed Trade Offer #2227108866 21/05/17 - 05:22:28 - Rejecting Trade Offer from (SteamID) - Reason: Cross-Set 21/05/17 - 05:22:28 - [INFO] givenlength: (1) receivelength: (1) tagged: (0) nonmarketable1: (0) nonmarketable2: (1) Mysterious card "3" for some reason will got tagged as "Non-Marketable Cards", but it's clearly that the cards is marketable --- Is this a bug or something? I can't reproduce this issue It's been going on for pretty long time, but pretty rare (about 5% Trades will get rejected for same reason) Thanks
  13. Something like this: community.on("sessionExpired", function(err) { //client.webLogOn and stuff }); client.on('disconnected', function (eresult) { console.log("Disconnected from Steam. Reason '"+SteamUser.EResult[eresult]+" ["+eresult+"]'"); //do your magic }); node-steamcommunity 'sessionExpired' event will fires if your cookies is dead (but still connected to Steam) node-steam-user 'disconnected' event will fires if your bot for some reason can't connect to Steam server. For example, try log in your bot using your code with 'disconnected' event code above, and after that turn off your internet connection. The log will say something like: "Disconnected from Steam. Reason 'NoConnection [3]'"
  14. Do you have 'disconnected' event (from steam-user)?It should show the reason why you get disconnected
  15. Use 'inviteToGroup(userSteamID, groupSteamID)' It's possible to send a lot people to spesific group, but just like the wiki said: "sending automated group invites is a violation of the Steam Subscriber Agreement and can get you banned."
  16. There's an event in steam-user for listening incoming trade invite.For real time trade, try using node-steam-trade https://github.com/seishun/node-steam-trade
  17. This will accept ALL incoming group invite client.on('groupRelationship', function (steamID, relationship) { if (relationship == SteamUser.Steam.EClanRelationship.Invited){ client.respondToGroupInvite(steamID, true); } });
  18. if(steamID == '76561197.....' || steamID == '76561.....'){ In case if you want the bot accept user command and admin command, you can try this example, or using switch-case: var admin = "76561..."; //this is admin Steam ID client.on('friendMessage', function (steamID, message) { if((steamID == admin) && (message== "!command1")){ client.chatMessage(steamID, 'admin command 1'); } else if((steamID == admin) && (message== "!command2")){ client.chatMessage(steamID, 'admin command 2'); } else if(message== "!user1"){ client.chatMessage(steamID, 'user command 1'); } else if(message== "!help"){ client.chatMessage(steamID, '!help command'); } else { client.chatMessage(steamID, 'command not found, use !help'); } });
  19. Hello there, I managed to make my bot edit their "Real Name' using editProfile node-steamcommunity, and I found a problem Everytime I'm using "community.editProfile", it always removing one of my bot Profile Showcase. The original is "Items Up For Trade" and Custom Info Box, but after calling editProfile, "Items Up For Trade" always gone and only leaving Custom Info Box. Is this a bug or am I missing something? Because I can't find anything in wiki about Profile Showcase. Thanks Not sure if it's help, but here's part of code community.editProfile({ "realName": "Bot Version: " +version, "background" : 4149974111, }, function(err) { if (err) { var log = (currentdate() + " - Failed to update RealName"); fs.appendFile("log.txt", log+ "\n", {flag: 'a'}, function(err) {}); console.log(log); } else { var log = (currentdate() + " - RealName updated: "+version); fs.appendFile("log.txt", log+ "\n", {flag: 'a'}, function(err) {}); console.log(log); } });
×
×
  • Create New...