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.
Post Reply
Message
Author
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Autologin revisited

#101 Post by rock5 » Thu Sep 30, 2010 12:11 am

poper wrote:1. Can I use this to logon multiple accounts? I have 5 accounts, do I have to change the name in the accountlogin.lua every time I want to change accounts? (with auto login on)
My autologin was only intended for changing characters, not relogging into the account. MiesterMan has had some success switching accounts. It looks a bit confusing to me but have a read.
http://www.solarstrike.net/phpBB3/viewt ... =21&t=1398
poper wrote:2. This is a little more complicated and I am having problems. What I want to do is when my character gets "stuck" and is auto logged out, I want RomBot to wait 30-40 seconds (while I am being auto logged back in) And then run my waypoint file again… Is this possible?
For this I think you need to do 2 things.

1. Stop Logout() from stopping the script. So delete this line which should be line 2264 of player.lua

Code: Select all

	error("Exiting: Auto-logout", 0); -- Not really an error, but it will drop us back to shell.
2. When logging out, we need to reset the stuck counter and wait the appropriate time. So at about line 715 of bot.lua change

Code: Select all

						if( settings.profile.options.LOGOUT_WHEN_STUCK ) then
							player:logout();
						else
to

Code: Select all

						if( settings.profile.options.LOGOUT_WHEN_STUCK ) then
							player:logout(); -- includes 30s wait
							yrest(30000)
							player.Unstick_counter = 0
						else
It should logout wait 60s then continue where it left off so you don't have to reload anything.

See how that goes.
  • 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

poper
Posts: 4
Joined: Wed Sep 29, 2010 4:21 pm

Re: Autologin revisited

#102 Post by poper » Thu Sep 30, 2010 1:28 am

Perfect! Works like a charm!!

But, is there anyway to define a way-point file in the bot.lua? See I need the scrip to start over from the beginning... Since logging me out takes me out of the instance, I need to get back in by running the way-point file.

I tried:

Code: Select all

settings.profile.options.LOGOUT_WHEN_STUCK ) then
player:logout(); -- includes 30s wait
yrest(30000)
player.Unstick_counter = 0>loadPaths("waypoint")
else

Edit, I tryed this and it loads the waypoint now, but I get an error message:
scripts/rom/bot.lua:716:attempt to compare nil with string
Changed to this:

Code: Select all

settings.profile.options.LOGOUT_WHEN_STUCK ) then
				player:logout(); -- includes 30s wait
                        yrest(30000)
				player.Unstick_counter = 0
				yrest(2000)
				loadPaths("my waypoint")
				                     
						else
Now it works as intended, but my character goes to waypoint 3 instead of waypoint 1 this is a Major problem with my script. Trying to find a function to force Waypoint 1.

Edit: Made a waypoint file that is only waypoint 1 and after reaching wp1 will move to another wp file. Servers are down will test when back up.

EDIT2: Thanks for everything, got it to work!

backslash28
Posts: 1
Joined: Thu Oct 07, 2010 2:49 am

Re: Autologin revisited

#103 Post by backslash28 » Thu Oct 07, 2010 2:57 am

hey i tried to do what you guys were doing and yeah it made my whole rombot stop working lol this is the error i have

scripts/rom/bot.lua:20: bad argument #1 to 'pairs' (table expected, got nil)

and my postbox waypoint file i changed like this

Code:

<waypoints type="TRAVEL" >
<!-- # 1 --><waypoint x="5529" z="-4428"></waypoint>
<!-- # 2 --><waypoint x="5523" z="-4371"></waypoint>
<!-- # 3 --><waypoint x="5408" z="-4163"></waypoint>
<!-- # 4 --><waypoint x="5242" z="-4028"></waypoint>
<!-- # 5 --><waypoint x="5238" z="-3996"></waypoint>
<!-- # 6 --><waypoint x="5277" z="-3963"></waypoint>
<!-- # 7 --><waypoint x="5276" z="-3915">
player:target_NPC("Lyeve");
player:rest(2);
sendMacro("ChoiceOption(2);");
yrest(12000);
player:update();
__WPL:setWaypointIndex(__WPL:getNearestWaypoint(player.X, player.Z));
</waypoint>
<!-- # 8 --><waypoint x="5210" z="-3809"></waypoint>
<!-- # 9 --><waypoint x="5197" z="-3680"></waypoint>
<!-- #10 --><waypoint x="5255" z="-3494"></waypoint>
<!-- #11 --><waypoint x="5302" z="-3326"></waypoint>
<!-- #12 --><waypoint x="5376" z="-3165"></waypoint>
<!-- #13 --><waypoint x="5432" z="-3000"></waypoint>
<!-- #14 --><waypoint x="5381" z="-2924"></waypoint>
<!-- #15 --><waypoint x="5218" z="-2773"></waypoint>
<!-- #16 --><waypoint x="4950" z="-2907"></waypoint>
<!-- #17 --><waypoint x="4831" z="-2894"></waypoint>
<!-- #18 --><waypoint x="4820" z="-2786"></waypoint>
<!-- #19 --><waypoint x="4838" z="-2604"></waypoint>
<!-- #20 --><waypoint x="4737" z="-2426"></waypoint>
<!-- #21 --><waypoint x="4619" z="-2218"></waypoint>
<!-- #22 --><waypoint x="4574" z="-2206">
printf("We where running for %s seconds.\n", os.difftime(os.time(),player.BotStartTime_nr) - player.Sleeping_time );
error("Bot finished", 0); -- Not really an error, but it will drop us back to shell.
</waypoint>
</waypoints>
<!-- # numberofwaypoint --><waypoint x="-23764" z="4484">
sendMacro("}LoginNextToon=true;a={")
sendMacro("Logout();"); yrest(3*60*1000) -- wait 3m for next character to load

-- Re-initialize player
player = CPlayer.new();
settings.load();
settings.loadProfile("l1-10"); -- Profile name
yrest (4000)

loadPaths("1-10/l1t_start"); -- First script
</waypoint>

ive downloaded the autologin and change the postbox file:/ don't know what to do and now my rombot does nto work at all:/

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

Re: Autologin revisited

#104 Post by rock5 » Thu Oct 07, 2010 3:49 am

Firstly, always put your code in

Code: Select all

 tags as per the forum rules.

Secondly that code looks messed up. The waypoints closing tag </waypoints> is in the middle of the code. It should be at the end. Also if it passes point 22 the script will end. You need to get rid of that code.
  • 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

uelkfr
Posts: 8
Joined: Wed Sep 01, 2010 10:30 am

Re: Autologin revisited

#105 Post by uelkfr » Sat Oct 30, 2010 1:28 am

What does this line means? I don't understand.

Code: Select all

sendMacro("}LoginNextToon=true;a={")
It sets LoginNextToon variable to true. But what "}" and "a={" means? Is it some trick?
rock5 wrote:My autologin was only intended for changing characters, not relogging into the account. MiesterMan has had some success switching accounts. It looks a bit confusing to me but have a read.
http://www.solarstrike.net/phpBB3/viewt ... =21&t=1398
Is it possible to make wrapper to Rombot on micromacro to restart the client when it halts with error - an message box with Send report and Cancel buttons? With login to account then login character then start the waypoints.

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

Re: Autologin revisited

#106 Post by rock5 » Sat Oct 30, 2010 6:30 pm

uelkfr wrote:What does this line means? I don't understand.

Code: Select all

sendMacro("}LoginNextToon=true;a={")
It sets LoginNextToon variable to true. But what "}" and "a={" means? Is it some trick?
Actually I'm not really sure. When I tried this,

Code: Select all

sendMacro("LoginNextToon=true")
it didn't work, something to do with it not being a function. Administrator told me to change it like above and it worked. That's all I needed to know. You'll have to ask him if you want better clarification.

uelkfr wrote:Is it possible to make wrapper to Rombot on micromacro to restart the client when it halts with error - an message box with Send report and Cancel buttons? With login to account then login character then start the waypoints.
I don't know. It's definitely beyond my expertise.
  • 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: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: Autologin revisited

#107 Post by Administrator » Sat Oct 30, 2010 9:06 pm

It's because of the way RoMScript() automatically encapsulates the provided Lua code with more code.

That is, it would send something like this:

Code: Select all

/script a={codehere};<code to put table 'a' into macro 2>
Since doing "var=value" inside a table turns it into a dictionary (which we don't want), we instead close the table and do raw Lua code, so it looks like this:

Code: Select all

/script a={};codehere;<code to put table 'a' into macro2>

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

Re: Autologin revisited

#108 Post by rock5 » Sat Oct 30, 2010 9:51 pm

Administrator wrote:we instead close the table and do raw Lua code, so it looks like this:

Code: Select all

/script a={};codehere;<code to put table 'a' into macro2>
I understand now but wouldn't it end up looking like this?

Code: Select all

/script a={}codehere;a={}<code to put table 'a' into macro2>
Yes I know, I'm just nitpicking. :D
  • 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

Germangold
Posts: 276
Joined: Thu Oct 22, 2009 3:58 am

Re: Autologin revisited

#109 Post by Germangold » Sat Nov 06, 2010 6:09 pm

so far so good..
Autologin works fine with elvendaily quest for phirius token..

How can I implement that after 8 characters successfully completed their dailys, the autologin routine switches to the next account, loggs in an
starts over

I have 9 accounts, running 3 instances of ROM at the same time, so i have to login 3x3 account.. nicer would be having just one instance and login 1x to complete 9 accounts with their dailys.

cheers

Germangold
Posts: 276
Joined: Thu Oct 22, 2009 3:58 am

Re: Autologin revisited

#110 Post by Germangold » Mon Dec 13, 2010 7:17 am

Update:
Running now 6Accounts (instances) with elven Dailys script. i have 2x6 accounts running them every day
thats 9600 token per day!

TotalDamage
Posts: 3
Joined: Wed Dec 22, 2010 10:15 am

Re: Autologin revisited

#111 Post by TotalDamage » Wed Dec 22, 2010 10:18 am

Hi there,
since yesterday my Fast-Login Script (written by Jaff|r) doesn't work anymore. The Loginscreen prompt, but in the same moment it disappears and Runes of Magic says "Connection lost".
Without the Fast-Login Script everything is normal.

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

Re: Autologin revisited

#112 Post by rock5 » Thu Dec 23, 2010 12:20 am

TotalDamage wrote:Hi there,
since yesterday my Fast-Login Script (written by Jaff|r) doesn't work anymore. The Loginscreen prompt, but in the same moment it disappears and Runes of Magic says "Connection lost".
Without the Fast-Login Script everything is normal.
Mine version still seems to be working fine.
  • 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

mayainverse
Posts: 94
Joined: Tue Dec 21, 2010 3:12 am

Re: Autologin revisited

#113 Post by mayainverse » Mon Jan 17, 2011 6:32 am

using multi accounts.

saw in first post that this is removed?

is any other way I can use this to just string together 8x chars on 3x accounts all in 1 go. or just resetart bot on each account. not like thats abig deal though.

Germangold
Posts: 276
Joined: Thu Oct 22, 2009 3:58 am

Re: Autologin revisited

#114 Post by Germangold » Mon Jan 17, 2011 3:39 pm

due to bad programming rom client fails you after 3 accounts...

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

Re: Autologin revisited

#115 Post by lisa » Mon Jan 17, 2011 6:48 pm

Any way to get it to load the actual characters profile?

Code: Select all

     settings.loadProfile("" .. player.Name .. "");
I thought this might work, doesn't seem to though.
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

JackBlonder
Posts: 99
Joined: Sat Dec 18, 2010 6:55 am

Re: Autologin revisited

#116 Post by JackBlonder » Tue Jan 18, 2011 2:18 am

I'm not sure about this but maybe this works

Code: Select all

settings.loadProfile(player.Name)
player.Name should already be a string so you don't have to add ""

horsewilly
Posts: 25
Joined: Tue Aug 17, 2010 6:41 am

Re: Autologin revisited

#117 Post by horsewilly » Sat Jan 22, 2011 6:21 am

Hey, hope this isn't too stupid of a question.
this function is very helpful, but this addon gets quite annoying when I play normally cause I can't switch characters, but instead am logged instantly back into the character I just came from. is there any way to allow normal switching of characters (without having micromacro running) and still keeping the whole relogging-into-another-character-thing working for clients where bots are running?

User avatar
Giram
Posts: 191
Joined: Thu Aug 26, 2010 3:34 pm
Location: Finland

Re: Autologin revisited

#118 Post by Giram » Sat Jan 22, 2011 7:40 am

horsewilly wrote:Hey, hope this isn't too stupid of a question.
this function is very helpful, but this addon gets quite annoying when I play normally cause I can't switch characters, but instead am logged instantly back into the character I just came from. is there any way to allow normal switching of characters (without having micromacro running) and still keeping the whole relogging-into-another-character-thing working for clients where bots are running?
I had same problem and i found solution to that. If you open interface/Loginxml/accountlogin.lua file and search lines below and i hope that is right one cause it's been long time ago since i changed those. It should be true for you cause it will go back game so just change it to false and it should stay in character selection screen.

Code: Select all

-- >>>>>>>>> SHOULD WE RELOG IN AFTER RETURNING TO CHARACTER SELECTION <<<<<<<<<<
fastLoginRelog=false

horsewilly
Posts: 25
Joined: Tue Aug 17, 2010 6:41 am

Re: Autologin revisited

#119 Post by horsewilly » Sat Jan 22, 2011 8:01 am

thanks for the fast reply, that must be it. Ill try it, thanks! :D

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

Re: Autologin revisited

#120 Post by lisa » Tue Jan 25, 2011 8:37 pm

I keep getting stuck at the region selection, doesn't it work anymore?

Code: Select all

fastLoginRegSel=1
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

Post Reply

Who is online

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