Advertisement
Guest User

Untitled

a guest
Sep 9th, 2021
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. #cs ----------------------------------------------------------------------------
  2.  
  3. AutoIt Version: 3.3.14.5
  4. Author: myName
  5.  
  6. Script Function:
  7. Template AutoIt script.
  8.  
  9. #ce ----------------------------------------------------------------------------
  10.  
  11. ; Script Start - Add your code below here
  12. ;================= [KONFIGURACJA] =======================
  13. HotKeySet("{HOME}", "_START")
  14. HotKeySet("{END}", "_EXIT")
  15. HotKeySet('{Insert}','TogglePause')
  16.  
  17. Global $TIBIA_WINDOW_NAME = "to sobie sam dodam :D"
  18.  
  19. Global $HP_PIXEL_COLOR = 0xC73A2B ; Kolor HP
  20. Global $HP_PIXEL_POS = [185, 95] ; POZYCJA PIXELA HP
  21. ;================= [KONFIGURACJA] =======================
  22.  
  23. Global $Paused
  24.  
  25. While 1
  26. Sleep(100)
  27. WEnd
  28.  
  29. Func _START()
  30. While WinGetTitle("[ACTIVE]") <> $TIBIA_WINDOW_NAME
  31. Sleep(100)
  32. WEnd
  33.  
  34.  
  35. Local $HWND = WinGetHandle("[ACTIVE]")
  36. Local $HP_COLOR = Int($HP_PIXEL_COLOR)
  37.  
  38.  
  39. While True
  40. If PixelGetColor($HP_PIXEL_POS[0], $HP_PIXEL_POS[1]) <> $HP_COLOR Then
  41. ControlSend($HWND,'','','{F2}')
  42. Sleep(250)
  43. EndIf
  44. Sleep(10)
  45. WEnd
  46. EndFunc
  47.  
  48. Func TogglePause()
  49. $Paused = NOT $Paused
  50. While $Paused
  51. sleep(100)
  52. WEnd
  53. EndFunc
  54.  
  55. Func _EXIT()
  56. Exit
  57. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement