Aion Auto-Login (Sample Script)

Amadeus

The Maestro
Staff member
This is a very basic script to show how one might automate the login process. I'm sure there is a better way to write/design the script; this is just a quick/dirty version to show the various TLOs and datatype members/methods.

This example code logs in using "Amadeus@example.com" as the account name, and "MyPassword" for the password. It then selects the character "Amadeus" and uses the PIN code 123456.

(NOTE: I am generous with the "waits" (wait 5 = .5 seconds) throughout the script because I like to look as 'human' as possible.)

Code:
function main()
{
    variable string Account
    variable string Password
    variable string Character
    variable int Pin1
    variable int Pin2
    variable int Pin3
    variable int Pin4
    variable int Pin5
    variable int Pin6
    
    if (!${isxAion(exists)})
        return
  
    Account:Set["amadeus@example.com"]
    Password:Set["MyPassword"]
    Character:Set["Amadeus"]
    Pin1:Set[1]
    Pin2:Set[2]
    Pin3:Set[3]
    Pin4:Set[4]
    Pin5:Set[5]
    Pin6:Set[6]
    
    echo "AutoLoginSample:: Initialized"
    
    do 
    {
        waitframe
    }
    while (!${isxAion.IsReady} || !${LoginWindow(exists)})
    
    LoginWindow.Account:SetText[${Account}]
    wait 10
    LoginWindow.Password:SetText[${Password}]
    wait 10
    LoginWindow.OK:LeftClick
    wait 5
    do
    {
        waitframe
    }
    while (!${EULAWindow(exists)} && !${CharSelectWindow(exists)})
    
    if (${EULAWindow(exists)})
    {
        wait 5
        EULAWindow.Accept:LeftClick
        wait 5
        do
        {
            if ${QuestionWindow(exists)}
            {
                 QuestionWindow.Button1:LeftClick
                 wait 5
            }
            waitframe
        }
        while (!${CharSelectWindow(exists)})
    }
    
    wait 5
    if (!${CharSelectWindow.Character[${Character}](exists)})
    {
        echo "AutoLoginSample::Debug::  Character '${Character}' does not exist on this account."
        return
    }
    CharSelectWindow.Character[${Character}]:LeftClick
    wait 5
    do
    {
        waitframe
    }
    while (!${CharSelectWindow.Start.IsEnabled})
    CharSelectWindow.Start:LeftClick
    wait 60 ${PINWindow(exists)}
    
    if (${PINWindow(exists)})
    {
        wait 5
        PINWindow.Number[${Pin1}]:LeftClick
        wait 5
        PINWindow.Number[${Pin2}]:LeftClick
        wait 5
        PINWindow.Number[${Pin3}]:LeftClick
        wait 5
        PINWindow.Number[${Pin4}]:LeftClick
        wait 5
        PINWindow.Number[${Pin5}]:LeftClick
        wait 5
        PINWindow.Number[${Pin6}]:LeftClick
        wait 5
        
        if (${PINWindow.OK.IsEnabled})
            PINWindow.OK:LeftClick
        wait 5
    }
    
    
    echo "AutoLoginSample:: Ended"
}
 

Amadeus

The Maestro
Staff member
For the paranoid folks...

I've been doing this since 2002 and have a spotless record with regard to privacy and account information security. (ISXEQ2 has had auto-login support for years.) So, I think it's pretty obvious that I have no interest in stealing your account/password information when you use it in isxAion.

Feel free to use a packet sniffer at any time while using isxAion and you'll see that the only embedded interaction it has with the Internet is during authentication when you first load the extension.

All of my extensions are 100% clean and safe. If anyone feels they have found a legitimate security concern, please feel free to email me.
 

Amadeus

The Maestro
Staff member
Here is an example of the same script; however, this time it has support for multiple logins. With this one you'd save the script as something like "ALogin.iss" and then run with "run ALogin amadeus" (to load up Amadeus.) This version also loads isxAion if it's not already loaded.

Code:
variable(script) string Account
variable(script) string Password
variable(script) string Character
variable(script) int Pin1
variable(script) int Pin2
variable(script) int Pin3
variable(script) int Pin4
variable(script) int Pin5
variable(script) int Pin6

function main(... Args)
{
    variable int Iterator = 1
    
  if (!${isxAion(exists)})
  {
      ext isxaion
      do
      {
          waitframe
      }
      while !${isxAion.IsReady}
      wait 5
  }

  ; 'Args' is an array ... arrays are static.
    if ${Args.Size} > 0
    {
        do
        {
            if (${Args[${Iterator}].Equal[amadeus]})
            {
              Account:Set["Login@example.com"]
              Password:Set["MyPassword"]
              Character:Set["Amadeus"]
              Pin1:Set[1]
              Pin2:Set[2]
              Pin3:Set[3]
              Pin4:Set[4]
              Pin5:Set[5]
              Pin6:Set[6]
              break
            }
            elseif (${Args[${Iterator}].Equal[deus]})
            {
              Account:Set["Login@example.com"]
              Password:Set["MyPassword"]
              Character:Set["Deus"]
              Pin1:Set[1]
              Pin2:Set[2]
              Pin3:Set[3]
              Pin4:Set[4]
              Pin5:Set[5]
              Pin6:Set[6]
              break
            }        
            elseif (${Args[${Iterator}].Equal[ama]})
            {
              Account:Set["Login@example.com"]
              Password:Set["MyPassword"]
              Character:Set["Ama"]
              Pin1:Set[1]
              Pin2:Set[2]
              Pin3:Set[3]
              Pin4:Set[4]
              Pin5:Set[5]
              Pin6:Set[6]
              break
            }        
            else
            {
                echo "ALogin::Config::  '${Args[${Iterator}]}' is not a valid command line argument.  Ending Script."
                return
            }
        }
        while ${Iterator:Inc} <= ${Args.Size}
    }
    

    echo "AutoLoginSample:: Initialized"
    
    do 
    {
        waitframe
    }
    while (!${isxAion.IsReady} || !${LoginWindow(exists)})
    
    LoginWindow.Account:SetText[${Account}]
    wait 10
    LoginWindow.Password:SetText[${Password}]
    wait 10
    LoginWindow.OK:LeftClick
    wait 5
    do
    {
        waitframe
    }
    while (!${EULAWindow(exists)} && !${CharSelectWindow(exists)})
    
    if (${EULAWindow(exists)})
    {
        wait 5
        EULAWindow.Accept:LeftClick
        wait 5
        do
        {
            if ${QuestionWindow(exists)}
            {
                 QuestionWindow.Button1:LeftClick
                 wait 5
            }
            waitframe
        }
        while (!${CharSelectWindow(exists)})
    }
    
    wait 5
    if (!${CharSelectWindow.Character[${Character}](exists)})
    {
        echo "AutoLoginSample::Debug::  Character '${Character}' does not exist on this account."
        return
    }
    CharSelectWindow.Character[${Character}]:LeftClick
    wait 5
    do
    {
        waitframe
    }
    while (!${CharSelectWindow.Start.IsEnabled})
    CharSelectWindow.Start:LeftClick
    wait 60 ${PINWindow(exists)}
    
    if (${PINWindow(exists)})
    {
        wait 5
        PINWindow.Number[${Pin1}]:LeftClick
        wait 2
        PINWindow.Number[${Pin2}]:LeftClick
        wait 2
        PINWindow.Number[${Pin3}]:LeftClick
        wait 2
        PINWindow.Number[${Pin4}]:LeftClick
        wait 2
        PINWindow.Number[${Pin5}]:LeftClick
        wait 2
        PINWindow.Number[${Pin6}]:LeftClick
        wait 2
        
        if (${PINWindow.OK.IsEnabled})
            PINWindow.OK:LeftClick
        wait 5
    }
    
    
    echo "AutoLoginSample:: Ended"
}
 

Zandros

Script Author: VGA
I do not know how many people had problems installing the game, I know I did. I ended up using BitTorrent to download the files to my computer so that I can install the game. Configuring the game was also lots of fun and with help from several others I was able to get up and running. The next hurdle was the login procedure, which I owe Amadeus many thanks for making it possible which I took it a little further to show how great this works.

I tested this and it works smoothly for all my players and I was able to get this launching the game and logging into your player without any action on your part. Below are the steps I used to configure Inner Space with settings you'll need to get up and running at a click of a button:

Add Game in Inner Space with these parameters which you will use when creating new profiles (the path may be different for you):
Name: Aion
Executable: C:\Program Files (x86)\NCSOFT\Aion\bin32\Aion.bin
Parameters: -ip:64.25.35.103 -port:2106 -cc:1 -noauthgg -charnamemenu -f2p -webshopevent:1 -loginex -pwd16 -nosatab -fmd -32

Create a Profile for each of your player's Name:
Profile Name: Your Player's Name
Executable FileName: Aion.bin
Executable Parameters: -ip:64.25.35.103 -port:2106 -cc:1 -noauthgg -charnamemenu -f2p -webshopevent:1 -loginex -pwd16 -nosatab -fmd -32
Executable Path: C:\Program Files (x86)\NCSOFT\Aion\bin32
Click on Startup and insert the following:
Name: Auto-Login
Command to execute: waitscript Auto-Login "Your Player's Name"

Using the multiple login code from Amadeus we need to save and edit to get it to work properly.
Copy the code and save it to a file in your Scripts folder: Auto-Login.iss
Edit the newly created file changing the entries for each of your characters (snippet of the code you will be editing):

Code:
	(the following is what you will be looking for when you enter your information)

	if (${Args[${Iterator}].Equal[YOUR PLAYER'S NAME]})
	{
		Account:Set["YOUR ACCOUNT NAME"]
		Password:Set["YOUR PASSWORD"]
		Character:Set["YOUR PLAYER'S NAME"]
		Pin1:Set[1]
		Pin2:Set[2]
		Pin3:Set[3]
		Pin4:Set[4]
		Pin5:Set[5]
		Pin6:Set[6]
		break
	}
 

Amadeus

The Maestro
Staff member
Just an FYI, you can have a pin longer than the display, I have a 9 digit pin, will this still work?
Yes, you would just need to edit the script. You would add more variables at the top, then any time you see them being used, just add more steps for the new ones.

I don't have time right now; however, I'll update the script in the next day or so with comments explaining how to set it to PINs that are shorter or longer. I'll make the script more dynamic so that you can do everything from the command line too.

What's the maximum length of the PIN?
 
Top Bottom