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
lolita
Posts: 139
Joined: Thu Oct 20, 2011 5:39 am
Location: Serbia

Re: rock5's "fastLogin Revisited"

#541 Post by lolita » Fri Sep 13, 2013 5:00 pm

rock5 wrote:With so many buttons I can't understand why people need to log in manually.
Well i like this addon a lot, but don't want my 10 year's old kid have access to my main account :D
that's why we login manually
Life is a journey, not destination :D

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

Re: rock5's "fastLogin Revisited"

#542 Post by rock5 » Sat Sep 14, 2013 12:35 am

So that means you can't quickly log in by pressing a button and you can't use my changechar and loginnextchar functions. I'm assuming you've set up your kids accounts so they can log in easily.

I feel sad that youcan't use the buttons though. If you only log in with one account I guess that's not so bad but if you log in with a few maybe I can suggest some solutions that would allow you to use the buttons for yourself. Interested?
  • 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"

#543 Post by rock5 » Sat Sep 14, 2013 3:10 am

rock5 wrote:It's too hard to support loggings that aren't from a button. With so many buttons I can't understand why people need to log in manually.

The main problem is, I fixed the missing characters by making it log in again. When you log in manually, though, it can't log back in because it doesn't know the password.

Hm... I have an idea to fix it. I'll look at it tomorrow.
Turned out to be a lot, lot easier to fix than I thought.

Line 400 of characterselect.lua is

Code: Select all

	if LogID and RealmServer and RealmServer ~= "" and RealmServer ~= " " then
LogID means is a button was used. Get rid of that and it works fine with or without a button being used. It should be

Code: Select all

	if RealmServer and RealmServer ~= "" and RealmServer ~= " " then
  • 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
lolita
Posts: 139
Joined: Thu Oct 20, 2011 5:39 am
Location: Serbia

Re: rock5's "fastLogin Revisited"

#544 Post by lolita » Sat Sep 14, 2013 9:08 am

ty rock5 for fix, this work great, it help a lot
Life is a journey, not destination :D

Ivan
Posts: 10
Joined: Fri Dec 16, 2011 4:35 am

Re: rock5's "fastLogin Revisited"

#545 Post by Ivan » Wed Sep 18, 2013 9:40 am

Hi Rock,

I really like this addon, it is really handy.

However I am missing a function that was in autologin that allow in the configuration file to set a default character (for each account) to automatically login when selecting an account. I have several accounts each having several characters but basically I always use only one per account. But on some accounts it is the 1st character and on some other it is the 2nd or 3rd... Would it be possible to add a field in the configuration file to specify the character to log? And if this field is left empty then it goes to the character selection and let the user select the character he wants.

Thanks

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

Re: rock5's "fastLogin Revisited"

#546 Post by rock5 » Wed Sep 18, 2013 1:47 pm

That complicates things. Do you want it to be tied to the fastLoginAutoEnter option so that it auto selects the character (if specified) when the option is enabled? What happens to the fastLoginChrSel option? Do I do away with it? Or maybe this field can completely replace these 2 options? There's a bit to think about.
  • 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

Buster99
Posts: 69
Joined: Fri Nov 25, 2011 9:27 am

Re: rock5's "fastLogin Revisited"

#547 Post by Buster99 » Mon Oct 28, 2013 12:19 am

Help please. I cannot get the game client to actually close and restart. It moves through the list properly, loading each new character in list, but does not close and restart client. I have read much and not sure what I am missing. I have:

installed LoginNextChar userfunction in the correct folder (v.1.5)
installed the latest Login files, 7z
created link in Rom folder called "rom" for shortcut to game client
installed login.lua in Rom folder though I don't believe I need this file from what I have read

Here is my onload:

Code: Select all

<onLoad>

function relog()
   -- 2 CharLists for 2 clients running at the same time
   SetCharList({{
      {account=1 , chars= {1,2}},
      {account=2 , chars= {2,5}},
      {account=3 , chars= {1,2}},
      {account=4 , chars= {1,2}},
   },{
      {account=65 , chars= {1}},
      {account=5 , chars= {1,2}},
      {account=6 , chars= {1}},
      {account=7 , chars= {1}},
      {account=8 , chars= {1}},
      {account=9 , chars= {1}},
      {account=10 , chars= {1}},
   }})
   
   SetRestartClientSettings(1, "rom")
	LoginNextChar()
	loadProfile()
              loadPaths(__WPL.FileName)
end
</onLoad>
I am simiply doing dailies. When dailies are done I simply call the relog() function. I have the SetRestartClientSettings at 1 to test it out, hoping it will restart client every time I relogs, but doesn't.

Do I need to use ChangeChar? Not sure what is wrong.

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

Re: rock5's "fastLogin Revisited"

#548 Post by rock5 » Mon Oct 28, 2013 4:14 am

It's true that you don't need login.lua, that is only used for starting the bot and game together. But the other functions need userfunction_login.lua installed in the userfunctions folder to provide the game restart functionality.
  • 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

Buster99
Posts: 69
Joined: Fri Nov 25, 2011 9:27 am

