- Code:
Func atk()
For $i = 1 to 1550
Send("{"& GUICtrlRead($Input1 )&"}")
Sleep(100)
If BitAND(GUICtrlRead($Radio1), $GUI_CHECKED) Then
$b1 = PixelGetColor(100, 13)
ElseIf BitAND(GUICtrlRead($Radio2), $GUI_CHECKED) Then
$b1 = PixelGetColor(137, 13)
Else
$b1 = PixelGetColor(165, 13)
EndIf
If $b1 = 0x080608 Then
If PixelGetColor(490, 746) = 0x9C8A6B Then
Send("{F1}")
ElseIf PixelGetColor(520, 746) = 0x9C8A6B Then
Send("{F2}")
ElseIf PixelGetColor(550, 746) = 0x9C8A6B Then
Send("{F3}")
ElseIf PixelGetColor(544, 745) = 0xA59A84 Then
Send("z")
Else
EndIf
EndIf
If PixelGetColor(101, 29) <> 0x00046B Then
If PixelGetColor(580, 746) = 0x4775C0 Then
Send("{F4}")
ElseIf PixelGetColor(610, 746) = 0x4775C0 Then
Send("{F5}")
ElseIf PixelGetColor(640, 746) = 0x4775C0 Then
Send("{F6}")
ElseIf PixelGetColor(670, 746) = 0x4775C0 Then
Send("{F7}")
ElseIf PixelGetColor(700, 746) = 0x4775C0 Then
Send("{F8}")
ElseIf PixelGetColor(730, 746) = 0x4775C0 Then
Send("{F9}")
ElseIf PixelGetColor(760, 746) = 0x4775C0 Then
Send("{F10}")
ElseIf PixelGetColor(752, 744) = 0xAD9E84 Then
Send("z")
Else
EndIf
EndIf
If PixelGetColor(1161, 34) = 0x000000 Then
Send("{"& GUICtrlRead($Input8 )&"}")
ElseIf PixelGetColor(850, 747) = 0x7B96B5 Then
Send("z")
EndIf
If GUIGetMsg() = $Button2 Then
ExitLoop
EndIf
Next
For $j = 1 to 2
Send("{"& GUICtrlRead($Input2 )&"}")
Sleep(3000)
Send("4")
Sleep(100)
Next
Sleep(100)
EndFunc
ยกทั้งหมดนี้ไปใส่ในฟังก์ชั่น
- Code:
Case $Button1
while 1
atk()
WEnd
ผลปรากฎว่าไม่ยอมหลุดออกจากลูปคับ พอคลิกปุ่ม $button2
แก้ไขล่าสุดโดย sticked เมื่อ 14/02/12, 02:59 pm, ทั้งหมด 1 ครั้ง