Jump to content
McKay Development

Game Idle without SharedSecret


CellSplitter

Recommended Posts

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?

Link to comment
Share on other sites

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?!

Edited by CellSplitter
Link to comment
Share on other sites

The promptSteamGuardCode option was removed in v4. The prompting is now automatically disabled when you add a steamGuard event listener.

The arguments for the steamGuard event are domain, callback, lastCodeWrong. With the code you pasted, lastCodeWrong will always be truthy because that's actually the callback you should call with your new code.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...