-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdutable.mod
More file actions
203 lines (174 loc) · 3.91 KB
/
dutable.mod
File metadata and controls
203 lines (174 loc) · 3.91 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
dutable={}
dutable["ok"]=nil
dutable["fail"]=nil
do_dutable=function(dutable_ok,dutable_fail)
dutable["ok"]=dutable_ok
dutable["fail"]=dutable_fail
busytest(dutable.main)
end
dutable["end"]=function(s)
if ((s~="")and(s~=nil)) then
call(dutable[s])
end
dutable["ok"]=nil
dutable["fail"]=nil
end
dutable_end_ok=function()
dutable["end"]("ok")
end
dutable_end_fail=function()
dutable["end"]("fail")
end
dutable.items={}
dutable.yxl={}
dutable.items["干粮"]={min=1000,max=1000}
dutable.items["牛皮水袋"]={min=8,max=8}
dutable.items={}
dutable.yxl["yingxiong ling"]={min=1,max=1}
dutable.checkyxl=function()
if me.fam=="少林派" then return false end
return checkitems(dutable.yxl,dutable["main"],dutable["main"])
end
dutable.main=function()
if quest.stop then
dutable["end"]()
return
end
if _roomid==-1 then go(0,dutable.main,dutable.main) end
if _roomid~=1938 then
getstatus(dutable["check"])
else
getstatus(dutable.cmd)
end
end
dutable.loop=function()
busytest(dutable.loopcmd)
end
dutable.loopcmd=function()
do_dutable(dutable.loop,dutable.loop)
end
dutable.check=function()
if do_check(dutable["main"]) then
elseif checkitems(dutable.items,dutable["main"],dutable["main"]) then
elseif dutable.checkyxl() then
else
go(1938,dutable.main,dutable.main)
end
end
dutable.cmd=function()
if itemsnum("牛皮水袋")==0 or itemsnum("干粮")==0 then
run("quit")
return
end
if testneili() then
dazuo(dutable.main)
else
run("du table;du table;du table;du table")
busytest(dutable.main)
end
end
canwu={}
canwu["ok"]=nil
canwu["fail"]=nil
do_canwu=function(canwu_ok,canwu_fail)
canwu["ok"]=canwu_ok
canwu["fail"]=canwu_fail
busytest(canwu.main)
end
canwu["end"]=function(s)
if ((s~="")and(s~=nil)) then
call(canwu[s])
end
canwu["ok"]=nil
canwu["fail"]=nil
end
canwu_end_ok=function()
canwu["end"]("ok")
end
canwu_end_fail=function()
canwu["end"]("fail")
end
canwu.cmd=function()
run("canwu xisui jing;canwu xisui jing;canwu xisui jing;canwu xisui jing")
getstatus(canwu.main)
end
canwu.restok=function()
getstatus(canwu.main)
end
canwu.main=function()
if quest.stop then
dutable["end"]()
return
end
if _roomid==-1 then go(0,canwu.main,canwu.main) end
if _roomid==1924 then
go(1913,canwu.main,canwu_end_fail)
return
elseif _roomid~=1913 then
getstatus(canwu["check"])
elseif itemsnum("牛皮水袋")==0 or itemsnum("干粮")==0 then
run("quit")
discon()
return
elseif checkrest(canwu.restok,canwu.mian,1924) then
else
delay(1,canwu.cmd)
end
end
canwu.loop=function()
busytest(canwu.loopcmd)
end
canwu.loopcmd=function()
do_canwu(canwu.loop,canwu.loop)
end
canwu.check=function()
if do_check(canwu["main"]) then
elseif checkitems(dutable.items,canwu["main"],canwu["main"]) then
elseif canwu.checkyxl() then
else
go(1913,canwu.main,canwu.main)
end
end
canwu.checkyxl=function()
if me.fam=="少林派" then return false end
return checkitems(dutable.yxl,canwu["main"],canwu["main"])
end
-------------------
thinkwall={}
thinkwall["ok"]=nil
thinkwall["fail"]=nil
do_thinkwall=function(thinkwall_ok,thinkwall_fail)
thinkwall["ok"]=thinkwall_ok
thinkwall["fail"]=thinkwall_fail
busytest(thinkwall.main)
end
thinkwall["end"]=function(s)
if ((s~="")and(s~=nil)) then
call(thinkwall[s])
end
thinkwall["ok"]=nil
thinkwall["fail"]=nil
end
thinkwall_end_ok=function()
thinkwall["end"]("ok")
end
thinkwall_end_fail=function()
thinkwall["end"]("fail")
end
thinkwall.main=function()
if quest.stop then
thinkwall["end"]()
return
end
getstatus(thinkwall.check)
end
thinkwall.check=function()
if do_check(thinkwall["main"]) then
else
go(2571,thinkwall.arrive,thinkwall_end_fail)
end
end
thinkwall.arrive=function()
run("think wall")
busytest(thinkwall.main)
end