Author Topic: Very fast Logout / Login  (Read 8513 times)

0 Members and 1 Guest are viewing this topic.

Offline KilroyIsDeadTopic starter

  • Full Member
  • ***
  • Posts: 155
  • Activity:
    0%
  • Reputation Power: 2
  • KilroyIsDead has no influence.
  • Respect: +13
  • Referrals: 0
    • View Profile
Very fast Logout / Login
« on: June 18, 2009, 04:01:30 PM »
0
I think it's in release form.  If you try to logout and it detects the disconnected or idle gump it will handle those and then log you in or out.

--Added deas from Khamelon and Cerveza (Woot to they!)

It's now using the TrailMyx call protocol

Now there is code that helps with detecting and handling the Idle or disconnected gumps
Closes Vet rewards gump
Handles being in the middle of the login prcess when sub routine is called

When Logging out you can set an amount of time to wait before failure.  This is useful so that you don't hang in my bad code ;(

There is now a force logout parameter when you call the login.  If this is set and it's determined you are already logged in then you'll be logged out first.  This is for folks that two calls is just TOO much.

I corrected the Logout header so it shows the logout description instead of the login description.

I built this to help the zoo donator so that I could recall and fastlog instead of gating For this I set the Expedite to true which logs me back into the same account and shard

But you can also log into any number of different accounts and shards and characters on each


Code: [Select]
set !PGLoginScript C:\UO\Scripts\PGUtils\PG.Login.suo

set %YourAcountName YourAccountName
set %YourPassword YourPassword
set %YourShard Atlantic
set %YourAltShard Great_Lakes
set %YourCharIndex 3
set %YourAltCharIndex 0

display ok This logs you into your account identified by the settings
call !PGLoginScript PG_Login %YourAcountName %YourPassword %YourShard %YourCharIndex paperdoll_gump 30 #False #True
display ok #Result

display ok This is the caddillac you can be logged in or out and it will very quickly log you into you last character (The shard has to be set here as we double check that you are logging back into the correct shard, one reason you might not is that the shard is down.)
call !PGLoginScript PG_Login %YourAcountName %YourPassword %YourShard %YourCharIndex paperdoll_gump 30 #True #True
display ok #Result

display ok This will log you out, and allow for 5 seconds before failing
call !PGLoginScript PG_Logout 5
display ok #Result

display ok This will log you in from a logged out state, since the last test should have logged you out, and allow for 30 seconds before failing
call !PGLoginScript PG_Login %YourAcountName %YourPassword %YourShard %YourCharIndex paperdoll_gump 30 #True #True
display ok #Result

display ok This will log you in using the the clicks and typing instead of just assuming the defaults on each screen
call !PGLoginScript PG_Login %YourAcountName %YourPassword %YourShard %YourCharIndex paperdoll_gump 30 #False #True
display ok #Result

display ok This will log you in to your alt account info using the the clicks and typing instead of just assuming the defaults on each screen
call !PGLoginScript PG_Login %YourAcountName %YourPassword %YourAltShard %YourAltCharIndex paperdoll_gump 30 #False #True
display ok #Result

halt


There are 1 attachment(s) in this post. You must register and post an acceptable introduction to download
PG.Login.suo
« Last Edit: June 27, 2009, 09:33:27 AM by KilroyIsDead »
Give a man a fire, he'll be warm the rest of the night;
Set a man afire, he'll be warm the rest of his life.

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: +238
  • Referrals: 0
    • View Profile
Re: Very fast Logout / Login
« Reply #1 on: June 25, 2009, 07:21:31 PM »
0
in the character select screen this code right here does not work for Two Word Shards.
why? !Shard is split with #SPC its gonna need the Underscore put back into the !LastShard Var.

  ;Am I on the right shard?
  if ! . PG_Login_Shard_ . !Shard <> #LShard

Offline KilroyIsDeadTopic starter

  • Full Member
  • ***
  • Posts: 155
  • Activity:
    0%
  • Reputation Power: 2
  • KilroyIsDead has no influence.
  • Respect: +13
  • Referrals: 0
    • View Profile
Re: Very fast Logout / Login
« Reply #2 on: June 25, 2009, 07:41:15 PM »
0
nice catch I'll fix that tonight
Give a man a fire, he'll be warm the rest of the night;
Set a man afire, he'll be warm the rest of his life.

Offline KilroyIsDeadTopic starter

  • Full Member
  • ***
  • Posts: 155
  • Activity:
    0%
  • Reputation Power: 2
  • KilroyIsDead has no influence.
  • Respect: +13
  • Referrals: 0
    • View Profile
Re: Very fast Logout / Login
« Reply #3 on: June 25, 2009, 08:08:37 PM »
0
Updated to work on multiple word shards

I'm getting 3 second relogs, my connection must be good tonight
Give a man a fire, he'll be warm the rest of the night;
Set a man afire, he'll be warm the rest of his life.

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: +238
  • Referrals: 0
    • View Profile
Re: Very fast Logout / Login
« Reply #4 on: June 26, 2009, 01:38:58 PM »
0
what id really like to see is a log out at this time, and log back in at this time.. should be easy to add simple Time adjusters.

Offline KilroyIsDeadTopic starter

  • Full Member
  • ***
  • Posts: 155
  • Activity:
    0%
  • Reputation Power: 2
  • KilroyIsDead has no influence.
  • Respect: +13
  • Referrals: 0
    • View Profile
Re: Very fast Logout / Login
« Reply #5 on: June 26, 2009, 01:48:53 PM »
0
Oh yeah that's pretty easy and would just be a wrapper of either of these subs

The reason I created this was that for the zoo donator when I was doing something other than unicorns/kirins I had to gate back and my chars can't regen the Mana fast enough, so now I just recall back to the zoo and do a quick log to get the animals there.  It helps alot with the polar bears because most of them have been tamed and released so many time they are typically confused and don't like to follow.

I'll add a couple wrappers for the logout(Time) Login(Time)
Would it be useful to have a logout, wait x mins, login or force the developer to determine the actual times based upon their wiat x min needs?
Give a man a fire, he'll be warm the rest of the night;
Set a man afire, he'll be warm the rest of his life.

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: +403
  • Referrals: 11
    • View Profile
Re: Very fast Logout / Login
« Reply #6 on: June 26, 2009, 01:51:19 PM »
0
Actual times would rock.... have a call to the sub and if it's at the user's set time (or later) then log out and wait till the user's set log in time, then log back in.
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: +238
  • Referrals: 0
    • View Profile
Re: Very fast Logout / Login
« Reply #7 on: June 26, 2009, 01:54:41 PM »
0
ya I'm gonna play with this a bit I've already played with something similar to this except instead of logging out I just had the character stand around until the disconnection gump popped up.


btw.. Im getting like 2s login times
« Last Edit: June 26, 2009, 02:00:03 PM by Khameleon »

Offline KilroyIsDeadTopic starter

  • Full Member
  • ***
  • Posts: 155
  • Activity:
    0%
  • Reputation Power: 2
  • KilroyIsDead has no influence.
  • Respect: +13
  • Referrals: 0
    • View Profile
Re: Very fast Logout / Login
« Reply #8 on: June 26, 2009, 02:02:14 PM »
0
I had constants on the lost connection gump and the other one that says if you don't do something in a minute I'll log you.  So I wanted to detect and relog you on those.  But I think those are all developer design issues.

I get the impression your loop would look like this...

Repeat
...
;If it's ever greater than 5:57 this would log you out
gosub Logout(5:57p)
...
until

But I would think the loop looks more like this...

repeat
...
if Now > 5:57p && ImStillLoggedIn
  gosub logout

if now > 7:15p && ImStillLoggedOut
  gosub login

...
until
Give a man a fire, he'll be warm the rest of the night;
Set a man afire, he'll be warm the rest of his life.

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: +403
  • Referrals: 11
    • View Profile
Re: Very fast Logout / Login
« Reply #9 on: June 26, 2009, 02:10:08 PM »
0
Something along those lines....

sub logout_login_timer
if now = or > the %logout time
{
gosub logout
while now > logout && now < login
  wait 0
gosub login
}
return

Just off the top of my head there....
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: +238
  • Referrals: 0
    • View Profile
Re: Very fast Logout / Login
« Reply #10 on: June 26, 2009, 02:20:43 PM »
0
hehe I already got it working in a script.

Set %LogOut 070000
Set %Login  073000


mainloop:
  If #Clilogged = 1 && #Time >= %Logout && #Time <= %Login
     gosub PG_Logout
  If #Clilogged = 0 && #Time >= %Login
     gosub PG_Login %AccountName %Password !Shard 4 paperdoll_gump 30 #True ; This logs you in assuming same account, shard and character
  If #Clilogged = 0
     Goto MainLoop

Offline KilroyIsDeadTopic starter

  • Full Member
  • ***
  • Posts: 155
  • Activity:
    0%
  • Reputation Power: 2
  • KilroyIsDead has no influence.
  • Respect: +13
  • Referrals: 0
    • View Profile
Re: Very fast Logout / Login
« Reply #11 on: June 26, 2009, 02:41:19 PM »
0
hehe I already got it working in a script.

Set %LogOut 070000
Set %Login  073000


mainloop:
  If #Clilogged = 1 && #Time >= %Logout && #Time <= %Login
     gosub PG_Logout
  If #Clilogged = 0 && #Time >= %Login
     gosub PG_Login %AccountName %Password !Shard 4 paperdoll_gump 30 #True ; This logs you in assuming same account, shard and character
  If #Clilogged = 0
     Goto MainLoop

Brilliant, I'm guessing you're using this for a always running script

By using that last parm #True you're requesting to come back to the same account shard and then char 4

I was thinking about doing this
acct1 char1 is my miner

Mine until it's bod time, Go get some bods, continue mining

mainloop:
gosub Mine
if #Time > !BodTime
{
  gosub GetBods
  gosub logout
 
  gosub login acct1 char2
  gosub GetBods
  gosub logout

  gosub login acct2 char1
  gosub GetBods
  gosub logout

  gosub login acct1 char1
  set !BodTime #Time + 6hrs
}
goto MainLoop
Give a man a fire, he'll be warm the rest of the night;
Set a man afire, he'll be warm the rest of his life.

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: +238
  • Referrals: 0
    • View Profile
Re: Very fast Logout / Login
« Reply #12 on: June 26, 2009, 02:57:14 PM »
0
I've wondered why I haven't Seen that in a Miner Script Myself.
And yes.. I have this in a Always Running Script

Offline KilroyIsDeadTopic starter

  • Full Member
  • ***
  • Posts: 155
  • Activity:
    0%
  • Reputation Power: 2
  • KilroyIsDead has no influence.
  • Respect: +13
  • Referrals: 0
    • View Profile
Re: Very fast Logout / Login
« Reply #13 on: June 27, 2009, 09:32:22 AM »
0
Updated to use safer waits for the gumps
This now also handles being down the login path (Shard selection or character selection screen) and still being able to login
This closes the vet rewards gump
Give a man a fire, he'll be warm the rest of the night;
Set a man afire, he'll be warm the rest of his life.

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: +238
  • Referrals: 0
    • View Profile
Re: Very fast Logout / Login
« Reply #14 on: June 27, 2009, 05:06:59 PM »
0
does this have a Fail-Safe Feature if the shard is not listed? wait like a Min or what ever, and try to log in until Successful?

Tags: