Heya
Its a simple auto attack b0t for RF0.
Start() function works well but Pause() doesnt.
Numpad1 key start auto attacking when monster is selected and numpad0 key is stop auto attack.
Whats wrong with this code?
Thx for any help!
And sry4my ENG:)
#include <Misc.au3>
WinWait("RF Online")
Global $myTargetColor, $attack1, $targetIsSelected, $Paused, $PauseHotKey, $StartHotKey
$myTargetColor = 0x52DBD6
$targetIsSelected = 0
$Paused = 1; Paused in default
$PauseHotKey = 60;NumLock0 Pause
$StartHotKey = 61;NumLock1 Start
Func IsTargetSelected()
$getTargetColor = PixelGetColor(440,84)
If $myTargetColor <> $getTargetColor Then
; ToolTip('Target selected!',0,0)
$targetIsSelected = 1
EndIf
; ToolTip('Searching target!',0,0)
EndFunc
Func Attack()
send("{F1}")
send("{F1}")
Sleep(1100)
send("{F2}")
send("{F2}")
Sleep(1300)
send("{F3}")
send("{F3}")
Sleep(1400)
send("{F4}")
send("{F4}")
Sleep(2000)
send("{F7}")
send("{F7}")
EndFunc
Func Paused()
If _IsPressed(60) Then
$Paused = 1
EndIf
EndFunc
Func Start()
If _IsPressed(61) Then
$Paused = 0
EndIf
EndFunc
while 1
Start()
Paused()
While $Paused = 0
IsTargetSelected()
If $targetIsSelected == 1 Then
Attack()
EndIf
WEnd
WEnd