Fishing on Boat by tarouca

Related: Fishing fishing

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