Author Topic: C2's Auto Reloger  (Read 59452 times)

0 Members and 1 Guest are viewing this topic.

Offline _C2_Topic starter

  • AFK FtW
  • Global Moderator
  • *
  • *****
  • Posts: 4077
  • Activity:
    0%
  • Reputation Power: 48
  • _C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!
  • RIP Pen Trick
  • Respect: +396
  • Referrals: 4
    • View Profile
C2's Auto Reloger
« on: January 21, 2009, 06:25:37 AM »
+1
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

There are 2 attachment(s) in this post. You must register and post an acceptable introduction to download
c2's Auto Relog Sub Login Change Version.txt
c2's Auto Relog Sub.txt
« Last Edit: May 28, 2014, 03:20:15 PM by _C2_ »

Offline Khameleon

  • Script Tester - Team Leader
  • Elite
  • *
  • *
  • Posts: 2574
  • Activity:
    0%
  • Reputation Power: 30
  • Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!
  • Gender: Male
  • Respect: +465
  • Referrals: 0
    • View Profile
Re: C2's Auto Reloger
« Reply #1 on: February 03, 2009, 01:46:57 AM »
+1
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.

Offline _C2_Topic starter

  • AFK FtW
  • Global Moderator
  • *
  • *****
  • Posts: 4077
  • Activity:
    0%
  • Reputation Power: 48
  • _C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!
  • RIP Pen Trick
  • Respect: +396
  • Referrals: 4
    • View Profile
Re: C2's Auto Reloger
« Reply #2 on: February 03, 2009, 05:27:21 AM »
+1
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.

Offline Khameleon

  • Script Tester - Team Leader
  • Elite
  • *
  • *
  • Posts: 2574
  • Activity:
    0%
  • Reputation Power: 30
  • Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!
  • Gender: Male
  • Respect: +465
  • Referrals: 0
    • View Profile
Re: C2's Auto Reloger
« Reply #3 on: February 03, 2009, 03:31:01 PM »
+1
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.

Offline wildesau

  • Newbie
  • *
  • Posts: 5
  • Activity:
    0%
  • Reputation Power: 0
  • wildesau has no influence.
  • Respect: +3
  • Referrals: 0
    • View Profile
C2's Auto Reloger Feedback/Problems
« Reply #4 on: February 04, 2009, 11:32:36 AM »
+1
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? . . . . . .)

Offline Khameleon

  • Script Tester - Team Leader
  • Elite
  • *
  • *
  • Posts: 2574
  • Activity:
    0%
  • Reputation Power: 30
  • Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!
  • Gender: Male
  • Respect: +465
  • Referrals: 0
    • View Profile
Re: C2's Auto Reloger Feedback/Problems
« Reply #5 on: February 04, 2009, 02:24:21 PM »
+1
change the click x y to msg $ and you should be ok.

Code: [Select]
if #contsize = 203_121 2
       Msg $

Offline wildesau

  • Newbie
  • *
  • Posts: 5
  • Activity:
    0%
  • Reputation Power: 0
  • wildesau has no influence.
  • Respect: +3
  • Referrals: 0
    • View Profile
Re: C2's Auto Reloger Feedback/Problems
« Reply #6 on: February 05, 2009, 08:39:22 AM »
+1
Thank you ! Works great now !! :)

Offline Khameleon

  • Script Tester - Team Leader
  • Elite
  • *
  • *
  • Posts: 2574
  • Activity:
    0%
  • Reputation Power: 30
  • Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!
  • Gender: Male
  • Respect: +465
  • Referrals: 0
    • View Profile
Re: C2's Auto Reloger Feedback/Problems
« Reply #7 on: February 05, 2009, 01:12:28 PM »
+1
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

Offline _C2_Topic starter

  • AFK FtW
  • Global Moderator
  • *
  • *****
  • Posts: 4077
  • Activity:
    0%
  • Reputation Power: 48
  • _C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!
  • RIP Pen Trick
  • Respect: +396
  • Referrals: 4
    • View Profile
Re: C2's Auto Reloger Feedback/Problems
« Reply #8 on: February 05, 2009, 07:29:56 PM »
+1
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

Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +861
  • Referrals: 11
    • View Profile
Re: C2's Auto Reloger
« Reply #9 on: February 27, 2009, 07:43:56 AM »
+1
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.
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Offline Khameleon

  • Script Tester - Team Leader
  • Elite
  • *
  • *
  • Posts: 2574
  • Activity:
    0%
  • Reputation Power: 30
  • Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!
  • Gender: Male
  • Respect: +465
  • Referrals: 0
    • View Profile
Re: C2's Auto Reloger
« Reply #10 on: February 27, 2009, 08:32:12 AM »
+1
ya the script works great. I use it in just about ever one of my scripts.

Offline 8 Ball

  • Full Member
  • ***
  • Posts: 102
  • Activity:
    0%
  • Reputation Power: 2
  • 8 Ball has no influence.
  • Gender: Male
  • Respect: +24
  • Referrals: 0
    • View Profile
Re: C2's Auto Reloger
« Reply #11 on: August 15, 2009, 07:05:01 AM »
+1
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 :)

Offline cgeorgemo

  • Hero Member
  • *
  • Posts: 586
  • Activity:
    0%
  • Reputation Power: 5
  • cgeorgemo has no influence.
  • Gender: Male
  • I'm Brian...cgeorgemo is Curious George Missouri
  • Respect: +36
  • Referrals: 1
    • View Profile
Re: C2's Auto Reloger
« Reply #12 on: September 01, 2009, 12:05:54 AM »
+1
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.
« Last Edit: September 04, 2009, 09:44:47 AM by cgeorgemo »
Sarcasm is your body's natural defense against stupidity.

Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +861
  • Referrals: 11
    • View Profile
Re: C2's Auto Reloger
« Reply #13 on: December 17, 2009, 05:10:30 AM »
+1
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.
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Offline _C2_Topic starter

  • AFK FtW
  • Global Moderator
  • *
  • *****
  • Posts: 4077
  • Activity:
    0%
  • Reputation Power: 48
  • _C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!
  • RIP Pen Trick
  • Respect: +396
  • Referrals: 4
    • View Profile
Re: C2's Auto Reloger
« Reply #14 on: December 17, 2009, 05:58:24 AM »
+1
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.

Tags: