อยากจะใส่ คำสั่ง PixelSearch เข้าไปในสคริป เวลามี จุด แดง เข้ามาใน แผนที่(บอททำงานอยุ่และอยุ่ดีๆมีจุดแดงเข้ามา) จะสั่งให้บอท กด ปุ่มตามที่กำหนดก่อน ที่จะให้บอทหยุดทำ งาน พอจุดแดง หายไปจากกรอบที่กำหนด จึงให้บอทเริ่มทำงานใหม่อีกครั่ง ต้อง เขียน สคริป การหาค่าสียังไงเหรอครับ เเล้ว จะ แทรกเข้าไปใน สคริป ด้านล่างนี้ยังไงครับ รอบกวนดัวยนะคับ ขอบคุณครับ
Global $GameHD
Func _PSsixLoadH($gtitle)
$GameHD = WinGetHandle($gtitle)
If @error Then
MsgBox(4096, "Error", "ไม่พบหน้าต่างเกม")
Else
Return 1
EndIf
EndFunc
Hotkeyset("{Esc}","stop")
If _PSsixLoadH("xxxxx") Then WinActivate($GameHD)
Global $begin = TimerInit(), $B1 = 100, $B2 = 200
AdlibRegister("buff", 1000)
func buff()
$Diff = Int(TimerDiff($begin)/1000)
If mod( $Diff, $B1) = 0 Then
Sleep(10)
ControlSend($GameHD, "", "", "u") ;
Sleep(10)
EndIf
If mod( $Diff, $B2) = 0 Then
Sleep(10)
ControlSend($GameHD, "", "", "g") ;
Sleep(10)
EndIf
EndFunc
While 1
For $i = 1 To 10
ControlSend($GameHD, "", "", "x")
Sleep(500)
Next
For $i = 1 To 8
ControlSend($GameHD, "", "", "c")
Sleep(500)
Next
For $i = 1 To 8
ControlSend($GameHD, "", "", "v")
Sleep(500)
Next
WEnd
Func Stop()
Exit
EndFunc
รูป
[You must be registered and logged in to see this link.]
Global $GameHD
Func _PSsixLoadH($gtitle)
$GameHD = WinGetHandle($gtitle)
If @error Then
MsgBox(4096, "Error", "ไม่พบหน้าต่างเกม")
Else
Return 1
EndIf
EndFunc
Hotkeyset("{Esc}","stop")
If _PSsixLoadH("xxxxx") Then WinActivate($GameHD)
Global $begin = TimerInit(), $B1 = 100, $B2 = 200
AdlibRegister("buff", 1000)
func buff()
$Diff = Int(TimerDiff($begin)/1000)
If mod( $Diff, $B1) = 0 Then
Sleep(10)
ControlSend($GameHD, "", "", "u") ;
Sleep(10)
EndIf
If mod( $Diff, $B2) = 0 Then
Sleep(10)
ControlSend($GameHD, "", "", "g") ;
Sleep(10)
EndIf
EndFunc
While 1
For $i = 1 To 10
ControlSend($GameHD, "", "", "x")
Sleep(500)
Next
For $i = 1 To 8
ControlSend($GameHD, "", "", "c")
Sleep(500)
Next
For $i = 1 To 8
ControlSend($GameHD, "", "", "v")
Sleep(500)
Next
WEnd
Func Stop()
Exit
EndFunc
รูป
[You must be registered and logged in to see this link.]
- Attachments
- 111.png
- You don't have permission to download attachments.
- (22 Kb) Downloaded 18 times
แก้ไขล่าสุดโดย steplovedj เมื่อ 01/12/11, 03:59 pm, ทั้งหมด 1 ครั้ง