Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #cs ----------------------------------------------------------------------------
- SWG ALT2 CHAR Login Script v1.0
- [required] Auto-It Version 3.3+ - https://www.autoitscript.com/site/autoit/downloads/
- [optional] SWG Extension Loader - https://www.swgmods.com/index.php?resources/swg-galaxy-extender.8/
- This script :
- 1) starts the SWG Extension Loader if it exists
- 2) starts the SWG client
- 3) cycles past the splash screens
- 4) enters your username and password
- 5) brings you to the character select screen
- 6) chooses the third character and loads the game
- 7) sets the /emu graphic settings
- How to use :
- 1) Edit your login details below on line 29 and 30
- 2) Save this script as whatever.au3 in your SWGEmu folder
- 3) Make a shortcut to the whatever.au3 file
- 4) Start the game using the shortcut
- Shortcomings :
- 1) If the /emu settings are too much of a change at once, the client will lag
- If it doesn't work, make sure the Auto-It executable is set to run as administrator (C:\Program Files (x86)\AutoIt3\AutoIt3.exe)
- #ce ----------------------------------------------------------------------------
- #include <FileConstants.au3>
- $username="myusername" ; Would be better to read this from a file
- $password="mypassword" ; And this too
- $choiceTime="20" ; Number of seconds to load into the game.
- $renamedWindow='SwgClientAlt2'
- $configFileString='{"windowName":"SwgClientAlt2","dllName":"SWGCommandExtensionAlt2.dll"}'
- ; Function to definitely get the window focus of the SWG client
- Func _WinWaitActivate($title,$text,$timeout=0)
- WinWait($title,$text,$timeout)
- If Not WinActive($title,$text) Then WinActivate($title,$text)
- WinWaitActive($title,$text,$timeout)
- EndFunc
- Local $hFileOpen = FileOpen("config.json", $FO_OVERWRITE + $FO_CREATEPATH) ; Open the extension loader config file
- FileWriteLine($hFileOpen, $configFileString) ; Write renamed window title to extension loader config file
- FileClose($hFileOpen) ; Close the handle returned by FileOpen.
- Run("SWGExtensionLoader.exe","") ; Start the /emu extension loader
- Sleep(1000)
- Run("SWGEmu.exe",""); This requires elevation
- Sleep(2000)
- WinSetTitle("SwgClient","",$renamedWindow) ; Rename SwgClient window to match the change made to the extension loader config file
- _WinWaitActivate($renamedWindow,"") ; Switch to the renamed SWG window
- Sleep(2000) ; Wait enough time to show the server splash screen
- Send("{ENTER}{ENTER}{ENTER}{ENTER}") ; Clear the splash screens
- Sleep(1000)
- Send($username)
- Sleep(1500)
- Send("{TAB}")
- Sleep(1500)
- Send($password)
- Sleep(1000)
- Send("{ENTER}") ; Brings you to the character selection screen
- Sleep(1000)
- Send("{DOWN}")
- Send("{DOWN}")
- Send("{ENTER}") ; Choose the third character and load into the game.
- Sleep($choiceTime*1000) ; Time to load into the game
- ; Set the /emu graphics settings (this could be made tidier with a /emu preset)
- Send("/emu viewdistance 2048") ; Default max is 2048
- Send("{ENTER}")
- Sleep(2000)
- Send("/emu globaldetail 6") ; Default max is 6
- Send("{ENTER}")
- Sleep(2000)
- Send("/emu hdterrain 28") ; Default max is 20
- Send("{ENTER}")
- Sleep(2000)
- Send("/emu ncflora 128") ; Default max is 128
- Send("{ENTER}")
- Sleep(2000)
- Send("/emu radialflora 64") ; Default max is 64
- Send("{ENTER}")
- Exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement