Gosub 更换武器 Return 战吼 //===================每1.5小时更换一次武器(按键7)========================= Sub 更换武器 If datediff("s",thistime3,now)>5400 Delay 100 KeyPress 55,1 Delay 2500 thistime3=now EndIf If datediff("s",thistime4,now)>10800 Delay 100 KeyPress 9,1 Delay 2500 thistime4=now EndIf Gosub Kill NPC Return 更换武器 //======================打怪(按键1和2)================================= Sub Kill NPC KeyPress 67,1 Delay 300 For MaxTime IfColor 4,162,294573,0 IfColor 72,156,6b,0 KeyPress 49,1 Delay 500 Else For 40 IfColor 72,156,6b,1 IfColor 4,162,294573,0 KeyPress 50,1 Delay 500 Else Gosub 补血 EndIf Else Gosub 补血 EndIf EndFor EndIf Else Gosub 补血 EndIf EndFor Return Kill NPC //========================================================================= //========================================================================= //========================================================================= //========================================================================= //========================================================================= //==============================补血(按键8)==================== Sub 补血2 IfColor HP2,53,ce,2 Gosub 补充SP2 Else For 300 IfColor 171,49,9eef,2 Gosub Kill NPC2 EndIf IfColor 198,53,ce,2 Gosub 补充SP2 Else KeyPress 56,1 Delay 3000 KeyPress 51,1 Delay 16000 EndIf EndFor EndIf Return 补血2 //==============================补充精力(按键3)============================ Sub 补充SP2 IfColor SP2,90,42b231,2 Gosub 防御2 Else KeyPress 51,1 Delay 6000 KeyPress 51,1 For 20 IfColor 171,49,9eef,2 Gosub Kill NPC2 EndIf IfColor 198,90,42b239,2 Gosub 防御2 Else Delay 5000 EndIf EndFor EndIf Return 补充SP2 //===================每300秒加一次技能(按键4)========================= Sub 防御2 If datediff("s",thistime,now)>290 //VBSCall messagebox(datediff("s",thistime,now)) Delay 100 KeyPress 52,1 Delay 2500 thistime=now EndIf