Re: rock5's "fastLogin Revisited"

#549 Post by Buster99 » Mon Oct 28, 2013 10:04 am

I forgot to list it in previous post but I DO have userfunction_login.lua in the userfunction folder. Still does not work.

I am trying to test it with this simple code, but is not working:

Code: Select all

<waypoints type="TRAVEL">
<onLoad>

function relog()
   SetCharList({
      {account=1 , chars= {1,2}},
      {account=2 , chars= {2,5}},
      {account=3 , chars= {1,2}},
      {account=4 , chars= {1,2}},
   })
   

	SetRestartClientSettings(1, "rom")
	LoginNextChar()
	loadProfile()
	loadPaths(__WPL.FileName) 
end


</onLoad>
	<!-- #  1 --><waypoint x="-5868" z="3318" y="572">
		relog()
	</waypoint>
</waypoints>

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

Re: rock5's "fastLogin Revisited"

#550 Post by rock5 » Mon Oct 28, 2013 11:25 am

I can't see anything wrong with it so I went ahead and tried your code. It worked fine. Here is my output of changing 3 characters

Code: Select all

Press the (End) key to stop/pause the script.
You can resume with the (Delete) key.
Game Version is 6.0.2.2662
RoM windows size is 1024x768, upper left corner at 6,24
Loading profile XXXXX.xml
Testing 'ingamefunctions' macro. If it gets stuck here, please update the 'ingam
efunctions' by copying the 'ingamefunctions' folder from 'rom/devtools' to the g
ames 'interface/addons' folder.
MACRO Test: ok
Maximum range of range attack skills is less than COMBAT_DISTANCE 250. Reducing
COMBAT_DISTANCE setting to 50.
[DEBUG] CPU Frequency 2349.111
Loaded waypoint path __unnamed.xml
No return path with default naming __unnamed_return.xml found.
We use the normal waypoint path __unnamed.xml now.
Moving to waypoint #1, (-17961, -3322)
Changing to character 1 account 46 with client lnk "rom"
SUCCESS: The process with PID 1092 has been terminated.
Starting client rom4u ...
Clicking account 46 ...
Selecting character 1 ...
Waiting until in-game ...
Player address changed: 0x33533700
Ranged skill found: SCOUT_COMBO_SHOT
Maximum range of range attack skills is less than COMBAT_DISTANCE 250. Reducing
COMBAT_DISTANCE setting to 225.
Ranged skill found: SCOUT_COMBO_SHOT
Maximum range of range attack skills is less than COMBAT_DISTANCE 250. Reducing
COMBAT_DISTANCE setting to 225.
We read the hotkey settings from your bindings.txt file C:\Users\Rocco\My Docume
nts\Runes of Magic\bindings.txt instead of using the settings.xml file.
Loading profile XXXXX.xml
Testing 'ingamefunctions' macro. If it gets stuck here, please update the 'ingam
efunctions' by copying the 'ingamefunctions' folder from 'rom/devtools' to the g
ames 'interface/addons' folder.
MACRO Test: ok
Ranged skill found: SCOUT_COMBO_SHOT
Loaded waypoint path __unnamed.xml
No return path with default naming __unnamed_return.xml found.
We use the normal waypoint path __unnamed.xml now.
Moving to waypoint #1, (-17961, -3322)
Changing to character 1 account 47 with client lnk "rom"
SUCCESS: The process with PID 6268 has been terminated.
Starting client rom4u ...
Clicking account 47 ...
Selecting character 1 ...
Waiting until in-game ...
Player address changed: 0x36041E00
Ranged skill found: SCOUT_COMBO_SHOT
Ranged skill found: SCOUT_COMBO_SHOT
We read the hotkey settings from your bindings.txt file C:\Users\Rocco\My Docume
nts\Runes of Magic\bindings.txt instead of using the settings.xml file.
Loading profile XXXXX.xml
Testing 'ingamefunctions' macro. If it gets stuck here, please update the 'ingam
efunctions' by copying the 'ingamefunctions' folder from 'rom/devtools' to the g
ames 'interface/addons' folder.
MACRO Test: ok
No ranged skills specified in profile; Turning COMBAT_RANGED_PULL off.
Maximum range of range attack skills is less than COMBAT_DISTANCE 170. Reducing
COMBAT_DISTANCE setting to 50.
Loaded waypoint path __unnamed.xml
No return path with default naming __unnamed_return.xml found.
We use the normal waypoint path __unnamed.xml now.
Moving to waypoint #1, (-17961, -3322)
Last player finished.
10/29/13 03:15:17  Auto-logging out.
The game client did not crash.
3:15am - Exiting: Auto-logout
From what I'm seeing in the code, if it doesn't restart the client there should be a message telling you why, eg. "Character and account not specified." or "No client shortcut link specified. Not restarting client.". Look carefully in the output for any such messages.
  • 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

Buster99
Posts: 69
Joined: Fri Nov 25, 2011 9:27 am

Re: rock5's "fastLogin Revisited"

#551 Post by Buster99 » Mon Oct 28, 2013 12:51 pm

