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
madgamer
Posts: 18
Joined: Sat Oct 01, 2011 1:34 pm

Re: rock5's "fastLogin Revisited"

#201 Post by madgamer » Sat Nov 19, 2011 11:01 pm

hello, ive noticed a problem lately when loading the next character and im not to sure how to fix it.
Ill try to give as much info as possible

here is what happens from my understanding, the bot finishes and logs into next character, bot succesfully logs into next character and trys to goto waypoint one or closest, BUT bot thinks its at a X,Y,Z location its not really at? and enters a chain unsticking loop till stoped.

Code: Select all

You did 10 of 10 All Done Stop.
CharacterName = $$$$ Done
Loading next character on this account
Use MACRO: Executing RoMScript "}LoginNextToon=true;a={".
Use MACRO: Executing RoMScript "Logout();".
Player address changed: 0x4525C300
Maximum range of range attack skills is less than COMBAT_DISTANCE 100. Reducing
COMBAT_DISTANCE setting to 0.
Loading Next Farmer..
We changed the option 'COMBAT_DISTANCE' from '0' to '90'.
We changed the option 'COMBAT_RANGED_PULL' from 'false' to 'false'.
We changed the option 'WAYPOINT_DEVIATION' from '0' to '0'.
We changed the option 'ANTI_KS' from 'true' to 'true'.
We changed the option 'LOOT_PAUSE_AFTER' from '5' to '5'.
GM detection started
We changed the option 'INV_AUTOSELL_ENABLE' from 'true' to 'true'.
We changed the option 'INV_AUTOSELL_FROMSLOT' from '1' to '1'.
We changed the option 'INV_AUTOSELL_TOSLOT' from '90' to '90'.
We changed the option 'INV_AUTOSELL_QUALITY' from 'white,green' to 'white,green
.
We changed the option 'INV_AUTOSELL_TYPES_NOSELL' from 'Accessories,Amulets' to
'Accessories,Amulets'.
Loaded waypoint path tokenquick.xml
No return path with default naming tokenquick_return.xml found.
We use the normal waypoint path tokenquick.xml now.
We found Logar Bulletin Board and will harvest it.
Quest accepted: sharp bear claw
Quest accepted: collect boar tusks
Got the Quests
Clearing target.
Moving to waypoint #1, (-613, -5812)
You've done 0 of 10 Daily Quests.
Got the Quests
Moving to waypoint #2, (-564, -5904)
Clearing target.
Unsticking player... at position -606,-5829. Trial 1 from maximum 10 trials
Moving to waypoint #2, (-564, -5904)
Clearing target.
Unsticking player... at position -606,-5829. Trial 2 from maximum 10 trials
Moving to waypoint #2, (-564, -5904)
Clearing target.
Unsticking player... at position -606,-5829. Trial 3 from maximum 10 trials
Moving to waypoint #1, (-613, -5812)
You've done 0 of 10 Daily Quests.
Got the Quests
Moving to waypoint #2, (-564, -5904)
Clearing target.
Unsticking player... at position -606,-5829. Trial 4 from maximum 10 trials
Moving to waypoint #2, (-564, -5904)
Clearing target.
Unsticking player... at position -606,-5829. Trial 5 from maximum 10 trials
Moving to waypoint #2, (-564, -5904)
Clearing target.
Unsticking player... at position -606,-5829. Trial 6 from maximum 10 trials
Moving to waypoint #4, (-654, -6022)
Paused. (Delete) to continue, (CTRL+L) exit to shell, (CTRL+C) quit
Stopping execution.

below is my logout script.

Code: Select all

function nextplease()
	if loadeggafter == true then
		printf("Loading Egg Farmer Script\n"); yrest(2000);
        loadPaths("eggs");
	else
		printf("Loading next character on this account\n"); yrest(2000);
		sendMacro("}LoginNextToon=true;a={")
        sendMacro("Logout();");
        waitForLoadingScreen(90);
		printf("Loading Next Farmer..\n");
        loadPaths("tokenquick");
	end
end
pretty sure both my MM and rombot are SVN updated. ive noticed this problem for awhile now idk why its doing it.
always the same thou bot trys to goto the first waypoint even thou its already there or ran past it and unsticks for no reason. maybe my bot is using the X,Y,Z location as the character it just came from?
ive come back to find the bot half a screen away from where it loged in at(loged in at correct spot) just from unsticking itself and running to a new wrong spot etc.
Doesnt happen everytime but def happens once an account always sometimes a few times.
i noticed Player address changed: 0x4525C300 happens, do i need a player.update after my loadPaths maybe?

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

Re: rock5's "fastLogin Revisited"

#202 Post by rock5 » Sun Nov 20, 2011 6:42 am

It looks like it successfully got to waypoint #1 because the unsticks start on the way to #2.

The fact that it says the address changed means it updated player so it should be ok. You would only need to do a player:update() if you were doing some more code after calling that function, within the same waypoint. Otherwise it will update player as it moves to the first waypoint.
  • 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
Nero
Posts: 98
Joined: Wed Aug 10, 2011 9:07 am

Re: rock5's "fastLogin Revisited"

#203 Post by Nero » Fri Nov 25, 2011 1:19 am

Finally got around to make it work correctly (eliminated that annoying thing where after using teleporter on character logged by that function it would spawn underground and die).

Next step would be, as I've mentioned, changing channel - that's where the code you gave me comes in handy (thanks!).


Problem is, I've no idea where to add this line. I'm using your fastLogin just to change chars for now, so I could just grab some other script floating on forum, but this one is far superior to them.


Adding it to WP doesn't work - tried in two possible places just to test

Code: Select all

	sendMacro("}LoginNextToon=true a={") -- Tell autologin to log next character
	CHARACTERSELECT_REGION_SELECTED = 2
	sendMacro("Logout()") -- Logout
	CHARACTERSELECT_REGION_SELECTED = 2
	waitForLoadingScreen() -- Wait until the next character has finished loading
both didn't work.

Then I've looked trough userfunction, and it appears to complement fastLogin, so I'm reasonably confident that changing channel on login doesn't go there.

So, I've looked at lua files in Loginxml, but didn't manage to find any place to add this line to. Closest thing there is is part of logindialog.lua, starting at line 147:

Code: Select all

LoginDialogTypes["SELECT_CHARACTER_ZONENOTEXIST"] = {
	text = TEXT("SELECT_CHARACTER_ZONENOTEXIST"),
	button1 = TEXT("LOGIN_OKAY"),
	button2 = TEXT("LOGIN_CANCEL"),
	OnAccept = function()
		EnterWorld(CHARACTER_SELECT.selectedIndex);
--shouldn't it go there? didn't work
	end,
	OnCancel = function()
		CancelEnterWorld();
	end,
}
Out of ideas. I would appreciate if you could spare a minute to help me with this when you've got a second (I'm not in a rush however, take your time ;] )

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

Re: rock5's "fastLogin Revisited"

#204 Post by rock5 » Fri Nov 25, 2011 4:54 am

Hm.. fastlogin has an option for setting the channel.

Code: Select all

-- >>>>>>>> ENTER THE NUMBER OF THE CHANNEL YOU WANT TO BE AUTO SELECTED <<<<<<<<
fastLoginRegSel=1
When doing relogs it set it to this channel. It should be a simple matter to change this value before a relog, eg.

Code: Select all

RoMScript("fastLoginRegSel = 2")
ChangeChar(3,4)
  • 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
Nero
Posts: 98
Joined: Wed Aug 10, 2011 9:07 am

Re: rock5's "fastLogin Revisited"

#205 Post by Nero » Fri Nov 25, 2011 5:29 am

Hmm.. it might be, but if one had much chars, it would be a bother to check for name of currently used char, and then based on this to choose channel.

As I'm looking for it to simply choose random channel, would just changing that line in accountlogin.lua to

Code: Select all

fastLoginChrSel=math.random(3)
work?

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

Re: rock5's "fastLogin Revisited"

#206 Post by rock5 » Fri Nov 25, 2011 5:46 am

I think so, except that is run only when the file is loaded, so once set, wouldn't change. You could just as easily use

Code: Select all

RoMScript("fastLoginRegSel = math.random(3)")
during relogs.
  • 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
Nero
Posts: 98
Joined: Wed Aug 10, 2011 9:07 am

Re: rock5's "fastLogin Revisited"

#207 Post by Nero » Fri Nov 25, 2011 6:39 am

My 'biggest' account has 6 chars - that makes for 1/243 chance that all chars will log in on the same channel. With math.random it keeps happening for some reason..

I've created 2 waypoints. Here's the code

Code: Select all

   <onLoad>
	<!--Log out and login on next character-->
	yrest(2500);
	RoMScript("fastLoginRegSel=3");
	yrest(2500);
	sendMacro("}LoginNextToon=true a={") -- Tell autologin to log next character
	sendMacro("Logout()") -- Logout
	waitForLoadingScreen() -- Wait until the next character has finished loading
	yrest(800);
	keyboardPress( settings.hotkeys.MOVE_FORWARD.key );
	yrest(800);
	loadPaths("Start2"); 

   </onLoad>
It's start and Start2 - only difference is that one has fastLoginRegSel=2, and one fastLoginRegSel=3. Start loads Start2, Start2 loads Start - so it should alternate between those two channels.

No such luck - it did not, always loads the number specified in accountlogin. It's also impossible to change accountlogin.lua's fastLoginRegSel without closing the game, but I guess it's expected.


Why doesn't it work?


Just now noticed that it doesn't even print that another waypoint is loaded - but I'm not sure if it's being printed if the whole WP is in onload anyway

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

Re: rock5's "fastLogin Revisited"

#208 Post by Buster99 » Fri Nov 25, 2011 9:59 am

rock5, ty so much for your great work. Has been a huge help for long time for me tho new to posting.

Problem: I am trying to use your new function, LoginNextChar() but getting error, "No character list defined. Use 'SetCharList<_table> to define list before using 'LoginNextChar<>". I have set up all my account names and secondaries in accountlogin.lua and logindialg.lua. My table in LoginNextChar looks like:

Code: Select all

function SetCharList(_table)
		SetCharList({
			{account=1, chars= {3,4,5,6,7,8}},
			{account=3, chars= {2,3,4,5,6,7,8}},
			{account=4, chars= {}},
		})
I have tried to call this SetCharList(_table) function immediately before I call LoginNextChar() but I get a stack overflow error.

I am trying to call both userfunctions after completely 10 dailies with this code:

Code: Select all

<waypoint x="31845" z="4588">
			local dailyQuestCount, dailyQuestsPerDay= RoMScript("Daily_count()"); 
     			if 10 == dailyQuestCount then
				SetCharList(_table)
				LoginNextChar()
              else 
Just not sure how to get the #charList to not be 0. Could you give a small snipet of code that actually uses these functions properly.

Any help appreciated. Very much want this new userfunction to work!

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

Re: rock5's "fastLogin Revisited"

#209 Post by rock5 » Fri Nov 25, 2011 10:59 am

@ Nero. Sorry, just as LoginNextToon you you have to do this

Code: Select all

sendMacro("}LoginNextToon=true a={") 
For fastLoginRegSel you have to do it like this,

Code: Select all

RoMScript("}fastLoginRegSel=3 a={");
You have to do this every time you change the value of a variable.

@ Buster

DO NOT EDIT THE LoginNextChar USERFUNCTION FILE. Restore it back to it's original state.

Otherwise, you nearly had it.

In you waypoint file, assign the table.

Code: Select all

      SetCharList({
         {account=1, chars= {3,4,5,6,7,8}},
         {account=3, chars= {2,3,4,5,6,7,8}},
         {account=4, chars= {}},
      })
Then change character

Code: Select all

LoginNextChar()
  • 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"

#210 Post by Buster99 » Fri Nov 25, 2011 11:43 am

HAHA. Thanks so much for fast response. Makes perfect sense! Going to make changes now.

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

Re: rock5's "fastLogin Revisited"

#211 Post by Buster99 » Sat Nov 26, 2011 2:00 pm

Rock, userfunction works great but I am having one problem. When I am finished with char #8 and it is switching to new account...it wrongly logs in char#1 instead of char#2 even tho I have correctly defined the char table to not use first char. Any ideas why?

Is this userfunction designed to be able to log out of one acct and login another account? Even able to log in, skipping a char?

Thanks again for your great work.

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

Re: rock5's "fastLogin Revisited"

#212 Post by rock5 » Sat Nov 26, 2011 10:11 pm

I think that was caused by an earlier version of loginxml. I think it was fixed in version 2.21. Try updating to the latest version.
  • 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"

#213 Post by Buster99 » Sun Nov 27, 2011 9:23 am

Hmmm. I am using version 2.2. Here is my table:

Code: Select all

	SetCharList({
		{account=1, chars= {3,4,5,6,7,8}},
		{account=3, chars= {2,3,4,5,6,7,8}},
	})
When it finishes with acccount 1 and loads account 3 it still tries to load char#1 instead of bypassing to #2. The message in micromacro correctly says it is loading char 2, account 3 but it still logs in first char.

Any ideas?

If I am unable to get this part to work could you share a way to have a check of char location? e.g. - if character is not at correct waypoint when characdter logs in then it executes LoginNextChar();? Some king of check based on zone or location because the chars that I am trying to skip are not even in same zone.

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

Re: rock5's "fastLogin Revisited"

#214 Post by rock5 » Sun Nov 27, 2011 10:12 am

Buster99 wrote:Hmmm. I am using version 2.2.
So I was right, it was because you are running an older version.

So did you update it? If you don't update it, it wont work.
  • 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

botique
Posts: 40
Joined: Fri Oct 21, 2011 12:25 pm

Re: rock5's "fastLogin Revisited"

#215 Post by botique » Sun Nov 27, 2011 10:50 am

I have a similar problem when using the table

Code: Select all

SetCharList({
        {account=1 , chars= {2,3,4,5,6,7,8}},
        {account=3 , chars= {1,2,3,4,5,6,7,8}},
	{account=2 , chars= {2,3,4,5,6,7,8}},
        });
in version 2.22
When switching from account 3 to account 2 rombot informs correctly that it will load character 2 of account 2, but it actually switches to character 1 of account 2.

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

Re: rock5's "fastLogin Revisited"

#216 Post by rock5 » Sun Nov 27, 2011 11:12 am

botique wrote:I have a similar problem ... in version 2.22
Did you restart the game after you installed 2.22?
  • 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

botique
Posts: 40
Joined: Fri Oct 21, 2011 12:25 pm

Re: rock5's "fastLogin Revisited"

#217 Post by botique » Sun Nov 27, 2011 11:23 am

yes, i am using version 2.22 for about a week now.

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

Re: rock5's "fastLogin Revisited"

#218 Post by Buster99 » Sun Nov 27, 2011 12:58 pm

Rock, sorry about typo. I am running verion 2.22 also.

It is only version I have actually used.

Since another person having same problem I am wondering if there is error in the userfunction.

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

Re: rock5's "fastLogin Revisited"

#219 Post by rock5 » Sun Nov 27, 2011 10:52 pm

While trying to find a copy of 2.2 so that I can see the differences between 2.2 and 2.21 I realized I'm using version 2.23. I even have it all zipped up in my archive and ready to upload but I must have forgotten to upload it.

It looks like, even though I fixed the problem in 2.21, the small change I made in 2.22 means it stopped working again.

Anyway, the version I use has another change that fixes it and it has been working well for me so I'll upload it.

Main changes are:
  • Added option to select the channel to log into eg.

    Code: Select all

    ChangeChar(char,account,Channel)
  • Fixed the above problem. Logs into the correct character when changing account.
  • Last minute addition, if 'char' is not specified then defaults to logging into next character, removing the need to use the awkward RoMScript("} LoginNextToon = true a={").
Also updated "userfunction_LogNextChar.lua" to support these changes. Also, the ChangeChar in the userfunctions file now supports nil values like the one in loginxml. So it accepts all the same values, and can be used the same.
So

Code: Select all

ChangeChar(5,nil,2)
and

Code: Select all

RoMScript("ChangeChar(5,nil,2)") 
will both log into character 5 of the same account using channel 2.
  • 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"

#220 Post by rock5 » Mon Nov 28, 2011 12:10 am

I've updated the first post with the new files and descriptions.

Now at versions.
  • loginxml 2.23
    userfunctions_LoginNextChar 1.1
  • 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 2 guests