//******************************************
// 怪检测
//******************************************
Sub 怪检测
Delay 10
Rem 检测怪
IfColor x-316,y+7,0C0E10,0
//找到怪,攻击
Gosub 打怪
Else
//-------------------------------
KeyPressH 9,1
//找怪.......
Delay 10
Gosub 捡起物品
//-------------------------------
EndIf
Goto 检测怪
Return 怪检测
//**********************************************
// 防卡检测
//**********************************************
Sub 防卡检测
Delay 10
If DateDiff("s",t(8),now)>=25
//< DateDiff 函数:返回两个日期之间的时间间隔>
//<"s":秒> <t1:时间变量> <now:当前系统日期和时间> <s(0):自定义时间变量>
t(8)=now
//返回初始化值
IfColor 90/100*((x-308)-(x-426))+(x-426),y+23,color(2),2
//人物卡了、没打到怪或怪的血没减少
KeyPressH 9,1
//换下一个怪
Delay 300
EndIf
EndIf
If DateDiff("s",t(9),now)>=45
//防发呆
t(9)=now
//返回初始化
Goto 开始
EndIf
Return 防卡检测
//***************************************************
// 血量检测
//**************************************************
Sub 打坐时间检测
Delay 10
If DateDiff("s",t(6),now)>=50
//每次打坐最长时间为50秒
Delay 100
t(6)=now
Goto 开始
EndIf
Return 打坐时间检测
//***************************************************
// 打怪开始
//**************************************************
Sub 打怪
Delay 10
t(8)=now:t(9)=now
Rem 怪没死
//--------------------------
Gosub 红蓝检测
Delay 10
KeyPressH 49,1
//放技能1
Delay 200
IfColor 10/100*((x-616)-(x-733))+(x-733),y+29,color(1),2
//还有蓝,用技能
Gosub 时间技能
EndIf
Delay 10
//------------------------------------------
Gosub 防卡检测
Delay 10
Gosub 状态技能检测
//-------------------------------------------
Delay 10
IfColor x-316,y+7,0C0E10,0
//怪还没死,继续攻击
Goto 怪没死
Else
//--------------------------------------------
Gosub 捡起物品
Delay 10
Gosub 挂机范围
Delay 10
Gosub 红蓝检测
//--------------------------------------------
EndIf
Return 打怪
//***************************************************
// 补红蓝
//**************************************************
Sub 补红打坐
Delay 10
If H=1
Delay 10
IfColor x-316,y+7,0C0E10,0