Fishing on Boat by tarouca
Description: Fishing - Fishing Spots, Special Nets, SOSs. Keeps you healed, deals with the spawn and keeps the spyglass alternating between fishing spots and boats (when in justSpecialFishing_ mode 0, on mode 1 and 2 only looks for boats).
1# IT IS TAILORED TO USE WITH A DEXXER HARPOONER TEMPLATE
2# THE GREATER ABILITY IS MARINERs FORTUNE AND ITS TIMER MUST BE ADJUSTED TO YOUR OWN BOAT
3# WHEN DOING MIBs IT WONT TRIGGER MARINERs
4
5if not timerexists "curePotTimer_"
6 createtimer "curePotTimer_"
7 settimer "curePotTimer_" 99999
8endif
9if not timerexists "stillPoisonedTimer_"
10 createtimer "stillPoisonedTimer_"
11 settimer "stillPoisonedTimer_" 99999
12endif
13if not timerexists "fishingTimer_"
14 createtimer "fishingTimer_"
15 settimer "fishingTimer_" 99999
16endif
17if not timerexists "checkForNetsTimer_"
18 createtimer "checkForNetsTimer_"
19 settimer "checkForNetsTimer_" 99999
20endif
21if not timerexists "skinningTimer_"
22 createtimer "skinningTimer_"
23 settimer "skinningTimer_" 99999
24endif
25if not timerexists "netCastTimer_"
26 createtimer "netCastTimer_"
27 settimer "netCastTimer_" 99999
28endif
29if not timerexists "checkMyHatchTimer"
30 createtimer "checkMyHatchTimer"
31 settimer "checkMyHatchTimer" 99999
32endif
33if not timerexists "checkSOSLocationTimer"
34 createtimer "checkSOSLocationTimer"
35 settimer "checkSOSLocationTimer" 99999
36endif
37if findtype 3702 backpack as fishBag__
38 @setvar fishBag_ fishBag__
39 overhead "FISH BAG FOUND"
40endif
41if findtype 3999 backpack as scissors__
42 @setvar scissors_ scissors__
43 overhead "FOUND SCISSORS"
44endif
45if findtype 31172|31169 backpack as myWeapon__
46 @setvar myWeapon_ myWeapon__
47 overhead "FOUND HARPON"
48endif
49
50@clearignore
51@setvar me_ self
52@setvar pvpPvmStatus_ 0
53@setvar lagTimer_ 750
54@setvar spyglassChoice_ 0
55@setvar fishingWithNet_ 0
56@setvar minHpAllowed_ 50
57@setvar lagTimer_ 750
58
59@setvar weaponAbility_ 2
60# 0 - FISHING SPOTS, 1 - SPECIAL NETS, 2 - SOSs
61@setvar justSpecialFishing_ 2
62
63@setvar greaterTimerValue_ 205000
64if justSpecialFishing_ = 0
65 @setvar greaterTimerValue_ 205000
66elseif justSpecialFishing_ = 1
67 @setvar greaterTimerValue_ 217000
68elseif justSpecialFishing_ = 2
69 @setvar greaterTimerValue_ 217000
70endif
71while not dead
72 if findtype "spyglass" backpack as spyglass_ and not cooldown "Spyglass" and hp > minHpAllowed_
73 while gumpexists 2890020940
74 gumpclose 2890020940
75 wait lagTimer_
76 endwhile
77 hotkey "> Interrupt"
78 dclick spyglass_
79 waitfortarget
80 target self
81 while not gumpexists 2890020940
82 wait lagTimer_
83 endwhile
84 if spyglassChoice_ = 0
85 gumpresponse 10 2890020940
86 while not gumpexists 2890020940
87 wait lagTimer_
88 endwhile
89 gumpresponse 4 2890020940
90 if justSpecialFishing_ = 0
91 @setvar spyglassChoice_ 1
92 endif
93 else
94 gumpresponse 11 2890020940
95 while not gumpexists 2890020940
96 wait lagTimer_
97 endwhile
98 gumpresponse 4 2890020940
99 @setvar spyglassChoice_ 0
100 endif
101 cooldown "Spyglass" 5000
102 endif
103
104 if poisoned
105 if statusPoisoned_ = 0
106 @setvar statusPoisoned_ 1
107 settimer "stillPoisonedTimer_" 0
108 endif
109 if timer "stillPoisonedTimer_" > 5000
110 if timer "curePotTimer_" > 5100
111 if findtype "Orange Potion" backpack as pot_
112 dclick pot_
113 wait lagTimer_
114 settimer "curePotTimer_" 0
115 else
116 overhead "MISSING POTS" 38
117 endif
118 else
119 overhead "Wait for it..."
120 endif
121 endif
122 elseif statusPoisoned_ = 1
123 @setvar statusPoisoned_ 0
124 endif
125
126 if hp < maxhp
127 if pvpPvmStatus_ = 0 and not bandaging
128 if findtype "clean bandage%s%" backpack
129 hotkey "Bandage Self"
130 cooldown "Bandage" 7100
131 else
132 overhead "MISSING: BANDAGES" 38
133 endif
134 elseif pvpPvmStatus_ = 1 and not bandaging and findtype "clean bandage%s%" backpack
135 hotkey "Bandage Self"
136 cooldown "Bandage" 10100
137 endif
138 if hp < 60
139 if pvpPvmStatus_ = 0
140 if not cooldown "Health Potion" and findtype "Yellow Potion" backpack as pot_
141 dclick pot_
142 cooldown "Health Potion" healthPotTimer_
143 endif
144 if hp < minHpAllowed_ and not cooldown "Holy Light" and not cooldown "Chiv Timer" and skill "chivalry" >= 95
145 say "[HolyLight"
146 wait lagTimer_
147 if insysmsg "Holy symbols remaining"
148 cooldown "Holy Light" 30000
149 cooldown "Chiv Timer" 500
150 endif
151 endif
152 else
153 if hp < 60 and not cooldown "Health Potion" and findtype "Yellow Potion" backpack as pot_
154 dclick pot_
155 cooldown "Health Potion" 11100
156 endif
157 endif
158 endif
159 endif
160
161 if not warmode
162 if not warmode and timer "fishingTimer_" > 8100 and fishingWithNet_ = 0 and justSpecialFishing_ = 0
163 if findtype 3520 backpack as pole_
164 dress Fishing
165 while queued
166 endwhile
167 endif
168 hotkey "Use Item in Hand"
169 settimer "fishingTimer_" 0
170 endif
171
172 while findtype "fish" fishBag_ as fish_
173 dclick scissors_
174 waitfortarget
175 target fish_
176 wait lagTimer_
177 endwhile
178 while findtype 17606|28828|28825|28820|28823|17157|28821|28829|28845|28822 fishBag_ as fish_
179 dclick scissors_
180 waitfortarget
181 target fish_
182 wait lagTimer_
183 endwhile
184
185 if not findtype 3530 backpack and timer "checkForNetsTimer_" > 60000
186 overhead "MISSING FISHING NET" 38
187 settimer "checkForNetsTimer_" 0
188 endif
189
190 if findtype "corpse" ground -1 -1 2 as corpse_ and timer "skinningTimer_" > 3000
191 if findtype "Elven Spellblade" backpack as blade_
192 dclick blade_
193 waitfortarget
194 target self
195 settimer "skinningTimer_" 0
196 @ignore corpse_
197 endif
198 endif
199 endif
200
201 if justSpecialFishing_ = 0 and findtype 1286|18824|3530|26683|39345|29410|29230|2646|18824|441|25769|39434|27641|3707|29230|25769 ground -1 -1 12 as fishingSpot_
202 if not cooldown "Main Greater"
203 say "[GreaterAbility"
204 wait lagTimer_
205 cooldown "Main Greater" greaterTimerValue_
206 endif
207
208 if not find fishingSpot_ ground -1 -1 8
209 overhead "MOVE CLOSER" 48
210 overhead "X" 38 fishingSpot_
211 wait lagTimer_
212 wait lagTimer_
213 else
214 if cooldown "Main Greater" < 40000
215 overhead "WAITING ON MARINERs" 48
216 wait 1000
217 else
218 @setvar fishingWithNet_ 1
219 if find myWeapon_ backpack
220 dclick myWeapon_
221 endif
222 if not warmode and timer "netCastTimer_" > 3000
223 if findtype 3530 backpack as net_
224 getlabel net_ net__
225 if "special" in net__
226 @ignore net_
227 else
228 dclick net_
229 waitfortarget
230 target self
231 settimer "netCastTimer_" 0
232 endif
233 else
234 overhead "MISSING NETS" 38
235 endif
236 endif
237 endif
238 endif
239 else
240 if fishingWithNet_ = 1
241 @setvar fishingWithNet_ 0
242 endif
243 endif
244
245 if justSpecialFishing_ = 1
246 if not cooldown "Main Greater"
247 say "[GreaterAbility"
248 wait lagTimer_
249 cooldown "Main Greater" greaterTimerValue_
250 endif
251 @setvar fishingWithNet_ 1
252 if find myWeapon_ backpack
253 dclick myWeapon_
254 endif
255 if cooldown "Main Greater" < 40000
256 overhead "WAITING ON MARINERs"
257 else
258 if not warmode and timer "netCastTimer_" > 9000
259 if findtype 3530 fishBag_ as net_
260 getlabel net_ net__
261 if "special" in net__
262 overhead "CASTING SPECIAL"
263 dclick net_
264 while not targetexists
265 endwhile
266 while targetexists
267 overhead "CAST NET" 48
268 wait 500
269 endwhile
270 settimer "netCastTimer_" 0
271 endif
272 else
273 @setvar fishingWithNet_ 0
274 overhead "MISSING NETS" 38
275 endif
276 endif
277 endif
278 endif
279
280 if justSpecialFishing_ = 2
281 @setvar fishingWithNet_ 1
282 if find myWeapon_ backpack
283 dclick myWeapon_
284 endif
285 if not warmode and timer "netCastTimer_" > 4000
286 if findtype 3530 backpack as net_
287 getlabel net_ net__
288 if "special" in net__
289 @ignore net_
290 else
291 dclick net_
292 waitfortarget
293 target self
294 settimer "netCastTimer_" 0
295 endif
296 else
297 overhead "MISSING NETS" 38
298 endif
299 endif
300 endif
301
302 if not find myAttackTarget_ ground -1 -1 8 or myAttackTarget_ = me_
303 hotkey "Target Closest Grey Monster"
304 hotkey "Target Closest Enemy Monster"
305 hotkey "Next Non-Friendly Player Target"
306 hotkey "Next Murderer Player Target"
307 if lasttarget != me_ and find lasttarget ground -1 -1 8
308 warmode "on"
309 @setvar myAttackTarget_ lasttarget
310 say "[CrewAttack"
311 waitfortarget
312 target myAttackTarget_
313 wait lagTimer_
314 else
315 warmode "off"
316 endif
317 endif
318
319 if warmode
320 if find myWeapon_ backpack
321 dclick myWeapon_
322 endif
323
324 if find myAttackTarget_ ground -1 -1 8 or myAttackTarget_ = me_
325 attack myAttackTarget_
326 endif
327
328 if not cooldown "Weapon Ability" and warmode
329 if weaponAbility_ = 1
330 say "[WeaponAbility1"
331 wait lagTimer_
332 elseif weaponAbility_ = 2
333 say "[WeaponAbility2"
334 wait lagTimer_
335 elseif weaponAbility_ = 3
336 say "[WeaponAbility3"
337 wait lagTimer_
338 endif
339 if insysmsg "You cannot perform that ability yet."
340 cooldown "Weapon Ability" 2500
341 endif
342 endif
343 endif
344
345endwhile