Back to "b" tags

Chivalry Tanking Script by demlar

1# Some things taken from Jaseowns scripts
2#Modified by: Demlar
3# UO Outlands
4##IMPORTANT!!!
5## **** this script currently assumes you have the auto unquip and reequip in razor ****
6# requip is this way because we wont need to requip soon.
7
8# have a seperate script that taunts all and plays this script after. (if needed dm and will add it to the list of scripts *patch will prevent this as some point*)
9
10#Version 1.2
11#Changes:
12#    1.1 
13#       1: Updated useCurePotionBelowHp now should work properly.
14#       2: Codex update should populate the codex
15# 
16#   1.2
17#       1: Fixed CodexHotbar to work properly  
18#
19#############################################################
20@setvar! chivCD 30000
21@setvar! skinningCD 3000
22
23#
24# USER PREFERENCES!!
25@setvar! autoSkinning 0
26@setvar! autoDropGold 1
27@setvar! useCurePotionBelowHp 80
28@setvar! useCleansebyFire 1
29#mainly for bosses
30
31if not timerexists ChivHeal1
32    createtimer ChivHeal1
33    settimer ChivHeal1 chivCD
34endif
35
36if not timerexists ChivHeal2
37    createtimer ChivHeal2
38    settimer ChivHeal2 chivCD
39endif
40
41
42if not timerexists chivCloseWounds
43    createtimer chivCloseWounds
44    settimer chivCloseWounds chivCD
45endif
46
47if not timerexists chivCleansebyFire
48    createtimer chivCleansebyFire
49    settimer chivCleansebyFire chivCD
50endif
51
52if not timerexists skinningTimer
53    createtimer skinningTimer
54    settimer skinningTimer skinningCD
55endif
56
57if not timerexists HPots
58    createtimer HPots
59    settimer HPots 10000
60endif
61
62
63#Finding Your Weapons and Shield
64overhead 'setting hands'
65if findlayer self righthand as item
66    @setvar! rightEquip item
67endif
68
69if findlayer self lefthand as item
70    @setvar! leftEquip item
71endif
72
73#Starting up verbose info your missing!
74
75overhead 'Checking inventory'
76if count 'bandages' = 0
77    overhead 'No Bandages!'
78    overhead 'Get some Bandages!' 88
79elseif not findtype 'Yellow Potion' backpack
80    overhead 'No Greater heal pots'
81    overhead 'Get some Greater heal pots!' 88
82    
83elseif not findtype 'Orange Potion' backpack
84    overhead 'No Greater cure pots'
85    overhead 'Get some Greater Cure pots!' 88
86endif
87
88#lets stop the script, if we dont have anything. are you tanking hits bro?
89if count 'bandages' = 0 or not findtype "Yellow Potion" backpack or not findtype "Orange Potion" backpack
90    overhead "Stopping script" 88 
91    stop
92endif
93
94if findtype "shield codex|fencing codex|macing codex|sword codex|archery codex|wrestling codex" backpack as item
95    
96    getlabel item codexDesc
97
98    while not gumpexists 2016719803
99        overhead "Loading Codex Hotbar"
100        say "[CodexHotBar"
101        wait 350
102    endwhile
103endif
104    
105    
106
107#No Hands left behind
108###########################################
109if rhandempty
110       lift rightEquip
111       drop 'self' RightHand
112endif
113
114if lhandempty
115        lift leftEquip
116        drop 'self' LeftHand
117    endif
118endif
119###############################################
120    
121while not dead
122
123    if not bandaging and hp < maxhp and count 'bandages' > 0
124        hotkey 'Bandage Self'
125        wait 300
126    endif
127
128
129    #check for food buffs
130    if not findbuff "food satisfaction" and findtype 'tray' backpack as food
131        dclick food
132        wait 500
133    endif
134    
135    #poison removal sequence
136    if poisoned and timer chivCleansebyFire > chivCD and useCleansebyFire = 1
137      overhead "Cleansing Poison With Fire"
138      wait 250
139      say '[CleanseByFire'
140        if insysmsg "Holy symbols remaining:"
141            settimer chivCleansebyFire 0
142        endif
143    endif  
144
145    if poisoned and hp < useCurePotionBelowHp   
146        while poisoned
147            if findtype 'Orange Potion' backpack 
148                overhead 'Cure Pot Used!'
149                hotkey "Drink Cure"
150                wait 1000
151            endif
152        endwhile
153    endif
154    
155            #need a pot check here dont do it if we dont have any pots!!! 
156    if poisoned and hp <= 40      
157        overhead "Emergency Poison Removal Activated"   
158        if not findbuff "I cannot gate travel" and timer ChivHeal1 > chivCD
159            say '[HolyLight'
160            if insysmsg "Holy symbols remaining:"
161                settimer ChivHeal1 0
162            endif
163        endif
164    endif  
165        
166    if findbuff "bleed" and timer chivCloseWounds > chivCD and useCloseWounds > 0      
167        overhead "Bleed Detected. Closing wounds."
168        say '[Closewounds'
169        wait 500
170        if insysmsg "Holy symbols remaining:"
171            settimer chivCloseWounds 0
172            wait 350
173            
174        else 
175            settimer chivCloseWounds 27000
176        endif 
177    endif
178        
179 //Reduce Disease Damage
180    if findbuff "disease" and timer chivCloseWounds > 30000 and useCloseWounds > 0
181        
182        say '[Closewounds'
183        overhead "You got diseased. Closing Wounds."
184        if insysmsg "Holy symbols remaining:"
185            settimer chivCloseWounds 0
186            wait 350
187        else 
188            settimer chivCloseWounds 27000
189        endif  
190    endif
191
192    //Emergency Heal Sequence
193    if diffhits > 30       
194        if timer ChivHeal1 > chivCD 
195            say '[Holylight'
196            wait 250
197            if insysmsg "Holy symbols remaining:"
198                settimer ChivHeal1 0
199            endif
200
201        endif 
202    endif 
203    
204    wait 350
205    if diffhits > 50
206        if timer ChivHeal2 > chivCD            
207            say '[NobleSacrifice'
208            wait 350
209            target self
210            wait 350
211
212            if targetexists
213              hotkey 'cancel current target'
214              hotkey 'clear target queue'
215            endif
216
217            if insysmsg "Holy symbols remaining:"
218                settimer ChivHeal2 0
219            endif            
220        endif
221    endif
222    
223    #need a pot check here dont do it if we dont have any pots!!! 
224    if diffhits > 50 and timer HPots > 10000 and findtype 'Yellow Potion' backpack          
225        wait 250
226        hotkey 'Drink Heal'
227        overhead "Healing Pot Used"
228        settimer HPots 0
229        wait 550          
230    endif 
231    
232    if autoSkinning = 1 and findtype "corpse" ground -1 -1 2 as skinCorpse
233        if findtype "Elven Spellblade" backpack and timer skinningTimer >= skinningCD
234            while not targetexists 
235                useskill 'forensicevaluation'
236            endwhile
237            if targetexists beneficial or targetexists neutral
238                hotkey "Target Self"
239                wait 200
240                settimer skinningTimer 0
241                @ignore skinCorpse
242            endif
243        endif
244    endif
245    
246    if autoDropGold = 1 and findbuff "weaken" and weight > maxweight 
247        if findtype "gold coin" backpack as item
248            lift item 2000
249            droprelloc 0 0
250            wait 200
251            if insysmsg "cannot drop anything"
252                drop backpack -1 -1 -1
253            endif
254            wait 650
255        else
256            overhead "We are overweight and cannot drop anything" 34
257        endif
258    endif
259    
260   // Trapped
261    if paralyzed 
262        if findtype "pouch" backpack 38 
263            yell "[pouch"
264        wait 200
265        else
266            overhead "Out of Pouches!" 34
267        endif
268    endif
269     
270    // capture world saving outside the loop
271    if insysmsg 'world is saving'
272        for 30
273            overhead 'Waiting for world save...'
274            wait 1000
275            if insysmsg 'save complete'
276                overhead 'Save complete - continue on!' 88
277                replay
278            endif
279        endfor
280    endif
281    
282endwhile