Advertisement
Guest User

Untitled

a guest
May 29th, 2012
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.77 KB | None | 0 0
  1. ;LEAGUE OF LEGENDS CREEP TIMERS - MINIMALIST VERSION
  2. ;VERSION 2.2
  3. ;Created by unknown, modded by theMizzler
  4. ;Minimal version created by pacov
  5. ;Slightly altered by Headchopperz, added inhib and ward
  6. ;Last update - 5/29/2012
  7.  
  8. ;DESCRIPTION
  9. ;The purpose of this AutoHotKey script is to enable League of Legends players to quickly track when critical creeps are spawned.
  10. ;The script handles baron, dragon, red, and blue buffs. In short, the user with this script installed presses a hotkey (detailed
  11. ;below) to track when a specific creep has died. When the user presses the hotkey, a chat message is sent indicating the respawn
  12. ;time of those specific creeps. The bottom line is that this script makes it simple for everyone on the team to know when creeps
  13. ;respawn just by having 1 person paying enough attention to press a hot key when a particular creep dies.
  14.  
  15. ;HOW TO INSTALL
  16. ;Step 1 - Download and install AutoHotkey at http://www.autohotkey.com/download/
  17. ;Step 2 - If you received this code via pastebin, open notepad, copy and paste the info, and save the file as whatever you want.
  18. ;be sure to save the file with the extension .ahk (ex lol.ahk). If you received this file as a .ahk file, move to step 3.
  19.  
  20. ;HOW TO RUN
  21. ;Right click on the .ahk file and click run. If you compiled the script, simply click on the compiled file and it will execute.
  22.  
  23. ;HOW TO USE IN GAME
  24. ;The following step is CRITICAL. At 15 seconds into the game, you MUST press f9. This sets the internal counter within the
  25. ;script so that the script believes your game time is currently at 15 seconds. You have to do this at the start of every game
  26. ;and it is not possible to automate it further. The thing to understand here is that the script has NO idea of when your game
  27. ;has started unless you tell it (by pressing f9 at 15 seconds). When you are done playing, be sure to press F10 to stop the
  28. ;timers
  29.  
  30. ;This variable determines when in game to press the F9 key to synchronize the time of the script and the game, in seconds.
  31. clockSynchroniseTime = 15
  32.  
  33. ;These variables determine what to call the objectives
  34. ourBlue = oB
  35. ourRed = oR
  36. theirBlue = tB
  37. theirRed = tR
  38. dragon = Drag
  39. baron = Baron
  40. ward = Ward
  41. inhib = Inhib
  42.  
  43. ;HOTKEYS
  44. ;F9 = Reset game timer to 15 seconds(Use this after 15 seconds ingame.)
  45. ;F10 = Stop all timers (Use this when you finish the game)
  46.  
  47. ;F1 = OUR BLUE
  48. ;F2 = OUR RED
  49. ;F3 = THEIR BLUE
  50. ;F4 = THEIR RED
  51. ;F5 = DRAGON
  52. ;F6 = BARON NASH
  53. ;F7 = Ward
  54. ;F8 = Inhib
  55.  
  56. ;Everything below this line is the script for the game. Good luck and have fun!
  57.  
  58.  
  59.  
  60.  
  61. #Persistent
  62.  
  63. globalSeconds := 0
  64.  
  65. MakeTime(totalSeconds) {
  66. S := mod(totalSeconds, 60)
  67. M := mod((totalSeconds // 60), 60)
  68. H := mod((totalSeconds // 3600), 3600)
  69.  
  70. zM := ""
  71. zS := ""
  72. zH := ""
  73.  
  74. if M < 10
  75. zM := "0"
  76. if S < 10
  77. zS := "0"
  78. if H > 0
  79. zH := H . ":"
  80.  
  81. return (zH . zM . M . ":" . zS . S)
  82. }
  83.  
  84. TimeStamp(name, delay) {
  85. global globalSeconds
  86.  
  87. delayS := globalSeconds + delay
  88.  
  89. Chat(MakeTime(delayS) . " " . name)
  90. }
  91.  
  92. ~F1::
  93. TimeStamp(ourBlue, 300)
  94. return
  95.  
  96. ~F2::
  97. TimeStamp(ourRed, 300)
  98. return
  99.  
  100. ~F3::
  101. TimeStamp(theirBlue, 300)
  102. return
  103.  
  104. ~F4::
  105. TimeStamp(theirRed, 300)
  106. return
  107.  
  108. ~F5::
  109. TimeStamp(dragon, 360)
  110. return
  111.  
  112. ~F6::
  113. TimeStamp(baron, 420)
  114. return
  115.  
  116. ~F7::
  117. TimeStamp(ward, 180)
  118. return
  119.  
  120. ~F8::
  121. TimeStamp(inhib, 300)
  122. return
  123.  
  124. ~F9::
  125. globalSeconds := clockSynchroniseTime
  126. SetTimer, Update, 1000
  127. return
  128.  
  129.  
  130. ~F10::
  131. MsgBox, 0x40000, JungleTimer, JungleTimer Stopped, 0.75
  132. SetTimer, Update, Off
  133. return
  134.  
  135. Chat(msg) {
  136. Send {Enter}
  137. sleep 50
  138. Send %msg%
  139. sleep 50
  140. Send {Enter}
  141. }
  142.  
  143. Update:
  144. globalSeconds += 1
  145. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement