HOWTO: Automate Server and Character Select

Amadeus

The Maestro
Staff member
This is a sample script illustrating how one might log into the game automatically using ISXVG. Basically, you could set up your innerspace so that it runs this script immediately after loading ISXVG. Then, the script will run until you're in the game proper, and then finish.

Of course, in this example, I'm using as my server Beta Server and the character name Amadeus.


Code:
atom(script) VG_onConnectionStateChange(string NewConnectionState)
{
    if ${NewConnectionState.Find[AT_SERVER_SELECT]}
        vgexecute /wsselect Beta Server
    elseif ${NewConnectionState.Find[AT_CHARACTER_SELECT]}
        vgexecute /select \"Amadeus\" \"--\" 0
 
}
 
 
function main()
{
      ; If isxVG isn't loaded, then no reason to run this script.
      if (!${ISXVG(exists)})
          return
 
      ;Initialize/Attach the event Atoms that we defined previously
        Event[VG_onConnectionStateChange]:AttachAtom[VG_onConnectionStateChange]
 
 
    ; Check when the script first loads if we're at server select or character select
    if ${ISXVG.ConnectionState.Find[AT_SERVER_SELECT]}
        vgexecute /wsselect Beta Server
    elseif ${ISXVG.ConnectionState.Find[AT_CHARACTER_SELECT]}
        vgexecute /select \"Amadeus\" \"--\" 0
 
 
        do 
        {
           waitframe
        }
        while !${ISXVG.ConnectionState.Find[IN_GAME]}
 
      ;We're done with the script, so let's detach all of the event atoms
        Event[VG_onConnectionStateChange]:DetachAtom[VG_onConnectionStateChange]
 
        echo AutoLogin Script Finished!
 
}
 

buallfrels

Active Member
Trying to understand this

If i get this right, I would change
select \"Amadeus\" \"--\" 0 to /select \"mycharacter\" \"--\" 0
/wsselect Beta Server to /wsselect myserver

Wouldn't it be "Amadeus" ?
And what is all the characters after the name for?
 

Amadeus

The Maestro
Staff member
That is right...and who knows?

Of course, I've not tested this since I posted it, so you'll have to test it and make sure that it still works. I believe that it does.
 
Top Bottom