rock5's "fastLogin Revisited"

Additional botting resources. Addons may be either for the game itself or for the RoM bot.
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Message
Author
User avatar
nerf
Posts: 88
Joined: Thu Jan 27, 2011 10:44 am

Re: rock5's "fastLogin Revisited"

#561 Post by nerf » Fri Nov 08, 2013 8:58 pm

rock5 wrote:

Code: Select all

ChangeCharRestart("current")
I have a problem with ChangeCharRestart ("current")

when should restart just get an error like this:

Changing to character 7 1 with client account Ink "rom"
"TASKKILL 'is not recognized as an internal or external command, program or batch file.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: rock5's "fastLogin Revisited"

#562 Post by rock5 » Sat Nov 09, 2013 12:23 am

I think it's supposed to be part of Windows. What operating system are you using? Are you running the bot in some sort of Windows emulator?
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
nerf
Posts: 88
Joined: Thu Jan 27, 2011 10:44 am

Re: rock5's "fastLogin Revisited"

#563 Post by nerf » Sat Nov 09, 2013 6:49 am

My operating system is Microsoft Windows XP Home Edition Version 2002, Service pack 3

Processor: Intel (R) Core (TM) 3.30GHz

Memory: 2044MB RAM

DirectX 9.0c

language: Spanish

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: rock5's "fastLogin Revisited"

#564 Post by rock5 » Sat Nov 09, 2013 8:16 am

It is included with XP so I have no idea why it wouldn't work. Sorry.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
nerf
Posts: 88
Joined: Thu Jan 27, 2011 10:44 am

Re: rock5's "fastLogin Revisited"

#565 Post by nerf » Sat Nov 09, 2013 9:39 am

ok no problem, thanks!

User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: rock5's "fastLogin Revisited"

#566 Post by Lamkefyned » Sat Nov 09, 2013 10:09 am

problem when entering the account click on the same site before ahora.que not in the I have to do?
If you think something is right just because everyone else believes,you're not thinking.

Rickster
Posts: 291
Joined: Sun Oct 24, 2010 4:23 pm

Re: rock5's "fastLogin Revisited"

#567 Post by Rickster » Mon Nov 11, 2013 7:27 am

hi,

when automatically restarting, after changing chars several times, the client restarts but logs in to the wrong account.

i installed:
login.lua v3.1 in scripts\rom folder
userfunction_LoginNextChar v1.5 in scripts\rom\userfunctions folder
userfunction_login v3.4 in scripts\rom\userfunctions folder
fastLogin v3.4

heres the code i use:

Code: Select all

	SetCharList({
		{
			{account=1 , chars= {}},
		},{
			{account=2 , chars= {}},
			{account=3 , chars= {}},
		},
	})
	SetRestartClientSettings(1, "rom")
	LoginNextChar()
	loadProfile()
in my case it was changing from account 1, char 3 to account 8, char 4. but account 8 is not in the setcharlist.
trying it on another account i figured out it always adds +7 to the account it should use, 1->8, 2->9 ...
this also happens when using this from the mm window

Code: Select all

rom/login acc:3 char:3 path:xxx
this logs in to account 10

i am using this the first time, so can not compare it to a working situation.

next thing is, that i cant get the autostart of the game client to work from a batch file.
i use

Code: Select all

FOR /F "tokens=1 delims=" %%A in ('cd') do SET folder=%%A
START ../../micromacro.exe "%folder%/login.lua" acc:3 char:3 client:rom path:xxx
which closes the mm window automatically, after showing the message:

Code: Select all

Starting client rom ...
Waiting for another bot to release the active windows.
there is no other bot/mm/client running.

not realy a problem, but i just want to report, that i have to include the "NoCheckVersion" to the game link in the rom folder, otherwise it would start the normal update and start box of the game.

Can someone help me with some of these probs? ;)

Ric

User avatar
BlubBlab
Posts: 948
Joined: Fri Nov 30, 2012 11:33 pm
Location: My little Pony cafe

Re: rock5's "fastLogin Revisited"

#568 Post by BlubBlab » Mon Nov 11, 2013 8:30 am

That did happened to me also 1-2 times after that I simple added code that checked if ac/char is the right one.
Don't know from what it came, I only saw that my global savevariable.lua was crashed once.
Jack-of-all-trades, but master-of-only of a few :D

My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226

Rickster
Posts: 291
Joined: Sun Oct 24, 2010 4:23 pm

Re: rock5's "fastLogin Revisited"

#569 Post by Rickster » Mon Nov 11, 2013 8:58 am

how and where did you do the check?
i would like to prevent to log in to the wrong account.

Ric

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: rock5's "fastLogin Revisited"

#570 Post by rock5 » Mon Nov 11, 2013 11:16 pm

This is going to be hard to crack. Firstly though, when you see the message that says "Logging on to account" does is say 3 or 10? If 10 then there is something wrong with one of the userfunctions. If 3 then there is something wrong with loginxml.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Rickster
Posts: 291
Joined: Sun Oct 24, 2010 4:23 pm

Re: rock5's "fastLogin Revisited"

#571 Post by Rickster » Tue Nov 12, 2013 12:14 am

messages from the bot are correct, changing from char 1, account 3 to:

Code: Select all

Changing to character 2 account 3 with client lnk "rom"
(translated) SUCCESSFUL: The process with PID xxxx was killed.
Starting client rom ...
Clicking account 3 ...
Selecting character 2 ...
Waiting until in-game ...
But it clicks account 10 to log in with that one.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: rock5's "fastLogin Revisited"

#572 Post by rock5 » Tue Nov 12, 2013 7:39 am

Maybe you should try reinstalling fastlogin. Make sure you be careful when copying over the account info.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: rock5's "fastLogin Revisited"

#573 Post by Lamkefyned » Wed Nov 13, 2013 3:05 pm

Error

http://youtu.be/V33mPZRSSWQ

see video

Bath Code:

Code: Select all

@echo off
FOR /F "tokens=1 delims=" %%A in ('cd') do SET folder=%%A
START ../../micromacro.exe "%folder%/login.lua" acc:2 char:1 client:Rom path:perros 2
If you think something is right just because everyone else believes,you're not thinking.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: rock5's "fastLogin Revisited"

#574 Post by rock5 » Wed Nov 13, 2013 10:34 pm

You can't use spaces in file names at the prompt. Even if you have already started the client manually, this wont work.

Code: Select all

rom/bot path:perros 2
Change the name of the file to perros2.

BTW. We have a new way of finding the current folder. Check out the way it's done now with the bat files in the rom folder.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: rock5's "fastLogin Revisited"

#575 Post by Lamkefyned » Wed Nov 13, 2013 11:17 pm

and fix it but it still does not click on the button above and click below
If you think something is right just because everyone else believes,you're not thinking.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: rock5's "fastLogin Revisited"

#576 Post by rock5 » Wed Nov 13, 2013 11:30 pm

I don't understand. Above and below what? What buttons?
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
BlubBlab
Posts: 948
Joined: Fri Nov 30, 2012 11:33 pm
Location: My little Pony cafe

Re: rock5's "fastLogin Revisited"

#577 Post by BlubBlab » Thu Nov 14, 2013 4:59 am

I think he mean a char to much below in the list here my code what he ask for:

Code: Select all

function ChangeCharRestartNext(client)
	if(client == nil) then
		client = "Client"
	end
	if #charList == 0 then
		error("LoginNextChar(); No character list defined. Use \"SetCharList(_table)\" to define list before using \"LoginNextChar()\"")
	end

	nextChar, nextAcc = GetNextChar()
	CurrentLoginChar = nextChar;
	CurrentLoginAcc = nextAcc;
	if nextAcc == nil then
		if (Quit_Game == "true") then
			-- we will quit game
			print("Last player finished. We will Quit game")
			RoMScript("QuitGame()")
		else			-- Last character
			print("Last player finished.")
			player:logout()
		end
	end
	ChangeCharRestart(nextChar,nextAcc, client);
        -- That part he asked about
	if( nextChar ~= getChar() or  nextAcc ~= getAcc())then
		print("We are in the wrong acc Report:ChangeCharRestartNext");
		ChangeCharRestart(nextChar,nextAcc,"Client")
	end
	
	CurrentLoginChar = nextChar;
	CurrentLoginAcc = nextAcc;
end


I have also a problem I have a function that login a char for KS, the problem is if I start it directly before I switched between different chars it works perfectly but if I switched chars through rombot before it crash because I seems it mislead too an old rom-client.
I don't know what which system var contains so I can't update it myself bevor I start a new rom-client.

Code: Select all

function loginChar(character, account, client)
	client = client or current_client_lnk_in_use
	local oldwindow = nil;
	local oldProcess = nil;
	local oldwin = __WIN
	local trycounter = 1;
	local oldchar = getChar();
	local oldacc = getAcc()
	if not client then
		error("No client specified.")
	end
	if not account then
		error("No account specified.")
	end
	if not character then
		error("No character specified.")
	end
	
	oldwindow = getWin();
	oldProcess = __PROC;
	
		startClient(client, oldwindow)
		rest(5000)
	
	__PROC = openProcess( findProcessByWindow(getWin()) )
	
	-- Wait until it's at the login screen. ('atLogin' returns true early so I'm not sure this is necessary)
	
	repeat
		rest(1000)
	until gameState(__WIN) == 1
	rest(3000)

	-- Click login button until it leave login
	reserveActiveWindow()
	print("Clicking account "..account.." ...")
	repeat
		clickLoginButton(account)
		rest(2000)
	trycounter = trycounter +1;
	until gameState() ~= 1
	releaseActiveWindow()

	-- Wait until at character selection
	repeat
		rest(2000)
	until gameState() == 2
	rest(3000)

	-- Click character
	reserveActiveWindow()
	print("Selecting character "..character.." ... ")
	clickCharacter(character) rest(500)
	keyboardPress(key.VK_ENTER)
	releaseActiveWindow()

	-- Wait until in game
	print("Waiting until in-game ...")
	local starttime = os.time()
	repeat
		rest(2000)
	until gameState() == 3 or 120 > (os.time() - starttime)
	rest(3000)
	showWindow(getWin(),sw.minimize);
	
	detach()
	
	
	rest(500)
	if(openProcess( oldwin) == 0)then
		login(oldchar, oldacc, "Client");
	end
	
	__PROC = oldProcess;
	__WIN = oldwin;
	attach(oldwindow);
	IdAddressTables = {}

	if CCamera then
		local cameraAddress = memoryReadUIntPtr(getProc(), addresses.staticbase_char, addresses.camPtr_offset) or 0;
		camera = CCamera(cameraAddress);
	end

	if CGuildbank then guildbank = CGuildbank() end
	player:update();
end
Jack-of-all-trades, but master-of-only of a few :D

My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: rock5's "fastLogin Revisited"

#578 Post by rock5 » Thu Nov 14, 2013 7:21 am

Not sure I understand. Are you saying ChangeCharRestart and login don't work properly?

Looks like you are saying ChangeCharRestart sometimes logs into the wrong account. It works fine for me but if you are talking about your function there could be something wrong there. I see you change CurrentLoginChar/Acc. I'm not sure why you do that. ChangeCharRestart doesn't do that. All you really need for a "ChangeCharRestartNext" function is

Code: Select all

ChangeCharRestartNext(client)
    local nextChar, nextAcc = GetNextChar()
    if nextAcc == nil then
        -- Do something if last
    else
        ChangeCharRestart(nextChar,nextAcc, client)
    end
end
I'm not quite sure of the purpose of the second code and I'm not inclined to fix it for you. If you report a problem with my 'login' function I'll fix it, if I can. Just explain the error and step by step how you caused it so I can try to reproduce it.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
BlubBlab
Posts: 948
Joined: Fri Nov 30, 2012 11:33 pm
Location: My little Pony cafe

Re: rock5's "fastLogin Revisited"

#579 Post by BlubBlab » Thu Nov 14, 2013 9:12 am

Sry I mixed thinks up a little bit today the first code was an answer to Rickster what I'm doing to make sure afterwards that I'm in the right ac and char so far that code works a few 100 times tested.

The second code is a function that starts a new client additional to the client which is already their and then return to the old client to control it again. I use this function a few months until now, but like I said their is a bug in it. When I already restarted the client befor through the bot it crash. Like that:
KS Char (loginChar)=> KS character (return)=>KS Char that works.
character(loginNextChar)=>character(loginNextChar)=>KS Char(loginChar)=> KS character (return) => MM reading error

That starts annoying me
Jack-of-all-trades, but master-of-only of a few :D

My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226

User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: rock5's "fastLogin Revisited"

#580 Post by Lamkefyned » Thu Nov 14, 2013 5:03 pm

in my case click on the button click account.al go where no old version where the new
If you think something is right just because everyone else believes,you're not thinking.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest