Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;LEAGUE OF LEGENDS CREEP TIMERS - MINIMALIST VERSION
- ;VERSION 2.3
- ;Created by unknown, modded by theMizzler
- ;Minimal version created by pacov
- ;Game time A_TickCount suggestion by FajitaofTreason
- ;Last update - 5/29/2012
- ;DESCRIPTION
- ;The purpose of this AutoHotKey script is to enable League of Legends players to quickly track when critical creeps are spawned.
- ;The script handles baronName, dragon, red, and blue buffs. In short, the user with this script installed presses a hotkey (detailed
- ;below) to track when a specific creep has died. When the user presses the hotkey, a chat message is sent indicating the respawn
- ;time of those specific creeps. The bottom line is that this script makes it simple for everyone on the team to know when creeps
- ;respawn just by having 1 person paying enough attention to press a hot key when a particular creep dies.
- ;HOW TO INSTALL
- ;Step 1 - Download and install AutoHotkey at http://www.autohotkey.com/download/
- ;Step 2 - If you received this code via pastebin, open notepad, copy and paste the info, and save the file as whatever you want.
- ;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.
- ;HOW TO RUN
- ;Right click on the .ahk file and click run. If you compiled the script, simply click on the compiled file and it will execute.
- ;HOW TO USE IN GAME
- ;The following step is CRITICAL. At 90 seconds into the game, you MUST press f9. This sets the internal counter within the
- ;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
- ;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
- ;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
- ;timers
- ;This variable determines when in game to press the F9 key to synchronize the time of the script and the game, in seconds.
- clockSynchroniseTime = 90
- ;These variables determine what to call the objectives in chat
- ourBlueName = oB
- ourRedName = oR
- theirBlueName = tB
- theirRedName = tR
- drakeName = D
- baronName = B
- ;These values determine whether reminders be shown.
- ;-1: this reminder is not shown
- ;0: it is announced when this objective spawns
- ;any value over 0: this many seconds before the objective spawns, a reminder is shown
- oBTimer := -1 ;our Blue
- oRTimer := -1 ;our Red
- tBTimer := -1 ;their Blue
- tRTimer := -1 ;their Red
- DTimer := 60 ;Drake
- BTimer := 60 ;Baron
- ;HOTKEYS
- ;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.)
- ;F10 = Stop all timers (Use this when you finish the game our you will have random announcements type on whatever window is open)
- ;F1 = OUR BLUE
- ;F2 = OUR RED
- ;F3 = THEIR BLUE
- ;F4 = THEIR RED
- ;F5 = DRAGON
- ;F6 = BARON NASH
- ;Everything below this line is the script for the game. Good luck and have fun!
- #Persistent
- GameStartTime := -1
- MakeTime(totalSeconds) {
- S := mod(totalSeconds, 60)
- M := mod((totalSeconds // 60), 60)
- H := mod((totalSeconds // 3600), 3600)
- zM := ""
- zS := ""
- zH := ""
- if M < 10
- zM := "0"
- if S < 10
- zS := "0"
- if H > 0
- zH := H . ":"
- return (zH . zM . M . ":" . zS . S)
- }
- TimeStamp(name, delay) {
- global GameStartTime
- globalSeconds := (A_TickCount - GameStartTime)//1000
- delaySeconds := globalSeconds + delay
- Chat(MakeTime(delaySeconds) . " " . name)
- }
- ReportTimer(name, timer) {
- if timer = 0
- {
- Chat(name . " up")
- }
- else
- {
- Chat(name . " up in " . timer)
- }
- }
- Handle(name, scriptname, delay, timer) {
- TimeStamp(name, delay)
- if timer > -1
- {
- timername = %scriptname%Timer
- timerdelay := (delay - timer) * 1000
- SetTimer, %timername%, -%timerdelay%
- }
- }
- ~F1::
- Handle(ourBlueName, "OurBlue", 300, oBTimer)
- return
- ~F2::
- Handle(ourRedName, "OurRed", 300, oRTimer)
- return
- ~F3::
- Handle(theirBlueName, "TheirBlue", 300, tBTimer)
- return
- ~F4::
- Handle(theirRedName, "TheirRed", 300, tRTimer)
- return
- ~F5::
- Handle(drakeName, "Drake", 360, DTimer)
- return
- ~F6::
- Handle(baronName, "Baron", 420, BTimer)
- return
- ~F9::
- GameStartTime := A_TickCount - (clockSynchroniseTime * 1000)
- return
- ~F10::
- MsgBox, 0x40000, JungleTimer, JungleTimer Stopped, 0.75
- SetTimer, OurBlueTimer, Off
- SetTimer, OurRedTimer, Off
- SetTimer, TheirBlueTimer, Off
- SetTimer, TheirRedTimer, Off
- SetTimer, DrakeTimer, Off
- SetTimer, BaronTimer, Off
- return
- Chat(msg) {
- Send {Enter}
- sleep 50
- Send %msg%
- sleep 50
- Send {Enter}
- }
- OurBlueTimer:
- ReportTimer(ourBlueName, oBTimer)
- return
- OurRedTimer:
- ReportTimer(ourRedName, oRTimer)
- return
- TheirBlueTimer:
- ReportTimer(theirBlueName, tBTimer)
- return
- TheirRedTimer:
- ReportTimer(theirRedName, tRTimer)
- return
- DrakeTimer:
- ReportTimer(drakeName, DTimer)
- return
- BaronTimer:
- ReportTimer(baronName, BTimer)
- return
Advertisement
Add Comment
Please, Sign In to add comment