Author Topic: SuperSlayer's Auto Login Script for OpenEUO Version 1.8  (Read 32844 times)

0 Members and 1 Guest are viewing this topic.

Offline SuperslayerTopic starter

  • Elite
  • *
  • *
  • Posts: 1006
  • Activity:
    0%
  • Reputation Power: 14
  • Superslayer barely matters.Superslayer barely matters.
  • Gender: Male
  • Well what do you drink? Not tea.
  • Respect: +100
  • Referrals: 0
    • View Profile
Re: SuperSlayer's Auto Login Script for OpenEUO Version 1.6
« Reply #15 on: October 18, 2010, 11:43:45 PM »
0
Odd, now it too shows for me,..little buggy still I suppose.

Offline SuperslayerTopic starter

  • Elite
  • *
  • *
  • Posts: 1006
  • Activity:
    0%
  • Reputation Power: 14
  • Superslayer barely matters.Superslayer barely matters.
  • Gender: Male
  • Well what do you drink? Not tea.
  • Respect: +100
  • Referrals: 0
    • View Profile
Re: SuperSlayer's Auto Login Script for OpenEUO Version 1.7
« Reply #16 on: October 22, 2010, 09:23:50 AM »
0
Uploaded version 1.7

Version 1.7
- Removed LShard function in favor of speed of script and shard selection accuracy. Using LShard at login properly
  sets the last used shard, but during maintenance, the shards get reassigned. Otherwise, this is so fast
  that it still only takes less than a few seconds to get into the game.
- Added atom functionality so the script may be 'called' using variables set in your own script. Useful for bod
  collecting scripts, multi-account script setups, (Manwinc's army perhaps?) and more!
- Little more code cleanup as well.

Offline SuperslayerTopic starter

  • Elite
  • *
  • *
  • Posts: 1006
  • Activity:
    0%
  • Reputation Power: 14
  • Superslayer barely matters.Superslayer barely matters.
  • Gender: Male
  • Well what do you drink? Not tea.
  • Respect: +100
  • Referrals: 0
    • View Profile
Re: SuperSlayer's Auto Login Script for OpenEUO Version 1.7
« Reply #17 on: October 22, 2010, 10:07:54 AM »
0
Here's an example of how swapping characters can work by calling the script with different shard and character parameters:
Start with your first char and shard login by filling in the atom variables like below:

Quote
setatom('Custom',true)                  -- set the boolean value to true to first set the atom variable for the first char/shard
setatom('AN','***')                        -- your UO account name in place of the asterisks
setatom('PW','***')                       -- your UO password in place of the asterisks
setatom('S2',5)                             -- shards to scan
setatom('CS',1)                              -- character slot
setatom('SH',890981139)               -- shard to select by numeric value
dofile('ss_autologinoeuov1.7.lua')   --call the login script
setatom('Custom',false)                 -- now turn off the custom atom variable telling the script to ignore the logged in character should they log out

Now you're logged in with the selected account, do your thing, and have your logout script run. Once your logout script has taken you to the login page, the next character can log in using the same method as above.  One script could look like this:

Code: [Select]
setatom('Custom',true)               
setatom('AN','***')                     
setatom('PW','***')                     
setatom('S2',5)                         
setatom('CS',1)                           
setatom('SH',890981139)             
dofile('ss_autologinoeuov1.7.lua') 
setatom('Custom',false)

** Run your code here **

logout
login next char

setatom('Custom',true)               
setatom('AN','***')                     
setatom('PW','***')                     
setatom('S2',5)                         
setatom('CS',1)                           
setatom('SH',890981139)             
dofile('ss_autologinoeuov1.7.lua') 
setatom('Custom',false)

Wanna be fancy? Make a table out of the logins, just don't change the atom variables themselves or the script won't work! :P ;)

Offline Dixie Wrecked

  • Full Member
  • ***
  • Posts: 124
  • Activity:
    0%
  • Reputation Power: 3
  • Dixie Wrecked has no influence.
  • Gender: Male
  • Respect: +61
  • Referrals: 1
    • View Profile
Re: SuperSlayer's Auto Login Script for OpenEUO Version 1.7
« Reply #18 on: October 23, 2010, 11:30:26 AM »
0
I have been messing around with this script for a little while today, trying to make a gift gathering script in OEUO for testing when they release the 13th anniversary gifts.  Anyway, everything seemed to be working well, but I am now having two problems with the script (and I shut down both OEUO and UO, as well as redownloaded version 1.7, to make sure I didn't accidentally change anything in there when getting the numbers for the shards):

1) The script does not seem to recognize Legends when scanning the shards; this is the first shard I have on my list, so it might be possible that it is just not scanning the first one?

2) Even though it recognizes other shards, it doesn't actually select any of them for me.  I have tested this with several shards, and while it moves down the list until it finds the correct shard, it does not actually choose the shard, instead logging into the last shard selected.  However, if I changed line 190 from:
Code: [Select]
    UO.Click(238,115,true,true,true,false)  --  click shard nameto:
Code: [Select]
    UO.Click(238,115,true,true,false,false)  --  click shard nameas well as commented out line 192:
Code: [Select]
    UO.Click(618,445,true,true,true,false)  -- click green arrowit does log into the correct shard, although it still doesn't recognize Legends. 

Anyway, I love the script so far, as it will definitely make finishing the Gift Gathering script a lot easier, and then I can turn my attention to seeing if I can write a BOD Gatherer as well! 
"hmm, theres no examples and directions sticky in new member intros.  you have to admit script library would have been a good place to put it"
- karrde

Offline Dixie Wrecked

  • Full Member
  • ***
  • Posts: 124
  • Activity:
    0%
  • Reputation Power: 3
  • Dixie Wrecked has no influence.
  • Gender: Male
  • Respect: +61
  • Referrals: 1
    • View Profile
Re: SuperSlayer's Auto Login Script for OpenEUO Version 1.7
« Reply #19 on: October 23, 2010, 03:19:11 PM »
0
OK, I did some more testing and found that the script is moving too fast between entering the account/password and scanning the shards.  When it gets to the shard selection screen, it seems to click the down arrow very quickly, moving the top shard from my screen.  After pausing the script and manually moving back to the top, it immediately found it, and with the above edit for the clicks, it finished logging in the correct character on the correct shard.  I added a wait(500) as line 143, right after the repeat loop would end from being the shard selection screen, as I am thinking that the shard selection screen may be the active window, but the shard names may take just a fraction of a second longer to load, and the script is so fast, that slight delay is still too much? 
"hmm, theres no examples and directions sticky in new member intros.  you have to admit script library would have been a good place to put it"
- karrde

Offline SuperslayerTopic starter

  • Elite
  • *
  • *
  • Posts: 1006
  • Activity:
    0%
  • Reputation Power: 14
  • Superslayer barely matters.Superslayer barely matters.
  • Gender: Male
  • Well what do you drink? Not tea.
  • Respect: +100
  • Referrals: 0
    • View Profile
Re: SuperSlayer's Auto Login Script for OpenEUO Version 1.7
« Reply #20 on: October 23, 2010, 03:52:18 PM »
0
OK, I did some more testing and found that the script is moving too fast between entering the account/password and scanning the shards.  When it gets to the shard selection screen, it seems to click the down arrow very quickly, moving the top shard from my screen.  After pausing the script and manually moving back to the top, it immediately found it, and with the above edit for the clicks, it finished logging in the correct character on the correct shard.  I added a wait(500) as line 143, right after the repeat loop would end from being the shard selection screen, as I am thinking that the shard selection screen may be the active window, but the shard names may take just a fraction of a second longer to load, and the script is so fast, that slight delay is still too much? 

Awesome debugging work there Dixie! I had a hell of a time figuring out some other issues with this when it wasn't clicking and see'ing stuff correctly. It too turned out to be that the script was too dam fast. That 500 wait should be fine, and you could probably fine tune it slowly down to 250, if desired.

Creating clicks and double clicks is a little tricky since we don't that the 'd' parameter. We actually have to run the code twice with a wait in between for a double. However, just clicking in the client is a little 'off' as the client has to be the topmost/active window on the screen, otherwise, a single click will just just make the client window active, and not actually send a mouse click.

I'll continue to work on the shard scanning and update the script clicks as OEUO comes together.

Thanks again for the input with this script Dixie!

Offline Dixie Wrecked

  • Full Member
  • ***
  • Posts: 124
  • Activity:
    0%
  • Reputation Power: 3
  • Dixie Wrecked has no influence.
  • Gender: Male
  • Respect: +61
  • Referrals: 1
    • View Profile
Re: SuperSlayer's Auto Login Script for OpenEUO Version 1.7
« Reply #21 on: October 31, 2010, 05:43:04 PM »
0
OK, I've had another small hiccup with this script, I am guessing to due to a lack of lag (gotta love a script running too fast!).  In the function SelectChar(), it was hanging by waiting for the SysMsg to be "Welcome to Ultima Online!".  This message had appeared, but I believe due to a lot of other messages appearing as well, it missed that it had shown this message, and thus it was hanging.  I am not sure how a timeout would need to be handled though, as I did have a character logged in, but that doesn't mean this would always be the case?  Perhaps having it also check if UO.CharName ~= '', then have it continue on as well, as that would mean the character has logged in? 

Otherwise, this script is working great and really fast, so I am going to time it now as it logs in over 550 chars on 4 accounts so I can see just how quickly this moves!
"hmm, theres no examples and directions sticky in new member intros.  you have to admit script library would have been a good place to put it"
- karrde

Offline SuperslayerTopic starter

  • Elite
  • *
  • *
  • Posts: 1006
  • Activity:
    0%
  • Reputation Power: 14
  • Superslayer barely matters.Superslayer barely matters.
  • Gender: Male
  • Well what do you drink? Not tea.
  • Respect: +100
  • Referrals: 0
    • View Profile
Re: SuperSlayer's Auto Login Script for OpenEUO Version 1.7
« Reply #22 on: October 31, 2010, 05:54:05 PM »
0
Glad to hear you're still liking it a bunch. I haven't messed with in a week or so, and I know I have a few strings to tighten with it.  I have 1.8 behind bars atm while I myself work with it.  In the mean time, you could place a wait before the check for the line "welcome to uo..." if ya want, or wait a few days 'till I throw 1.8 out here.

Offline SuperslayerTopic starter

  • Elite
  • *
  • *
  • Posts: 1006
  • Activity:
    0%
  • Reputation Power: 14
  • Superslayer barely matters.Superslayer barely matters.
  • Gender: Male
  • Well what do you drink? Not tea.
  • Respect: +100
  • Referrals: 0
    • View Profile
Re: SuperSlayer's Auto Login Script for OpenEUO Version 1.8
« Reply #23 on: November 02, 2010, 03:07:39 PM »
0
Uploaded to version 1.8

Code: [Select]
Version 1.8
- Added ClientSwap function; confirms the client to log in to based on an empty 'CharName'.     
- Added additional login validation step to avoid hanging at character selection gump.
- Adjusted shard scanning technique to first scan for the existence of shard
    names and run a pixel sum test to verify.
- Misc. wait adjustments and subtle code changes to certain function
- Print function included to provide feedback to the user that the character is logged in, and
    the characters name is no longer "".

Offline Dixie Wrecked

  • Full Member
  • ***
  • Posts: 124
  • Activity:
    0%
  • Reputation Power: 3
  • Dixie Wrecked has no influence.
  • Gender: Male
  • Respect: +61
  • Referrals: 1
    • View Profile
Re: SuperSlayer's Auto Login Script for OpenEUO Version 1.8
« Reply #24 on: December 16, 2010, 10:16:23 AM »
0


Just an FYI that this script is "broken", as the gump values have been changed as follows:

line 153 - main menu gump from 42636 to 46764
line 165 - wait gump from 9524 to 13652
line 170 - shard selection gump from 40956 to 45084
line 200 - wait gump from 9524 to 13652
line 224 - main menu gump from 42636 to 46764
line 243 - wait gump from 9524 to 13652

line 249 already uses the ContName variable, but the commented value has changed from 19212 to 23340, in case that comes into play later.

I think that's all that was changed, and after changing these myself, the script works fine again!
"hmm, theres no examples and directions sticky in new member intros.  you have to admit script library would have been a good place to put it"
- karrde

Offline smokinjoe26

  • Jr. Member
  • **
  • Posts: 25
  • Activity:
    0%
  • Reputation Power: 1
  • smokinjoe26 has no influence.
  • Respect: +2
  • Referrals: 0
    • View Profile
Re: SuperSlayer's Auto Login Script for OpenEUO Version 1.8
« Reply #25 on: February 10, 2012, 09:26:46 AM »
0
Thank you much for the Auto Login Script SS .... it works like a charm after changing a few gump values much like Dixie mentions before me.  just had to figure out the new ones .... these must be due to updates.  No doubt they will more than likely change again in future updates.  Also thank you Dixie for your previous post.  I would not have learned how to do it on my own if it weren't for you.

Tags: OEUO