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
Notorious
Posts: 19
Joined: Thu Jan 02, 2014 7:46 am

Re: rock5's "fastLogin Revisited"

#741 Post by Notorious » Sun Apr 06, 2014 3:00 pm

rock5 wrote:@Notorious, I think I found the problem. The gameState function was sometimes reporting that it was at the character selection even though it wasn't. So it would try to click the character then press Enter. This caused the Enter to cancel the login process. As you may know, if you cancel the login, it pops up the server selection screen.

I found what I think is a better pointer. Here is a version of userfunction_login.lua using the new address. It should only work with latest official version of rom 6.0.7 as it's using a static address. Tell me if it works and I'll see about adding a pattern search for it so it will work with all versions.
Hi rock5
I found a new problem, now after login to account and server bot not selected character. MM does not report any error just stop at "Chose account xx"

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

Re: rock5's "fastLogin Revisited"

#742 Post by rock5 » Sun Apr 06, 2014 9:28 pm

I ran through my relog test script twice, going through all my alt characters twice, and I didn't get that problem. If it gets to the character selection screen but doesn't try to click the character then it is either waiting for the gamestate to change or it's waiting for the client to become the foreground window.

If it's waiting for the client to become the foreground window then you should see the client icon flashing in the Windows taskbar, well that's what you see in Windows 7. You can double check whether this the problem by clicking on the client window when it gets stuck to make sure it's the active window. If it doesn't resume then that wasn't the problem.

If it's waiting for the gamestate to change then that means the gamestate is reporting the wrong state. I'll probably have to add some print messages to figure out what's happening.
  • 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

Notorious
Posts: 19
Joined: Thu Jan 02, 2014 7:46 am

Re: rock5's "fastLogin Revisited"

#743 Post by Notorious » Tue Apr 08, 2014 12:20 pm

Hmm with this script all works great:

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">

<onLoad>

function relog()
   -- 2 CharLists for 2 clients running at the same time
   SetCharList({{
      {account=2 , chars= {3,4,5,6,7,8}},
      {account=3 , chars= {1,2,3,4,5,6,7,8}},
      {account=4 , chars= {1,2,3,4,5,6,7,8}},
   

   },{
      {account=5 , chars= {1,2,3,4,5,6,7,8}},
      {account=6 , chars= {1,3,4,5,6,7,8}},
      
   }})

      SetChannelForLogin("random")
	  SetRestartClientSettings(2,"rom")
      LoginNextChar()
      loadProfile()
      loadPaths(__WPL.FileName)
	  
   
end
relog()
</onLoad>
</waypoints>
Later I again test the full script

Notorious
Posts: 19
Joined: Thu Jan 02, 2014 7:46 am

Re: rock5's "fastLogin Revisited"

#744 Post by Notorious » Wed Apr 09, 2014 5:24 am

I know what causes the error :D
http://www.solarstrike.net/phpBB3/viewt ... =27&t=3811
When bot mode is enable script stops after "Click account X". In normal mode all is ok.
I know you have not support this project, but I use it often and I like it.

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

Re: rock5's "fastLogin Revisited"

#745 Post by rock5 » Wed Apr 09, 2014 9:25 am

Yeah, I'm wary of using the model file now, because I know it can cause problems. If I want to improve performance I usually just rename the texture fdbs and only use the 'fx' folder in the models folder. Just to keep it simple.
  • 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
cibervagos
Posts: 26
Joined: Sat Apr 12, 2014 10:36 pm
Location: Argentina

Re: rock5's "fastLogin Revisited"

#746 Post by cibervagos » Tue Apr 29, 2014 7:08 pm

Hi all. I have a little problem. When I use ChangeCharRestart() or login() MM never select my character. I put some print() in userfunction_login and MM stuk here.

Code: Select all

	 repeat
		rest(4000)
	until gameState() == 2
I never use model or any other modified file. Sorry for my english. I not english speaker.

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

Re: rock5's "fastLogin Revisited"

#747 Post by rock5 » Tue Apr 29, 2014 9:34 pm

What does it return as the gameState()? Just add a print that prints it inside the loop.
  • 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
cibervagos
Posts: 26
Joined: Sat Apr 12, 2014 10:36 pm
Location: Argentina

Re: rock5's "fastLogin Revisited"

#748 Post by cibervagos » Wed Apr 30, 2014 11:41 am

Ty for ur help. I solved it. gameState() = 0 in character selection screen. So I changed my userfunction_login from

Code: Select all

	repeat
		rest(4000)
	until gameState() == 2
to

Code: Select all

	repeat
		if gameState() ~= juego then
			local juego = gameState();
			print("Debugg gameState Seleccion PJ ..."..juego.."\n");
		end
		rest(4000)
	until gameState() == 0
Now work fine for me. Ty.

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

Re: rock5's "fastLogin Revisited"

#749 Post by rock5 » Wed Apr 30, 2014 7:23 pm

I'm happy you got it working but that's not really a fix. A gamestate of 0 means it thinks it's between states. I'm surprised your fix works. I'm not sure what's going on there but I'm working on a new version that uses a better memory address for the character selection screen. Hopefully it will work for you.
  • 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

Notorious
Posts: 19
Joined: Thu Jan 02, 2014 7:46 am

Re: rock5's "fastLogin Revisited"

#750 Post by Notorious » Fri May 16, 2014 11:43 pm

How to kill the client when the last char end?

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

Re: rock5's "fastLogin Revisited"

#751 Post by rock5 » Fri May 16, 2014 11:58 pm

Code: Select all

if IsLastChar() then
    killClient()
    error("Client killed. Stopping bot")
end
You would use that before calling LoginNextChar() or ChangeChar().
  • 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

ZZZZZ
Posts: 513
Joined: Sun Oct 21, 2012 1:42 am

Re: rock5's "fastLogin Revisited"

#752 Post by ZZZZZ » Sat May 17, 2014 2:44 am

rock5 wrote:

Code: Select all

if IsLastChar() then
    killClient()
    error("Client killed. Stopping bot")
end
You would use that before calling LoginNextChar() or ChangeChar().
You could also use the variable built into LoginNextChar:

Code: Select all

Quit_Game = "true"
LoginNextChar()
loadProfile()						
line 202 of LoginNextChar

Code: Select all

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

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

Re: rock5's "fastLogin Revisited"

#753 Post by rock5 » Sat May 17, 2014 3:01 am

Yeah, there's that too. Forgot all about that option.
  • 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
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: rock5's "fastLogin Revisited"

#754 Post by rock5 » Sat May 17, 2014 10:22 pm

Updated fastlogin (loginxml) to version 3.51. No big changes.
  • - Changes default for fastLoginRegSel to nil so default for channel is now random.
    - Moved getDefaultName() to accountlogin.lua.
    - Fixed pr function to handle tables with functions for keys. Thx dx876234.
  • 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
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: rock5's "fastLogin Revisited"

#755 Post by rock5 » Sun May 18, 2014 10:13 pm

Updated fastlogin to version 3.511 to fix a bug I introduced in 3.51 that caused ChangeChar to fail.
  • 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

ZZZZZ
Posts: 513
Joined: Sun Oct 21, 2012 1:42 am

Re: rock5's "fastLogin Revisited"

#756 Post by ZZZZZ » Mon May 26, 2014 6:41 pm

Just wondering, how does loginxml remove the 10 second delay with logging out? I want to look into making it also remove the delay for switching channels, or at least lowering it to 5 seconds or so. Just have no idea if its even possible.

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

Re: rock5's "fastLogin Revisited"

#757 Post by rock5 » Mon May 26, 2014 8:28 pm

When you log out the game executes Logout() which includes the timer. It was discovered that using DisconnectFromServer() was a faster way to log off so loginxml replaces the Logout function with it's own that uses DisconnectFromServer().

Code: Select all

function Logout()
	RealmServer = GetCurrentRealm()
	DisconnectFromServer()
end
I don't know if something similar can be done with changing channel. I can tell you the command it executes when you change channel is ChangeParallelID(num). I'm not aware of any other way to change channel.
  • 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

leroy
Posts: 19
Joined: Thu Sep 19, 2013 11:57 am

Re: rock5's "fastLogin Revisited"

#758 Post by leroy » Sun Jun 01, 2014 2:35 pm

Some NPC's are only available in 1 channel. Like the current badges/bags NPC is only in channel 1. SetChannelForLogin() works when relogging chars but not when restarting client with SetRestartClientSettings().
So I modified some files to click the desire channel when restarting client.
It works when used from a waypoint but also from batchfile.
In waypoint use: SetRestartClientSettings(frequency, "link2romclient", channel)
In batchfile use: micromacro.exe "login.lua" acc:## char:## client:link2romclient chan:channel
Where channel can be 1,2 or 3.
Attachments
userfunction_LoginNextChar_MOD.lua
(7.79 KiB) Downloaded 130 times
userfunction_login_MOD.lua
(10.96 KiB) Downloaded 109 times
login.lua
(1.43 KiB) Downloaded 127 times

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

Re: rock5's "fastLogin Revisited"

#759 Post by rock5 » Sun Jun 01, 2014 7:36 pm

Good work. I still don't know if I'd implement it though. In a later version I posted later in the topic I have login accepting size info for the client and console

Code: Select all

login(character, account, client, clientx, clienty, clientw, clienth, consolex, consoley, consolew, consoleh)
So if I added the channel argument and a user didn't want to use it they would have to still add a nil value to bypass it, eg.

Code: Select all

login(character, account, client, nil, clientx, clienty, clientw, clienth, consolex, consoley, consolew, consoleh)
That's a bit annoying.

This is something that is needed but there are options, now. You can set the default starting channel in the accountlogin.lua file

Code: Select all

-- >>>>>>>> ENTER THE NUMBER OF THE CHANNEL YOU WANT TO BE AUTO SELECTED <<<<<<<<
fastLoginRegSel = 1
You can change channel after logging on, eg.

Code: Select all

if RoMScript("GetCurrentParallelID()") ~= 1 then
    SetChannelForLogin(1)
    ChangeChar("current")
end
Yeah, so I'm still undecided. I might do it but I'm not sure.
  • 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
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: rock5's "fastLogin Revisited"

#760 Post by rock5 » Sun Jun 01, 2014 7:49 pm

Might as well give you some feed back while I'm at it.

Function clickCharacter is missing a line

Code: Select all

	moveX,moveY = x+w+xPer*h/100, y+h/2+yPer*h/100
I think you accidentally moved it instead of copying it.

You probably do not want to make it mandatory to specify a channel.

Code: Select all

	if not channel then
		error("No channel specified.")
	end
You probably don't need to release then reserve the active window between these 2 steps.

Code: Select all

	-- Click channel
	reserveActiveWindow()
	print("Selecting channel "..channel.." ... ")
	clickChannel(channel) rest(500)
	releaseActiveWindow()

	-- Click character
	reserveActiveWindow()
	print("Selecting character "..character.." ... ")
	clickCharacter(character) rest(500)
	keyboardPress(key.VK_ENTER)
	releaseActiveWindow()
Ah..., that's 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

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests