Guest User

Untitled

a guest
Dec 11th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. $NumpadSub::Suspend
  2. $NumpadMult::Start()
  3. $Numpad9::ObjectiveTaken(1) ; baron
  4. $Numpad7::ObjectiveTaken(2) ; dragon
  5. $Numpad5::ObjectiveTaken(7) ; greater relic
  6. $Numpad6::ObjectiveTaken(3) ; our blue
  7. $Numpad4::ObjectiveTaken(5) ; our red
  8. $Numpad3::ObjectiveTaken(4) ; their blue
  9. $Numpad1::ObjectiveTaken(6) ; their red
  10.  
  11. start_time := ""
  12. elapsed_time := ""
  13. NamesArray := ""
  14. SpawnTimesArray := ""
  15.  
  16. Start()
  17. {
  18. global
  19. start_time := A_TickCount
  20. Names = baron,dragon,our blue,their blue,our red,their red,greater relic
  21. SpawnTimes = 7,6,5,5,5,5,3
  22. StringSplit, NamesArray, Names, `,, `,
  23. StringSplit, SpawnTimesArray, SpawnTimes, `,, `,
  24. }
  25.  
  26. ObjectiveTaken(id)
  27. {
  28. global
  29. seconds := ""
  30. minutes := ""
  31. if(start_time != "") {
  32. elapsed_time := A_TickCount - start_time ; Getting time in ms from beginning of game
  33. elapsed_time := elapsed_time // 1000 ; Dividing to go from ms to seconds
  34. seconds := Mod(elapsed_time, 60)
  35. minutes := elapsed_time // 60
  36.  
  37. ; now we have the current minutes:seconds that passed since Start() ran.
  38.  
  39. minutes += SpawnTimesArray%id% ; Adding the selected objective's spawn time
  40. name := NamesArray%id%
  41.  
  42. Send {Enter}
  43. Sleep 20
  44. Send %name% respawns at%A_Space%
  45. if(minutes < 10) {
  46. Send 0%minutes%:
  47. }else {
  48. Send %minutes%:
  49. }
  50. if(seconds < 10) {
  51. Send 0%seconds%
  52. }else {
  53. Send %seconds%
  54. }
  55. Sleep 20
  56. Send {Enter}
  57. }
  58. }
Add Comment
Please, Sign In to add comment