簡易腳本
SetSimMode 2
Dim path
Dim intX, intY
path = "C:\Users\doublexi\Desktop\按鍵素材\"
SaveMousePos?
Do
For i = 1 To 20
TracePrint "執(zhí)行圖片"&i
Call clickPic(i)
Next
Call 常規(guī)決斗()
Delay 1000
Loop
Sub 常規(guī)決斗()
scanPic("抽卡")
If intX > 0 And intY > 0 Then?
Call click(950,800)
Delay 1000
Call click(950,800)
End If
scanPic("主要")
If intX > 0 And intY > 0 Then?
Call 行動()
End If
scanPic("戰(zhàn)斗")
If intX > 0 And intY > 0 Then?
Call 戰(zhàn)斗()
End If
End Sub
Sub 戰(zhàn)斗()
Delay 3000
FindPic 800,555,870,664,getPath("星星"),0.6,intX,intY
If intX > 0 And intY > 0 Then?
Call 拖曳()
Delay 8000
End If
FindPic 900,555,1000,664,getPath("星星"),0.6,intX,intY
If intX > 0 And intY > 0 Then?
Call 拖曳()
Delay 8000
End If
FindPic 1000,555,1120,664,getPath("星星"),0.6,intX,intY
If intX > 0 And intY > 0 Then?
Call 拖曳()
Delay 8000
End If
Call 切換()
End Sub
Sub 行動()
Delay 3000
//普通怪獸卡
FindColorEx 650,900,1250,1080,"569DC4",0,0.9,intX,intY
If intX > 0 And intY > 0 Then?
Call 拖曳()
Delay 500
Call 使用卡牌()
End If
Call 切換()
End Sub
Sub 切換()
intX = 1212
intY = 690
Call click(intX,intY)
Delay 1000
Call click(intX,intY)
End Sub
Sub 拖曳()
MoveTo intX, intY
Delay 500
LeftDown 1
Delay 500
MoveTo intX, intY - 50
Delay 250
MoveTo intX, intY - 100
Delay 250
MoveTo intX, intY - 150
Delay 250
MoveTo intX, intY - 200
Delay 250
MoveTo intX, intY - 250
Delay 250
LeftUp 1
Delay 250
End Sub
Sub 使用卡牌()
clickPic("召喚")
Delay 3000
End Sub
Function click(x,y)
MoveTo x,y
Delay 300
LeftDown 1
Delay 300
LeftUp 1
Delay 800
RestoreMousePos
End Function
Function getPath(file)
getPath=path&file&".bmp"
End Function
Function scanPic(file)
FindPic 0, 0, 1920, 1080, getPath(file), 0.6, intX, intY
End Function
Function clickPic(file)
FindPic 0, 0, 1920, 1080, getPath(file), 0.6, intX, intY
TracePrint intX&","&intY
If intX > 0 and intY > 0 Then?
TracePrint "點擊了"&file
Call click(intX,intY)?
RightClick 1
?
End If?
End Function
Function alert(msg)
MsgBox msg
End Function
Function pullLeft(x,y)
?Dim s
?s = 100
MoveTo x,y
Delay s
LeftDown 1
Delay 500
MoveTo x - 50, y
Delay s / 2
MoveTo x - 100, y
Delay s / 2
MoveTo x - 150, y
Delay s / 2
MoveTo x - 200, y
Delay s/2
MoveTo x - 250, yx
Delay s / 2
LeftUp 1
End Function