-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjiqu.mod
More file actions
65 lines (57 loc) · 1.17 KB
/
jiqu.mod
File metadata and controls
65 lines (57 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
jiqu={}
jiqu["ok"]=nil
jiqu["fail"]=nil
jiqu.timeout=0
do_jiqu=function(jiqu_ok,jiqu_fail)
jiqu["ok"]=jiqu_ok
jiqu["fail"]=jiqu_fail
go(-2,jiqu.arrive,jiqu_end_fail)
end
jiqu.arrive=function()
if me.fam=="华山剑宗" then
busytest(jiqu.sword)
else
busytest(jiqu.cmd)
end
end
jiqu.sword=function()
weapon(3)
run("jiqu sword-cognize")
busytest(jiqu.cmd)
end
jiqu.cmd=function()
catch("jiqu","jiqu")
busytest(jiqu.ok)
end
jiqu.ok=function()
jiqu_end_ok()
end
jiqu["end"]=function(s)
if ((s~="")and(s~=nil)) then
call(jiqu[s])
end
jiqu["ok"]=nil
jiqu["fail"]=nil
end
jiqu_fail=function()
jiqu.timeout=os.time()+1800
end
jiqu_end_ok=function()
jiqu["end"]("ok")
end
jiqu_end_fail=function()
jiqu["end"]("fail")
end
checkjiqu=function(jiqu_ok,jiqu_fail)
if me.hp.exp<100000 then return false end
vbtihuimax=GetVariable("tihuimax")
if os.time()<jiqu.timeout then return false end
if vbtihuimax=="0" or vbtihuimax=="" or vbtihuimax ==nil then return false end
vbtihuimax=tonumber(vbtihuimax)
if me.hp.tihui>vbtihuimax then
do_jiqu(jiqu_ok,jiqu_fail)
return true
else
return false
end
end