Baoulettes

Lineage II - Old Skool Launcher (single core)

Mar 22nd, 2014
439
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;Script to run L2.exe in single core (L2 Old Skool main use.)
  2. ;This simple script use "Runfirst from :
  3. ;
  4. ;http://www.activeplus.com/Products/RunFirst
  5. ;
  6. ;This is provided only for L2 OldSkool Lineage II Server.
  7. ;It is made by Baoulettes :)
  8.  
  9. ;Prevent multi Launcher at once (launcher is closed when L2.exe title as been set.)
  10.  
  11. #SingleInstance, Force
  12.  
  13. ;This check if L2.exe (main function to be sure the user paste that Launcher in System Folder!)
  14.  
  15. IfNotExist, L2.exe
  16. (
  17. ;If not simple put a warning window an dkill process.
  18.     MsgBox, Lineage II - Old Skool - Launcher MUST be placed in a System folder !
  19.     ExitApp
  20. )
  21.  
  22. ;If okay install "RunFist.exe"
  23.  
  24. FileInstall, D:\Jeux\L2 C3\system\runfirst.exe, %A_ScriptDir%\runfirst.exe,1
  25.  
  26. ;Run CMD to CD to the proper direction (thanks to variable to make it so easly.)
  27. ;and in same line run  "runfirst.exe as if L2.exe as been dragged in.)
  28. ;Hide is used to hide the CMD command so that look and feel clean as it should !
  29. Run, cmd /c CD %A_ScriptDir% & runfirst.exe L2.exe",,Hide
  30.  
  31. ;Get the last L2.exe process launched and change it name to put "Lineage II - Old Skool"
  32. ;Copy right powa ....
  33. ;1st it wait to Lineage II window to popup.
  34.  
  35. WinWaitActive, Lineage II
  36. Loop
  37. {
  38.     ;Check if our little renamed L2.exe is running
  39.     Process, Exist, L2.exe
  40.     {
  41.         If ErrorLevel != 0
  42.         {
  43.             ;If yes then wait it to be active.
  44.             WinWaitActive, Lineage II
  45.             WinSetTitle, Lineage II - Old Skool
  46.         }
  47.         else
  48.         {
  49.             ;Else close our launcher.
  50.             GoTo,Exit
  51.         }
  52.     }
  53.     ;Sleep for a second
  54.     Sleep 1000
  55.     Process, Exist, L2.exe
  56.     {
  57.         If ErrorLevel != 0
  58.         {
  59.             WinWaitNotActive, Lineage II
  60.             WinSetTitle, Lineage II - Old Skool
  61.  
  62.         }
  63.         else
  64.         {
  65.             GoTo,Exit
  66.         }
  67.     }
  68. }
  69. Exit:
  70. ExitApp
Advertisement
Add Comment
Please, Sign In to add comment