Problem after switching characters with LoginNextChar();

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
squeekthegeek
Posts: 25
Joined: Mon Nov 08, 2010 1:50 pm

Problem after switching characters with LoginNextChar();

#1 Post by squeekthegeek » Mon Jan 16, 2012 1:10 pm

So I had the idea of changing the last waypoint of the 1-10 levelup thing there.

Code: Select all

	<!-- #22 --><waypoint x="4574" z="-2206">

	printf("We where running for %s seconds.\n", os.difftime(os.time(),player.BotStartTime_nr) - player.Sleeping_time );
	LoginNextChar();
	settings.load ();
	settings.loadProfile ("l1-10");
	yrest (5000);
        loadPaths("1-10Pioneers/l1t_start");	
	 
	</waypoint>
Here's my problem. When the first bot runs the 1-10 waypoints, eveything works perfectly. Now after the second character logs in things start getting messy.

First thing i notice is the <onLoad> works because when the new lvl1 character starts, it opens the gift bag. However, the <onLevelUp> does not seem to work because as soon as the character reaches lvl2, nothing is done(no gift bag open, no leveling skills) it just keeps killing stuff.

Any ideas what might be causing that?

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

Re: Problem after switching characters with LoginNextChar();

#2 Post by rock5 » Mon Jan 16, 2012 9:31 pm

This is a known issue. You have to reinitialize the player. I recently added a function that simplifies this for you. Try the following.

Code: Select all

   <!-- #22 --><waypoint x="4574" z="-2206">

   printf("We where running for %s seconds.\n", os.difftime(os.time(),player.BotStartTime_nr) - player.Sleeping_time );
   LoginNextChar();
   loadProfile("l1-10");
   yrest (5000);
        loadPaths("1-10Pioneers/l1t_start");   
    
   </waypoint>
Using the function also makes sure the profile onload section is run again which the old way doesn't do.
  • 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: Ahrefs [Bot] and 194 guests