Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; Gán phím tắt cho các hàm
- HotKeySet("{F9}","ShootOnOff")
- HotKeySet("{F10}","ExitApp")
- Tooltip("F9 = Shoot, F10 = Exit bot", 0, 0)
- Dim $shoot = False
- ; Thay đổi trạng thái của biến $shoot
- Func ShootOnOff()
- If $shoot = False Then
- $shoot = True
- ToolTip("Shooting",0,0)
- Else
- $shoot = False
- Tooltip("F9 = Shoot, F10 = Exit bot", 0, 0)
- EndIf
- EndFunc
- ; Thoát chương trình
- Func ExitApp()
- Exit
- EndFunc
- While True
- If $shoot = True Then
- ; Khai báo biến mảng $cordinates.
- ; Với các tham số mà hàm PixelSearch trong ví dụ này nhận thì nó sẽ quét hết cả màn hình và trả về các tọa độ có mã màu 0xCC6600
- ; Hàm PixelSearch trả về tọa độ (x,y) sau đó truyền vào mảng $cordinates nên $cordinates[0] lưu tọa độ x, $cordinates[1] lưu tọa độ y
- Dim $cordinates = PixelSearch( 0, 0, @DesktopWidth, @DesktopHeight, 0xCC6600)
- If Not @error Then
- MouseClick( "left", $cordinates[0], $cordinates[1], 1, 0)
- EndIf
- EndIf
- Sleep(500)
- WEnd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement