theMizzler

JungleTimer 2.3, modded by pacov and theMizzler

May 29th, 2012
6,404
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;LEAGUE OF LEGENDS CREEP TIMERS - MINIMALIST VERSION
  2. ;VERSION 2.3
  3. ;Created by unknown, modded by theMizzler
  4. ;Minimal version created by pacov
  5. ;Game time A_TickCount suggestion by FajitaofTreason
  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 baronName, 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 90 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 90 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 90 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 = 90
  32.  
  33. ;These variables determine what to call the objectives in chat
  34. ourBlueName     = oB
  35. ourRedName      = oR
  36. theirBlueName   = tB
  37. theirRedName    = tR
  38. drakeName       = D
  39. baronName       = B
  40.  
  41. ;These values determine whether reminders be shown.
  42. ;-1: this reminder is not shown
  43. ;0: it is announced when this objective spawns
  44. ;any value over 0: this many seconds before the objective spawns, a reminder is shown
  45. oBTimer     := -1    ;our Blue
  46. oRTimer     := -1    ;our Red
  47. tBTimer     := -1    ;their Blue
  48. tRTimer     := -1    ;their Red
  49. DTimer      := 60    ;Drake
  50. BTimer      := 60    ;Baron
  51.  
  52. ;HOTKEYS
  53. ;F9 = Reset game timer to 1:30 mins (Use this after 1:30 mins ingame, i.e. when the announcer says "Minions have spawned". This synchonize time is adjustable.)
  54. ;F10 = Stop all timers (Use this when you finish the game our you will have random announcements type on whatever window is open)
  55.  
  56. ;F1 = OUR BLUE
  57. ;F2 = OUR RED
  58. ;F3 = THEIR BLUE
  59. ;F4 = THEIR RED
  60. ;F5 = DRAGON
  61. ;F6 = BARON NASH
  62.  
  63. ;Everything below this line is the script for the game.  Good luck and have fun!
  64.  
  65. #Persistent
  66.  
  67. GameStartTime := -1
  68.  
  69. MakeTime(totalSeconds) {
  70.     S := mod(totalSeconds, 60)
  71.     M := mod((totalSeconds // 60), 60)
  72.     H := mod((totalSeconds // 3600), 3600)
  73.    
  74.     zM := ""
  75.     zS := ""
  76.     zH := ""
  77.    
  78.     if M < 10
  79.         zM := "0"
  80.     if S < 10
  81.         zS := "0"
  82.     if H > 0
  83.         zH := H . ":"
  84.    
  85.     return (zH . zM . M . ":" . zS . S)
  86. }
  87.  
  88. TimeStamp(name, delay) {
  89.     global GameStartTime
  90.     globalSeconds := (A_TickCount - GameStartTime)//1000
  91.    
  92.     delaySeconds := globalSeconds + delay
  93.    
  94.     Chat(MakeTime(delaySeconds) . " " . name)
  95. }
  96.  
  97. ReportTimer(name, timer) {
  98.     if timer = 0
  99.     {
  100.         Chat(name . " up")
  101.     }
  102.     else
  103.     {
  104.         Chat(name . " up in " . timer)
  105.     }
  106. }
  107.  
  108. Handle(name, scriptname, delay, timer) {
  109.     TimeStamp(name, delay)
  110.     if timer > -1
  111.     {
  112.         timername   = %scriptname%Timer
  113.         timerdelay := (delay - timer) * 1000
  114.         SetTimer, %timername%, -%timerdelay%
  115.     }
  116. }
  117.  
  118. ~F1::
  119.     Handle(ourBlueName, "OurBlue", 300, oBTimer)
  120. return
  121.  
  122. ~F2::
  123.     Handle(ourRedName, "OurRed", 300, oRTimer)
  124. return
  125.  
  126. ~F3::
  127.     Handle(theirBlueName, "TheirBlue", 300, tBTimer)
  128. return
  129.  
  130. ~F4::
  131.     Handle(theirRedName, "TheirRed", 300, tRTimer)
  132. return
  133.  
  134. ~F5::
  135.     Handle(drakeName, "Drake", 360, DTimer)
  136. return
  137.  
  138. ~F6::
  139.     Handle(baronName, "Baron", 420, BTimer)
  140. return
  141.    
  142.  
  143. ~F9::
  144.     GameStartTime := A_TickCount - (clockSynchroniseTime * 1000)
  145. return
  146.  
  147.  
  148. ~F10::
  149.     MsgBox, 0x40000, JungleTimer, JungleTimer Stopped, 0.75
  150.     SetTimer, OurBlueTimer, Off
  151.     SetTimer, OurRedTimer, Off
  152.     SetTimer, TheirBlueTimer, Off
  153.     SetTimer, TheirRedTimer, Off
  154.     SetTimer, DrakeTimer, Off
  155.     SetTimer, BaronTimer, Off
  156. return
  157.  
  158. Chat(msg) {
  159.     Send {Enter}
  160.     sleep 50
  161.     Send %msg%
  162.     sleep 50
  163.     Send {Enter}
  164. }
  165.  
  166. OurBlueTimer:
  167.    ReportTimer(ourBlueName, oBTimer)
  168. return
  169.  
  170. OurRedTimer:
  171.    ReportTimer(ourRedName, oRTimer)
  172. return
  173.  
  174. TheirBlueTimer:
  175.    ReportTimer(theirBlueName, tBTimer)
  176. return
  177.  
  178. TheirRedTimer:
  179.    ReportTimer(theirRedName, tRTimer)
  180. return
  181.  
  182. DrakeTimer:
  183.    ReportTimer(drakeName, DTimer)
  184. return
  185.  
  186. BaronTimer:
  187.    ReportTimer(baronName, BTimer)
  188. return
Advertisement
Add Comment
Please, Sign In to add comment