Back to "b" tags

Animal Taming Script by daklue

1# Animal Taming Script by DaKlue
2# Modified: Shelter Dungeon Animal Taming by Jaseowns
3# UO Outlands
4
5// Set Time For Taming
6@setvar! tamingTimerCd 11500
7// Healing Pet Timer
8@setvar! vetTimerCd 8000
9// Healing Controllers
10@setvar! hpCheckToTriggerGreaterHealSpell 30
11@setvar! hpCheckToTriggerMiniEmergencyHealSpell 60
12@setvar! hpCheckToTriggerHealPotion 45
13// Buffs
14@setvar! castMagicShield 0
15@setvar! castReactiveArmor 0
16@setvar! manaReserve 50
17
18// Tankpet setup
19if followers = 0
20    overhead 'We need to tame a tank pet.'
21    wait 2000
22    overhead 'Rerun script when you have a tank pet.'
23    break
24elseif followers > 0
25    if not varexist tankpet 
26        overhead 'Please select your tanking pet' 88
27        @setvar! tankpet
28        wft 500
29    endif
30endif
31    
32// Vet Bandage timer 
33if not timerexists 'vetTimer'
34    settimer vetTimer vetTimerCd
35endif
36
37if not timerexists tamingTimer
38    settimer tamingTimer tamingTimerCd
39endif
40
41if not timerexists sayTimer
42    settimer sayTimer 0
43endif
44
45// Bandage tankpet every 8 seconds
46if timer 'vetTimer' > 8000
47    if not bandaging and findtype "clean bandage%s%" backpack as item
48        dclick item
49        wft 500
50        target tankpet
51        wait 200
52        hotkey 'Cancel current target'
53    endif
54
55    if insysmsg 'not damaged'
56        settimer 'vetTimer' 4000
57    else
58        settimer 'vetTimer' 0
59    endif
60endif
61
62if followers = 0
63    @setvar! myFollowers 0  
64    settimer sayTimer 0
65elseif followers = 1
66    @setvar! myFollowers 1
67elseif followers = 2
68    @setvar! myFollowers 2
69elseif followers = 3
70    @setvar! myFollowers 3
71elseif followers = 4
72    @setvar! myFollowers 4
73elseif followers = 5
74    @setvar! myFollowers 5
75    overhead "Too many followers - release some!" 88
76    wait 2000
77    replay
78endif
79
80@clearignore 
81
82@setvar! tameThisThing 0
83
84if skill "Animal Taming" < 60
85    while findtype "a mongbat|a giant rat|a guar|a wolf|a familiar|a giant frog|a primordial whelp|a colossal frog|a giant bat|a monitor hatchling" ground -1 -1 3 as janimal
86        getlabel janimal desc
87        if "released" in desc
88            // ignore them
89            @ignore janimal
90        elseif "tame" in desc or "bonded" in desc
91            // ignore them
92            @ignore janimal
93        else
94            @setvar! tameThisThing janimal
95            break
96        endif
97    endwhile
98elseif skill "Animal Taming" < 70
99    while findtype "a primordial|a cave bear|a corpse eater|a familiar|a guar|a wolf|a giant frog|a primordial whelp|a colossal frog|a giant bat|a monitor hatchling" ground -1 -1 3 as janimal
100        getlabel janimal desc
101        if "released" in desc
102            // ignore them
103            @ignore janimal
104        elseif "tame" in desc or "bonded" in desc
105            // ignore them
106            @ignore janimal
107        else
108            @setvar! tameThisThing janimal
109            break
110        endif
111    endwhile
112elseif skill "Animal Taming" < 80
113    while findtype "a corpse eater|a primordial|a cave bear|a drake whelp|a chameleon" ground -1 -1 3 as janimal
114        getlabel janimal desc
115        if "released" in desc
116            // ignore them
117            @ignore janimal
118        elseif "tame" in desc or "bonded" in desc
119            // ignore them
120            @ignore janimal
121        else
122            @setvar! tameThisThing janimal
123            break
124        endif
125    endwhile
126elseif skill "Animal Taming" < 85
127    while findtype "a deep crawler" ground -1 -1 3 as janimal
128        getlabel janimal desc
129        if "released" in desc
130            // ignore them
131            @ignore janimal
132        elseif "tame" in desc or "bonded" in desc
133            // ignore them
134            @ignore janimal
135        else
136            @setvar! tameThisThing janimal
137            break
138        endif
139    endwhile
140elseif skill "Animal Taming" < 90
141    while findtype "a drake|a dragon whelp|a sabeartooth" ground -1 -1 3 as janimal
142        getlabel janimal desc
143        if "released" in desc
144            // ignore them
145            @ignore janimal
146        elseif "tame" in desc or "bonded" in desc
147            // ignore them
148            @ignore janimal
149        else
150            @setvar! tameThisThing janimal
151            break
152        endif
153    endwhile
154elseif skill "Animal Taming" < 95
155    while findtype "a husk crab" ground -1 -1 3 as janimal
156        getlabel janimal desc
157        if "released" in desc
158            // ignore them
159            @ignore janimal
160        elseif "tame" in desc or "bonded" in desc
161            // ignore them
162            @ignore janimal
163        else
164            @setvar! tameThisThing janimal
165            break
166        endif
167    endwhile
168elseif skill "Animal Taming" < 100
169    while findtype "a dragon|a molten mongbat" ground -1 -1 3 as janimal
170        getlabel janimal desc
171        if "released" in desc
172            // ignore them
173            @ignore janimal
174        elseif "tame" in desc or "bonded" in desc
175            // ignore them
176            @ignore janimal
177        else
178            @setvar! tameThisThing janimal
179            break
180        endif
181    endwhile
182elseif skill "Animal Taming" < 105
183    while findtype "a snowdrift|a wisp" ground -1 -1 3 as janimal
184        getlabel janimal desc
185        if "released" in desc
186            // ignore them
187            @ignore janimal
188        elseif "tame" in desc or "bonded" in desc
189            // ignore them
190            @ignore janimal
191        else
192            @setvar! tameThisThing janimal
193            break
194        endif
195    endwhile
196elseif skill "Animal Taming" < 110
197    while findtype "a earth drake|a acarid" ground -1 -1 3 as janimal
198        getlabel janimal desc
199        if "released" in desc
200            // ignore them
201            @ignore janimal
202        elseif "tame" in desc or "bonded" in desc
203            // ignore them
204            @ignore janimal
205        else
206            @setvar! tameThisThing janimal
207            break
208        endif
209    endwhile
210elseif skill "Animal Taming" < 115
211    while findtype "a sphix|a aegis minion" ground -1 -1 3 as janimal
212        getlabel janimal desc
213        if "released" in desc
214            // ignore them
215            @ignore janimal
216        elseif "tame" in desc or "bonded" in desc
217            // ignore them
218            @ignore janimal
219        else
220            @setvar! tameThisThing janimal
221            break
222        endif
223    endwhile
224elseif skill "Animal Taming" < 120
225    while findtype "a earth dragon|a eldritch dragon|a colossal sandroach" ground -1 -1 3 as janimal
226        getlabel janimal desc
227        if "released" in desc
228            // ignore them
229            @ignore janimal
230        elseif "tame" in desc or "bonded" in desc
231            // ignore them
232            @ignore janimal
233        else
234            @setvar! tameThisThing janimal
235            break
236        endif
237    endwhile
238endif
239
240if diffhits >= hpCheckToTriggerGreaterHealSpell
241    if targetexists 
242        hotkey 'Cancel Current Target'
243    endif
244    while not targetexists 'beneficial'
245        if diffhits >= hpCheckToTriggerMiniEmergencyHealSpell
246            cast 'Heal'
247        else
248            cast 'Greater Heal'                
249        endif
250        wait 50
251        if hp = maxhp
252            hotkey '> Interrupt'
253            break
254        endif
255    endwhile
256    if targetexists 'beneficial'
257        hotkey "Target Self"
258    endif
259    replay
260endif
261
262if diffhits >= hpCheckToTriggerHealPotion 
263    if findtype "Yellow Potion" backpack as pot 
264        getlabel pot desc
265        if "next usable" in desc
266            // do nothing
267        else
268            dclick pot
269            wait 500
270        endif
271    endif
272endif
273
274if castMagicShield = 1 and not findbuff "Magic Reflection"
275    if mana >= manaReserve
276        cast "Magic Reflection"
277        wait 1000
278    endif
279endif
280
281if findbuff "Magic Reflection"
282    settimer magicShieldTimer 0
283endif
284
285if castReactiveArmor = 1 and not findbuff "Reactive Armor"
286    if mana >= manaReserve
287        cast "Reactive Armor"
288        wait 200
289    endif
290endif
291
292if findbuff "Reactive Armor"
293    settimer reactiveArmorTimer 0
294endif
295
296if tameThisThing != 0
297    clearsysmsg 
298    settimer tamingTimer 0
299    settimer sayTimer 0   
300
301    if followers > 0
302        say "all kill"
303        wft 500
304        target tameThisThing
305        settimer sayTimer 0
306        wait 200
307        while timer sayTimer < 750
308        endwhile
309        say "all follow me"
310        warmode off
311    endif
312
313    while followers = myFollowers
314        useskill "taming"
315        wft 500
316        target tameThisThing
317        if timer tamingTimer >= tamingTimerCd
318            replay
319        elseif insysmsg "cannot be seen"
320            replay
321        elseif dead tameThisThing or not find tameThisThing ground -1 -1 4
322            replay
323        endif
324    endwhile                
325
326    if followers > 3
327        if skill "herding" > 0
328            while not gumpexists 2426193729
329                menu tameThisThing 10
330                wait 50
331            endwhile
332        else
333            while not gumpexists 2426193729
334                menu tameThisThing 9
335                wait 50
336            endwhile
337        endif
338        while gumpexists 2426193729
339            gumpresponse 1 2426193729
340            wait 50
341        endwhile
342    endif
343endif
344
345wait 100
346replay
347
348