#include #include ;==> Set our $font variable Global $font $font = "Arial Black" ;Constants Const $sleepLen = 100 ; New variables Dim $ybluebuffactive = False Dim $ybluebuffcounter = 0 ;==> Create our Graphic User Interface ;Opt("GUIOnEventMode", 1) ; Change to OnEvent mode $mainwindow = GUICreate("Jungle Timers Deluxe", 200, 400) $startbutton = GUICtrlCreateButton("Start Game", 50, 10, 70) $ybluebuff = GUICtrlCreateButton("Ancient Golem (Blue)", 10, 40, 50, 50, $BS_MULTILINE) $yredbuff = GUICtrlCreateButton("Lizard Elder (Red)", 10, 110, 50, 50, $BS_MULTILINE) $ywraiths = GUICtrlCreateButton("Lizard Elder (Red)", 10, 180, 50, 50, $BS_MULTILINE) $ywolves = GUICtrlCreateButton("Lizard Elder (Red)", 10, 250, 50, 50, $BS_MULTILINE) $ydgolems = GUICtrlCreateButton("Lizard Elder (Red)", 10, 320, 50, 50, $BS_MULTILINE) $ebluebuff = GUICtrlCreateButton("Ancient Golem (Blue)", 100, 40, 50, 50, $BS_MULTILINE) $eredbuff = GUICtrlCreateButton("Lizard Elder (Red)", 100, 110, 50, 50, $BS_MULTILINE) $ewraiths = GUICtrlCreateButton("Lizard Elder (Red)", 100, 180, 50, 50, $BS_MULTILINE) $ewolves = GUICtrlCreateButton("Lizard Elder (Red)", 100, 250, 50, 50, $BS_MULTILINE) $edgolems = GUICtrlCreateButton("Lizard Elder (Red)", 100, 320, 50, 50, $BS_MULTILINE) ;==> Display our Graphic User Interface. GUISetState(@SW_SHOW) While True ; Check which buttons have been pressed $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE CLOSEClicked() Case $startbutton StartGame() ; If this is run at the same time as a timer, it would cause the timer to be off of its original time Case $ybluebuff ; Start the timer $ybluebuffactive = True ; Reset the counter $ybluebuffcounter = 0 ; Delete the controls and make the new ones $ybb = GUICtrlCreateLabel("Your Blue Buff:", 10, 40) GUICtrlDelete($ybluebuff) Global $ybblabel = GUICtrlCreateLabel("0", 15, 60, 50, 40) GUICtrlSetFont(-1, 22, 500, $font) EndSwitch sleep($sleepLen) checkYBlueBuff() WEnd Func checkYBlueBuff() If $ybluebuffactive Then $ybluebuffcounter += 1 If $ybluebuffcounter = (1000/$sleepLen)*5 Then ; Set the back color GUICtrlSetBkColor($ybblabel, 0xFFCCCC) EndIf ; Update the label & font If Mod($ybluebuffcounter, (1000/$sleepLen)) = 0 Then GUICtrlSetData($ybblabel, Round($ybluebuffcounter/(1000/$sleepLen))) EndIf If $ybluebuffcounter >= (1000/$sleepLen)*10 Then ; This is 10 (buff time) * 10 (a hundred of these checks per second) ; Reset the controls $ybluebuffactive = False GUICtrlDelete($ybblabel) GUICtrlDelete($ybb) $ybluebuff = GUICtrlCreateButton("Ancient Golem (Blue)", 10, 40, 50, 50, $BS_MULTILINE) EndIf EndIf EndFunc Func StartGame() ; Activate your League Window WinActivate("[CLASS:Notepad]") ; Wait for the Notepad become active - it is titled "Untitled - Notepad" on English systems WinWaitActive("[CLASS:Notepad]") ; Now that the Notepad window is active type some text Send("{ENTER}Baron spawns in 15, Dragon spawns at 2:30{ENTER}") Sleep(500) Send("{ENTER}Wraiths/Wolves/Double Golems spawn at 1:40. Red & Blue spawn at 1:55{ENTER}") Sleep(500) EndFunc ;==>StartGame Func CLOSEClicked() ;Note: at this point @GUI_CTRLID would equal $GUI_EVENT_CLOSE, ;and @GUI_WINHANDLE would equal $mainwindow MsgBox(0, "Goodbye", "Thanks for using Jungle Timers Deluxe!") Exit EndFunc ;==>CLOSEClicked ; Finished!