Thank you for testing my code. That gave me the information I needed to know it wasn't in the script. I found the problem after doing more testing:

I had these two copies in my userfunction folder:

userfunction_LoginNextChar_old.lua
userfunction_LoginNextChar.lua

For some reason it was accessing the old backup copy instead of the new one.

Works fine now.

Thanks for this GREAT feature!

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

Re: rock5's "fastLogin Revisited"

#552 Post by rock5 » Mon Oct 28, 2013 2:55 pm

That's because "userfunction_LoginNextChar_old.lua" is still a valid userfunction name so it gets loaded. And because it gets loaded after the other one, it overwrites it. To be a valid userfunction name it has to start with "userfunction_" and end with ".lua". So if you change one of those then it wont get loaded, eg. "userfunction_LoginNextChar._lua".
  • 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

Buster99
Posts: 69
Joined: Fri Nov 25, 2011 9:27 am

Re: rock5's "fastLogin Revisited"

#553 Post by Buster99 » Mon Oct 28, 2013 4:50 pm

Ahhh gotcha. Thank you.

Question: The example that you give in your relog function shows how to set CharList table for two clients. Is there a limit on how many clients you can do in this fashion? Would it work for 4 clients if table was adjusted for it? Does userfunction support more than 2?

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

Re: rock5's "fastLogin Revisited"

#554 Post by rock5 » Mon Oct 28, 2013 11:04 pm

There is no limit.
  • 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

Buster99
Posts: 69
Joined: Fri Nov 25, 2011 9:27 am

Re: rock5's "fastLogin Revisited"

#555 Post by Buster99 » Tue Oct 29, 2013 4:13 pm

Another question: I would like to run a farming script for one hour then force client to restart and reload script.

1. I know there is a Logout_Time option in user profile. Can I use that? Or some type of loop I set up?

I have been trying to read many posts on "timer" to see if there is a simple timer function that I can just set it to run for specified time.

2. Once I can figure out the timer option, would I use the ChangeCharRestart(characterindex, account, client) option to do the restart of client logging back in with same char?

Any help appreciated.

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

Re: rock5's "fastLogin Revisited"

#556 Post by rock5 » Tue Oct 29, 2013 11:23 pm

I don't think Logout_Time gives you the option to take any other actions besides just logging off.

I think having some sort of timer is overkill. I think all you really need is at a certain point in your waypoint file, preferably somewhere safe, check how much time has elapsed. This means 'remembering' the start time in the onload or using player.BotStartTime which the bot sets automatically. So something like this should work.

Code: Select all

local elapsed = os.difftime(os.time(), player.BotStartTime);
if( elapsed >= 60 * 60 ) then -- in seconds. 60 * 60 = 1 hour.
    -- Do stuff
That's probably the simplest way I think.
  • 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

Buster99
Posts: 69
Joined: Fri Nov 25, 2011 9:27 am

Re: rock5's "fastLogin Revisited"

#557 Post by Buster99 » Thu Oct 31, 2013 4:52 pm

Thanks Rock. That works. But...

Is there a way to restart client and relog in with same char and acct? I want to use this script with multi-clients and chars without making a script for each one.

I tried using:

Code: Select all

ChangeCharRestart('current',"rom")
and varieties of the 'current' option that is allowed with ChangeChar, but doesn't seem to allow for it.

So I am currently just using

Code: Select all

ChangeCharRestart(3,62,"rom")
If ChangeCharRestart does not allow for the 'current' option is there any chance we could get it added? :)

EDIT: Nevermind. Using the ChangeCharRestart option does not automatically close the crash client message that pops up frequently when closing client. Any ideas of how to simply restart client with same char?

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

Re: rock5's "fastLogin Revisited"

#558 Post by rock5 » Thu Oct 31, 2013 11:32 pm

Code: Select all

ChangeCharRestart("current")
-- or
ChangeCharRestart("current", nil, "rom")
Should work. Not ChangeCharRestart('current', "rom") though as the second argument should be the account.
Buster99 wrote: Nevermind. Using the ChangeCharRestart option does not automatically close the crash client message that pops up frequently when closing client.
This is probably a bug I have to fix. I just assumed that if you are using the command above, then it hasn't crashed yet so I don't need to check if it crashed. I didn't take into account that it might crash while closing it. I'll look into fixing it. It will be hard to test so I could do with your help with that.

Just to be clear, when the client crashes while restarting, the client closes but leaves the crash dialog? Is that right?
  • 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"

#559 Post by rock5 » Fri Nov 01, 2013 12:28 am

Here is something for you to try. It should close the crash dialog if it appears while killing the client.
Attachments
userfunction_login.lua
(10.29 KiB) Downloaded 157 times
  • 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

Buster99
Posts: 69
Joined: Fri Nov 25, 2011 9:27 am

Re: rock5's "fastLogin Revisited"

#560 Post by Buster99 » Fri Nov 01, 2013 12:56 pm

Code: Select all

ChangeCharRestart("current")
Works perfectly.

The client error box has not returned after using your updated userfunction_login.lua

I will let you know if any more probs but it seems to be working flawlessly.

Thanks again

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests