-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaskyou.mod
More file actions
43 lines (39 loc) · 851 Bytes
/
askyou.mod
File metadata and controls
43 lines (39 loc) · 851 Bytes
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
askyou={}
askyou["ok"]=nil
askyou["fail"]=nil
youxunname="you xun"
do_askyou=function(_npcname,askyou_ok,askyou_fail)
askyou["npcname"]=_npcname
askyou["ok"]=askyou_ok
askyou["fail"]=askyou_fail
askyou.npcalive=false
go(youxunloc,askyou.cmd,askyou_end_fail)
end
askyou["end"]=function(s)
if ((s~="")and(s~=nil)) then
call(askyou[s])
end
askyou["ok"]=nil
askyou["fail"]=nil
end
askyou_end_ok=function()
askyou["end"]("ok")
end
askyou_end_fail=function()
askyou["end"]("fail")
end
askyou["cmd"]=function()
askyou.npcalive=false
catch("askyou","ask "..youxunname.." about "..askyou["npcname"])
infoend(askyou.askend)
end
askyou.askend=function()
if askyou.npcalive then
busytest(askyou_end_ok)
else
busytest(askyou_end_fail)
end
end
askyouok=function(n,l,w)
askyou.npcalive=true
end