Page 6 of 46

Re: Autologin revisited

Posted: Thu Sep 30, 2010 12:11 am
by rock5
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.

Re: Autologin revisited

Posted: Thu Sep 30, 2010 1:28 am
by poper
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!

Re: Autologin revisited

Posted: Thu Oct 07, 2010 2:57 am
by backslash28
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:/

Re: Autologin revisited

Posted: Thu Oct 07, 2010 3:49 am
by rock5
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.

Re: Autologin revisited

Posted: Sat Oct 30, 2010 1:28 am
by uelkfr
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.

Re: Autologin revisited

Posted: Sat Oct 30, 2010 6:30 pm
by rock5
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.

Re: Autologin revisited

Posted: Sat Oct 30, 2010 9:06 pm
by Administrator
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>

Re: Autologin revisited

Posted: Sat Oct 30, 2010 9:51 pm
by rock5
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

Re: Autologin revisited

Posted: Sat Nov 06, 2010 6:09 pm
by Germangold
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

Re: Autologin revisited

Posted: Mon Dec 13, 2010 7:17 am
by Germangold
Update:
Running now 6Accounts (instances) with elven Dailys script. i have 2x6 accounts running them every day
thats 9600 token per day!

Re: Autologin revisited

Posted: Wed Dec 22, 2010 10:18 am
by TotalDamage
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.

Re: Autologin revisited

Posted: Thu Dec 23, 2010 12:20 am
by rock5
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.

Re: Autologin revisited

Posted: Mon Jan 17, 2011 6:32 am
by mayainverse
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.

Re: Autologin revisited

Posted: Mon Jan 17, 2011 3:39 pm
by Germangold
due to bad programming rom client fails you after 3 accounts...

Re: Autologin revisited

Posted: Mon Jan 17, 2011 6:48 pm
by lisa
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.

Re: Autologin revisited

Posted: Tue Jan 18, 2011 2:18 am
by JackBlonder
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 ""

Re: Autologin revisited

Posted: Sat Jan 22, 2011 6:21 am
by horsewilly
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?

Re: Autologin revisited

Posted: Sat Jan 22, 2011 7:40 am
by Giram
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

Re: Autologin revisited

Posted: Sat Jan 22, 2011 8:01 am
by horsewilly
thanks for the fast reply, that must be it. Ill try it, thanks! :D

Re: Autologin revisited

Posted: Tue Jan 25, 2011 8:37 pm
by lisa
I keep getting stuck at the region selection, doesn't it work anymore?

Code: Select all

fastLoginRegSel=1