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
User avatar
cufRet8e
Posts: 82
Joined: Tue Dec 27, 2011 2:33 pm
Location: UK

Re: rock5's "fastLogin Revisited"

#261 Post by cufRet8e » Sun Jan 15, 2012 1:43 pm

rock5,
Is it possible to modify those fastlogin files, to make accountlogin.lua and logindialog.lua as one .lua file? It take a long time to fill all fields and looking for same fields in logindialog.lua file.

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

Re: rock5's "fastLogin Revisited"

#262 Post by rock5 » Sun Jan 15, 2012 10:47 pm

cufRet8e wrote:rock5,
Is it possible to modify those fastlogin files, to make accountlogin.lua and logindialog.lua as one .lua file? It take a long time to fill all fields and looking for same fields in logindialog.lua file.
No. These file names were not chosen by me. They are files that the game uses and we are replacing them. I could put the secondary passwords in accountlogin.lua but to make them available to logindialog.lua I would have to make the variable global and thereby unsecure.

So for securities sake, they have to be separate.
  • 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

bobdole
Posts: 152
Joined: Thu May 26, 2011 6:30 pm

Re: rock5's "fastLogin Revisited"

#263 Post by bobdole » Sat Jan 21, 2012 11:54 am

Giving this a try:

Code: Select all

RoMScript("ChangeChar(CHARACTER_SELECT.selectedIndex)")
waitForLoadingScreen()
loadPaths("eggs7")
The issues really is I am running probably one to many bots on the laptop and it causes freezes.

Rickster
Posts: 291
Joined: Sun Oct 24, 2010 4:23 pm

Re: rock5's "fastLogin Revisited"

#264 Post by Rickster » Mon Jan 30, 2012 2:39 am

Hi,

I am using the following code to switch channel after each character change.
Changing char works fine, and the variable "channel" is printed out correctly, but while relogging it does not change to the given channel. The next character is on the same channel as the one before.

Code: Select all

		if ( 1 == RoMScript("GetCurrentParallelID()")) then
			channel = 2;
		elseif ( 2 == RoMScript("GetCurrentParallelID()")) then
			channel = 3;
		else 
			channel = 1;
		end;
		cprintf_ex("|lightgreen| Channel should change to %s.\n", channel);

		RoMScript("ChangeChar(nil,nil,channel)");
		waitForLoadingScreen(); yrest(4000);
Do you have any ideas what goes wrong?

Ric

Rickster
Posts: 291
Joined: Sun Oct 24, 2010 4:23 pm

Re: rock5's "fastLogin Revisited"

#265 Post by Rickster » Mon Jan 30, 2012 3:01 am

I got the solution and did some minor changes, works now

Code: Select all

		channel = nil;
		repeat channel = RoMScript("GetCurrentParallelID()"); yrest(100); until channel;
		if ( switch_channel_local ) then
			if ( 3 >  channel) then
				channel = channel + 1;
			else 
				channel = 1;
			end;
			cprintf_ex("|lightgreen| Channel should change to %s.\n", channel);
		end;

		RoMScript("ChangeChar(nil,nil," .. channel .. ")");
1. using a repeat statement to get the channel coz RoMScript sometimes returns nil.
2. Increase channel until highest channel for that area, then switch back to 1
3. i had to resolve "channel" in the RoMScript because the game scope does not know about Micromacro variables.

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

Re: rock5's "fastLogin Revisited"

#266 Post by rock5 » Mon Jan 30, 2012 4:28 am

Rickster wrote:1. using a repeat statement to get the channel coz RoMScript sometimes returns nil.
RoMScript has been make quite reliable now. It's shouldn't need the repeat.
  • 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

Rickster
Posts: 291
Joined: Sun Oct 24, 2010 4:23 pm

Re: rock5's "fastLogin Revisited"

#267 Post by Rickster » Mon Jan 30, 2012 5:33 am

Is there a possibility to change channel when using ChangeChar() (Userfunction) while using multiple accounts?

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

Re: rock5's "fastLogin Revisited"

#268 Post by rock5 » Mon Jan 30, 2012 6:51 am

Rickster wrote:Is there a possibility to change channel when using ChangeChar() (Userfunction) while using multiple accounts?
Yes, just use

Code: Select all

 ChangeChar(char, acc, chan)
  • 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

Rickster
Posts: 291
Joined: Sun Oct 24, 2010 4:23 pm

Re: rock5's "fastLogin Revisited"

#269 Post by Rickster » Mon Jan 30, 2012 7:34 am

ah ok, thanx :)

but, when I again read my question, I see it was not clear, what I realy wanted to know ;) sorry ...

I want to cycle through some accounts, and to all chars within these accounts. thats what i acutally do:

Code: Select all

	SetCharList({
			   {account=1 , chars= {}},
			   {account=2 , chars= {}},
			   {account=3 , chars= {}},
			})

			LoginNextChar();
but I also would like to switch channel by the way, while relogging.
sure, i can switch channel after the new char is logged in, but i want to save some time.

I use just this, which logs in one character after the other for one account:

Code: Select all

RoMScript("ChangeChar(nil,nil," .. channel .. ")");
But I did not get the point how to combine these two ... Charset with multi accounts and channelswitching.

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: rock5's "fastLogin Revisited"

#270 Post by lisa » Mon Jan 30, 2012 7:45 am

I can't see a way to do what you want with current code.

I imagine if rock added in another argument to

Code: Select all

function LoginNextChar(_waypoint,channel)
channel = channel or nil
and then

Code: Select all

ChangeChar(nextChar, nextAcc,channel)
That would probably do the trick.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

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

