-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfish.mod
More file actions
121 lines (106 loc) · 2.69 KB
/
fish.mod
File metadata and controls
121 lines (106 loc) · 2.69 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
test=[[ 青鱼(qingyu) 草鱼(caoyu) 鲫鱼(ji yu) 死草鱼(si yu) 烂鱼(lan yu)]]
fish={}
fish["ok"]=nil
fish["fail"]=nil
fish.items={}
fish.items["diao gan"]={max=1,min=1}
--fish.items["鱼饵"]={max=100,min=1}
fish.drops={}
fish.drops["si yu"]="si yu"
fish.drops["lan yu"]="lan yu"
fish.drops["qingyu"]="qingyu"
fish.drops["caoyu"]="caoyu"
fish.drops["ji yu"]="ji yu"
fish.drops["liyu"]="liyu"
fish.sells={}
--fish.sells["qingyu"]={name="qingyu",id="qingyu"}
--fish.sells["caoyu"]={name="caoyu",id="caoyu"}
--fish.sells["ji yu"]={name="ji yu",id="ji yu"}
--fish.sells["liyu"]={name="liyu",id="liyu"}
--fish.sells["jin liyu"]={name="jin liyu",id="jin liyu"}
fish.expmax=0
do_fish=function(fish_ok,fish_fail,expmax)
fish["ok"]=fish_ok
fish["fail"]=fish_fail
busytest(fish.main)
fish.expmax=getnum(expmax)
end
fish["end"]=function(s)
if ((s~="")and(s~=nil)) then
call(fish[s])
end
fish["ok"]=nil
fish["fail"]=nil
EnableTriggerGroup("fish",false)
end
fish_end_ok=function()
fish["end"]("ok")
end
fish_end_fail=function()
fish["end"]("fail")
end
fish["main"]=function()
if quest.stop then
fish["end"]()
return
end
getstatus(fish["check"])
end
checkfish=function()
if fish.expmax==0 or fish.expmax>getnum(me.hp.exp) then
return false
end
fish.fstatus()
return true
end
fish.fstatus=function()
getstatus(fish.finish)
end
fish.finishsell={}
fish.finishsell["diao gan"]={name="diao gan",id="diao gan"}
fish.finishdrop={}
fish.finishdrop["yu er"]="yu er"
fish.finish=function()
if do_check(fish.fstatus) then
elseif checksell(fish.finishsell,fish.fstatus) then
elseif checkdrop(fish.finishdrop,fish.fstatus) then
elseif checkdrop(fish.drops,fish.fstatus,fish.fstatus) then
elseif checksell(fish.sells,fish.fstatus,fish.fstatus) then
else
busytest(aliasaftercmd)
quest.stop=true
end
end
fish["check"]=function()
if do_check(fish["main"]) then
elseif checkitems(fish.items,fish["main"]) then
elseif checkdrop(fish.drops,fish["main"],fish["main"]) then
elseif checksell(fish.sells,fish["main"],fish["main"]) then
elseif checkfangqi(fish["main"],fish["main"]) then
elseif checkstudy(fish["main"]) then
else
go(fishloc,fish.arrive,fish_end_fail)
end
end
fish.arrive=function()
EnableTriggerGroup("fish",true)
run("fish")
busytest(fish_end_ok)
end
fish_ondraw=function(n,l,w)
run("draw diao gan")
run("sell jin liyu")
run("sell long xia")
run("sell qingyu")
run("sell caoyu")
run("sell ji yu")
run("sell liyu")
end
fish.loop=function()
if not checkfish() then
busytest(fish.loopcmd)
end
end
fish.loopcmd=function()
do_fish(fish.loop,fish.loop,fish.expmax)
end