Back to "taming" tags

Taming Trainer by Brozan (Syal)

Related: AnimalTaming

1# Clear messages
2clearsysmsg 
3
4overhead 'Starting autotamer'
5
6# Setup timers
7createtimer 'bandageTimer'
8createtimer 'tamingTimer'
9createtimer 'aid time'
10createtimer 'healpot time'
11createtimer 'anti pot spam'
12createtimer 'low mana'
13
14# Setup tank variable
15    overhead 'Select your tank pet'
16    setvar! 'tank'
17    say 'all follow me'
18
19
20# Skip waiting the full cycle before Starting
21settimer 'bandageTimer' 20000 
22settimer 'tamingTimer' 20000 
23settimer 'healpot time' 20000 
24settimer 'anti pot spam' 20000
25
26# Main Loop
27while not dead
28    # Setup target list for each taming skill bracket.
29    # 0-50 = Buy Skill
30    # 50-60
31    removelist 'petarray'
32    createlist 'petarray'
33    if skill 'Taming' < 60
34        # Frog = 80
35        pushlist 'petarray' '80'
36
37    # 60-70
38    elseif skill 'Taming' < 70
39        # Cave Bear
40        pushlist 'petarray' '213'
41        
42    # 70-75
43    elseif skill 'Taming' < 75
44        # Scarab
45        pushlist 'petarray' '169'
46        
47    # 75-80
48    elseif skill 'Taming' < 80
49        #  Drake Whelp
50        pushlist 'petarray' '718'
51        
52    # 80-85
53    elseif skill 'Taming' < 85
54        #  Deep Crawler
55        pushlist 'petarray' '315'
56        
57    # 85-90
58    elseif skill 'Taming' < 90
59        #  Drake grey body
60        pushlist 'petarray' '60'
61        #  Drake red body
62        pushlist 'petarray' '61'
63        # dragon welp
64        pushlist 'petarray' '718'
65        
66    # 90-95
67    elseif skill 'Taming' < 95
68        #  Husk Crab
69        pushlist 'petarray' '729'
70        
71    # 95-100
72    elseif skill 'Taming' < 100
73        #  or Dragon grey body
74        pushlist 'petarray' '12'
75        #  or Dragon red body
76        pushlist 'petarray' '59'
77        #  Dragon whelp
78        # pushlist 'petarray' '718'
79        
80    # 100-105
81    elseif skill 'Taming' < 105
82        #  Snow Drift
83        pushlist 'petarray' '51'
84        
85    # 105-110
86    elseif skill 'Taming' < 110
87        #  Drake grey body
88        pushlist 'petarray' '60'
89        #  Drake red body
90        pushlist 'petarray' '61'
91        #  Acarid
92        pushlist 'petarray' '385'
93        
94    # 110-115
95    elseif skill 'Taming' < 115
96        #  Aegis Minion
97        pushlist 'petarray' '776'
98        #  or Sphinx
99        pushlist 'petarray' '293'
100        
101    # 115-120
102    elseif skill 'Taming' < 120
103        #  Grey Dragon body value
104        pushlist 'petarray' '12'
105        #  Red Dragon body value
106        pushlist 'petarray' '59'
107        #  or Colossal Sandroach
108        pushlist 'petarray' '388'
109        
110    # 120+
111    else
112        overhead 'Congratulations on 120 taming!'
113        unsetvar 'tank'
114        stop
115    endif
116    
117    # If hurt, send pet to aggro then heal self
118    if diffhits > 5
119        # Have pet guard to grab all aggro
120        say 'all guard me'
121
122        # Healing Survival
123        if skill 'Healing' > 1
124            if insysmsg 'You begin applying the bandages'
125                settimer 'aid time' 0
126            endif
127            if hits < maxhits and timer 'aid time' > 10250 
128                hotkey 'bandage self'
129                settimer 'aid time' 0
130            endif
131        endif
132
133        # Magery Survival
134        if skill 'Magery' > 1
135            # Check if we have enough regs, skip loop if we dont.
136            if counttype 'garlic' < 1 or counttype "spider's silk" < 1 or counttype "ginseng" < 1 or counttype "Mandrake Root%s%" < 1
137                //'
138                overhead "Not enough regs to heal" 33
139                pause 5000
140                continue
141            endif
142            # Spell interrupt warnings, pause to give a chance to run away
143            if insysmsg 'concentration is disturbed'
144                overhead 'Interrupted cast! Waiting 2 second' 33
145                wait 2000
146            endif
147
148            # Mana warnings
149            if mana < 40 and timer 'low mana' > 3000
150                overhead 'Low Mana' 88
151                settimer 'low mana' 0
152            elseif mana < 20  and timer 'low mana' > 3000
153                overhead 'OOM' 33
154                settimer 'low mana' 0
155            endif
156
157            # If hurt, attempt to heal
158            if hits < maxhits
159                # If casting something already, wait before attempting to heal.
160                if insysmsg 'already casting' or insysmsg 'frozen and cannot move'
161                    overhead 'Already casting! Waiting 2 second' 33
162                    wait 2000
163                endif
164
165                # If under 35 HP and we cant heal pot, quick heal and reset heal timer
166                # Interrupt and clearall targets before attempting to self-cast to avoid harming self
167                if hits < 35 and timer 'healpot time' < 10000 and timer 'anti pot spam' < 1000
168                    interrupt
169                    clearall
170                    hotkey 'Cancel current target'
171                    pause 250
172                    hotkey '> Mini-Heal/Cure Self'
173                    pause 250
174                    settimer 'magery heal' 3001
175                elseif hits < maxhits
176                    # Otherwise just use greater heal to heal up. 
177                    interrupt
178                    clearall
179                    hotkey 'Cancel current target'
180                    pause 250
181                    hotkey '> Greater Heal/Cure Self'
182                    pause 250
183                    settimer 'magery heal' 0
184                endif
185            endif
186        endif
187
188        # Cure Survival
189        if poisoned 'self' and timer 'anti pot spam' > 1000
190            overhead 'Used: Cure Potion' 33
191            hotkey 'Drink Cure' 
192            settimer 'anti pot spam' 0
193        endif
194
195        # Heal Potion
196        if hits < 35 and timer 'healpot time' > 10000 and timer 'anti pot spam' > 1000
197            overhead 'Used: Heal Potion' 33
198            hotkey 'Drink Heal'
199            settimer 'healpot time' 0
200            settimer 'anti pot spam' 0
201        endif
202
203        # pause a few seconds to aggro
204        pause 3000
205        say 'all follow me'
206        warmode off
207    endif
208    if find 'tank' 'ground' -1 1 5
209        if timer 'bandageTimer' > 40000 
210                    hotkey 'Use Bandage (No Timer)'
211                    pause 250
212                    target 'tank'
213                    pause 500
214                    if insysmsg 'not damaged'
215                        settimer 'bandageTimer' 15000
216                    else
217                        settimer 'bandageTimer' 0
218                    endif
219        endif
220    else
221                    overhead 'Cannot heal tank, too far away!' 33
222                    pause 3000
223    endif
224    # Search for pet to tame
225    foreach pettarget in petarray
226        # Tracking
227        if insysmsg 'Now tracking'
228            overhead 'Tracking Found!' 33
229            overhead 'Recalling' 33
230            say 'all follow me'
231            ################################################
232            # CHANGE THIS SECTION TO YOUR RECALL MACRO
233            ################################################
234            dclick 0x40F706DE
235            waitforgump 1551740969
236            gumpresponse 5
237            ################################################
238        endif
239
240        # Warn if followers are full
241        if followers >= 5
242            overhead 'Clear up follower count to tame' 33
243            pause 1000
244            //continue
245        endif
246        
247        # Attempt to tame pet
248        if findtype pettarget 'ground' -1 1 4 as 'mypettarget'
249            # Attempt to heal tank pet
250            
251
252            if noto 'mypettarget' = friend
253                interrupt
254                clearall
255                # If the mypetarget is already tamed, skip.
256                say 'all kill'
257                wft 250
258                target 'mypettarget'
259                pause 5000
260                say 'all follow me'
261            else
262                # Otherwise tame it.
263                warmode off
264                if timer 'tamingTimer' > 13000
265                    interrupt
266                    clearall
267                    useskill 'Taming'
268                    wft 1000
269                    target 'mypettarget'
270                    settimer 'tamingTimer' 0
271                endif
272            endif
273        else
274            pause 1000
275        endif
276        poplist petarray pettarget
277    endfor
278endwhile
279
280# Dead exit
281if dead
282    unsetvar 'tank'
283    stop
284endif