Re: rock5's "fastLogin Revisited"

#271 Post by rock5 » Mon Jan 30, 2012 8:02 am

I don't want to add arguments to LoginNextChar but you could do it like this

Code: Select all

         SetCharList({
            {account=1 , chars= {}},
            {account=2 , chars= {}},
            {account=3 , chars= {}},
         })

         local channel = RoMScript("GetCurrentParallelID()");
         if ( 3 >  channel) then
            channel = channel + 1;
         else 
            channel = 1;
         end;
         RoMScript("UserSelectedChannel = "..channel)

         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

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: rock5's "fastLogin Revisited"

#272 Post by lisa » Mon Jan 30, 2012 8:56 am

Ahh cool, set it in the addon itself.

might need to be like this though

Code: Select all

RoMScript("UserSelectedChannel = '..channel..')")
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

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

Re: rock5's "fastLogin Revisited"

#273 Post by rock5 » Mon Jan 30, 2012 12:33 pm

Too many brackets on right side. It's not a function just a variable assignment. Which reminds me it should be like this because varables assignments don't work normally in RoMScript.

Code: Select all

RoMScript("} UserSelectedChannel = "..channel .." a={")
  • 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

Rickster
Posts: 291
Joined: Sun Oct 24, 2010 4:23 pm

Re: rock5's "fastLogin Revisited"

#274 Post by Rickster » Mon Jan 30, 2012 5:30 pm

Thanx for your ideas :)

my code now looks like this

Code: Select all

			switch_channel_local = true;
			[..]
			SetCharList({
			   {account=1 , chars= {}},
			   {account=2 , chars= {}},
			   {account=3 , chars= {}},
			})
			if ( switch_channel_local ) then
				channel = nil;
				channel = RoMScript("GetCurrentParallelID()");
				if ( 2 >  channel) then
					channel = channel + 1;
				else 
					channel = 1;
				end;
				cprintf_ex("|lightgreen| Channel should change to %s.\n", channel);
			end;
			RoMScript("} UserSelectedChannel = " .. channel .. " a={");
			LoginNextChar();
But it does not switch channel.
I do not realy understand whats happening here

Code: Select all

RoMScript("} UserSelectedChannel = " .. channel .. " a={");
I found "UserSelectedChannel" in the loginxml and asume this variable is set there, before relogging.
But I do not understand the syntax of the "},{" and what the "a=" is for.

This variable or the one which is needed to choose a new channel, is not set correct in the end.

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

Re: rock5's "fastLogin Revisited"

#275 Post by rock5 » Mon Jan 30, 2012 11:03 pm

Ah I see. It's being erased by the nil value of "channel" in that function.

Try this. Change line 213 of accountlogin.lua

Code: Select all

UserSelectedChannel = channel
to

Code: Select all

if channel ~= nil then UserSelectedChannel = channel end
If that works ok, I'll commit it.

Otherwise your code looks good except "channel" in your code should be declared local and you can make those 2 lines one.

So change

Code: Select all

            channel = nil;
            channel = RoMScript("GetCurrentParallelID()");
to

Code: Select all

            local channel = RoMScript("GetCurrentParallelID()");
  • 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

Rickster
Posts: 291
Joined: Sun Oct 24, 2010 4:23 pm

Re: rock5's "fastLogin Revisited"

#276 Post by Rickster » Tue Jan 31, 2012 9:11 am

rock5 wrote: Try this. Change line 213 of accountlogin.lua

Code: Select all

UserSelectedChannel = channel
to

Code: Select all

if channel ~= nil then UserSelectedChannel = channel end
If that works ok, I'll commit it.
that works very well :) thanks a lot!

the final code looks like this, which should help everybody, who wants to circle multiple characters on different accounts and also wants to switch channel

Code: Select all

			SetCharList({
			   {account=1 , chars= {}},
			   {account=2 , chars= {}},
			   {account=3 , chars= {}},
			})
			
			local channel = RoMScript("GetCurrentParallelID()");
			if ( 2 >  channel) then
				channel = channel + 1;
			else 
				channel = 1;
			end;

			RoMScript("} UserSelectedChannel = " .. channel .. " a={");

			LoginNextChar();

as always ... thanks rock!

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

Re: rock5's "fastLogin Revisited"

#277 Post by rock5 » Tue Jan 31, 2012 9:43 am

Maybe I'll add a function for changing the channel so you don't have to do that ugly RoMScript. Something like

Code: Select all

function ChangeChannelForNextLogin(num)
    RoMScript("} UserSelectedChannel = " .. num.. " a={");
end
That's about it. But the names a bit long. I didn't want to use just "ChangeChannel" because then people will think it will change channel when they use it, not after the login. Hm.. maybe "SetSelectedChannel" or "SetChannel".
  • 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

Rickster
Posts: 291
Joined: Sun Oct 24, 2010 4:23 pm

Re: rock5's "fastLogin Revisited"

#278 Post by Rickster » Tue Jan 31, 2012 4:15 pm

I have no probs with long function names as long as they describe what they do :)

A combination of your suggestions is my favorite:
SetChannelForNextLogin()

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

Re: rock5's "fastLogin Revisited"

#279 Post by rock5 » Tue Jan 31, 2012 10:16 pm

How about "SetChannelForLogin" to make it just that little bit shorter but still as clear I think.
  • 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

Rickster
Posts: 291
Joined: Sun Oct 24, 2010 4:23 pm

Re: rock5's "fastLogin Revisited"

#280 Post by Rickster » Wed Feb 01, 2012 6:07 am

This one is also fine.

You are the master ;) ... its up to you.

Post Reply

Who is online

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