-
Posts
26 -
Joined
-
Last visited
Everything posted by CellSplitter
-
I use Version 3.29.3 from steam-user and there works this Code very well SteamGuard event fires only lastcodewrong if the Code is wrong otherwise not. I give him the Code over client.LogOn via TwoFactorCode But will check options from a newer Version Thx...
-
Hey thank You for your Answer, i found this too today and i solve my Problem. // => IdleClient on/off Switch let online = 0; // Only a SNIPPET from my Chat Commands } else if(CONFIG.OWNER.indexOf(SENDER.getSteamID64()) >= 0 || CONFIG.OWNER.indexOf(parseInt(SENDER.getSteamID64())) >= 0) { // Admin Chat Commands if (MSG.toUpperCase().indexOf("!ONIDLE") >= 0) { let n = MSG.toUpperCase().replace("!ONIDLE ", "").toString(); IdleClient.setOption("promptSteamGuardCode", false); let IdleLogOnOptions = { accountName: CONFIG.IdleAccount.USERNAME, password: CONFIG.IdleAccount.PASSWORD, twoFactorCode: n }; IdleClient.logOn(IdleLogOnOptions); IdleClient.on("steamGuard", function(domain, lastCodeWrong) { if(lastCodeWrong) { sleep(1000).then(() => { client.chatMessage(SENDER, "⛔ You don't set the right SteamGuard Code!"); }); } }); IdleClient.on("loggedOn", function() { IdleClient.getPersonas([IdleClient.steamID], (personas) => { IdleClient.setPersona(SteamUser.Steam.EPersonaState.Online); IdleClient.gamesPlayed(CONFIG.IdleAccount.IDLEGAMES); }); console.log("[" + getTime() + "] [INFO] [IdleClient] Login successfully!"); sleep(1000).then(() => { client.chatMessage(SENDER, "✅ IdleClient Login successfully!"); }); online = 1; }); } else if(MSG.toUpperCase() === "!OFFIDLE") { if (online === 1) { online = 0; IdleClient.logOff(); sleep(1000).then(() => { client.chatMessage(SENDER, "✅ IdleClient Logout successfully!"); }); } else { sleep(1000).then(() => { client.chatMessage(SENDER, "⛔ IdleClient not running!"); }); }; Works like a Charm now, iam happy :-) EDIT: I don't know why this editor shows the code a bit shifted?!
-
Hey, i will idle my Gamehours from my main Acc without loosing my Mobile Confirmation. i start it via Message from a second Account (Command + right 2fa Code like "!boost KH54E") if the 2fa Code right, it works good, but if it wrong it fires a Command Prompt to Console "Steam Guard App Code:" ...but i run this Bot via PM2 and i cant set the right 2fa Code in the Console. MY CODE: (snippet) } else if (MSG.toUpperCase().indexOf("!BOOST") >= 0) { let n = MSG.toUpperCase().replace("!BOOST", "").toString(); let IdleLogOnOptions = { accountName: CONFIG.IdleAccount.USERNAME, password: CONFIG.IdleAccount.PASSWORD, twoFactorCode: n }; IdleClient.logOn(IdleLogOnOptions); IdleClient.on("loggedOn", function() { IdleClient.getPersonas([IdleClient.steamID], (personas) => { sleep(1000).then(() => { console.log("[" + getTime() + "] [INFO] [IdleClient] Login successfully!"); IdleClient.setPersona(SteamUser.Steam.EPersonaState.Online); IdleClient.gamesPlayed(730); online++ }); }); }); sleep(2000).then(() => { if ( online === 1) { client.chatMessage(SENDER, "✅ IdleClient successfully Login!"); } else { client.chatMessage(SENDER, "⛔ You don't set the right 2FA Code!"); }; }); Can i handle it that the Bot gives me only the Message back that i set the wrong 2fa Code without fires the Command Prompt, so i can try it again with the right Code?
-
Solved by myself, my mistake was that the Gamedetails on this Account set to privat. Set on open for all and now it works like a charme
-
I mean to hear, there is a Limit over 33 Games, but i dont know it clearly
-
Hey, after 2 years i will rewake my old +REP Profile Commentbot. Runs good, but if i look on Bots Profile Page, it shows only that he is online and not in a non Steam Game. const SteamUser = require('steam-user'); const SteamCommunity = require('steamcommunity'); const SteamTotp = require('steam-totp'); const TradeOfferManager = require('steam-tradeoffer-manager'); const fs = require('fs'); const config = require('./config.json'); const sleep = (milliseconds) => { return new Promise(resolve => setTimeout(resolve, milliseconds)) } const client = new SteamUser(); const community = new SteamCommunity(); const manager = new TradeOfferManager({ steam: client, community: community, language: 'en' }); const logOnOptions = { accountName: config.username, password: config.password, twoFactorCode: SteamTotp.generateAuthCode(config.sharedSecret) }; client.logOn(logOnOptions); client.on("loggedOn", function() { client.getPersonas([client.steamID], (personas) => { console.log("Logged in as " + personas[client.steamID].player_name + " [ " + client.steamID + " ]."); client.setPersona(SteamUser.Steam.EPersonaState.Online); client.gamesPlayed("Profile Comment Service"); }); }); client.on('webSession', (sessionid, cookies) => { manager.setCookies(cookies); community.setCookies(cookies); }); If i look in my Steam App (Android) and on Steam App (Windows) the Bot is still shows only online. If i look in my Browser like Chrome or Firefox the Bot plays Custom Game named "Profile Comment Service" thats right Is there over the 2 years anything new that i must do to get this working again?
-
Cool nice that works. Thx for this. Can u tell me how can i set for every element an • like • 730 • 440 • 4000 SOLVED
-
Hey, i have a Problem. I have an Array. For Example: let Games = [730,440,4000] The Array Output looks like: 730,440,4000 But i want an Output like an List without comma and every Array Element in a new Line. That looks so: 730 440 4000 How can i solve this? Thx in advance ☺
-
Question community.getSteamUser is not a function -- help please
CellSplitter replied to Snavellet's topic in node-steamcommunity
// Set this to your Imports let SteamCommunity = require("steamcommunity"); U must install it with "npm i steamcommunity", if u have a package.json file u can save it with "--save" after "npm i steamcommunity --save" // Then make community instance of SteamCommunity let community = new SteamCommunity(); Thats all -
ok thanks a lot, then i have to deal with it now
-
Hey, i will get my Inventory History and specific my CSGO Knife History. i see this is now a part of node-steamcommunity, but i dont know how i get this. My coding in node (javascript) is not so good for this Moment. I learn it now. Have anyone a code snippet for me? Or a good manuell for this how i can solve this? Special Thanks in advance I try it with let Inv = []; community.getHistory(client.steamID,function(err, user){ if (err) { console.log(err); } else { console.log(user.Inv); } }); But its not working and it is rly bad code i think ?
-
If u have a free Account, you must be friends to comment on their profile. You must spend minimum 5 Dollar to your Acc. The higher your steam level, the more comments you can write before getting a cool down
-
Question set emitter.setMaxListeners()
CellSplitter replied to CellSplitter's topic in node-steam-user
Its my Code ...i know why, it add random people as friend, and if friend add to group -
Question RateLimitExceeded from sendFriendMessage method
CellSplitter replied to Walle's topic in node-steam-user
Is the Bot Account a free Account? I can send so many MSGs i want from my BOT to my main Account. But why u must send a message all 100ms? This are 10 MSGs per second and 60 in a minute ? Is not enough once per hour or on request? In my mind, there are no limitations. Only on Profile Comments... I have limited MSGs from Users to my BOT by my self to 1 MSG in 2 sec ...Otherwise they get autoblocked from my BOT But there was a chat update few days ago, i dont know if there are changes like this EDIT: I spam my Bot for few minutes, all works fine, can u send ur code to take a look?- 1 reply
-
- node.js
- node-steam-user
-
(and 1 more)
Tagged with:
-
Hey, i have a Problem in a function from my BOT I become a warning: (node:21607) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 friendRelationship listeners added. Use emitter.setMaxListeners() to increase limit I need to use emitter.setMaxListeners(), but i dont know how to use it
-
Question check if trade success
CellSplitter replied to CellSplitter's topic in node-steam-tradeoffer-manager
Post can close, i solve the Problem by my self -
Question check if trade success
CellSplitter replied to CellSplitter's topic in node-steam-tradeoffer-manager
How can i solve it, if tradeoffer changed by TradePartner and he send me new Offer that it automaticly decline? -
Question check if trade success
CellSplitter replied to CellSplitter's topic in node-steam-tradeoffer-manager
Yes thats right, i want cacel the new offer from my OfferPartner -
Question check if trade success
CellSplitter replied to CellSplitter's topic in node-steam-tradeoffer-manager
Ok, i have try it, but there was an error if tradeoffer items changed by OfferPartner ( Offer.state == 4 ) how can i cancel the changed TradeOffer from OfferPartner? Send TradeOffer Function: // Send TradeOffer to TradePartnerSteamID64 function GetItems(){ manager.getUserInventoryContents(TradePartnerSteamID64, 440, 2, true, (err, inv) => { if (err) { log("[" + getTime() + "] [ERROR] Get User Inventory Contents: " + err); } else { var Volume = 1; // Get X Amount of Items // Filter out all the TF2 Keys var Tf2Keys = inv.filter(function(item) { return item.market_hash_name.match('Mann Co. Supply Crate Key') }); // Let the user know we don't have enough Tf2Keys if(Tf2Keys.length < Volume) { log("[" + getTime() + "] [INFO] Not enough Mann Co. Supply Crate Keys in TradePartnerSteamID64's Inventory"); return true; // Give up } // Start a new trade offer Offer = manager.createOffer(TradePartnerSteamID64); // Add what we should to the current trade log("[" + getTime() + "] [INFO] Adding " + Volume + " Mann Co. Supply Crate Keys to TradeOffer"); Offer.addTheirItems(Tf2Keys.slice(0, Volume)) // Send the offer Offer.send(function(err, status) { if(err) { log(err); } else if(status == 'pending') { community.acceptConfirmationForObject(Config.IDENTITYSECRET, Offer.id, function(err) { if(err) { log(err); } else { log("[" + getTime() + "][INFO] TradeOffer confirmed with TradeOfferID: #" + Offer.id); } }); } else if(status == "accepted") { log("[" + getTime() + "][INFO] TradeOffer accepted"); } else { log("[" + getTime() + "][INFO] TradeOffer #" + Offer.id + " sent successfully"); } }); } }); }; Check TradeOffer States : // Check TradeOffer States manager.on("sentOfferChanged", (Offer, oldstate) => { if (Offer.state == 1) { log("[" + getTime() + "] [WARN] Invalid TradeOffer"); } else if (Offer.state ==2) { log("[" + getTime() + "] [WARN] Active TradeOffer"); } else if (Offer.state == 3) { log("[" + getTime() + "] [WARN] Accepted TradeOffer"); } else if (Offer.state == 4) { // TradeOffer Changed log("[" + getTime() + "] [WARN] Countered TradeOffer"); Offer.cancel((err) => { if(err) { log("["+getTime()+"] [ERROR] We can't cancel the TradeOffer: " + err); } else { log("["+getTime()+"] [Canceled TradeOffer] OfferID: #" + Offer.id); } }); } else if (Offer.state == 5) { log("[" + getTime() + "] [WARN] Expired TradeOffer"); } else if (Offer.state == 6) { log("[" + getTime() + "] [WARN] Canceled TradeOffer"); } else if (Offer.state == 7) { log("[" + getTime() + "] [WARN] Declined TradeOffer"); } else if (Offer.state == 8) { log("[" + getTime() + "] [WARN] InvalidItems TradeOffer"); } else if (Offer.state == 9) { log("[" + getTime() + "] [WARN] CreatedNeedsConfirmation TradeOffer"); } else if (Offer.state == 10) { log("[" + getTime() + "] [WARN] CanceledBySecondFactor TradeOffer"); } else if (Offer.state == 11) { log("[" + getTime() + "] [WARN] InEscrow TradeOffer"); } }); CONSOLE OUTPUT: [10:05:2019 - 12:18:57] [INFO] Websession created and Cookies set successfully. [10:05:2019 - 12:18:57] [INFO] Adding 1 Mann Co. Supply Crate Keys to TradeOffer [10:05:2019 - 12:18:58] [INFO] TradeOffer #3565072757 sent successfully [10:05:2019 - 12:19:48] [WARN] Countered TradeOffer [10:05:2019 - 12:19:48] [ERROR] We can't cancel the TradeOffer: Error: Offer #353565072757 is not active, so it may not be cancelled or declined ------------------ I want if Offer.state == 4 cancel the offer automaticly But i dont know how :-( -
Question check if trade success
CellSplitter replied to CellSplitter's topic in node-steam-tradeoffer-manager
Ok, thx for fast help, i will try it. If i have probs, i write again -
Hey iam working on a GameBot. Example: someone want a Gamepackage, it cost 2 TF2 Keys. I sent the TradePartner an offer with 2 Keys from his Inventory. Here is my Code: function GetItems(){ manager.getUserInventoryContents(TradePartnerSteamID64, 440, 2, true, (err, inv) => { if (err) { console.log(err); } else { var Volume = 2; // Get X Amount of Items // Filter out all var Keys = inv.filter(function(item) { return item.market_hash_name.match('Mann Co. Supply Crate Key') }); // Check if TradePartner have enough Keys if(Keys.length < Volume) { console.log('Not enough Mann Co. Supply Crate Keys'); return true; } // Start a new TradeOffer var offer = manager.createOffer(TradePartnerSteamID64); // Add the Items to TradeOffer console.log('Adding ' + Volume + ' Mann Co. Supply Crate Key'); offer.addTheirItems(Keys.slice(0, Volume)) // Send the TradeOffer offer.send(function(err, status) { if(err) { console.log(err); } else if(status == 'pending') { community.acceptConfirmationForObject(Config.IDENTITYSECRET, offer.id, function(err) { if(err) { console.log(err); } else { console.log("TradeOffer confirmed"); } }); } else { console.log('TradeOffer sent successfully'); } }); } }); }; ...ok that works. But how can i check if the Trade decline, finish or Items changed by TradePartner? Like: If trade done sent GameCodes If trade decline do anything If trade changed kick him i his ass Iam newbie in node, pls help me. Thx in advance....
-
You can do this for example: client.on('friendRelationship', function(steamID, relationship) { if (relationship == SteamUser.Steam.EFriendRelationship.RequestRecipient) { client.addFriend(steamID); console.log(" "); console.log("Accepted friend request from: " + steamID); var name; client.getPersonas([steamID], function(personas) { var persona = personas[steamID]; name = persona ? persona.player_name : ("[" + steamID + "]"); client.chatMessage(steamID, "\nWelcome " + name + " !!!" + "\nI am a +REP BOT and i can give you a +REP Comment on your Steam® Profile" + "\nType !help in Chat to get started!" ); }); } });
-
Try this for Login let client = new SteamUser(), manager = new TradeOfferManager({ "steam": client, "pollInterval": "10000", "cancelTime": "1800000" // 30m in ms }), community = new SteamCommunity(); //Logging in client.logOn({ accountName: CONFIG.USERNAME, password: CONFIG.PASSWORD, twoFactorCode: SteamTotp.getAuthCode(CONFIG.SHAREDSECRET) }); client.on("loggedOn", function() { client.getPersonas([client.steamID], (personas) => { console.log("["+getTime()+"] " + " Logged in as " + personas[client.steamID].player_name + " [ " + client.steamID + " ]."); client.setPersona(SteamUser.Steam.EPersonaState.Online); }); }); client.on("webSession", (sessionID, cookies) => { manager.setCookies(cookies, (ERR) => { if (ERR) { console.log("## An error occurred while setting cookies."); } else { console.log("## Websession created and cookies set."); } });
-
Sometimes you do not see the forest for the trees.? Thx, now it works fine ?
-
Hey, iam work on new functions for my BOT. I am currently working on boosting my main account via chat message to my BOT. The login works fine, but the logout does not work and I can't find the error Here my Code: // Boost Owners Account START else if (MSG.toUpperCase().indexOf("!STARTBOOST") >= 0) { let BoostClient = new SteamUser(), BoostManager = new TradeOfferManager({ "steam": BoostClient, "pollInterval": "10000", "cancelTime": "1800000" // 30m in ms }), BoostCommunity = new SteamCommunity(); let BoostLogOnOptions = { accountName: CONFIG.Boost.USERNAME, password: CONFIG.Boost.PASSWORD, twoFactorCode: SteamTotp.generateAuthCode(CONFIG.Boost.SHAREDSECRET) }; BoostClient.logOn(BoostLogOnOptions); BoostClient.on("loggedOn", function() { BoostClient.getPersonas([BoostClient.steamID], (personas) => { sleep(500); console.log("[Boost Steam Account] - Login successfully!"); client.chatMessage(SENDER, "[Boost Steam Account] - Login successfully!"); BoostClient.setPersona(SteamUser.Steam.EPersonaState.Online); BoostClient.gamesPlayed(730); }); }); BoostClient.on('webSession', (sessionid, cookies) => { BoostManager.setCookies(cookies); BoostCommunity.setCookies(cookies); sleep(2000); console.log("[Boost Steam Account] - Cookies set successfully"); client.chatMessage(SENDER, "[Boost Steam Account] - Cookies set successfully"); }); sleep(7000); console.log("[Boost Steam Account] - Boosting Games Active"); client.chatMessage(SENDER, "[Boost Steam Account] - Start Boosting Games"); } else if (MSG.toUpperCase().indexOf("!STOPBOOST") >= 0) { let BoostClient = new SteamUser(); BoostClient.logOff(); sleep(1000); console.log("[Boost Steam Account] - Stop Boosting Games"); client.chatMessage(SENDER, "[Boost Steam Account] - Stop Boosting Games"); } // Boost Owners Account END It runs not in an error, but i dont log off :-((( I hope someone can help me out... THX