Advertisement
Guest User

Untitled

a guest
Aug 31st, 2018
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.29 KB | None | 0 0
  1. #cs ----------------------------------------------------------------------------
  2.  
  3. SWG ALT2 CHAR Login Script v1.0
  4.  
  5. [required] Auto-It Version 3.3+ - https://www.autoitscript.com/site/autoit/downloads/
  6. [optional] SWG Extension Loader - https://www.swgmods.com/index.php?resources/swg-galaxy-extender.8/
  7.  
  8. This script :
  9. 1) starts the SWG Extension Loader if it exists
  10. 2) starts the SWG client
  11. 3) cycles past the splash screens
  12. 4) enters your username and password
  13. 5) brings you to the character select screen
  14. 6) chooses the third character and loads the game
  15. 7) sets the /emu graphic settings
  16.  
  17. How to use :
  18. 1) Edit your login details below on line 29 and 30
  19. 2) Save this script as whatever.au3 in your SWGEmu folder
  20. 3) Make a shortcut to the whatever.au3 file
  21. 4) Start the game using the shortcut
  22.  
  23. Shortcomings :
  24. 1) If the /emu settings are too much of a change at once, the client will lag
  25.  
  26. If it doesn't work, make sure the Auto-It executable is set to run as administrator (C:\Program Files (x86)\AutoIt3\AutoIt3.exe)
  27.  
  28. #ce ----------------------------------------------------------------------------
  29.  
  30. #include <FileConstants.au3>
  31.  
  32. $username="myusername" ; Would be better to read this from a file
  33. $password="mypassword" ; And this too
  34. $choiceTime="20" ; Number of seconds to load into the game.
  35. $renamedWindow='SwgClientAlt2'
  36. $configFileString='{"windowName":"SwgClientAlt2","dllName":"SWGCommandExtensionAlt2.dll"}'
  37.  
  38. ; Function to definitely get the window focus of the SWG client
  39.  
  40. Func _WinWaitActivate($title,$text,$timeout=0)
  41. WinWait($title,$text,$timeout)
  42. If Not WinActive($title,$text) Then WinActivate($title,$text)
  43. WinWaitActive($title,$text,$timeout)
  44. EndFunc
  45.  
  46. Local $hFileOpen = FileOpen("config.json", $FO_OVERWRITE + $FO_CREATEPATH) ; Open the extension loader config file
  47.  
  48. FileWriteLine($hFileOpen, $configFileString) ; Write renamed window title to extension loader config file
  49.  
  50. FileClose($hFileOpen) ; Close the handle returned by FileOpen.
  51.  
  52. Run("SWGExtensionLoader.exe","") ; Start the /emu extension loader
  53.  
  54. Sleep(1000)
  55.  
  56. Run("SWGEmu.exe",""); This requires elevation
  57.  
  58. Sleep(2000)
  59.  
  60. WinSetTitle("SwgClient","",$renamedWindow) ; Rename SwgClient window to match the change made to the extension loader config file
  61.  
  62. _WinWaitActivate($renamedWindow,"") ; Switch to the renamed SWG window
  63.  
  64. Sleep(2000) ; Wait enough time to show the server splash screen
  65.  
  66. Send("{ENTER}{ENTER}{ENTER}{ENTER}") ; Clear the splash screens
  67.  
  68. Sleep(1000)
  69.  
  70. Send($username)
  71. Sleep(1500)
  72. Send("{TAB}")
  73. Sleep(1500)
  74. Send($password)
  75.  
  76. Sleep(1000)
  77.  
  78. Send("{ENTER}") ; Brings you to the character selection screen
  79.  
  80. Sleep(1000)
  81.  
  82. Send("{DOWN}")
  83. Send("{DOWN}")
  84. Send("{ENTER}") ; Choose the third character and load into the game.
  85.  
  86. Sleep($choiceTime*1000) ; Time to load into the game
  87.  
  88. ; Set the /emu graphics settings (this could be made tidier with a /emu preset)
  89.  
  90. Send("/emu viewdistance 2048") ; Default max is 2048
  91. Send("{ENTER}")
  92. Sleep(2000)
  93.  
  94. Send("/emu globaldetail 6") ; Default max is 6
  95. Send("{ENTER}")
  96. Sleep(2000)
  97.  
  98. Send("/emu hdterrain 28") ; Default max is 20
  99. Send("{ENTER}")
  100. Sleep(2000)
  101.  
  102. Send("/emu ncflora 128") ; Default max is 128
  103. Send("{ENTER}")
  104. Sleep(2000)
  105.  
  106. Send("/emu radialflora 64") ; Default max is 64
  107. Send("{ENTER}")
  108.  
  109. Exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement