ScriptUO

Official ScriptUO EasyUO Scripts => Site Scripter Libraries => _C2_ Script Library => Topic started by: _C2_ on January 21, 2009, 06:25:37 AM

Title: C2's Auto Reloger
Post by: _C2_ on January 21, 2009, 06:25:37 AM
This can be used as a sub in your current code or run in a separate window to relog your character on any shard until the shard becomes available.  It uses last shard and continues to check until it pops up on login page.  It does not use OCR and the client can be completely covered.

I wasn't happy with the use of OCR and shardscanners even thought they are great so I wrote my own login and out subs that even perform when under a client or internet. I hated having to give up my playtime while they worked. These are the subs that are used in my bod collector scripts but slightly revised to work as a stand alone script that you play along side another script. Some scripts do not work well when u relog into the acct but others may be very compatible. Feel free to use my subs in your code if you add credit in your script.

This cannot auto relog two accts at the same time... make sure if using for two accts u add a wait so they both accts aren't logging in at the same exact second on the same acct. Accts never get past verifying if both on the same comp at the same exact time. Something to do with uo and not the script

I also use this in my bod collector that is multi-shard.  Feel free to make small tweeks for your own use but if you release a script with this code, again, please credit it.

all you need to do is this section
Code: [Select]
;set-up
set %a acct_name    ;replace acct_name with the actual name
set %PW password   ;replace password with an actual password
set %character_slot_number #  ;replace # sign with actual char #
set %s shard  ;replace shard with shard name
;two name shards have _ ex) great_lakes

Know issues:
2/20/09 - fixed conn lost gump noted by Khameleon- now uses key enter
Title: Re: C2's Auto Reloger
Post by: Khameleon on February 03, 2009, 01:46:57 AM
C2, I love this script it works every time.  I have multiple scripts I use this script on. that I made a few adjustments, see if you like what I did.

set-up
Code: [Select]
set %a account name
set %PW password
set %character_slot_number x
set %s shard_name  ;two name shards have _ ex) great_lakes
Set %Shard_Up  074000
Set %Shard_Down 070000

Main Loop
Code: [Select]
repeat
if #Time > %Shard_Down && #Time < %Shard_Up
   Gosub Safe_Logout
if #contsize = 203_121 2
       Msg $ ; Right here my mouse wasn't always hitting the Check Mark so I changed it to enter button
       wait 60 ; I added this to give the login some time to organize bags and what not before attempting to run next script
if #contname = MainMenu_gump
       {
       gosub login %character_slot_number %A %PW %S
       wait 20s
       gosub startscript
       }
until #charghost = yes
halt

Bottom of script

Code: [Select]
Sub StartScript
  namespace push
  namespace global Auto_Start
  set !Autostart_initialized #TRUE
Return

sub Safe_Logout
  namespace push
  namespace global Safe_Logout
  set !Safe_Logout #TRUE
Repeat
      if #contsize = 203_121
         {
         Msg $
         wait 60
         }
until #Time > %Shard_Up
Return

In the other script I would put in the main loop
a Sub to check if I was logged out if my shard server time was near I would recall to my safe spot, and wait for the shard to come back up and recall back to where I was and continue working.
Title: Re: C2's Auto Reloger
Post by: _C2_ on February 03, 2009, 05:27:21 AM
Very kool- i have considered doing that myself but i basically use it for afk miners hehe!  I let them mine to conn loss and then relog until shard is there.  however- with this you can use global values and make sure the script it is running with pauses at that time too so the server down / mini revert won't mess up the script. 

Cerv was looking to do something like that too.  ;D

Glad you are having success with it.  It will prob be a bit before i get to add that stuff as i am working 7 days a week  but when and if I do, I will credit you for adding the nice perks!  It took quite a bit of time to iron out timings hehe.
Title: Re: C2's Auto Reloger
Post by: Khameleon on February 03, 2009, 03:31:01 PM
ya well I've been adding it into some speacail wood chopping script, and that script has been updated about 5 times since I added in the code. so I've had to insert it in every update. still working out some kinks like you said i've found myself this afternoon recycling a disconection gump, and didn't do any UMing.
Title: C2's Auto Reloger Feedback/Problems
Post by: wildesau on February 04, 2009, 11:32:36 AM
Hi there ,

I tried C2's Auto Relogger script tonight but it seems i have a little problem with it.

If I close my client by clicking the log out button , the script works well and it relogs my character.

But if I get the "Connection Lost" window , it try to click ok and nothing happens. Or rather it looks as if it was clicked. I just see the colour of the button change every second (Dark , light , darkl, light, dark, light? . . . . . .)
Title: Re: C2's Auto Reloger Feedback/Problems
Post by: Khameleon on February 04, 2009, 02:24:21 PM
change the click x y to msg $ and you should be ok.

Code: [Select]
if #contsize = 203_121 2
       Msg $
Title: Re: C2's Auto Reloger Feedback/Problems
Post by: wildesau on February 05, 2009, 08:39:22 AM
Thank you ! Works great now !! :)
Title: Re: C2's Auto Reloger Feedback/Problems
Post by: Khameleon on February 05, 2009, 01:12:28 PM
ya I found it wasn't clicking in the right spot for me either. so instead of messing with clicks a simple enter key works. IMO better :P
Title: Re: C2's Auto Reloger Feedback/Problems
Post by: _C2_ on February 05, 2009, 07:29:56 PM
ya I found it wasn't clicking in the right spot for me either. so instead of messing with clicks a simple enter key works. IMO better :P

good idea!
  weird because 3 or four peeps have had that not work but most have had it work and i used cont. positions so it should work.  oh well.  i think i will end up changing that
Title: Re: C2's Auto Reloger
Post by: Cerveza on February 27, 2009, 07:43:56 AM
Is this a final?

I'm thinking of using it as a called script from my logger. Have it call this each cycle to see what time it is, if it's close to server down time then just wait in the called script until server up time, then continue to log in and return to the logging script.
Title: Re: C2's Auto Reloger
Post by: Khameleon on February 27, 2009, 08:32:12 AM
ya the script works great. I use it in just about ever one of my scripts.
Title: Re: C2's Auto Reloger
Post by: 8 Ball on August 15, 2009, 07:05:01 AM
Had a problem with this line

click %clickx %clicky x 8

at the end of the charclick sub, it would highlight the character but not login so I changed it to key enter and now it works like a charm :)
Title: Re: C2's Auto Reloger
Post by: cgeorgemo on September 01, 2009, 12:05:54 AM
I absolutely love this script with my balky DSL it is going to be awesome.
I just wish some of the other scripts I use this in conjunction with were lost connection safe. IE that they would just loop or pause when connection is lost instead of ending.
Once I get a little more script savvy I'm going to try to change some of them to be better.
Title: Re: C2's Auto Reloger
Post by: Cerveza on December 17, 2009, 05:10:30 AM
I'd really like to see this as a sub, though the name says it is... it's really a stand alone program.

The best case, would be a stand alone AND a sub. So you could call it from your script, or include it.
Title: Re: C2's Auto Reloger
Post by: _C2_ on December 17, 2009, 05:58:24 AM
i cannot look at this for about a week then i will have some time off work to do so.  this is perfect for my needs.  i let server go down and it monitors until server is available and i am instantly off and running.  I get what you are saying but if just hasn't been a priority because it is designed to handle random hiccups in the connection through out the day and patches etc. to keep you in as much as possible.  One thing that i could see being more beneficial with your method would be that some scripts like mining scripts will reload after server down occasionally and still be trying to mine a location at server save and not get back on track.  This would eliminate that very uncommon issue but an issue all the same.

I think an option where u can log in and out at times could be a fun addition.  or even a log out for x amount of minutes every __ minutes.  It is something to think about.
Title: Re: C2's Auto Reloger
Post by: NObama on December 17, 2009, 04:33:50 PM
I think this has potential as a char logger to collect all your gifts on every shard...or does it already do that and i just can't see it in the code?

Either way, I think I have a weekend project.

 :)
Title: Re: C2's Auto Reloger
Post by: Endless Night on December 17, 2009, 05:15:13 PM
nobamma use my character toolbox .. inventory option .. just needs the gumps updated.
Title: Re: C2's Auto Reloger
Post by: Oracle on December 17, 2009, 05:41:02 PM
Someone said they were going to update theirs around when we had the 12th Anniversary Tickets, then again at Halloween, and now we have Christmas Tickets...   :P
Title: Re: C2's Auto Reloger
Post by: Endless Night on December 17, 2009, 06:12:10 PM
Someone said they were going to update theirs around when we had the 12th Anniversary Tickets, then again at Halloween, and now we have Christmas Tickets...   :P


Haha this is getting off topic here.. and i did update i got all of those tickets what you didnt haha what can i say sad very sad.
Title: Re: C2's Auto Reloger
Post by: camotbik on December 28, 2009, 03:32:19 PM
Code: [Select]
until #contsize = 640_480 || ( #scnt > %safety_timer ) || #contsize = 203_121
worked for me.
Title: Re: C2's Auto Reloger
Post by: Oracle on April 02, 2010, 02:40:26 AM
C2,

Tried to add this to 12x Mining Script and when the shard goes down, the Script does not auto-log back in when the shard goes back up.  I actually want to add this so that I can re-log four miners in with wait statements in-between, so that they do not all log in at once.  I have tried adding this to the beginning of the Script and then also to the end with the same results?  Do I put the set-up at the top and the main loop in the bottom?  What I am asking is, where do I add this as a sub to the Mining Script?  Please help...I am feeling less intelligent.

Title: Re: C2's Auto Reloger
Post by: _C2_ on April 02, 2010, 05:03:11 AM
C2,

Tried to add this to 12x Mining Script and when the shard goes down, the Script does not auto-log back in when the shard goes back up.  I actually want to add this so that I can re-log four miners in with wait statements in-between, so that they do not all log in at once.  I have tried adding this to the beginning of the Script and then also to the end with the same results?  Do I put the set-up at the top and the main loop in the bottom?  What I am asking is, where do I add this as a sub to the Mining Script?  Please help...I am feeling less intelligent.

You really should ask 12x as it is his mining script and he knows where the key cycle points ate.  My script is a matter of adding a couple lines to the right point in his main loop so it won't halt and tell you out of resources etc.  If you place at the beginning, odds are you placed it in set-up and it will never be read again.  the rest of my script goes off in the subs.  oh yeah... the set %shard stuff does go in set-up of mining script.  I don't run the mining script and he could tell u 12x faster where the breaking points are.  I would think multiple spots could do the gump check without doing harm but when u lose connection it is sitting somewhere and looping in script.
Title: Re: C2's Auto Reloger
Post by: 12TimesOver on April 04, 2010, 03:56:04 AM
Hehe...12x faster... *snicker*

Actually for something like a mining script there really needs to be a check for the Disconnected gump every single time there is a response to a failed check for something. For example, the 12xMiner looks for stuff in the pack every single time you a) dig, b) recall, c) empty resources, d) make a new shovel, d) make a new tinker tool, etc, etc. At any one of these spots if it isn't happy it spits out an error. Furthermore there are many places where this or any other script can get hung up in a loop when the "disconnect" gump pops up if there isn't correct error-checking.

With that said, I think it would require many calls to the login sub throughout the script in order to check for the correct criteria to be met. Also, there needs to be "recovery" logic in the script so that it picks up where it left off correctly. For example, the shard could go down when you're in the middle of digging and when you log on it's reverted 2 minutes back to the bank in the middle of unloading but the bankbox isn't open. That requires more code logic.

I guess what I'm saying is, long story short, it could take, ummm... 12 times longer (hehe) than what you might think to get this working efficiently. I'll take a look at it though, auto-login has been on my list for the ever-elusive, Duke Nukem 4Ever, version 3.0.

X
Title: Re: C2's Auto Reloger
Post by: Oracle on April 05, 2010, 01:51:51 PM
That is perfectly understandable.  I spent a week trying to add the sub-routines in the different sections of the Mining Script.  Sometimes I could get it to re-login, but no Mining, and other times it just sat there and nothing happened...as I am not familiar with all the intricacies of the Script I went back to my saved version with the variaables added and started shoveling away...   ;)
Title: Re: C2's Auto Reloger
Post by: 12TimesOver on April 05, 2010, 02:05:01 PM
That is perfectly understandable.  I spent a week trying to add the sub-routines in the different sections of the Mining Script.  Sometimes I could get it to re-login, but no Mining, and other times it just sat there and nothing happened...as I am not familiar with all the intricacies of the Script I went back to my saved version with the variaables added and started shoveling away...   ;)

Hehe, you found exactly what I was talking about!! Recovery is always a scripts worst nightmare IMO, there are sosososososo many things to error-check for in a script; any program at all for that matter. We used to say, all code is 10% functional logic and 90% UI!

Anyhow, I'm still at it so it could be interesting, just may take a bit.

X
Title: Re: C2's Auto Reloger
Post by: Khameleon on April 05, 2010, 02:37:27 PM
it would be nice if someone started to build a script to shut down before the server shuts you down.... hrm... I think I already started that script and Is in testing phase for release... that's until I found the shards been down all day.
Title: Re: C2's Auto Reloger
Post by: Cush on April 10, 2012, 10:06:11 PM
Real Basic newbie question.

How do I adjust the timers for the situation of running several clients so that they all do not log in at the same time?
Title: Re: C2's Auto Reloger
Post by: nikki on July 26, 2012, 12:55:33 AM
not sure if anyone else has had this problem but when i try and use the script it enters account name and pass and gets to the shard select screen for about a millisecond before returning to the loggin screen. any help would be appreciated.
Title: Re: C2's Auto Reloger
Post by: _C2_ on July 26, 2012, 06:34:31 AM
not sure if anyone else has had this problem but when i try and use the script it enters account name and pass and gets to the shard select screen for about a millisecond before returning to the loggin screen. any help would be appreciated.

It is not recognizing the shard you typed in.  It could be:
A free shard
A misspelled shard
Or a shard with two parts to its name not entered correctly like lake Austin /lake_austin
Title: Re: C2's Auto Reloger
Post by: nikki on August 22, 2012, 03:40:48 PM
ok Im on OSI Atlantic, ill try retyping and making sure the spelling is correct this time, Thanks for the help
Title: Re: C2's Auto Reloger
Post by: robot_legs on May 20, 2014, 09:14:28 PM
Just wanted to let you know this is still working great. I have been looking for one of these for a while. Thank you!
Title: Re: C2's Auto Reloger
Post by: robot_legs on May 24, 2014, 06:07:18 PM
Okay, I hate to be that guy, but after the last patch I am having some trouble with this. It no longer logs in when you manually log out. It will enter the user name and password into the same box. I fixed that by removing the user name part and replacing mouse click with enters. However, during server down time it is acting funky. It will try to log into a different server instead of waiting for the selected server to show up again, then get hung up. I really did try to figure it out, but i am lost as far as that part goes. Thank you again.
Title: Re: C2's Auto Reloger
Post by: Crisis on May 26, 2014, 07:51:52 AM
EUO just got updated for the patch, try downloading the new EUO version 264 and see if things start working again.
Title: Re: C2's Auto Reloger
Post by: _C2_ on May 26, 2014, 09:50:14 AM
EUO just got updated for the patch, try downloading the new EUO version 264 and see if things start working again.

yep, please try your unaltered version with new easy uo and lets see what happens. I cannot fix easy uo when a function is not working on their end.
Title: Re: C2's Auto Reloger
Post by: robot_legs on May 26, 2014, 05:16:41 PM
EUO just got updated for the patch, try downloading the new EUO version 264 and see if things start working again.

yep, please try your unaltered version with new easy uo and lets see what happens. I cannot fix easy uo when a function is not working on their end.

Ok, patched my client and updated to the most recent verision of EUO. Still having the same issue. It will try to put the password and user name in the same spot. So it goes: delete account name, enter account name, delete account name, enter password. All in the same box. Let me know if you need anymore info or if I can help in anyway.
Title: Re: C2's Auto Reloger
Post by: Crisis on May 26, 2014, 06:57:04 PM
If you are using Win Vista or Win7, make sure you have EUO.EXE set to run as administrator. If you are running Win8, make sure that you are also running it in compatibility mode for Win7.
Title: Re: C2's Auto Reloger
Post by: robot_legs on May 26, 2014, 07:59:27 PM
If you are using Win Vista or Win7, make sure you have EUO.EXE set to run as administrator. If you are running Win8, make sure that you are also running it in compatibility mode for Win7.

Thank you for your reply. I am running EUO set to administrator. It is also running in compatibility mode for windows 7. Still the same issue. It was running perfect prior to the latest patch. I checked the click locations and they are still correct. 
Title: Re: C2's Auto Reloger
Post by: Hoby on May 27, 2014, 06:03:11 PM
I am having the same issue unfortunately.
It puts the account name in but doesn't tab to password just erases account name and puts password in its place.
Title: Re: C2's Auto Reloger
Post by: _C2_ on May 28, 2014, 02:42:59 PM
I am having the same issue unfortunately.
It puts the account name in but doesn't tab to password just erases account name and puts password in its place.

I'll try to look at this before I leave for the weekend. It seems to be impacting the bod collector too and i cannot log in atm. servers seem to be blocking me
Title: Re: C2's Auto Reloger
Post by: _C2_ on May 28, 2014, 03:17:44 PM
Okay... so Cheffe made some changes to how EUO 1.5 works and displays a few things:

EUO no longer allows users to set contposx on the main menu screen. This could just be a break in the program atm. For now, I have made a broken version where you hard code the screen clicks.  Try my clicks first to see if they work for you too. After that, you will need to adjust your own at the top of the script. I think they will work for all of us.
Code: [Select]
set %MainMenuNameX 503
set %MainMenuNameY 363
set %MainPassNameX 485
set %MainPassNameY 399
set %NextScreenArrowX 617
set %NextScreenArrowy 446

They also changed the #contsize!  That no longer exists in its original form. Noe EUO 1.5 has #contsizex & #contsizey... bah.  I have adjusted the script for that change and we will all have to monitor how that works. It is going to bust a lot of scripts out there that use #contsize in its old form.

This should work again! see login change version

I'll use it to update bod collector later... big dinner date with my lady!!!
Title: Re: C2's Auto Reloger
Post by: robot_legs on May 28, 2014, 03:29:34 PM
It is working again for me on log out. I will let you know after server down. Thank you!
Title: Re: C2's Auto Reloger
Post by: _C2_ on May 28, 2014, 09:01:55 PM
It is working again for me on log out. I will let you know after server down. Thank you!
Thank you! Please let me know regardless.
Title: Re: C2's Auto Reloger
Post by: robot_legs on May 29, 2014, 04:30:57 AM
Yeah so the server was jacked up tonight so I couldn't get a good test. Will try again today.
Title: Re: C2's Auto Reloger
Post by: Cush on May 31, 2014, 07:59:18 AM
Hi Looking for some input.

I have been using this on a few accounts over the last couple of months. Works great

Question is this. When you have multiple accounts I read you need to space the time of the log ins out a bit.

What do you all recommend in the spacing so that you maximize the execution of this?
Title: Re: C2's Auto Reloger
Post by: Pearls on July 22, 2014, 02:30:43 PM
I started using this gem again on 2 accounts with a wait of 450 between both. Absolute awesome! Cheers mate :)
Title: Re: C2's Auto Reloger
Post by: slyone on February 21, 2015, 05:27:49 PM
This script still works.  I ran into an issue with the x-y values due to multiple monitors.  The script worked once I moved the client to the monitor that EUO recognized as 0,0.  Thanks for a great script!
Title: Re: C2's Auto Reloger
Post by: Khameleon on February 25, 2015, 03:18:47 PM
there's an issue now when you click the account name it changes the gump window name, and contpos to 2 2
so instead of clicking the password box, I just used the Tab Key to get down to the password box.
Title: Re: C2's Auto Reloger
Post by: Teronius on February 28, 2015, 03:18:24 AM
Still works great  ;D Thanks C2!
Title: Re: C2's Auto Reloger
Post by: Damien on June 01, 2015, 10:58:06 AM
Just wont to let you know, no issues with latest EUO V1.5.1.287. Works perfect on the Freeshard i play. My miner is happy ;)

