Page 3 of 4
Re: Problem with auto login on next char
Posted: Tue Aug 12, 2014 10:07 am
by wiedzmin97
Yea, ofc. Also thanks for your help and work with it

)
Re: Problem with auto login on next char
Posted: Wed Aug 13, 2014 12:09 am
by Musier
It's me again. I got a next problem. Bot works great but now when i'm for example on account 2 char 3 and complete quest on it bot exectue as last account and don't change on next char.
Re: Problem with auto login on next char
Posted: Wed Aug 13, 2014 12:37 am
by rock5
What does your charlist look like? And what is the output on MM console?
Re: Problem with auto login on next char
Posted: Wed Aug 13, 2014 12:51 am
by Musier
Here i got screen with that. I'm on the 1st account and 3rd character.
http://imgur.com/MVH0mE9
And here is script:
Code: Select all
<waypoints type="TRAVEL">
<!-- # 1 --><waypoint x="31953" z="3272" y="22"> player:target_NPC("Gamunhan");
AcceptQuestByName("getting to know yourself")
player:target_NPC("Gamunhan");
CompleteQuestByName()
</waypoint>
<!-- # 8 --><waypoint x="31987" z="3368" y="6"> </waypoint>
<!-- # 22 --><waypoint x="32061" z="3391" y="5"> </waypoint>
<!-- # 23 --><waypoint x="32212" z="3354" y="28"> </waypoint>
<!-- # 24 --><waypoint x="32288" z="3346" y="28"> player:target_NPC("Daily Quest Manager");
AcceptQuestByName()
player:target_NPC("Daily Quest Manager");
CompleteQuestByName()
</waypoint>
<!-- # 29 --><waypoint x="32264" z="3338" y="28"> </waypoint>
<!-- # 30 --><waypoint x="32157" z="3403" y="12"> </waypoint>
<!-- # 31 --><waypoint x="31897" z="3886" y="12"> </waypoint>
<!-- # 32 --><waypoint x="31842" z="4150" y="32"> </waypoint>
<!-- # 33 --><waypoint x="31847" z="4230" y="37"> </waypoint>
<!-- # 34 --><waypoint x="31939" z="4360" y="33"> </waypoint>
<!-- # 35 --><waypoint x="31966" z="4437" y="15"> </waypoint>
<!-- # 36 --><waypoint x="31921" z="4517" y="6"> </waypoint>
<!-- # 1 --><waypoint x="31847" z="4592" tag ='Main'>
queststate = getQuestStatus("Helping them Grow");
if queststate == "complete" then
player:target_NPC("Blinsik");
CompleteQuestByName("helping them grow")
end
local dqCount, dqPerDay = RoMScript("Daily_count()");
if dqCount == 10 then
SetCharList({
{account=1, chars= {}},
{account=2, chars= {}},
{account=3, chars= {}},
{account=4, chars= {}},
{account=5, chars= {}},
})
LoginNextChar()
loadProfile()
loadPaths(__WPL.FileName);
else
player:target_NPC("Blinsik");
AcceptQuestByName("helping them grow")
end
</waypoint>
<!-- # 2 --><waypoint x="31812" z="4849"> </waypoint>
<!-- # 3 --><waypoint x="31415" z="5720" tag = "Item">
queststate = getQuestStatus("Helping them Grow")
if queststate == "incomplete" then
player:target_Object(112976,500);
yrest(3000);
__WPL:setWaypointIndex(__WPL:findWaypointTag("Item"));
end
</waypoint>
<!-- # 4 --><waypoint x="31878" z="4692"> </waypoint>
<!-- # 5 --><waypoint x="31843" z="4593"> __WPL:setWaypointIndex(__WPL:findWaypointTag("Main")); </waypoint>
</waypoints>
And why bot executes command like on the last character, but shouldn't?
Re: Problem with auto login on next char
Posted: Wed Aug 13, 2014 7:23 am
by rock5
I can't see anything wrong. Try this version with some print messages. Does it only happen with that character?
Check out my signature for a link to some instructions on how to copy and paste from the MM console.
Re: Problem with auto login on next char
Posted: Wed Aug 13, 2014 10:19 am
by Musier
This happen with every character. And i don't know what happen.
Now everything is OK. Thanks a alot again.
Re: Problem with auto login on next char
Posted: Wed Aug 13, 2014 11:26 pm
by Musier
Now i got a problem MM when one char is end MM shows the message:
scripts/rom/.../userfunction_LoginNextChar.lua:96: bad argument #1 to 'printf' <got nil>
It happens when bot ended 1st char on 1st account.
Re: Problem with auto login on next char
Posted: Thu Aug 14, 2014 12:11 am
by rock5
That means getAcc() returned nil. What would cause that?
Did you log into the game using the account button or did you log in by entering your account and password in the edit boxes?
Re: Problem with auto login on next char
Posted: Thu Aug 14, 2014 6:04 am
by Musier
rock5 wrote:That means getAcc() returned nil. What would cause that?
Did you log into the game using the account button or did you log in by entering your account and password in the edit boxes?
In loginxml i pointed "true" with autologin on account.
By the way, why i must entered secondary password o every account when i do it correctly in loginxml?
Re: Problem with auto login on next char
Posted: Thu Aug 14, 2014 6:35 am
by rock5
Musier wrote:In loginxml i pointed "true" with autologin on account.
Do you mean you set fastLoginAutoLogin to true? All the reloging functions require that you use the buttons to log in. If you don't use the buttons how will the bot know what account you're up to? Fortunately I added support for using the buttons with the auto login feature. Just use the button number instead of the account name. Eg.
Code: Select all
fastLoginAutoLogin = true
fastLoginUser = "1"
Re: Problem with auto login on next char
Posted: Thu Aug 14, 2014 7:24 am
by Musier
But i added this earlier.
Code: Select all
fastLoginAutoLogin = true
fastLoginUser = "Mauser001"
Re: Problem with auto login on next char
Posted: Thu Aug 14, 2014 7:39 am
by rock5
getAcc() requires that the in game variable "LogID" be set. It is only set when you use a button to log in. If you use the account name to log in with the auto login feature then LogID is not set so LoginNextChar doesn't know which account is logged in so it can't select the next character.
Re: Problem with auto login on next char
Posted: Thu Aug 14, 2014 8:42 am
by Musier
It means i must set up it too?
Code: Select all
fastLoginAutoEnter = true
fastLoginChrSel = 1
Re: Problem with auto login on next char
Posted: Thu Aug 14, 2014 9:12 am
by rock5
If you want the game to automatically log in and you want to use the LoginNextChar function then, yes, use the button number instead of the account name.
I forgot to answer your question about the secondary password. If it's asking for the secondary password then the secondary passwords in the logindialog.lua file must not be set up correctly. Note: if you log in without using the buttons then it wont know what secondary password to use.
Re: Problem with auto login on next char
Posted: Thu Aug 14, 2014 10:03 am
by Musier
When i got autologin = true go on account instead without secondary password but when the same option is false i must give sec password.
Code: Select all
Account8 = { ID = 8, xxx = "xxx", },
I saw my mistake and i correct in.
Re: Problem with auto login on next char
Posted: Tue Jun 23, 2015 8:07 pm
by noobbotter
Hey Rock5,
I have a custom script where my script dynamically determines the next character that needs to be loaded (vice using loginnextchar) but after it logs in the character, I get an error. Here's the code:
Code: Select all
if charToLoad ~= player.Name then
cprintf(cli.yellow,"\n\tNow loading %s (acc %s, char %s) \n\t\tinto waypoint file %s.xml.\n\n",charToLoad,accToLoad, charNumToLoad, pathToLoad)
killClient()
login(charNumToLoad, accToLoad, "rom4u")
loadProfile()
player:update()
end
It kills the client, restarts it, logs in the correct character, but then I get an error (see attachment). I'm not sure what's causing the error.
Re: Problem with auto login on next char
Posted: Wed Jun 24, 2015 6:44 am
by rock5
I get an error saying the attachment doesn't exist anymore.
Re: Problem with auto login on next char
Posted: Wed Jun 24, 2015 9:19 am
by noobbotter
They must have lost something when they upgraded this site, causing the attachment to go away.
Anyway, I tried swapping the order of the loadProfile() and player:update() from this
Code: Select all
killClient()
login(charNumToLoad, accToLoad, "rom4u")
loadProfile()
player:update()
to this
Code: Select all
killClient()
login(charNumToLoad, accToLoad, "rom4u")
player:update()
loadProfile()
and it seems to work now. Not sure if my change fixed it or if the first error was just a glitch. Maybe I had to do a player:update after changing characters prior to loading the profile?
Re: Problem with auto login on next char
Posted: Wed Jun 24, 2015 5:59 pm
by rock5
I guess that makes sense as loadProfile probably uses information from player. If player hasn't updated yet then loadProfile wont work.
I'll check attachments and let Administrator know if there is a problem with them.
Re: Problem with auto login on next char
Posted: Wed Jun 24, 2015 6:48 pm
by Administrator
He must have attached it as I was backing things up, and then when I imported the files that was left out. I've copied over the missing file and now the attachment is working properly.