本帖最后由 若相守、莫散 于 2011-5-31 18:43 编辑
- Rem 开始
- t1=Now
- t2=Now
- t3=Now
- Rem 记时
- If DateDiff("s",t1,Now)=10
- KeyPress 65,1
- t1=Now
- Goto q
- Else
- Rem q
- If DateDiff("s",t2,Now)=15
- KeyPress 66,1
- t2=Now
- Goto w
- Else
- Rem w
- If DateDiff("s",t3,Now)=25
- KeyPress 67,1
- t3=Now
- Goto 开始
- Else
- Goto 记时
- EndIf
- EndIf
- EndIf
复制代码
//以下内容是更好的代码 26楼 作者 wjllguyl
- //设定技能开始时间
- t1=Now
- t2=Now
- t3=Now
- Rem 开始
- //判断第一个技能是否达到要求,如果是则使用技能,并把当前时间设定为第一技能开始时间。
- If DateDiff("s",t1,Now)>=10
- KeyPress 65,1
- t1=Now
- //否则判断第二个技能是否达到要求,如果是则使用技能,并把当前时间设定为第二技能开始时间。
- ElseIf DateDiff("s",t2,Now)>=15
- KeyPress 66,1
- t2=Now
- //否则判断第三个技能是否达到要求,如果是则使用技能,并把当前时间设定为第三技能开始时间。
- ElseIf DateDiff("s",t3,Now)>=25
- KeyPress 67,1
- t3=Now
- EndIf
- Goto 开始
复制代码
30楼 作者 wjllguyl
- Rem 开始
- t1=Now
- t2=Now
- t3=Now
- Rem 判断
- If DateDiff("s",t1,Now)>=10
- KeyPress 65,1
- t1=Now
- EndIf
- If DateDiff("s",t2,Now)>=15
- KeyPress 66,1
- t2=Now
- EndIf
- If DateDiff("s",t3,Now)>=25
- KeyPress 67,1
- Goto 开始
- EndIf
- Goto 判断
复制代码 |
本帖最后由 wjllguyl 于 2010-6-4 17:36 编辑
- t1=Now
- t2=Now
- t3=Now
- Rem 开始
- If DateDiff("s",t1,Now)>=10
- KeyPress 65,1
- t1=Now
- ElseIf DateDiff("s",t2,Now)>=15
- KeyPress 66,1
- t2=Now
- ElseIf DateDiff("s",t3,Now)>=25
- KeyPress 67,1
- t3=Now
- EndIf
- Goto 开始
复制代码
貌似这样更好一点 |
|