Thank You C2..
Title: Re: C2's Auto Reloger
Post by: Ketchup on August 30, 2015, 03:53:34 PM
I get to the character selection screen and then it gets hung up, any suggestions?
Title: Re: C2's Auto Reloger
Post by: The Ghost on August 30, 2015, 05:50:28 PM
add this on top of the script.    Build 253 had change  a few of those option. 
Code: [Select]
ignorecont reset
ignorecont UULC
ignorecont YCLD
ignorecont GXJC
ignorecont UGQB
ignorecont GVKC
ignorecont SVP
ignorecont SXQ
ignorecont IGHC
ignorecont QCPD
ignorecont MSMC
Title: Re: C2's Auto Reloger
Post by: gruntman on September 04, 2015, 03:59:28 PM
I am trying to add something into the script to have it press the f5 key once logged in and everything i have tried does not seem to work. Can someone please point me in the right direction to make this happen.
Title: Re: C2's Auto Reloger
Post by: GordimRP on October 23, 2015, 07:22:46 PM
Hi.
To decrease the logging time, where would I change?
Title: Re: C2's Auto Reloger
Post by: Cush on January 10, 2016, 09:31:47 AM
Been digging around trying to get this to work for a week or so.

Tried The Ghosts suggestion above and can not seem to get it right.

anyone been able to update this to working order?

Thanks!!!
Title: Re: C2's Auto Reloger
Post by: The Ghost on January 11, 2016, 01:17:14 PM
the gump size for one of the login page  have change, that why it not working.   
Title: Re: C2's Auto Reloger
Post by: Oni on July 02, 2016, 02:13:47 AM
HEllo, I didn't understand how that will work,

all I can see in your post is this:

"all you need to do is this section
Code: Select All | Copy To Clipboard

;set-up
set %a acct_name    ;replace acct_name with the actual name
set %PW password   ;replace password with an actual password
set %character_slot_number #  ;replace # sign with actual char #
set %s shard  ;replace shard with shard name
;two name shards have _ ex) great_lakes


Know issues:
2/20/09 - fixed conn lost gump noted by Khameleon- now uses key enter
"

I really don't understand how to use EasyUO yet, and just by writing this in a script didn't reconnect me (I changed the acc name, pass, char slot and server name). What am I doing wrong?
Title: Re: C2's Auto Reloger
Post by: The Ghost on July 02, 2016, 04:39:30 AM
Let me direct you on the right patch.  here you will see why and maybe understand if you read and follow ScriptUO Board Rules.
http://www.scriptuo.com/index.php?board=55.0
Title: Re: C2's Auto Reloger
Post by: Demethar on January 11, 2017, 07:34:44 PM
I couldn't get this to work on OSI. Checked gump sizes, tried to supplement clicks with enter but no luck so far. :(

Script gets stuck at second step of entering login details. Account name is posted correctly, then clicks the same coordinates and enters password. Basicly it enters password in "account name" section. I've checked gump and click coordinates, all are correct. Don't know what else i could change. :(
Title: Re: C2's Auto Reloger
Post by: The Ghost on January 12, 2017, 03:22:17 AM
Sometime you need to read throughout all the page to see what change

add this on top of the script.    Build 253 had change  a few of those option. 
Code: [Select]
ignorecont reset
ignorecont UULC
ignorecont YCLD
ignorecont GXJC
ignorecont UGQB
ignorecont GVKC
ignorecont SVP
ignorecont SXQ
ignorecont IGHC
ignorecont QCPD
ignorecont MSMC