Back to "pet" tags

Bapeth's Trapper Background Script by barryroser

Description: "What it does"

# Bandage

# Cure

# Potion Buff

# Cleansing Brew (only while in warmode)

# Warn when str/resist/reflect/reactive are needed

# Shield Codex - Shield bash, Warding, Bullwark

Also "Time Sense" and "Loot Vacuum" mode can be enabled with this script.

1# "Bapeths Trapper Background"
2# Name the script exactly as "shown" above and it will be looped into other Bapeth Trapper Scripts
3#
4# This script works well with dex Trapper and Summoner Trapper
5#
6# Update: March 29 2025 removed arcane, replaced with other weapon skills
7#   
8# "To change WEAPON ABILITY edit line 80" 
9# 
10# Keep this script playing at all times
11# If you use another script, such as "BOOM BOOM by Bapeth"
12# Loop this background script at the end of your other script(s)
13#
14# "Required Cooldowns"
15#
16# "Move" Cooldown should be set to "0.3 seconds"
17# "Bandage" cooldown can be blank - Script assumes 3 points in "Self Treatment"
18#
19# "What it does"
20#
21# Bandage
22# Cure
23# Cleansing Brew (only while in warmode)
24# Warn when str/resist/reflect/reactive are needed
25# Shield Codex - Shield bash, Warding, Bulwark
26# Note on Bullwark : "BOOM BOOM" hotkey script required to activate auto-bullwark
27#
28# "Time Sense Container Search"
29# Enable this option to display and loot containers in "Time Dungeon"
30# The "Time Codex" acts like a switch to turn this setting on/off, open your codex while the script is playing to activate switch
31# Stop the script if you need to interact with the Time Codex normally
32#
33# "Auto Switch Flipper"
34# This is for green wall switches in "Time Dungeon" - Requires "Time Sense to be turned on"
35# Go into warmode when standing near a wall switch and the script will flip the switch and return to peacemode
36#
37# "Auto-Recycler"
38# This feature will auto recycle bad items and keep the good ones - To use this feature:
39# You must be carrying at least one "item identification wand" and at least one "recycler tool" type (Tinker Tools, Sewing Kit, Saw, Tongs, or Scribes Pen)
40# The recycle will happen when the player begins picking a fresh chest (Double Click Scissors to activate auto recycle manually)
41#
42# "Loot-Sense & Vacuum Mode"
43# This function will overhead display *loot* above items on the ground and pick them up as you pass by (2 tiles)
44# Be aware that this may make you overweight from large gold piles from time to time
45# To toggle this feature on/off (default is off) "Double click a Wizard Grimoire"
46#
47# "Gold Sacker"
48# To toggle this feature on/off and set a new sack bag open the "Atlas" while the script it playing
49# This feature will set a ground bag to drop gold into
50# Check out another script by Bapeth called "Bapeths Object Drag & Dropper" searchable on Jases site - This will help you move heavy bags
51#
52# Script starts here...
53
54if skill "Swordsmanship" >= 80 or skill "macefighting" >=80 or skill "fishing" >= 80 or skill "fencing" >=80 or skill "archery" >=80 and not casting and not targetexists and not cooldown "Move"
55    if timerexists baptrapcombat
56        if timer baptrapcombat <= 2000
57            clearsysmsg 
58            if not varexist "currentbaptarget"
59                hotkey 'Target Closest Grey Monster'
60                if insysmsg "No one matching"
61                    //donothing
62                else
63                    @setvar "currentbaptarget" lasttarget 
64                endif
65                hotkey "Cancel Current Target"
66            elseif not find "currentbaptarget" ground -1 -1 8
67                hotkey 'Target Closest Grey Monster'
68                if insysmsg "No one matching"
69                    //donothing
70                else
71                    @setvar "currentbaptarget" lasttarget 
72                endif
73                hotkey "Cancel Current Target"
74            elseif find "currentbaptarget" ground -1 -1 8
75                if not timerexists usearcaneability
76                    createtimer usearcaneability
77                    settimer usearcaneability 31000
78                elseif timer usearcaneability >= 31000
79                    settimer usearcaneability 0
80                    say "[WeaponAbility3"
81                endif
82                attack "currentbaptarget"
83            endif
84        endif
85    endif
86endif
87
88if skill "Parrying" >= 80 and mana >= 6
89    if not timerexists checkshieldcodex
90        createtimer checkshieldcodex
91        settimer checkshieldcodex 13000
92        elseif timer checkshieldcodex >= 13000
93        settimer checkshieldcodex 0
94        if findtype "shield codex" backpack as scodex
95            getlabel scodex desc
96            if "Shield Bash" in desc
97                overhead "--Shield Bash Active--" 2490
98            elseif "Warding" in desc
99                overhead "--Warding Active--" 2087
100                if not findbuff "Bleed" and not findbuff "Diseased"
101                    say "[ShieldsStance1" 45
102                    getlabel backpack ping
103                    say "[ShieldsFinisher1" 45
104                endif
105            elseif "Testudo" in desc
106                overhead "--Testudo Active--" 2503
107            elseif "Mirror" in desc
108                overhead "--Mirror Active--" 2615
109            elseif "Bulwark" in desc
110                overhead "--Bulwark Active--" 2767
111            else 
112                overhead "No Stance Active" 45
113                overhead "Defaulting to Shield Bash" 45
114                say "[ShieldsStance1"
115            endif
116        endif
117    endif
118    if not timerexists bleedbuffcheck and findbuff "Bleed" and not findbuff "Diseased"
119        removetimer bullwarkactive
120        createtimer bleedbuffcheck
121        say "[ShieldsStance2" 45
122        getlabel backpack ping
123        say "[ShieldsFinisher2" 45
124    elseif timerexists bleedbuffcheck and not findbuff "Bleed" and not findbuff "Diseased"
125        removetimer bleedbuffcheck
126        pause 800
127        getlabel backpack ping
128        say "[ShieldsStance1" 45
129        getlabel backpack ping
130        say "[ShieldsFinisher1" 45
131    endif
132    if not timerexists diseasebuffcheck and findbuff "Diseased" and not findbuff "Bleed"
133        removetimer bullwarkactive
134        createtimer diseasebuffcheck
135        say "[ShieldsStance2" 45
136        getlabel backpack ping
137        say "[ShieldsFinisher2" 45
138    elseif timerexists diseasebuffcheck and not findbuff "Diseased" and not findbuff "Bleed"
139        removetimer diseasebuffcheck
140        pause 800
141        getlabel backpack ping
142        say "[ShieldsStance1" 45
143        getlabel backpack ping
144        say "[ShieldsFinisher1" 45
145    endif
146    if timerexists baptrapcombat
147        if not findbuff "Diseased" and not findbuff "Bleed" and not timerexists defaultstance and timer baptrapcombat <= 10000
148            if not timerexists "bullwarktime"
149                createtimer bullwarktime
150            endif    
151            if cooldown "Move"
152                settimer bullwarktime 0
153            endif
154            if not timerexists bullwarkactive and timer bullwarktime >= 3000
155                say "[ShieldsStance5" 45
156                createtimer bullwarkactive
157            endif
158        endif
159    endif
160    if cooldown "Move"
161        settimer bullwarktime 0
162    endif
163    if timerexists bullwarkactive
164        if timer bullwarktime < 3000
165            say "[ShieldsStance1" 45
166            removetimer bullwarkactive
167        endif
168    endif
169endif
170
171if skill "Swordsmanship" >= 80 or skill "macefighting" >=80 or skill "fishing" >= 80 or skill "fencing" >=80 or skill "archery" >=80 and not gumpexists 3954121934
172    say '[abilityhotbar'
173    waitforgump 3954121934 500
174endif
175
176if not timerexists frostshelltimer
177    createtimer frostshelltimer
178    settimer frostshelltimer 5000
179endif
180if timerexists frostshellswitch and timer frostshelltimer > 5000 and not cooldown "Aspect" and hp <= 35
181    say "[AspectArmor Frost"
182    getlabel backpack ping
183    if insysmsg "Your armor is already of that aspect"
184        //donothing
185    else
186        cooldown "Aspect" 30000
187        overhead "--Frost Shell Primed--" 2234
188    endif
189    settimer frostshelltimer 0
190endif
191
192if not timerexists frostshellswitch
193    if gumpexists 3527489586
194        gumpclose 3527489586
195        createtimer frostshellswitch
196        overhead "--Auto Shell Enabled--" 2085
197    endif
198endif
199if timerexists frostshellswitch
200    if gumpexists 3527489586
201        gumpclose 3527489586
202        removetimer frostshellswitch
203        overhead "--Auto Shell Disabled--" 1779
204    endif
205endif
206
207if not timerexists goldsacker
208    if gumpexists 341416395
209        gumpclose 341416395
210        createtimer goldsacker
211        overhead "--Gold Sacker Enabled--" 2085
212        hotkey "Set Last Target"
213        wft 500
214        overhead "Target Gold Drop Bag" 88
215        while targetexists 
216            //donothing
217        endwhile
218        @setvar "bgoldbag" lasttarget 
219        overhead "Gold Drop Bag Set" 78
220    endif
221elseif timerexists goldsacker
222    if gumpexists 341416395
223        gumpclose 341416395
224        removetimer goldsacker
225        overhead "--Gold Sacker Disabled--" 1779
226    endif
227endif
228if not timerexists sacktracker
229    createtimer sacktracker
230    settimer sacktracker 5000
231elseif timer sacktracker >= 5000 and find "bgoldbag" ground
232    overhead "*gold sack*" 2843 "bgoldbag"
233    settimer sacktracker 0
234endif
235if find "bgoldbag" ground -1 -1 2
236    while findtype "gold coin" backpack as fatcoins
237        while queued
238            //donothing
239        endwhile
240        drop backpack
241        lift fatcoins 60000
242        drop bgoldbag -1 -1
243        pause 500
244        getlabel backpack ping
245    endwhile
246endif
247
248if not find "bsummon1" ground and findtype "an earth elemental|a fire elemental|a water elemental|an air elemental|a daemon" ground -1 -1 1 as sum1  
249    if noto sum1 = "friend"
250        # Name your summon if you like (no spaces must be unique)
251        rename sum1 "Bapith"
252    endif
253elseif not find "bsummon1" ground and findtype "Bapith" ground as sum1
254    @setvar "bsummon1" sum1
255endif
256if not find "bsummon2" ground and findtype "an earth elemental|a fire elemental|a water elemental|an air elemental|a daemon" ground -1 -1 1 as sum2  
257    if noto sum2 = "friend"
258        # Name your summon if you like (no spaces must be unique)
259        rename sum2 "Bapath"
260    endif
261elseif not find "bsummon2" gorund and findtype "Bapath" ground as sum2
262    @setvar "bsummon2" sum2
263endif
264
265if findtype "a primordial whelp|an aegis rat|a cougar|a wolf|a grizzly bear|a brown bear|a corpse eater|a familiar|a rock guar|a flamehound|a sand crab|a monitor hatchling|a firebat|a black bear|a muck|a polar bear|shallow water|a scorpion|a swamp spider|a searing lizard|a minion|a fire salamander|a fire ant|a silverback|a jaguar|an aegis mongbat|a cave bat|a primordial|a monitor|an asp|an imp|a winter wolf|a cave bear|a giant swamp slug|an aegis slime|a trapdoor spider|a chameleon|a searing imp|a dragon whelp|a drake whelp|a devilbat|a wolfhound|a blood ape|an army ant|a molten mongbat|a stinger|a rime guar|an aegis scorpion|a skulker|a komodo|a shade wolf|a husk crab|an aegis imp|a fire minion|a snowdrift|a spitting viper|a vampire bat" as csum
266    if noto csum = "friend"
267        # Name your summon if you like (no spaces must be unique)
268        rename csum "Bapesh"
269    endif
270endif
271
272if not timerexists bapactive
273    createtimer bapactive
274    settimer bapactive 5000
275elseif timer bapactive >= 5000
276    overhead "Boom time..." 78
277    settimer bapactive 0
278endif
279
280if not timerexists rptimer
281    createtimer rptimer
282    settimer rptimer 1200
283endif
284
285if not find "placedtrap" ground and findtype 51163 ground -1 -1 8 as smokingtrap
286    @setvar "placedtrap" smokingtrap
287endif
288
289if not timerexists armedtimer
290    createtimer armedtimer
291    settimer armedtimer 3000
292endif
293if find "placedtrap" ground -1 -1 8 as smokingtrap and timer armedtimer >= 1500
294    overhead "*Armed*" 38 smokingtrap
295    settimer armedtimer 0
296elseif find "placedtrap" ground as smokingtrap and timer armedtimer >= 1500
297    overhead "*Too Far*" 45 smokingtrap
298    settimer armedtimer 0
299endif
300
301if skill "healing" >= 20 and not casting and not targetexists 
302    if hp = maxhp
303        //donothing
304    elseif not bandaging and findtype 3617 backpack
305        hotkey "Bandage Self"
306        cooldown "Bandage" 7000
307    endif
308endif
309
310if skill "Magery" >= 80
311    if timerexists reflect and not findbuff "Magic Reflection"
312        if timer reflect > 30000
313            overhead "--Cast Reflect--" 2122
314            settimer reflect 12000
315        endif
316    endif
317    if findbuff "Magic Reflection" and timerexists reflect
318        removetimer reflect
319    endif
320    if not findbuff "Magic Reflection" and not timerexists reflect
321        createtimer reflect
322    endif
323endif
324if skill "Magery" >= 20
325    if timerexists reactive and not findbuff "Reactive Armor"
326        if timer reactive > 30000
327            overhead "--Cast Reactive--" 2122
328            settimer reactive 13500
329        endif
330    endif
331    if findbuff "Reactive Armor" and timerexists reactive
332        removetimer reactive
333    endif
334    if not findbuff "Reactive Armor" and not timerexists reactive
335        createtimer reactive
336    endif
337endif
338if skill "Magery" >= 40
339    if timerexists protection and not findbuff "Protection"
340        if timer protection > 30000
341            overhead "--Cast Protection--" 2122
342            settimer protection 9000
343        endif
344    endif
345    if findbuff "Protection" and timerexists protection
346        removetimer protection
347    endif
348    if not findbuff "Protection" and not timerexists protection
349        createtimer protection
350    endif
351endif
352if warmode and not hidden and not timerexists brew and not targetexists and findbuff "Bleed" and findtype 50675 backpack as cbrew
353    clearsysmsg 
354    while queued
355        //donothing
356    endwhile
357    dclick cbrew
358    getlabel backpack ping
359    if insysmsg "You drink a cleansing brew"
360        createtimer brew
361    endif
362elseif warmode and not hidden and not timerexists brew and not targetexists and findbuff "Diseased" and findtype 50675 backpack as cbrew
363    while queued
364        //donothing
365    endwhile
366    dclick cbrew
367    getlabel backpack ping
368    if insysmsg "You drink a cleansing brew"
369        createtimer brew
370    endif
371endif
372if timerexists brew
373    if timer brew >= 120000
374        removetimer brew
375    endif
376endif
377if not hidden and not casting and findbuff "Weaken" and not targetexists and findtype "White Potion" backpack as stpot
378    while queued
379        //donothing
380    endwhile
381    dclick stpot
382endif
383if not timerexists topupstr
384    createtimer topupstr
385    settimer topupstr 30000
386elseif timer topupstr >= 30000 and not hidden and not casting and str = 100 and findtype "White Potion" backpack as stpot
387    while queued
388        //donothing
389    endwhile
390    overhead "--Drink Strength--" 2041
391    settimer topupstr 0
392endif
393if not timerexists topupres
394    createtimer topupres
395    settimer topupres 30000
396elseif timer topupres >= 30000 and not hidden and not casting and not findbuff "Magic Resist Potion" and findtype "Black Potion" backpack as respot
397    while queued
398        //donothing
399    endwhile
400    overhead "--Drink Resist--" 2031
401    settimer topupres 0
402endif
403if not targetexists and not hidden and not casting and stam <= 4 and findtype "Red Potion" backpack as redpot
404    while queued
405        //donothing
406    endwhile
407    dclick redpot
408endif
409if not hidden and paralyzed and not targetexists and findtype "pouch" backpack 38
410    say "[Pouch"
411endif
412if not hidden and not casting and poisoned and not targetexists and findtype "Orange Potion" backpack as curepot
413    while queued
414        //donothing
415    endwhile
416    dclick curepot
417endif
418
419if insysmsg "What should I use these scissors on?" and findtype "sewing kit|saw|pen and ink|tongs|tool kit" backpack as breakdowntool
420    hotkey "Cancel Current Target"
421    if not find "ContainerIDWand" and findtype 20495 backpack as contIDwand
422        @setvar "ContainerIDWand" contIDwand
423    endif
424    if find "ContainerIDWand" backpack
425        clearsysmsg 
426        while queued
427            //donothing
428        endwhile
429        dclick "ContainerIDWand"
430        wft 500
431        overhead "Select Container to ID..." 88
432        while targetexists 
433            //donothing
434        endwhile
435        getlabel backpack ping
436        overhead "Attempting recycle..." 88
437        if insysmsg "No unidentified items found."
438            overhead "Nothing fresh to ID..." 45
439        elseif insysmsg "That is not a container." 
440            overhead "Invalid container, try again.." 45
441        endif
442        if findtype 3834 backpack 0 as bbook
443            @ignore bbook
444        endif
445        while findtype 5056|5059|5060|5061|5063|5070|5074|5075|5076|5078|5085|5089|5090|5101|5103|5105|5106|5129|5131|5132|5135|5138|5139|5142|5143|5144|5146|5201|5203|5204|5205|5207|7169|7170|7173|7175|7177|7179|7181|7610|7947|31003|31004|31005|31006|31007|31008|31009|31010|31011|31012|31015|31191|31017|31019|31021|31023|31025|31027|31029|31031|31033|31035|31037|31038|31041|31043|31045|31047|31049|31051|31053|31055|3834|3740|3742|3762|3763|10245|20006|20008|20010|20012|20014|20016|7026|7027|7029|7031|7033|7034|7035|7107|7109|31002|31130|3920|5042|5117|30990|30993|30994|30995|31184|31186|3719|3938|5121|5123|5125|30989|30992|30996|30997|30998|31176|31188|3568|3713|3721|3932|5040|5044|5112|5127|5177|5179|5181|30991|30999|31000|31001|31014|31178|31180|31182|3909|3911|3913|3915|3917|3934|3937|5046|5049|5115|5119|5182|5185|5187|30988|31128|31190|22187|31141|31142|31169|31172 backpack as IDitem
446            getlabel IDitem desc
447            if "aspect" in desc or "training" in desc or "vanquishing" in desc or "supremely" in desc or "slaying" in desc or "enticement" in desc or "invulnerability" in desc or "power" in desc or "exceedingly accurate force" in desc or "exceedingly potent" in desc or "valorite" in desc or "valehide" in desc or "valewood" in desc or "avarite" in desc or "avarhide" in desc or "avarwood" in desc or "verite" in desc or "verehide" in desc or "verewood" in desc or "agapite" in desc or "rosehide" in desc or "rosewood" in desc or "fortification" in desc
448                @ignore IDitem
449                overhead "*strong magic*" 2091 IDitem
450            elseif "durable" in desc or "substantial" in desc or "massive" in desc or "fortified" in desc or "indestructible" in desc or "exceptional" in desc or "accurate" in desc or "surpassingly" in desc or "eminently" in desc or "exceedingly" in desc or "ruin" in desc or "might" in desc or "force" in desc or "power" in desc or "mastercrafted" in desc or "defense" in desc or "guarding" in desc or "hardening" in desc or "potent" in desc or "melodious" in desc
451                overhead "*trash*" 1779 IDitem
452                while not gumpexists 949095101
453                    while queued
454                        //donothing
455                    endwhile
456                    dclick breakdowntool
457                    waitforgump 949095101 1000
458                endwhile
459                while not ingump "Recycle Single Item" 949095101
460                    gumpresponse 2
461                    waitforgump 949095101 1000
462                endwhile                                
463                gumpresponse 3
464                waitforgump 949095101 1000
465                target IDitem
466                getlabel backpack ping
467                pause 250
468                gumpclose 949095101
469            else
470                @ignore IDitem
471            endif
472            if not find "ContainerIDWand" backpack
473                break
474            endif
475        endwhile
476        if gumpexists 949095101
477            gumpclose 949095101
478        endif
479    else
480        overhead "No Container ID Wand..." 38
481    endif
482    if targetexists 
483        hotkey "Cancel Current Target"
484    endif
485    overhead "Recycle Complete." 88
486endif
487
488if not timerexists timesenseswitch
489    if gumpexists 3352257441
490        gumpclose 3352257441
491        createtimer timesenseswitch
492        overhead "--Time Sense Enabled--" 88
493    endif
494endif
495if timerexists timesenseswitch
496    if gumpexists 3352257441
497        gumpclose 3352257441
498        removetimer timesenseswitch
499        overhead "--Time Sense Disabled--" 38
500    endif
501endif
502if timerexists timesenseswitch and not targetexists and not casting
503    if not timerexists bappykeytimer
504        createtimer bappykeytimer
505        settimer bappykeytimer 5500
506    elseif timer bappykeytimer >= 5500 and findtype "4112" backpack as bappykey
507        overhead "*key*" 78 bappykey
508        settimer bappykeytimer 0
509    endif
510    if not timerexists timesensecontainer
511        createtimer timesensecontainer
512        settimer timesensecontainer 1000
513    endif
514    if not findtype 4239|4240 ground -1 -1 2 and timer timesensecontainer >= 1000
515        for 18
516            if index > 0 and findtype "wooden shelf|wooden box|armoire|dead|chest of drawers|3712|2712|3651|3649|3648|3650|3708|2475|2713|2637|2474|3647|3710|3645|3703|3702|2472|3701|2473|2639|3788|3791|3786|2711|3709|3789|3646|3705|27284|27287|27289|27286|27288|3793|3787|3794|3790|3792|2643|3644" ground -1 -1 index as dungeonfloorcontainers
517                getlabel dungeonfloorcontainers desc
518                overhead "*search*" 88 dungeonfloorcontainers
519                @ignore dungeonfloorcontainers
520            endif
521            if findtype "wooden shelf|wooden box|armoire|dead|chest of drawers|3712|2712|3651|3649|3648|3650|3708|2475|2713|2637|2474|3647|3710|3645|3703|3702|2472|3701|2473|2639|3788|3791|3786|2711|3709|3789|3646|3705|27284|27287|27289|27286|27288|3793|3787|3794|3790|3792|2643|3644" ground -1 -1 2
522                break
523            endif
524            if warmode and findtype "barred metal door|metal door|iron gate" ground -1 -1 2
525                break
526            endif
527            if warmode and findtype 4239|4240 ground -1 -1 2
528                break
529            endif
530            if varexist "bwiz" and find "bwiz" backpack and find "bmain" self
531                if not targetexists and not casting and skill "Stealth" >= 80 and hidden and stam = maxstam
532                    while queued
533                        //donothing
534                    endwhile
535                    dclick "bwiz"
536                    while queued
537                        //donothing
538                    endwhile
539                    pause 30
540                    dclick "bmain"
541                    pause 500
542                    getlabel backpack ping
543                endif
544                if not targetexists and not casting and not findlayer self head and find "bmain" self
545                    while queued
546                        //donothing
547                    endwhile
548                    dclick "bmain"
549                    pause 500
550                    getlabel backpack ping
551                endif
552            endif
553            if varexist "bwiz" and find "bmain" self
554                if not targetexists and not casting and not find "bwiz" backpack
555                    while queued
556                        //donothing
557                    endwhile
558                    dclick "bmain"
559                    pause 500
560                    getlabel backpack ping
561                endif
562            endif
563        endfor
564        @clearignore
565        settimer timesensecontainer 0
566    endif
567    if not timerexists switchandstufftimer
568        createtimer switchandstufftimer
569        settimer switchandstufftimer 1000
570    endif
571    if timer switchandstufftimer >= 1000
572        for 18
573            if index > 0 and findtype 4239|4240  ground -1 -1 index as switchandstuff
574                getlabel switchandstuff desc
575                overhead "*switch*" 78 switchandstuff
576                @ignore switchandstuff
577            endif
578            if warmode and findtype 4239|4240 ground -1 -1 2
579                break
580            endif 
581        endfor
582        @clearignore
583        settimer switchandstufftimer 0
584    endif
585    if warmode and findtype 4239|4240 ground -1 -1 2 as timewallswitch
586        dclick timewallswitch
587        warmode off
588        getlabel backpack ping
589    endif
590    @clearignore 
591    while findtype "wooden box|armoire|dead|chest of drawers|wooden shelf|3712|2712|3651|3649|3648|3650|3708|2475|2713|2637|2474|3647|3710|3645|3703|3702|2472|3701|2473|2639|3788|3791|3786|2711|3709|3789|3646|3705|27284|27287|27289|27286|27288|3793|3787|3794|3790|3792|2643|3644" ground -1 -1 2 as timecontainer
592        if warmode and findtype 4239|4240 ground -1 -1 2
593            break
594        endif
595        if varexist "bwiz" and find "bwiz" backpack and find "bmain" self
596            if not targetexists and not casting and skill "Stealth" >= 80 and hidden and stam = maxstam
597                while queued
598                    //donothing
599                endwhile
600                dclick "bwiz"
601                while queued
602                    //donothing
603                endwhile
604                pause 30
605                dclick "bmain"
606                pause 500
607                getlabel backpack ping
608            endif
609            if not targetexists and not casting and not findlayer self head and find "bmain" self
610                while queued
611                    //donothing
612                endwhile
613                dclick "bmain"
614                pause 500
615                getlabel backpack ping
616            endif
617        endif
618        if varexist "bwiz" and find "bmain" self
619            if not targetexists and not casting and not find "bwiz" backpack
620                while queued
621                    //donothing
622                endwhile
623                dclick "bmain"
624                pause 500
625                getlabel backpack ping
626            endif
627        endif        
628        @setvar "bapcontaineroftime" timecontainer
629        while queued
630            //donothing
631        endwhile
632        getlabel timecontainer desc
633        if "the remains of" in desc
634            overhead "*avatar corpse*" 45 timecontainer
635        else
636            dclick timecontainer
637            pause 500
638            getlabel backpack ping
639            if gumpexists 736038070 and skill "Lockpicking" >= 20 and findtype 5373 backpack
640                while gumpexists 736038070
641                    gumpresponse 4
642                endwhile
643                getlabel backpack ping
644            elseif gumpexists 736038070
645                @ignore timecontainer
646                gumpclose 736038070
647            endif
648# This seems to have been broken by Tranq in the last update - check again later to see if it gets fixed
649#            @ignore timecontainer
650#            while findtype "wooden shelf|wooden box|armoire|dead|chest of drawers|3712|2712|3651|3649|3648|3650|3708|2475|2713|2637|2474|3647|3710|3645|3703|3702|2472|3701|2473|2639|3788|3791|3786|2711|3709|3789|3646|3705|27284|27287|27289|27286|27288|3793|3787|3794|3790|3792|2643|3644" timecontainer -1 -1 2 as innercontainer
651#                while queued
652#                    //donothing
653#                endwhile
654#                dclick innercontainer
655#                pause 500
656#                getlabel backpack ping
657#                @ignore innercontainer
658#            endwhile
659#            @unignore timecontainer
660        endif
661        while findtype 5056|5059|5060|5061|5063|5070|5074|5075|5076|5078|5085|5089|5090|5101|5103|5105|5106|5129|5131|5132|5135|5138|5139|5142|5143|5144|5146|5201|5203|5204|5205|5207|7169|7170|7173|7175|7177|7179|7181|7610|7947|31003|31004|31005|31006|31007|31008|31009|31010|31011|31012|31015|31191|31017|31019|31021|31023|31025|31027|31029|31031|31033|31035|31037|31038|31041|31043|31045|31047|31049|31051|31053|31055|3834|3740|3742|3762|3763|10245|20006|20008|20010|20012|20014|20016|7026|7027|7029|7031|7033|7034|7035|7107|7109|31002|31130|3920|5042|5117|30990|30993|30994|30995|31184|31186|3719|3922|3938|5121|5123|5125|30989|30992|30996|30997|30998|31176|31188|3568|3713|3721|3932|5040|5044|5112|5127|5177|5179|5181|30991|30999|31000|31001|31014|31178|31180|31182|3909|3911|3913|3915|3917|3934|3937|5046|5049|5115|5119|5182|5185|5187|30988|31128|31190|22187|31141|31142|31169|31172 timecontainer as checkunid
662            getlabel checkunid desc
663            if "unidentified" in desc
664                hotkey 'Grab Item' 
665                target checkunid
666                overhead "*looting*" 2091 timecontainer
667                if insysmsg "Invalid or inaccessible item."
668                    @ignore checkunid
669                endif
670                while queued
671                    //donothing
672                endwhile
673            else 
674                @ignore checkunid
675            endif
676            if insysmsg "That container cannot hold more weight."
677                break
678            endif
679            if not find "bapcontaineroftime" ground -1 -1 2
680                break
681            endif
682            if varexist "bwiz" and find "bwiz" backpack and find "bmain" self
683                if not targetexists and not casting and skill "Stealth" >= 80 and hidden and stam = maxstam
684                    while queued
685                        //donothing
686                    endwhile
687                    dclick "bwiz"
688                    while queued
689                        //donothing
690                    endwhile
691                    pause 30
692                    dclick "bmain"
693                    pause 500
694                    getlabel backpack ping
695                endif
696                if not targetexists and not casting and not findlayer self head and find "bmain" self
697                    while queued
698                        //donothing
699                    endwhile
700                    dclick "bmain"
701                    pause 500
702                    getlabel backpack ping
703                endif
704            endif
705            if varexist "bwiz" and find "bmain" self
706                if not targetexists and not casting and not find "bwiz" backpack
707                    while queued
708                        //donothing
709                    endwhile
710                    dclick "bmain"
711                    pause 500
712                    getlabel backpack ping
713                endif
714            endif
715        endwhile
716        while findtype 3827 timecontainer 0 as zeroscroll
717            @ignore zeroscroll
718        endwhile
719        while findtype 7154 timecontainer 0 as zeroingot
720            @ignore zeroingot
721        endwhile
722        while findtype 4225 timecontainer 0 as zeroleather
723            @ignore zeroleather
724        endwhile
725        while findtype 7127 timecontainer 0 as zeroboard
726            @ignore zeroboard
727        endwhile
728        while findtype 7154 timecontainer 2419 as zeroingot
729            @ignore zeroingot
730        endwhile
731        while findtype 4225 timecontainer 2419 as zeroleather
732            @ignore zeroleather
733        endwhile
734        while findtype 7127 timecontainer 2419 as zeroboard
735            @ignore zeroboard
736        endwhile
737        while findtype 7154 timecontainer 2406 as zeroingot
738            @ignore zeroingot
739        endwhile
740        while findtype 4225 timecontainer 2406 as zeroleather
741            @ignore zeroleather
742        endwhile
743        while findtype 7127 timecontainer 2406 as zeroboard
744            @ignore zeroboard
745        endwhile
746        while findtype 7154 timecontainer 2413 as zeroingot
747            @ignore zeroingot
748        endwhile
749        while findtype 4225 timecontainer 2413 as zeroleather
750            @ignore zeroleather
751        endwhile
752        while findtype 7127 timecontainer 2413 as zeroboard
753            @ignore zeroboard
754        endwhile
755        while findtype 7154 timecontainer 2418 as zeroingot
756            @ignore zeroingot
757        endwhile
758        while findtype 4225 timecontainer 2418 as zeroleather
759            @ignore zeroleather
760        endwhile
761        while findtype 7127 timecontainer 2418 as zeroboard
762            @ignore zeroboard
763        endwhile
764        while findtype 7154 timecontainer 2213 as zeroingot  
765            @ignore zeroingot
766        endwhile
767        while findtype 4225 timecontainer 2213 as zeroleather
768            @ignore zeroleather
769        endwhile
770        while findtype 7127 timecontainer 2213 as zeroboard
771            @ignore zeroboard
772        endwhile
773        while findtype 22326 timecontainer 2401 as badseed
774            @ignore badseed
775        endwhile
776        while findtype 22326 timecontainer 2882 as badseed
777            @ignore badseed
778        endwhile
779        while findtype 22326 timecontainer 2451 as badseed
780            @ignore badseed
781        endwhile
782        while findtype 22326 timecontainer 63 as badseed
783            @ignore badseed
784        endwhile
785        while findtype 5901|5899|5903|5905 timecontainer as timefootwear
786            getlabel timefootwear desc
787            if "(hue" in desc
788                break
789            else 
790                @ignore timefootwear
791            endif
792        endwhile
793        while findtype "43206|54230|44985|glass display|20049|Pig Iron|broken shield|blackrock fragment|gargish fragment|18705|55247|49482|53694|54570|53696|53876|50612|55420|53280|53473|54831|50278|49528|bottle set|entrail bucket|mounted stalaghorn|sea glass bulb|juggling daggers|st patricks cross|divination orb|mirror display|murder of crows|charmed cobra|prodigy fiddle|wilting rose belljar|scale of balance|screaming mandrake|statue of the siren|the final hour|55204|specimen jars|shattered weapon|bird cage|widows grief|54684|27612|49223|54591|54601|54718|7408|19948|58325|19959|19822|49730|49729|19944|19949|47613|47612|47611|47610|47611|3986|3966|cathedral tapestry|Darkscale tapestry|large painting|landscape painting|portrait painting|figurine|statue|20291|44987|49730|47107|18653|45127|20103|47103|29363|47105|29361|43453|5899|47109|45250|41509|43447|18657|4025|51308|45156|51304|45214|28769|28799|28803|28765|45211|45248|51259|45220|51328|45218|3842|51327|45222|45241|51336|11858|51375|45282|54722|45255|45246|28795|44983|45235|45251|45238|51258|51314|28761|45236|51260|54718|18400|58325|45252|18656|47111|3839|45239|45242|45254|45281|45247|42241|45216|28775|51321|3838|51318|5901|5905|45259|5903|48407|51302|4248|27611|15296|43166|5359|5981|4026|3985|25359|17686|3836|17087|5356|29030|24434|22336|29036|3843|29025|51098|29034|8826|51094|576|3827|22326|45315|3891|2539|39898|39896|39892|39918|39911|39916|39897|39905|39891|39917|39912|39909|39889|31047|31017|31049|31019|31055|31051|31053|31025|31027|31031|31041|54717|31021|31011|31023|31029|31043|31003|31035|31033|31045|31037|31002|20006|31169|31006|30999|31012|31009|30996|7109|7107|31128|31188|20014|31014|31004|31142|31001|31000|37181|31010|30998|31172|30988|30997|31038|31141|7947|20008|31005|31191|31008|31007|30994|30993|31182|30989|20012|31186|31178|31015|30991|20010|20016|31184|31190|30990|30995|31176|31180|30992|31130|5207|7031|7026|7034|7033|7027|7035|7029|5078|5063|5059|5105|5060|5138|5129|5201|5142|5143|5076|5106|7610|5139|5090|5103|5132|7177|5061|7181|7179|3920|5042|5127|5117|5185|5125|3938|5177|3937|5044|5121|3915|3909|3568|3932|5123|5144|5119|5056|5135|5187|5074|5089|3934|3913|3917|3721|5075|5046|5049|7170|5146|5205|5203|5115|5204|5040|5179|5070|5182|5085|5181|3719|7173|5131|3911|5101|7175|7169|3713|5112|22187|9917|3859|3862|3878|3865|3856|3873|3877|3834|3742|3762|3740|3763|10245|3572|3573|3571|12686|19985|19981|19984|19982|19983|19991|19989|19986|19987|19988|19994|19995|19992|19993|19990|19980|19977|19976|19978|19979|43423|7154|4225|7127" timecontainer as bitem
794            hotkey 'Grab Item' 
795            target bitem
796            overhead "*looting*" 2091 timecontainer
797            if insysmsg "Invalid or inaccessible item."
798                @ignore bitem
799            endif
800            while queued
801                //donothing
802            endwhile
803            if insysmsg "That container cannot hold more weight."
804                break
805            endif
806            if not find "bapcontaineroftime" ground -1 -1 2
807                break
808            endif
809            if varexist "bwiz" and find "bwiz" backpack and find "bmain" self
810                if not targetexists and not casting and skill "Stealth" >= 80 and hidden and stam = maxstam
811                    while queued
812                        //donothing
813                    endwhile
814                    dclick "bwiz"
815                    while queued
816                        //donothing
817                    endwhile
818                    pause 30
819                    dclick "bmain"
820                    pause 500
821                    getlabel backpack ping
822                endif
823                if not targetexists and not casting and not findlayer self head and find "bmain" self
824                    while queued
825                        //donothing
826                    endwhile
827                    dclick "bmain"
828                    pause 500
829                    getlabel backpack ping
830                endif
831            endif
832            if varexist "bwiz" and find "bmain" self
833                if not targetexists and not casting and not find "bwiz" backpack
834                    while queued
835                        //donothing
836                    endwhile
837                    dclick "bmain"
838                    pause 500
839                    getlabel backpack ping
840                endif
841            endif
842        endwhile
843        @ignore timecontainer
844    endwhile
845endif
846if not findtype 4239|4240 ground -1 -1 1 and skill "Lockpicking" >= 20 and warmode and findtype "barred metal door|metal door|iron gate|stone wall" ground -1 -1 2
847    if findtype 5373 backpack as picks
848        clearsysmsg 
849        overhead "Which door shall I pick?" 88
850        hotkey "Set Last Target"
851        wft 1000
852        while targetexists 
853            if not findtype "barred metal door|metal door|iron gate|stone wall" ground -1 -1 2
854                break
855            endif
856        endwhile
857        @setvar "bapdoorpick" lasttarget 
858        overhead "Time is of the essence..." 88
859        for 2000
860            if not timerexists doorpicktimer
861                createtimer doorpicktimer
862                settimer doorpicktimer 3150
863            endif
864            if timer doorpicktimer >= 3150
865                dclick picks
866                wft 1000
867                target bapdoorpick
868                overhead "*picking*" 1060 bapdoorpick
869                getlabel backpack ping
870                settimer doorpicktimer 0
871            endif
872            if insysmsg "That is not locked"
873                warmode "off"
874                getlabel backpack ping
875                break
876            endif
877            if insysmsg "Target cannot be seen"
878                warmode "off"
879                getlabel backpack ping
880                break
881            endif
882            if insysmsg "You pick the lock!"
883                overhead "What lay beyond this door..." 87
884                dclick bapdoorpick
885                warmode "off"
886                getlabel backpack ping
887                break
888            endif
889            if not findtype 5373 backpack
890                overhead "Argh, it was my last pick..." 38
891                warmode "off"
892                getlabel backpack ping
893                break
894            endif
895            if not findtype "barred metal door" ground -1 -1 2
896                warmode "off"
897                getlabel backpack ping
898                break
899            endif
900            if not warmode 
901                break
902            endif
903            if insysmsg "You have worn out your tool"
904                overhead "This tool is worn out!" 805
905            endif
906            if not findtype 5373 backpack
907                break
908            endif
909            if timerexists frostshellswitch and timer frostshelltimer > 5000 and not cooldown "Aspect" and hp <= 35
910                say "[AspectArmor Frost"
911                getlabel backpack ping
912                if insysmsg "Your armor is already of that aspect"
913                    //donothing
914                else
915                    cooldown "Aspect" 30000
916                    overhead "--Frost Shell Primed--" 2234
917                endif
918                settimer frostshelltimer 0
919            endif
920            if not cooldown "Move" and not hidden and not cooldown "Hiding" and not cooldown "Stealth" and not cooldown "Stealing" and skill "Hiding" >= 80
921                skill "Hiding"
922                warmode on
923                getlabel backpack ping
924                if hidden
925                    getlabel backpack ping
926                    cooldown "Hiding" 10000
927                endif
928            endif
929            if not cooldown "Move" and findbuff "Invisibility" and not cooldown "Hiding" and not cooldown "Stealth" and not cooldown "Stealing" and skill "Hiding" >= 80
930                skill "Hiding"
931                warmode on
932                getlabel backpack ping
933                if hidden
934                    getlabel backpack ping
935                    cooldown "Hiding" 10000
936                    removetimer ots
937                endif
938            endif
939            if hidden and not cooldown "Hiding" and not cooldown "Stealth" and not timerexists ots and skill "Stealth" >= 80
940                skill "Stealth"
941                getlabel backpack ping
942                if not timerexists ots
943                    createtimer ots
944                endif
945            endif
946            if insysmsg "move quietly"
947                getlabel backpack ping
948                cooldown "Stealth" 10000
949            endif
950            if not cooldown "Move" and hidden and not cooldown "Hiding" and not cooldown "Stealth" and insysmsg "hide first" and skill "Hiding" >= 80
951                pause 1000
952                getlabel backpack ping
953                skill "Hiding"
954                getlabel backpack ping
955                if hidden
956                    getlabel backpack ping
957                    cooldown "Hiding" 10000
958                endif
959                removetimer ots
960            endif
961            if varexist "bwiz" and find "bwiz" backpack and find "bmain" self
962                if not targetexists and not casting and skill "Stealth" >= 80 and hidden and stam = maxstam
963                    while queued
964                        //donothing
965                    endwhile
966                    dclick "bwiz"
967                    while queued
968                        //donothing
969                    endwhile
970                    pause 30
971                    dclick "bmain"
972                    pause 500
973                    getlabel backpack ping
974                endif
975                if not targetexists and not casting and not findlayer self head and find "bmain" self
976                    while queued
977                        //donothing
978                    endwhile
979                    dclick "bmain"
980                    pause 500
981                    getlabel backpack ping
982                endif
983            endif
984            if varexist "bwiz" and find "bmain" self
985                if not targetexists and not casting and not find "bwiz" backpack
986                    while queued
987                        //donothing
988                    endwhile
989                    dclick "bmain"
990                    pause 500
991                    getlabel backpack ping
992                endif
993            endif
994        endfor
995     else 
996         overhead "I am out of lockpicks!" 38
997         warmode "off"
998         getlabel backpack ping
999     endif
1000endif
1001
1002if not timerexists lootvacuumswitch
1003    if gumpexists 1281623709
1004        gumpclose 1281623709
1005        createtimer lootvacuumswitch
1006        settimer lootvacuumswitch 15000
1007        overhead "--Loot Vacuum Enabled--" 2085
1008    endif
1009endif
1010if timerexists lootvacuumswitch
1011    if gumpexists 1281623709
1012        gumpclose 1281623709
1013        removetimer lootvacuumswitch
1014        overhead "--Loot Vacuum Disabled--" 1779
1015    endif
1016endif
1017while diffweight <= 0 and findtype "gold coin" backpack as dropgold
1018    if not hidden and stam <= 4 and findtype "Red Potion" backpack as redpot
1019        while queued
1020            //donothing
1021        endwhile
1022        dclick redpot
1023    endif
1024    overhead "My cup runneth over..." 1194
1025    if findtype 4225 backpack 0 as garbleather
1026        drop backpack
1027        lift garbleather 59999
1028        drop 0
1029        while queued
1030            //donothing
1031        endwhile
1032    endif
1033    drop backpack
1034    lift dropgold 444
1035    drop 0
1036    while queued
1037        //donothing
1038    endwhile
1039    settimer lootvacuumswitch 0
1040endwhile
1041if timerexists lootvacuumswitch
1042    if timer lootvacuumswitch >= 9000
1043        if not timerexists lootsensetimer
1044            createtimer lootsensetimer
1045            settimer lootsensetimer 1000
1046        endif
1047        if not findtype 4239|4240 ground -1 -1 2 and timer lootsensetimer >= 1000
1048            for 18
1049                while findtype 3827 ground 0 as zeroscroll
1050                    @ignore zeroscroll
1051                endwhile
1052                while findtype 7154 ground 0 as zeroingot
1053                    @ignore zeroingot
1054                endwhile
1055                while findtype 4225 ground 0 as zeroleather
1056                    @ignore zeroleather
1057                endwhile
1058                while findtype 7127 ground 0 as zeroboard
1059                    @ignore zeroboard
1060                endwhile
1061                while findtype 7154 ground 2419 as zeroingot
1062                    @ignore zeroingot
1063                endwhile
1064                while findtype 4225 ground 2419 as zeroleather
1065                    @ignore zeroleather
1066                endwhile
1067                while findtype 7127 ground 2419 as zeroboard
1068                    @ignore zeroboard
1069                endwhile
1070                while findtype 7154 ground 2406 as zeroingot
1071                    @ignore zeroingot
1072                endwhile
1073                while findtype 4225 ground 2406 as zeroleather
1074                    @ignore zeroleather
1075                endwhile
1076                while findtype 7127 ground 2406 as zeroboard
1077                    @ignore zeroboard
1078                endwhile
1079                while findtype 7154 ground 2413 as zeroingot
1080                    @ignore zeroingot
1081                endwhile
1082                while findtype 4225 ground 2413 as zeroleather
1083                    @ignore zeroleather
1084                endwhile
1085                while findtype 7127 ground 2413 as zeroboard
1086                    @ignore zeroboard
1087                endwhile
1088                while findtype 7154 ground 2418 as zeroingot
1089                    @ignore zeroingot
1090                endwhile
1091                while findtype 4225 ground 2418 as zeroleather
1092                    @ignore zeroleather
1093                endwhile
1094                while findtype 7127 ground 2418 as zeroboard
1095                    @ignore zeroboard
1096                endwhile
1097                while findtype 7154 ground 2213 as zeroingot  
1098                    @ignore zeroingot
1099                endwhile
1100                while findtype 4225 ground 2213 as zeroleather
1101                    @ignore zeroleather
1102                endwhile
1103                while findtype 7127 ground 2213 as zeroboard
1104                    @ignore zeroboard
1105                endwhile
1106                while findtype 22326 ground 2401 as badseed
1107                    @ignore badseed
1108                endwhile
1109                while findtype 22326 ground 2882 as badseed
1110                    @ignore badseed
1111                endwhile
1112                while findtype 22326 ground 2451 as badseed
1113                    @ignore badseed
1114                endwhile
1115                while findtype 22326 ground 63 as badseed
1116                    @ignore badseed
1117                endwhile
1118                if index > 0 and findtype "43206|54230|44985|glass display|20049|Pig Iron|blackrock fragment|gargish fragment|18705|55247|49482|53694|54570|53696|53876|50612|55420|53280|53473|54831|50278|49528|bottle set|entrail bucket|mounted stalaghorn|sea glass bulb|juggling daggers|st patricks cross|divination orb|mirror display|murder of crows|charmed cobra|prodigy fiddle|wilting rose belljar|scale of balance|screaming mandrake|statue of the siren|the final hour|55204|specimen jars|bird cage|widows grief|54684|27612|49223|54591|54601|54718|19948|58325|19959|19822|49730|49729|19944|19949|47613|47612|47611|47610|47611|3986|3966|cathedral tapestry|Darkscale tapestry|large painting|landscape painting|portrait painting|figurine|statue|20291|44987|49730|47107|18653|45127|20103|47103|29363|47105|29361|43453|5899|47109|45250|41509|43447|18657|4025|51308|45156|51304|45214|28769|28799|28803|28765|45211|45248|51259|45220|51328|45218|3842|51327|45222|45241|51336|11858|51375|45282|54722|45255|45246|28795|44983|45235|45251|45238|51258|51314|28761|45236|51260|54718|18400|58325|45252|18656|47111|3839|45239|45242|45254|45281|45247|42241|45216|28775|51321|3838|51318|5901|5905|45259|5903|48407|51302|4248|27611|15296|43166|5359|5981|4026|3985|25359|17686|3836|17087|5356|29030|24434|22336|29036|3843|29025|51098|29034|8826|51094|576|3827|22326|45315|3891|2539|39898|39896|39892|39918|39911|39916|39897|39905|39891|39917|39912|39909|39889|31047|31017|31049|31019|31055|31051|31053|31025|31027|31031|31041|54717|31021|31011|31023|31029|31043|31003|31035|31033|31045|31037|31002|20006|31169|31006|30999|31012|31009|30996|7109|7107|31128|31188|20014|31014|31004|31142|31001|31000|37181|31010|30998|31172|30988|30997|31038|31141|7947|20008|31005|31191|31008|31007|30994|30993|31182|30989|20012|31186|31178|31015|30991|20010|20016|31184|31190|30990|30995|31176|31180|30992|31130|5207|7031|7026|7034|7033|7027|7035|7029|5078|5063|5059|5105|5060|5138|5129|5201|5142|5143|5076|5106|7610|5139|5090|5103|5132|7177|5061|7181|7179|3920|5042|5127|5117|5185|5125|3938|5177|3937|5044|5121|3915|3909|3568|3932|5123|5144|5119|5056|5135|5187|5074|5089|3934|3913|3917|3721|5075|5046|5049|7170|5146|5205|5203|5115|5204|5040|5179|5070|5182|5085|5181|3719|7173|5131|3911|5101|7175|7169|3713|5112|22187|9917|3859|3862|3878|3865|3856|3873|3877|3834|3742|3762|3740|3763|10245|3572|3573|3571|3885|12686|19985|19981|19984|19982|19983|19991|19989|19986|19987|19988|19994|19995|19992|19993|19990|19980|19977|19976|19978|19979|43423|7154|4225|7127|3861" ground -1 -1 index as lootlocation
1119                    overhead "*loot*" 2091 lootlocation
1120                    @ignore lootlocation
1121                endif
1122                if warmode and findtype 4239|4240 ground -1 -1 2
1123                    break
1124                endif
1125            endfor
1126            @clearignore 
1127            settimer lootsensetimer 0
1128        endif
1129        while findtype 3827 ground 0 as zeroscroll
1130            @ignore zeroscroll
1131        endwhile
1132        while findtype 7154 ground 0 as zeroingot
1133            @ignore zeroingot
1134        endwhile
1135        while findtype 4225 ground 0 as zeroleather
1136            @ignore zeroleather
1137        endwhile
1138        while findtype 7127 ground 0 as zeroboard
1139            @ignore zeroboard
1140        endwhile
1141        while findtype 7154 ground 2419 as zeroingot
1142            @ignore zeroingot
1143        endwhile
1144        while findtype 4225 ground 2419 as zeroleather
1145            @ignore zeroleather
1146        endwhile
1147        while findtype 7127 ground 2419 as zeroboard
1148            @ignore zeroboard
1149        endwhile
1150        while findtype 7154 ground 2406 as zeroingot
1151            @ignore zeroingot
1152        endwhile
1153        while findtype 4225 ground 2406 as zeroleather
1154            @ignore zeroleather
1155        endwhile
1156        while findtype 7127 ground 2406 as zeroboard
1157            @ignore zeroboard
1158        endwhile
1159        while findtype 7154 ground 2413 as zeroingot
1160            @ignore zeroingot
1161        endwhile
1162        while findtype 4225 ground 2413 as zeroleather
1163            @ignore zeroleather
1164        endwhile
1165        while findtype 7127 ground 2413 as zeroboard
1166            @ignore zeroboard
1167        endwhile
1168        while findtype 7154 ground 2418 as zeroingot
1169            @ignore zeroingot
1170        endwhile
1171        while findtype 4225 ground 2418 as zeroleather
1172            @ignore zeroleather
1173        endwhile
1174        while findtype 7127 ground 2418 as zeroboard
1175            @ignore zeroboard
1176        endwhile
1177        while findtype 7154 ground 2213 as zeroingot  
1178            @ignore zeroingot
1179        endwhile
1180        while findtype 4225 ground 2213 as zeroleather
1181            @ignore zeroleather
1182        endwhile
1183        while findtype 7127 ground 2213 as zeroboard
1184            @ignore zeroboard
1185        endwhile
1186        while findtype 22326 ground 2401 as badseed
1187            @ignore badseed
1188        endwhile
1189        while findtype 22326 ground 2882 as badseed
1190            @ignore badseed
1191        endwhile
1192        while findtype 22326 ground 2451 as badseed
1193            @ignore badseed
1194        endwhile
1195        while findtype 22326 ground 63 as badseed
1196            @ignore badseed
1197        endwhile
1198        while not casting and not targetexists and findtype "43206|54230|44985|glass display|20049|Pig Iron|blackrock fragment|gargish fragment|18705|55247|49482|53694|54570|53696|53876|50612|55420|53280|53473|54831|50278|49528|bottle set|entrail bucket|mounted stalaghorn|sea glass bulb|juggling daggers|st patricks cross|divination orb|mirror display|murder of crows|charmed cobra|prodigy fiddle|wilting rose belljar|scale of balance|screaming mandrake|statue of the siren|the final hour|55204|specimen jars|bird cage|widows grief|54684|27612|49223|54591|54601|54718|19948|58325|19959|19822|49730|49729|19944|19949|47613|47612|47611|47610|47611|3986|3966|cathedral tapestry|Darkscale tapestry|large painting|landscape painting|portrait painting|figurine|statue|20291|44987|49730|47107|18653|45127|20103|47103|29363|47105|29361|43453|5899|47109|45250|41509|43447|18657|4025|51308|45156|51304|45214|28769|28799|28803|28765|45211|45248|51259|45220|51328|45218|3842|51327|45222|45241|51336|11858|51375|45282|54722|45255|45246|28795|44983|45235|45251|45238|51258|51314|28761|45236|51260|54718|18400|58325|45252|18656|47111|3839|45239|45242|45254|45281|45247|42241|45216|28775|51321|3838|51318|5901|5905|45259|5903|48407|51302|4248|27611|15296|43166|5359|5981|4026|3985|25359|17686|3836|17087|5356|29030|24434|22336|29036|3843|29025|51098|29034|8826|51094|576|3827|22326|45315|3891|2539|39898|39896|39892|39918|39911|39916|39897|39905|39891|39917|39912|39909|39889|31047|31017|31049|31019|31055|31051|31053|31025|31027|31031|31041|54717|31021|31011|31023|31029|31043|31003|31035|31033|31045|31037|31002|20006|31169|31006|30999|31012|31009|30996|7109|7107|31128|31188|20014|31014|31004|31142|31001|31000|37181|31010|30998|31172|30988|30997|31038|31141|7947|20008|31005|31191|31008|31007|30994|30993|31182|30989|20012|31186|31178|31015|30991|20010|20016|31184|31190|30990|30995|31176|31180|30992|31130|5207|7031|7026|7034|7033|7027|7035|7029|5078|5063|5059|5105|5060|5138|5129|5201|5142|5143|5076|5106|7610|5139|5090|5103|5132|7177|5061|7181|7179|3920|5042|5127|5117|5185|5125|3938|5177|3937|5044|5121|3915|3909|3568|3932|5123|5144|5119|5056|5135|5187|5074|5089|3934|3913|3917|3721|5075|5046|5049|7170|5146|5205|5203|5115|5204|5040|5179|5070|5182|5085|5181|3719|7173|5131|3911|5101|7175|7169|3713|5112|22187|9917|3859|3862|3878|3865|3856|3873|3877|3834|3742|3762|3740|3763|10245|3572|3573|3571|3885|12686|19985|19981|19984|19982|19983|19991|19989|19986|19987|19988|19994|19995|19992|19993|19990|19980|19977|19976|19978|19979|43423|7154|4225|7127|3861" ground -1 -1 2 as eatloot
1199            hotkey 'Grab Item' 
1200            target eatloot
1201            if insysmsg "Invalid or inaccessible item."
1202                @ignore eatloot
1203            endif            
1204            while queued
1205                //donothing
1206            endwhile 
1207        endwhile
1208    endif
1209endif
1210
1211if findtype 5912 self and not varexist "bwiz" and findlayer self head as regularhat
1212    getlabel regularhat desc
1213    if "magical" in desc
1214        dclick regularhat
1215        pause 500
1216        getlabel backpack ping
1217        replay
1218    endif
1219endif
1220if not find "bwiz" self and findtype 5912 backpack as wizhat
1221    getlabel wizhat desc
1222    if "restyled" in desc
1223        @ignore wizhat
1224        replay
1225    elseif "armored" in desc
1226        @setvar "bwiz" wizhat
1227    elseif "magical" in desc
1228        @setvar "bwiz" wizhat
1229        @setvar "nonaspectedwiz" wizhat
1230    endif
1231endif
1232if varexist "bwiz" and find "bwiz" backpack
1233    if not find "bmain" self and findlayer self head as hat
1234        @setvar "bmain" hat
1235    endif
1236    if not varexist "bmain"
1237        overhead "I need a primary hat or helm to wear.." 88
1238        pause 2000
1239        overhead "Anything will do, just not a magical wizard hat..." 88
1240        stop
1241    endif
1242endif
1243
1244if varexist "bwiz" and find "bwiz" backpack and find "bmain" self
1245    if not targetexists and not casting and skill "Stealth" >= 80 and hidden and stam = maxstam
1246        while queued
1247            //donothing
1248        endwhile
1249        dclick "bwiz"
1250        while queued
1251            //donothing
1252        endwhile
1253        pause 30
1254        dclick "bmain"
1255        pause 500
1256        getlabel backpack ping
1257    endif
1258    if not targetexists and not casting and not findlayer self head and find "bmain" self
1259        while queued
1260            //donothing
1261        endwhile
1262        dclick "bmain"
1263        pause 500
1264        getlabel backpack ping
1265    endif
1266endif
1267if varexist "bwiz" and find "bmain" self
1268    if not targetexists and not casting and not find "bwiz" backpack
1269        while queued
1270            //donothing
1271        endwhile
1272        dclick "bmain"
1273        pause 500
1274        getlabel backpack ping
1275    endif
1276endif
1277
1278if dead 
1279    overhead "I need a new body..." 88
1280    stop
1281endif
1282loop