Advertisement
Guest User

Untitled

a guest
Mar 24th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;By Sladki
  2.  
  3. #NoEnv
  4. #SingleInstance force
  5. #MaxHotkeysPerInterval 500
  6.  
  7. SendMode Input
  8. SetTitleMatchMode, 1
  9.  
  10. lastLifeFlask := 0
  11. lastUtilityFlask := 0
  12.  
  13. ~w::
  14. if WinActive("ahk_exe PathOfExile_x64.exe")
  15. {
  16.     ActivateLifeFlasks()
  17.     ActivateUtilityFlasks()
  18. }
  19. return
  20.  
  21. ActivateUtilityFlasks()
  22. {
  23.     Global lastUtilityFlask
  24.     if ((A_TickCount - lastUtilityFlask) > 4000)
  25.     {
  26.         lastUtilityFlask := A_TickCount
  27.         ActivateFlask(3)
  28.         ActivateFlask(4)
  29.         ActivateFlask(5)
  30.     }
  31. }
  32.  
  33. ActivateLifeFlasks()
  34. {
  35.     Global lastLifeFlask
  36.     if ((A_TickCount - lastLifeFlask) > 1000)
  37.     {
  38.         lastLifeFlask := A_TickCount
  39.         Random, roll, 0, 3
  40.         if (roll == 0)
  41.         {
  42.             ActivateFlask(2)
  43.             ActivateFlask(1)
  44.         }
  45.         else
  46.         {
  47.             ActivateFlask(1)
  48.             ActivateFlask(2)
  49.         }
  50.     }
  51. }
  52.  
  53. ActivateFlask(i)
  54. {
  55.     Send %i%
  56.     Random, delay, 50, 150
  57.     Sleep delay
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement