Problem with auto login on next char

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
wiedzmin97
Posts: 44
Joined: Wed Jul 03, 2013 1:37 pm

Re: Problem with auto login on next char

#41 Post by wiedzmin97 » Tue Aug 12, 2014 10:07 am

Yea, ofc. Also thanks for your help and work with it :))

Musier
Posts: 22
Joined: Sat Aug 09, 2014 1:29 am

Re: Problem with auto login on next char

#42 Post by Musier » Wed Aug 13, 2014 12:09 am

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.

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

Re: Problem with auto login on next char

#43 Post by rock5 » Wed Aug 13, 2014 12:37 am

What does your charlist look like? And what is the output on MM console?
  • 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

Musier
Posts: 22
Joined: Sat Aug 09, 2014 1:29 am

Re: Problem with auto login on next char

#44 Post by Musier » Wed Aug 13, 2014 12:51 am

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?

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

Re: Problem with auto login on next char

#45 Post by rock5 » Wed Aug 13, 2014 7:23 am

I can't see anything wrong. Try this version with some print messages. Does it only happen with that character?
userfunction_LoginNextChar.lua
(7.95 KiB) Downloaded 253 times
Check out my signature for a link to some instructions on how to copy and paste from the MM console.
  • 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

Musier
Posts: 22
Joined: Sat Aug 09, 2014 1:29 am

Re: Problem with auto login on next char

#46 Post by Musier » Wed Aug 13, 2014 10:19 am

This happen with every character. And i don't know what happen.

Now everything is OK. Thanks a alot again.

Musier
Posts: 22
Joined: Sat Aug 09, 2014 1:29 am

Re: Problem with auto login on next char

#47 Post by Musier » Wed Aug 13, 2014 11:26 pm

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.

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

Re: Problem with auto login on next char

#48 Post by rock5 » Thu Aug 14, 2014 12:11 am

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?
  • 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

Musier
Posts: 22
Joined: Sat Aug 09, 2014 1:29 am

Re: Problem with auto login on next char

#49 Post by Musier » Thu Aug 14, 2014 6:04 am

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?

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

Re: Problem with auto login on next char

#50 Post by rock5 » Thu Aug 14, 2014 6:35 am

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"
  • 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

Musier
Posts: 22
Joined: Sat Aug 09, 2014 1:29 am

Re: Problem with auto login on next char

#51 Post by Musier » Thu Aug 14, 2014 7:24 am

But i added this earlier.

Code: Select all

fastLoginAutoLogin = true
fastLoginUser = "Mauser001"

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

Re: Problem with auto login on next char

#52 Post by rock5 » Thu Aug 14, 2014 7:39 am

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.
  • 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

Musier
Posts: 22
Joined: Sat Aug 09, 2014 1:29 am

Re: Problem with auto login on next char

#53 Post by Musier » Thu Aug 14, 2014 8:42 am

It means i must set up it too?

Code: Select all

fastLoginAutoEnter = true
fastLoginChrSel = 1

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

Re: Problem with auto login on next char

#54 Post by rock5 » Thu Aug 14, 2014 9:12 am

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.
  • 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

Musier
Posts: 22
Joined: Sat Aug 09, 2014 1:29 am

Re: Problem with auto login on next char

#55 Post by Musier » Thu Aug 14, 2014 10:03 am

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.

noobbotter
Posts: 527
Joined: Fri Aug 31, 2012 1:15 pm

Re: Problem with auto login on next char

#56 Post by noobbotter » Tue Jun 23, 2015 8:07 pm

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.
Attachments
Memory error after loading different character.
Memory error after loading different character.

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

Re: Problem with auto login on next char

#57 Post by rock5 » Wed Jun 24, 2015 6:44 am

I get an error saying the attachment doesn't exist anymore.
  • 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

noobbotter
Posts: 527
Joined: Fri Aug 31, 2012 1:15 pm

Re: Problem with auto login on next char

#58 Post by noobbotter » Wed Jun 24, 2015 9:19 am

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?

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

Re: Problem with auto login on next char

#59 Post by rock5 » Wed Jun 24, 2015 5:59 pm

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.
  • 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
Administrator
Site Admin
Posts: 5331
Joined: Sat Jan 05, 2008 4:21 pm

Re: Problem with auto login on next char

#60 Post by Administrator » Wed Jun 24, 2015 6:48 pm

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests