Rem zong
Gosub hp
//检查红
Gosub sp
//检查sp
Gosub zt
//检查状态
Rem zhao
//找怪
KeyPress 49 1
Gosub 判断2
Gosub 判断2
Gosub 捡东西
Goto zong
EndScript
Sub hp
IfColor 152 38 080808 0
KeyPress 52 1
Gosub 休息
//如果挂的是主动怪 建议把“gosub 休息”删掉
Else
Delay 33
EndIf
Rem hp1
Return hp
Sub sp
IfColor 103 75 000400 0
KeyPress 53 1
Delay 33
Else
Delay 33
EndIf
Return sp
Sub zt
Rem zt
IfColor 423 93 ffff 1
KeyPress 97 1
Delay 300
KeyPress 98 1
Delay 300
Else
EndIf
Return zt
Sub 休息
IfColor 460 40 101818 0
Delay 33
Else
Goto hp1
EndIf
KeyPress 88 1
Rem 休息1
Delay 4000
IfColor 209 41 4220ad 0
KeyPress 87 1
Delay 33
Else
Goto 休息1
EndIf
Return 休息
Sub 判断1
//判断怪是否被人先打
IfColor 257 35 4218a5 0
Delay 33
Else
Delay 1000
Goto zhao
EndIf
Return 判断1
Sub 判断2
//判断怪是否死亡
Rem 判断2
IfColor 272 37 5228ad 0
Gosub kill
Goto 判断2
Else
EndIf
Return 判断2
Sub kill
KeyPress 57 1
KeyPress 48 1
KeyPress 56 1
Delay 333
Return kill
Sub magic
KeyPress 51 1
//使用数字3技能键
Delay 33
Return magic
Sub 捡东西
For 2
//循环2次
KeyPress 50 1
Delay 500
KeyPress 50 1
Delay 500
EndFor
Return 捡东西