Logout > Login (same char) + daily counter

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
caramel
Posts: 8
Joined: Sat Sep 25, 2010 5:08 am

Logout > Login (same char) + daily counter

#1 Post by caramel » Sat Sep 25, 2010 5:54 am

Hi guys,

I am searching a way to log out to the character selection and reconnect on the same one.
Something like that with the relog working :)

Code: Select all

cprintf(cli.red, "\n***Loging out!***\n");
			sendMacro("Logout();");
			yrest(30000);
			cprintf(cli.red, "\n***Reloging!***\n");
			-- RELOG!
			-- Cplayer:new();
			yrest(20000);
And also put a Daily counter, I tried to use this code but it gives me a TIME OUT error.

Code: Select all

RoMScript("Daily_count()");
Thanks in advance for your help,
Caramel.

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

Re: Logout > Login (same char) + daily counter

#2 Post by rock5 » Sat Sep 25, 2010 11:50 pm

caramel wrote:Hi guys,

I am searching a way to log out to the character selection and reconnect on the same one.
Something like that with the relog working :)

Code: Select all

cprintf(cli.red, "\n***Loging out!***\n");
			sendMacro("Logout();");
			yrest(30000);
			cprintf(cli.red, "\n***Reloging!***\n");
			-- RELOG!
			-- Cplayer:new();
			yrest(20000);
You could use my auto login script;
http://www.solarstrike.net/phpBB3/viewt ... 350#p10350
Once installed just set;

Code: Select all

fastLoginRelog= true
in the options section. Then when you "Logout()" it will log you back in with the same character.

Also, instead of waiting 30s which may or may not be long enough, you could use my function that waits until the game is ready then immediately returns control. I was thinking of adding it to rombot but no one seems interested.
http://www.solarstrike.net/phpBB3/viewt ... 638#p13638

And I don't think you need player:new() if you are logging in again with the same character.

So it would look something like this.

Code: Select all

cprintf(cli.red, "\n***Loging out!***\n");
			sendMacro("Logout();");
			waitForLoadingScreen();
			cprintf(cli.red, "\n***Resuming script***\n");
caramel wrote:And also put a Daily counter, I tried to use this code but it gives me a TIME OUT error.

Code: Select all

RoMScript("Daily_count()");
I'm not sure why you got a time out error. Maybe it was a 1 off hiccup. I use this;

Code: Select all

repeat DailyCount, DailyPerDay= RoMScript("Daily_count()") until DailyCount ~= nil and DailyPerDay ~= nil
DailysRemaining = DailyPerDay - DailyCount
The repeat loop is just to make sure RoMScript didn't return any nil values which it does occasionally.
  • 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

caramel
Posts: 8
Joined: Sat Sep 25, 2010 5:08 am

Re: Logout > Login (same char) + daily counter

#3 Post by caramel » Sun Sep 26, 2010 5:04 am

Thanks rock for the fast and detailed answer.

I'll give you a feedback asap. :-)

caramel
Posts: 8
Joined: Sat Sep 25, 2010 5:08 am

Re: Logout > Login (same char) + daily counter

#4 Post by caramel » Sun Sep 26, 2010 5:38 am

Code: Select all

repeat DailyCount, DailyPerDay= RoMScript("Daily_count()") until DailyCount ~= nil and DailyPerDay ~= nil
			DailysRemaining = DailyPerDay - DailyCount
	 		cprintf(cli.green, "Dailies remaining : %d\n", DailysRemaining);			
			cprintf(cli.red, "\n***Loging out!***\n");
			sendMacro("Logout();")
			waitForLoadingScreen();
			cprintf(cli.red, "\n***Reloged!***\n");
Works like a charm :twisted:

Thanks you very much rock5.

miximixi007
Posts: 94
Joined: Sat Apr 17, 2010 1:18 pm

Re: Logout > Login (same char) + daily counter

#5 Post by miximixi007 » Thu Sep 30, 2010 5:25 am

rock5 wrote: Also, instead of waiting 30s which may or may not be long enough, you could use my function that waits until the game is ready then immediately returns control. I was thinking of adding it to rombot but no one seems interested.
http://www.solarstrike.net/phpBB3/viewt ... 638#p13638
I back up u.your way is simpler.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 17 guests