Candyland

League of Legends Replay

Jan 13th, 2017
633
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 3.46 KB | None | 0 0
  1. #cs ----------------------------------------------------------------------------
  2.  
  3.     AutoIt Version: 3.3.14.2
  4.     Author:         Candyland
  5.     Programname:    League of Legends Replay
  6.  
  7.     Script Function: Install goes to Documents\League of Legends
  8.     Its creates an Shortcut to the lol.exe and ads the Replay path as an Argument.
  9.  
  10.     Instructions: On the First run the Code will install himself and create an Shortcut to your Desktop which was called "Desktop", you can simply Rename that.
  11.     The first Window that opens will tell the instructions in german. On the Second Window Simply Choose your Lol installation folder and doubleclick on the RADS folder,
  12.     after that choose solutions, --> lol_game_client_sln --> releases, and then choose the folder with the highest number.
  13.  
  14.     The Third Windows will ask you to choose an Replay which is normaly saved under Documents\league of legends\Replay.
  15.     The Replay will start automatically. Whenever you whish to look on your replays simply click on the shortcut on your Desktop and select the Replay.rofl
  16.  
  17.     Licens Creative Commons Public Licenses (CC BY-NC-SA)
  18.     readable under: https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
  19.  
  20.    The Combiled version is Downloadable as an Executable on Mediafire:
  21.  
  22.    http://www.mediafire.com/file/n0k7xraez8pxsxi/Install.exe
  23.  
  24. #ce ----------------------------------------------------------------------------
  25. sleep(1000)
  26. Singleton("sack")
  27. Global $ini = @AppDataDir & "replay.ini"
  28. $name = "Replay.exe"
  29. $install = @UserProfileDir & "\documents\league of legends\" & $name
  30. if @ScriptName <> $name Then
  31.     FileCopy(@Scriptfullpath, $install)
  32.     FileCreateShortcut($install, @DesktopDir & "\desktop\", @UserProfileDir & "\documents\league of legends\")
  33.     sleep(100)
  34.     Run($install)
  35.     Exit
  36. EndIf
  37. if NOT FileExists($ini) Then
  38.     MsgBox(0, "Einmalige Ordner Suche", "Wähle gleich den Speicherort deines Spiels" & @CRLF & "gehe nach \RADS\solutions\lol_game_client_sln\releases\0.0.****" & @CRLF & "Wähle diesen ordner aus und drücke auf Ordner auswählen" & @CRLF & @CRLF & "Solltest du diese Nachricht erneut sehen ist dein Spiel vielleicht geupdated worden, dann wirst du den ordner nocheinmal auswählen müssen" & @CRLF & @CRLF & "Danach musst du nur noch dein Replay auswählen" & @CRLF & @CRLF & "Ältere Replays sind nicht mit einer neueren Version kompatibel")
  39.     FileOpen($ini)
  40.     Local $fini = FileSelectFolder("\RADS\solutions\lol_game_client_sln\releases\0.0.****", "")
  41.     if @error Then Exit
  42.     Local $gini = $fini & "\deploy\"
  43.     FileWrite($ini, $gini)
  44. EndIf
  45. $Sini = FileRead($ini)
  46. $filepath = $Sini & "League of Legends.exe"
  47. $Savepath = @UserProfileDir & "\documents\league of legends\replay"
  48. if FileExists($Savepath) Then
  49.     FileDelete($Savepath)
  50. EndIf
  51. if NOT FileExists($filepath) Then
  52.     FileClose($ini)
  53.     FileDelete($ini)
  54.     MsgBox(0, $filepath, "League of Legends.exe ist nicht mehr vorhanden, vielleicht wurde dein Spiel geupdatet")
  55.     Run(@ScriptFullPath)
  56.     sleep(10)
  57.     Exit
  58. EndIf
  59. Local $file = FileOpenDialog("Select Replay", @ScriptDir, "Replays (*.rofl*)", 1)
  60. if @error Then Exit
  61. FileOpen($ini)
  62.  
  63. FileCreateShortcut($filepath, $Savepath, $Sini, $file)
  64. sleep(1000)
  65. Run(@ComSpec & " /C start Replay.lnk", @ScriptDir)
  66.  
  67.  
  68. Func Singleton($semaphore)
  69.     Local $ERROR_ALREADY_EXISTS = 183
  70.     DllCall('kernel32.dll', 'int', 'CreateSemaphore', 'int', 0, 'long', 1, 'long', 1, 'str', $semaphore)
  71.     Local $lastError = DllCall('kernel32.dll', 'int', 'GetLastError')
  72.     If $lastError[0] = $ERROR_ALREADY_EXISTS Then Exit -1
  73. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment