Back to "background" 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 Arc Trapper and Summoner Trapper
5#
6# Update: March 2 2025 loot list + misc
7# 
8# Keep this script playing at all times
9# If you use another script, such as "BOOM BOOM by Bapeth"
10# Loop this background script at the end of your other script(s)
11#
12# "Required Cooldowns"
13#
14# "Move" Cooldown should be set to "0.3 seconds"
15# "Bandage" cooldown can be blank - Script assumes 3 points in "Self Treatment"
16#
17# "What it does"
18#
19# Bandage
20# Cure
21# Cleansing Brew (only while in warmode)
22# Warn when str/resist/reflect/reactive are needed
23# Shield Codex - Shield bash, Warding, Bulwark
24# Note on Bullwark : "BOOM BOOM" hotkey script required to activate auto-bullwark
25#
26# "Time Sense Container Search"
27# Enable this option to display and loot containers in "Time Dungeon"
28# The "Time Codex" acts like a switch to turn this setting on/off, open your codex while the script is playing to activate switch
29# Stop the script if you need to interact with the Time Codex normally
30#
31# "Auto Switch Flipper"
32# This is for green wall switches in "Time Dungeon" - Requires "Time Sense to be turned on"
33# Go into warmode when standing near a wall switch and the script will flip the switch and return to peacemode
34#
35# "Auto-Recycler"
36# This feature will auto recycle bad items and keep the good ones - To use this feature:
37# 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)
38# The recycle will happen when the player begins picking a fresh chest (Double Click Scissors to activate auto recycle manually)
39#
40# "Loot-Sense & Vacuum Mode"
41# This function will overhead display *loot* above items on the ground and pick them up as you pass by (2 tiles)
42# Be aware that this may make you overweight from large gold piles from time to time
43# To toggle this feature on/off (default is off) "Double click a Wizard Grimoire"
44#
45# "Gold Sacker"
46# To toggle this feature on/off and set a new sack bag open the "Atlas" while the script it playing
47# This feature will set a ground bag to drop gold into
48# Check out another script by Bapeth called "Bapeths Object Drag & Dropper" searchable on Jases site - This will help you move heavy bags
49#
50# Script starts here...
51
52if skill "Arcane" >= 80 and not casting and not targetexists and not cooldown "Move"
53    if timerexists baptrapcombat
54        if timer baptrapcombat <= 2000
55            clearsysmsg 
56            if not varexist "currentbaptarget"
57                hotkey 'Target Closest Grey Monster'
58                if insysmsg "No one matching"
59                    //donothing
60                else
61                    @setvar "currentbaptarget" lasttarget 
62                endif
63                hotkey "Cancel Current Target"
64            elseif not find "currentbaptarget" ground -1 -1 8
65                hotkey 'Target Closest Grey Monster'
66                if insysmsg "No one matching"
67                    //donothing
68                else
69                    @setvar "currentbaptarget" lasttarget 
70                endif
71                hotkey "Cancel Current Target"
72            elseif find "currentbaptarget" ground -1 -1 8
73                if not timerexists usearcaneability
74                    createtimer usearcaneability
75                    settimer usearcaneability 31000
76                elseif timer usearcaneability >= 31000
77                    settimer usearcaneability 0
78                    say "[WeaponAbility3"
79                endif
80                attack "currentbaptarget"
81            endif
82        endif
83    endif
84endif
85if insysmsg "100%"
86    settimer usearcaneability 0
87endif
88
89if skill "Parrying" >= 80 and mana >= 6
90    if not timerexists checkshieldcodex
91        createtimer checkshieldcodex
92        settimer checkshieldcodex 13000
93        elseif timer checkshieldcodex >= 13000
94        settimer checkshieldcodex 0
95        if findtype "shield codex" backpack as scodex
96            getlabel scodex desc
97            if "Shield Bash" in desc
98                overhead "--Shield Bash Active--" 2490
99            elseif "Warding" in desc
100                overhead "--Warding Active--" 2087
101                if not findbuff "Bleed" and not findbuff "Diseased"
102                    say "[ShieldsStance1" 45
103                    getlabel backpack ping
104                    say "[ShieldsFinisher1" 45
105                endif
106            elseif "Testudo" in desc
107                overhead "--Testudo Active--" 2503
108            elseif "Mirror" in desc
109                overhead "--Mirror Active--" 2615
110            elseif "Bulwark" in desc
111                overhead "--Bulwark Active--" 2767
112            else 
113                overhead "No Stance Active" 45
114                overhead "Defaulting to Shield Bash" 45
115                say "[ShieldsStance1"
116            endif
117        endif
118    endif
119    if not timerexists bleedbuffcheck and findbuff "Bleed" and not findbuff "Diseased"
120        removetimer bullwarkactive
121        createtimer bleedbuffcheck
122        say "[ShieldsStance2" 45
123        getlabel backpack ping
124        say "[ShieldsFinisher2" 45
125    elseif timerexists bleedbuffcheck and not findbuff "Bleed" and not findbuff "Diseased"
126        removetimer bleedbuffcheck
127        pause 800
128        getlabel backpack ping
129        say "[ShieldsStance1" 45
130        getlabel backpack ping
131        say "[ShieldsFinisher1" 45
132    endif
133    if not timerexists diseasebuffcheck and findbuff "Diseased" and not findbuff "Bleed"
134        removetimer bullwarkactive
135        createtimer diseasebuffcheck
136        say "[ShieldsStance2" 45
137        getlabel backpack ping
138        say "[ShieldsFinisher2" 45
139    elseif timerexists diseasebuffcheck and not findbuff "Diseased" and not findbuff "Bleed"
140        removetimer diseasebuffcheck
141        pause 800
142        getlabel backpack ping
143        say "[ShieldsStance1" 45
144        getlabel backpack ping
145        say "[ShieldsFinisher1" 45
146    endif
147    if timerexists baptrapcombat
148        if not findbuff "Diseased" and not findbuff "Bleed" and not timerexists defaultstance and timer baptrapcombat <= 10000
149            if not timerexists "bullwarktime"
150                createtimer bullwarktime
151            endif    
152            if cooldown "Move"
153                settimer bullwarktime 0
154            endif
155            if not timerexists bullwarkactive and timer bullwarktime >= 3000
156                say "[ShieldsStance5" 45
157                createtimer bullwarkactive
158            endif
159        endif
160    endif
161    if cooldown "Move"
162        settimer bullwarktime 0
163    endif
164    if timerexists bullwarkactive
165        if timer bullwarktime < 3000
166            say "[ShieldsStance1" 45
167            removetimer bullwarkactive
168        endif
169    endif
170endif
171
172if skill "Arcane" >= 80 and not gumpexists 3954121934
173    say '[abilityhotbar'
174    waitforgump 3954121934 500
175endif
176
177if not timerexists frostshelltimer
178    createtimer frostshelltimer
179    settimer frostshelltimer 5000
180endif
181if timerexists frostshellswitch and timer frostshelltimer > 5000 and not cooldown "Aspect" and hp <= 35
182    say "[AspectArmor Frost"
183    getlabel backpack ping
184    if insysmsg "Your armor is already of that aspect"
185        //donothing
186    else
187        cooldown "Aspect" 30000
188        overhead "--Frost Shell Primed--" 2234
189    endif
190    settimer frostshelltimer 0
191endif
192
193if not timerexists frostshellswitch
194    if gumpexists 3527489586
195        gumpclose 3527489586
196        createtimer frostshellswitch
197        overhead "--Auto Shell Enabled--" 2085
198    endif
199endif
200if timerexists frostshellswitch
201    if gumpexists 3527489586
202        gumpclose 3527489586
203        removetimer frostshellswitch
204        overhead "--Auto Shell Disabled--" 1779
205    endif
206endif
207
208if not timerexists goldsacker
209    if gumpexists 341416395
210        gumpclose 341416395
211        createtimer goldsacker
212        overhead "--Gold Sacker Enabled--" 2085
213        hotkey "Set Last Target"
214        wft 500
215        overhead "Target Gold Drop Bag" 88
216        while targetexists 
217            //donothing
218        endwhile
219        @setvar "bgoldbag" lasttarget 
220        overhead "Gold Drop Bag Set" 78
221    endif
222elseif timerexists goldsacker
223    if gumpexists 341416395
224        gumpclose 341416395
225        removetimer goldsacker
226        overhead "--Gold Sacker Disabled--" 1779
227    endif
228endif
229if not timerexists sacktracker
230    createtimer sacktracker
231    settimer sacktracker 5000
232elseif timer sacktracker >= 5000 and find "bgoldbag" ground
233    overhead "*gold sack*" 2843 "bgoldbag"
234    settimer sacktracker 0
235endif
236if find "bgoldbag" ground -1 -1 2
237    while findtype "gold coin" backpack as fatcoins
238        while queued
239            //donothing
240        endwhile
241        drop backpack
242        lift fatcoins 60000
243        drop bgoldbag -1 -1
244        pause 500
245        getlabel backpack ping
246    endwhile
247endif
248
249if 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  
250    if noto sum1 = "friend"
251        # Name your summon if you like (no spaces must be unique)
252        rename sum1 "Bapith"
253    endif
254elseif not find "bsummon1" ground and findtype "Bapith" ground as sum1
255    @setvar "bsummon1" sum1
256endif
257if 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  
258    if noto sum2 = "friend"
259        # Name your summon if you like (no spaces must be unique)
260        rename sum2 "Bapath"
261    endif
262elseif not find "bsummon2" gorund and findtype "Bapath" ground as sum2
263    @setvar "bsummon2" sum2
264endif
265
266if 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
267    if noto csum = "friend"
268        # Name your summon if you like (no spaces must be unique)
269        rename csum "Bapesh"
270    endif
271endif
272
273if not timerexists bapactive
274    createtimer bapactive
275    settimer bapactive 5000
276elseif timer bapactive >= 5000
277    overhead "Boom time..." 78
278    settimer bapactive 0
279endif
280
281if not timerexists rptimer
282    createtimer rptimer
283    settimer rptimer 1200
284endif
285
286if not find "placedtrap" ground and findtype 51163 ground -1 -1 8 as smokingtrap
287    @setvar "placedtrap" smokingtrap
288endif
289
290if not timerexists armedtimer
291    createtimer armedtimer
292    settimer armedtimer 3000
293endif
294if find "placedtrap" ground -1 -1 8 as smokingtrap and timer armedtimer >= 1500
295    overhead "*Armed*" 38 smokingtrap
296    settimer armedtimer 0
297elseif find "placedtrap" ground as smokingtrap and timer armedtimer >= 1500
298    overhead "*Too Far*" 45 smokingtrap
299    settimer armedtimer 0
300endif
301
302if skill "healing" >= 20 and not casting and not targetexists 
303    if hp = maxhp
304        //donothing
305    elseif not bandaging and findtype 3617 backpack
306        hotkey "Bandage Self"
307        cooldown "Bandage" 7000
308    endif
309endif
310
311if skill "Magery" >= 80
312    if timerexists reflect and not findbuff "Magic Reflection"
313        if timer reflect > 30000
314            overhead "--Cast Reflect--" 2122
315            settimer reflect 12000
316        endif
317    endif
318    if findbuff "Magic Reflection" and timerexists reflect
319        removetimer reflect
320    endif
321    if not findbuff "Magic Reflection" and not timerexists reflect
322        createtimer reflect
323    endif
324endif
325if skill "Magery" >= 20
326    if timerexists reactive and not findbuff "Reactive Armor"
327        if timer reactive > 30000
328            overhead "--Cast Reactive--" 2122
329            settimer reactive 13500
330        endif
331    endif
332    if findbuff "Reactive Armor" and timerexists reactive
333        removetimer reactive
334    endif
335    if not findbuff "Reactive Armor" and not timerexists reactive
336        createtimer reactive
337    endif
338endif
339if skill "Magery" >= 40
340    if timerexists protection and not findbuff "Protection"
341        if timer protection > 30000
342            overhead "--Cast Protection--" 2122
343            settimer protection 9000
344        endif
345    endif
346    if findbuff "Protection" and timerexists protection
347        removetimer protection
348    endif
349    if not findbuff "Protection" and not timerexists protection
350        createtimer protection
351    endif
352endif
353if warmode and not hidden and not timerexists brew and not targetexists and findbuff "Bleed" and findtype 50675 backpack as cbrew
354    clearsysmsg 
355    while queued
356        //donothing
357    endwhile
358    dclick cbrew
359    getlabel backpack ping
360    if insysmsg "You drink a cleansing brew"
361        createtimer brew
362    endif
363elseif warmode and not hidden and not timerexists brew and not targetexists and findbuff "Diseased" and findtype 50675 backpack as cbrew
364    while queued
365        //donothing
366    endwhile
367    dclick cbrew
368    getlabel backpack ping
369    if insysmsg "You drink a cleansing brew"
370        createtimer brew
371    endif
372endif
373if timerexists brew
374    if timer brew >= 120000
375        removetimer brew
376    endif
377endif
378if not hidden and not casting and findbuff "Weaken" and not targetexists and findtype "White Potion" backpack as stpot
379    while queued
380        //donothing
381    endwhile
382    dclick stpot
383endif
384if not timerexists topupstr
385    createtimer topupstr
386    settimer topupstr 30000
387elseif timer topupstr >= 30000 and not hidden and not casting and str = 100 and findtype "White Potion" backpack as stpot
388    while queued
389        //donothing
390    endwhile
391    overhead "--Drink Strength--" 2041
392    settimer topupstr 0
393endif
394if not timerexists topupres
395    createtimer topupres
396    settimer topupres 30000
397elseif timer topupres >= 30000 and not hidden and not casting and not findbuff "Magic Resist Potion" and findtype "Black Potion" backpack as respot
398    while queued
399        //donothing
400    endwhile
401    overhead "--Drink Resist--" 2031
402    settimer topupres 0
403endif
404if not targetexists and not hidden and not casting and stam <= 4 and findtype "Red Potion" backpack as redpot
405    while queued
406        //donothing
407    endwhile
408    dclick redpot
409endif
410if not hidden and paralyzed and not targetexists and findtype "pouch" backpack 38
411    say "[Pouch"
412endif
413if not hidden and not casting and poisoned and not targetexists and findtype "Orange Potion" backpack as curepot
414    while queued
415        //donothing
416    endwhile
417    dclick curepot
418endif
419
420if insysmsg "What should I use these scissors on?" and findtype "sewing kit|saw|pen and ink|tongs|tool kit" backpack as breakdowntool
421    hotkey "Cancel Current Target"
422    if not find "ContainerIDWand" and findtype 20495 backpack as contIDwand
423        @setvar "ContainerIDWand" contIDwand
424    endif
425    if find "ContainerIDWand" backpack
426        clearsysmsg 
427        while queued
428            //donothing
429        endwhile
430        dclick "ContainerIDWand"
431        wft 500
432        overhead "Select Container to ID..." 88
433        while targetexists 
434            //donothing
435        endwhile
436        getlabel backpack ping
437        overhead "Attempting recycle..." 88
438        if insysmsg "No unidentified items found."
439            overhead "Nothing fresh to ID..." 45
440        elseif insysmsg "That is not a container." 
441            overhead "Invalid container, try again.." 45
442        endif
443        if findtype 3834 backpack 0 as bbook
444            @ignore bbook
445        endif
446        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
447            getlabel IDitem desc
448            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
449                @ignore IDitem
450                overhead "*strong magic*" 2091 IDitem
451            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
452                overhead "*trash*" 1779 IDitem
453                while not gumpexists 949095101
454                    while queued
455                        //donothing
456                    endwhile
457                    dclick breakdowntool
458                    waitforgump 949095101 1000
459                endwhile
460                while not ingump "Recycle Single Item" 949095101
461                    gumpresponse 2
462                    waitforgump 949095101 1000
463                endwhile                                
464                gumpresponse 3
465                waitforgump 949095101 1000
466                target IDitem
467                getlabel backpack ping
468                pause 250
469                gumpclose 949095101
470            else
471                @ignore IDitem
472            endif
473            if not find "ContainerIDWand" backpack
474                break
475            endif
476        endwhile
477        if gumpexists 949095101
478            gumpclose 949095101
479        endif
480    else
481        overhead "No Container ID Wand..." 38
482    endif
483    if targetexists 
484        hotkey "Cancel Current Target"
485    endif
486    overhead "Recycle Complete." 88
487endif
488
489if not timerexists timesenseswitch
490    if gumpexists 3352257441
491        gumpclose 3352257441
492        createtimer timesenseswitch
493        overhead "--Time Sense Enabled--" 88
494    endif
495endif
496if timerexists timesenseswitch
497    if gumpexists 3352257441
498        gumpclose 3352257441
499        removetimer timesenseswitch
500        overhead "--Time Sense Disabled--" 38
501    endif
502endif
503if timerexists timesenseswitch and not targetexists and not casting
504    if not timerexists bappykeytimer
505        createtimer bappykeytimer
506        settimer bappykeytimer 5500
507    elseif timer bappykeytimer >= 5500 and findtype "4112" backpack as bappykey
508        overhead "*key*" 78 bappykey
509        settimer bappykeytimer 0
510    endif
511    if not timerexists timesensecontainer
512        createtimer timesensecontainer
513        settimer timesensecontainer 1000
514    endif
515    if not findtype 4239|4240 ground -1 -1 2 and timer timesensecontainer >= 1000
516        for 18
517            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
518                getlabel dungeonfloorcontainers desc
519                overhead "*search*" 88 dungeonfloorcontainers
520                @ignore dungeonfloorcontainers
521            endif
522            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
523                break
524            endif
525            if warmode and findtype "barred metal door|metal door|iron gate" ground -1 -1 2
526                break
527            endif
528            if warmode and findtype 4239|4240 ground -1 -1 2
529                break
530            endif
531            if varexist "bwiz" and find "bwiz" backpack and find "bmain" self
532                if not targetexists and not casting and skill "Stealth" >= 80 and hidden and stam = maxstam
533                    while queued
534                        //donothing
535                    endwhile
536                    dclick "bwiz"
537                    while queued
538                        //donothing
539                    endwhile
540                    pause 30
541                    dclick "bmain"
542                    pause 500
543                    getlabel backpack ping
544                endif
545                if not targetexists and not casting and not findlayer self head and find "bmain" self
546                    while queued
547                        //donothing
548                    endwhile
549                    dclick "bmain"
550                    pause 500
551                    getlabel backpack ping
552                endif
553            endif
554            if varexist "bwiz" and find "bmain" self
555                if not targetexists and not casting and not find "bwiz" backpack
556                    while queued
557                        //donothing
558                    endwhile
559                    dclick "bmain"
560                    pause 500
561                    getlabel backpack ping
562                endif
563            endif
564        endfor
565        @clearignore
566        settimer timesensecontainer 0
567    endif
568    if not timerexists switchandstufftimer
569        createtimer switchandstufftimer
570        settimer switchandstufftimer 1000
571    endif
572    if timer switchandstufftimer >= 1000
573        for 18
574            if index > 0 and findtype 4239|4240  ground -1 -1 index as switchandstuff
575                getlabel switchandstuff desc
576                overhead "*switch*" 78 switchandstuff
577                @ignore switchandstuff
578            endif
579            if warmode and findtype 4239|4240 ground -1 -1 2
580                break
581            endif 
582        endfor
583        @clearignore
584        settimer switchandstufftimer 0
585    endif
586    if warmode and findtype 4239|4240 ground -1 -1 2 as timewallswitch
587        dclick timewallswitch
588        warmode off
589        getlabel backpack ping
590    endif
591    @clearignore 
592    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
593        if warmode and findtype 4239|4240 ground -1 -1 2
594            break
595        endif
596        if varexist "bwiz" and find "bwiz" backpack and find "bmain" self
597            if not targetexists and not casting and skill "Stealth" >= 80 and hidden and stam = maxstam
598                while queued
599                    //donothing
600                endwhile
601                dclick "bwiz"
602                while queued
603                    //donothing
604                endwhile
605                pause 30
606                dclick "bmain"
607                pause 500
608                getlabel backpack ping
609            endif
610            if not targetexists and not casting and not findlayer self head and find "bmain" self
611                while queued
612                    //donothing
613                endwhile
614                dclick "bmain"
615                pause 500
616                getlabel backpack ping
617            endif
618        endif
619        if varexist "bwiz" and find "bmain" self
620            if not targetexists and not casting and not find "bwiz" backpack
621                while queued
622                    //donothing
623                endwhile
624                dclick "bmain"
625                pause 500
626                getlabel backpack ping
627            endif
628        endif        
629        @setvar "bapcontaineroftime" timecontainer
630        while queued
631            //donothing
632        endwhile
633        getlabel timecontainer desc
634        if "the remains of" in desc
635            overhead "*avatar corpse*" 45 timecontainer
636        else
637            dclick timecontainer
638            pause 500
639            getlabel backpack ping
640            if gumpexists 736038070
641                @ignore timecontainer
642                gumpclose 736038070
643            endif
644# This seems to have been broken by Tranq in the last update - check again later to see if it gets fixed
645#            @ignore timecontainer
646#            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
647#                while queued
648#                    //donothing
649#                endwhile
650#                dclick innercontainer
651#                pause 500
652#                getlabel backpack ping
653#                @ignore innercontainer
654#            endwhile
655#            @unignore timecontainer
656        endif
657        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
658            getlabel checkunid desc
659            if "unidentified" in desc
660                hotkey 'Grab Item' 
661                target checkunid
662                overhead "*looting*" 2091 timecontainer
663                if insysmsg "Invalid or inaccessible item."
664                    @ignore checkunid
665                endif
666                while queued
667                    //donothing
668                endwhile
669            else 
670                @ignore checkunid
671            endif
672            if insysmsg "That container cannot hold more weight."
673                break
674            endif
675            if not find "bapcontaineroftime" ground -1 -1 2
676                break
677            endif
678            if varexist "bwiz" and find "bwiz" backpack and find "bmain" self
679                if not targetexists and not casting and skill "Stealth" >= 80 and hidden and stam = maxstam
680                    while queued
681                        //donothing
682                    endwhile
683                    dclick "bwiz"
684                    while queued
685                        //donothing
686                    endwhile
687                    pause 30
688                    dclick "bmain"
689                    pause 500
690                    getlabel backpack ping
691                endif
692                if not targetexists and not casting and not findlayer self head and find "bmain" self
693                    while queued
694                        //donothing
695                    endwhile
696                    dclick "bmain"
697                    pause 500
698                    getlabel backpack ping
699                endif
700            endif
701            if varexist "bwiz" and find "bmain" self
702                if not targetexists and not casting and not find "bwiz" backpack
703                    while queued
704                        //donothing
705                    endwhile
706                    dclick "bmain"
707                    pause 500
708                    getlabel backpack ping
709                endif
710            endif
711        endwhile
712        while findtype 3827 timecontainer 0 as zeroscroll
713            @ignore zeroscroll
714        endwhile
715        while findtype 7154 timecontainer 0 as zeroingot
716            @ignore zeroingot
717        endwhile
718        while findtype 4225 timecontainer 0 as zeroleather
719            @ignore zeroleather
720        endwhile
721        while findtype 7127 timecontainer 0 as zeroboard
722            @ignore zeroboard
723        endwhile
724        while findtype 7154 timecontainer 2419 as zeroingot
725            @ignore zeroingot
726        endwhile
727        while findtype 4225 timecontainer 2419 as zeroleather
728            @ignore zeroleather
729        endwhile
730        while findtype 7127 timecontainer 2419 as zeroboard
731            @ignore zeroboard
732        endwhile
733        while findtype 7154 timecontainer 2406 as zeroingot
734            @ignore zeroingot
735        endwhile
736        while findtype 4225 timecontainer 2406 as zeroleather
737            @ignore zeroleather
738        endwhile
739        while findtype 7127 timecontainer 2406 as zeroboard
740            @ignore zeroboard
741        endwhile
742        while findtype 7154 timecontainer 2413 as zeroingot
743            @ignore zeroingot
744        endwhile
745        while findtype 4225 timecontainer 2413 as zeroleather
746            @ignore zeroleather
747        endwhile
748        while findtype 7127 timecontainer 2413 as zeroboard
749            @ignore zeroboard
750        endwhile
751        while findtype 7154 timecontainer 2418 as zeroingot
752            @ignore zeroingot
753        endwhile
754        while findtype 4225 timecontainer 2418 as zeroleather
755            @ignore zeroleather
756        endwhile
757        while findtype 7127 timecontainer 2418 as zeroboard
758            @ignore zeroboard
759        endwhile
760        while findtype 7154 timecontainer 2213 as zeroingot  
761            @ignore zeroingot
762        endwhile
763        while findtype 4225 timecontainer 2213 as zeroleather
764            @ignore zeroleather
765        endwhile
766        while findtype 7127 timecontainer 2213 as zeroboard
767            @ignore zeroboard
768        endwhile
769        while findtype 22326 timecontainer 2401 as badseed
770            @ignore badseed
771        endwhile
772        while findtype 22326 timecontainer 2882 as badseed
773            @ignore badseed
774        endwhile
775        while findtype 22326 timecontainer 2451 as badseed
776            @ignore badseed
777        endwhile
778        while findtype 22326 timecontainer 63 as badseed
779            @ignore badseed
780        endwhile
781        while findtype 5901|5899|5903|5905 timecontainer as timefootwear
782            getlabel timefootwear desc
783            if "(hue" in desc
784                break
785            else 
786                @ignore timefootwear
787            endif
788        endwhile
789        while findtype "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
790            hotkey 'Grab Item' 
791            target bitem
792            overhead "*looting*" 2091 timecontainer
793            if insysmsg "Invalid or inaccessible item."
794                @ignore bitem
795            endif
796            while queued
797                //donothing
798            endwhile
799            if insysmsg "That container cannot hold more weight."
800                break
801            endif
802            if not find "bapcontaineroftime" ground -1 -1 2
803                break
804            endif
805            if varexist "bwiz" and find "bwiz" backpack and find "bmain" self
806                if not targetexists and not casting and skill "Stealth" >= 80 and hidden and stam = maxstam
807                    while queued
808                        //donothing
809                    endwhile
810                    dclick "bwiz"
811                    while queued
812                        //donothing
813                    endwhile
814                    pause 30
815                    dclick "bmain"
816                    pause 500
817                    getlabel backpack ping
818                endif
819                if not targetexists and not casting and not findlayer self head and find "bmain" self
820                    while queued
821                        //donothing
822                    endwhile
823                    dclick "bmain"
824                    pause 500
825                    getlabel backpack ping
826                endif
827            endif
828            if varexist "bwiz" and find "bmain" self
829                if not targetexists and not casting and not find "bwiz" backpack
830                    while queued
831                        //donothing
832                    endwhile
833                    dclick "bmain"
834                    pause 500
835                    getlabel backpack ping
836                endif
837            endif
838        endwhile
839        @ignore timecontainer
840    endwhile
841endif
842if skill "Lockpicking" >= 20 and timerexists timesenseswitch and warmode and findtype "barred metal door|metal door|iron gate" ground -1 -1 2
843    if findtype 5373 backpack as picks
844        clearsysmsg 
845        overhead "Which door shall I pick?" 88
846        hotkey "Set Last Target"
847        wft 1000
848        while targetexists 
849            if not findtype "barred metal door|metal door|iron gate" ground -1 -1 2
850                break
851            endif
852        endwhile
853        @setvar "bapdoorpick" lasttarget 
854        overhead "Time is of the essence..." 88
855        for 2000
856            if not timerexists doorpicktimer
857                createtimer doorpicktimer
858                settimer doorpicktimer 3150
859            endif
860            if timer doorpicktimer >= 3150
861                dclick picks
862                wft 1000
863                target bapdoorpick
864                overhead "*picking*" 1060 bapdoorpick
865                getlabel backpack ping
866                settimer doorpicktimer 0
867            endif
868            if insysmsg "That is not locked"
869                warmode "off"
870                getlabel backpack ping
871                break
872            endif
873            if insysmsg "Target cannot be seen"
874                warmode "off"
875                getlabel backpack ping
876                break
877            endif
878            if insysmsg "You pick the lock!"
879                overhead "What lay beyond this door..." 87
880                dclick bapdoorpick
881                warmode "off"
882                getlabel backpack ping
883                break
884            endif
885            if not findtype 5373 backpack
886                overhead "Argh, it was my last pick..." 38
887                warmode "off"
888                getlabel backpack ping
889                break
890            endif
891            if not findtype "barred metal door" ground -1 -1 2
892                warmode "off"
893                getlabel backpack ping
894                break
895            endif
896            if not warmode 
897                break
898            endif
899            if insysmsg "You have worn out your tool"
900                overhead "This tool is worn out!" 805
901            endif
902            if not findtype 5373 backpack
903                break
904            endif
905            if timerexists frostshellswitch and timer frostshelltimer > 5000 and not cooldown "Aspect" and hp <= 35
906                say "[AspectArmor Frost"
907                getlabel backpack ping
908                if insysmsg "Your armor is already of that aspect"
909                    //donothing
910                else
911                    cooldown "Aspect" 30000
912                    overhead "--Frost Shell Primed--" 2234
913                endif
914                settimer frostshelltimer 0
915            endif
916            if not cooldown "Move" and not hidden and not cooldown "Hiding" and not cooldown "Stealth" and not cooldown "Stealing" and skill "Hiding" >= 80
917                skill "Hiding"
918                warmode on
919                getlabel backpack ping
920                if hidden
921                    getlabel backpack ping
922                    cooldown "Hiding" 10000
923                endif
924            endif
925            if not cooldown "Move" and findbuff "Invisibility" and not cooldown "Hiding" and not cooldown "Stealth" and not cooldown "Stealing" and skill "Hiding" >= 80
926                skill "Hiding"
927                warmode on
928                getlabel backpack ping
929                if hidden
930                    getlabel backpack ping
931                    cooldown "Hiding" 10000
932                    removetimer ots
933                endif
934            endif
935            if hidden and not cooldown "Hiding" and not cooldown "Stealth" and not timerexists ots and skill "Stealth" >= 80
936                skill "Stealth"
937                getlabel backpack ping
938                if not timerexists ots
939                    createtimer ots
940                endif
941            endif
942            if insysmsg "move quietly"
943                getlabel backpack ping
944                cooldown "Stealth" 10000
945            endif
946            if not cooldown "Move" and hidden and not cooldown "Hiding" and not cooldown "Stealth" and insysmsg "hide first" and skill "Hiding" >= 80
947                pause 1000
948                getlabel backpack ping
949                skill "Hiding"
950                getlabel backpack ping
951                if hidden
952                    getlabel backpack ping
953                    cooldown "Hiding" 10000
954                endif
955                removetimer ots
956            endif
957            if varexist "bwiz" and find "bwiz" backpack and find "bmain" self
958                if not targetexists and not casting and skill "Stealth" >= 80 and hidden and stam = maxstam
959                    while queued
960                        //donothing
961                    endwhile
962                    dclick "bwiz"
963                    while queued
964                        //donothing
965                    endwhile
966                    pause 30
967                    dclick "bmain"
968                    pause 500
969                    getlabel backpack ping
970                endif
971                if not targetexists and not casting and not findlayer self head and find "bmain" self
972                    while queued
973                        //donothing
974                    endwhile
975                    dclick "bmain"
976                    pause 500
977                    getlabel backpack ping
978                endif
979            endif
980            if varexist "bwiz" and find "bmain" self
981                if not targetexists and not casting and not find "bwiz" backpack
982                    while queued
983                        //donothing
984                    endwhile
985                    dclick "bmain"
986                    pause 500
987                    getlabel backpack ping
988                endif
989            endif
990        endfor
991     else 
992         overhead "I am out of lockpicks!" 38
993         warmode "off"
994         getlabel backpack ping
995     endif
996endif
997
998if not timerexists lootvacuumswitch
999    if gumpexists 1281623709
1000        gumpclose 1281623709
1001        createtimer lootvacuumswitch
1002        settimer lootvacuumswitch 15000
1003        overhead "--Loot Vacuum Enabled--" 2085
1004    endif
1005endif
1006if timerexists lootvacuumswitch
1007    if gumpexists 1281623709
1008        gumpclose 1281623709
1009        removetimer lootvacuumswitch
1010        overhead "--Loot Vacuum Disabled--" 1779
1011    endif
1012endif
1013while diffweight <= 0 and findtype "gold coin" backpack as dropgold
1014    if not hidden and stam <= 4 and findtype "Red Potion" backpack as redpot
1015        while queued
1016            //donothing
1017        endwhile
1018        dclick redpot
1019    endif
1020    overhead "My cup runneth over..." 1194
1021    if findtype 4225 backpack 0 as garbleather
1022        drop backpack
1023        lift garbleather 59999
1024        drop 0
1025        while queued
1026            //donothing
1027        endwhile
1028    endif
1029    drop backpack
1030    lift dropgold 444
1031    drop 0
1032    while queued
1033        //donothing
1034    endwhile
1035    settimer lootvacuumswitch 0
1036endwhile
1037if timerexists lootvacuumswitch
1038    if timer lootvacuumswitch >= 9000
1039        if not timerexists lootsensetimer
1040            createtimer lootsensetimer
1041            settimer lootsensetimer 1000
1042        endif
1043        if not findtype 4239|4240 ground -1 -1 2 and timer lootsensetimer >= 1000
1044            for 18
1045                while findtype 3827 ground 0 as zeroscroll
1046                    @ignore zeroscroll
1047                endwhile
1048                while findtype 7154 ground 0 as zeroingot
1049                    @ignore zeroingot
1050                endwhile
1051                while findtype 4225 ground 0 as zeroleather
1052                    @ignore zeroleather
1053                endwhile
1054                while findtype 7127 ground 0 as zeroboard
1055                    @ignore zeroboard
1056                endwhile
1057                while findtype 7154 ground 2419 as zeroingot
1058                    @ignore zeroingot
1059                endwhile
1060                while findtype 4225 ground 2419 as zeroleather
1061                    @ignore zeroleather
1062                endwhile
1063                while findtype 7127 ground 2419 as zeroboard
1064                    @ignore zeroboard
1065                endwhile
1066                while findtype 7154 ground 2406 as zeroingot
1067                    @ignore zeroingot
1068                endwhile
1069                while findtype 4225 ground 2406 as zeroleather
1070                    @ignore zeroleather
1071                endwhile
1072                while findtype 7127 ground 2406 as zeroboard
1073                    @ignore zeroboard
1074                endwhile
1075                while findtype 7154 ground 2413 as zeroingot
1076                    @ignore zeroingot
1077                endwhile
1078                while findtype 4225 ground 2413 as zeroleather
1079                    @ignore zeroleather
1080                endwhile
1081                while findtype 7127 ground 2413 as zeroboard
1082                    @ignore zeroboard
1083                endwhile
1084                while findtype 7154 ground 2418 as zeroingot
1085                    @ignore zeroingot
1086                endwhile
1087                while findtype 4225 ground 2418 as zeroleather
1088                    @ignore zeroleather
1089                endwhile
1090                while findtype 7127 ground 2418 as zeroboard
1091                    @ignore zeroboard
1092                endwhile
1093                while findtype 7154 ground 2213 as zeroingot  
1094                    @ignore zeroingot
1095                endwhile
1096                while findtype 4225 ground 2213 as zeroleather
1097                    @ignore zeroleather
1098                endwhile
1099                while findtype 7127 ground 2213 as zeroboard
1100                    @ignore zeroboard
1101                endwhile
1102                while findtype 22326 ground 2401 as badseed
1103                    @ignore badseed
1104                endwhile
1105                while findtype 22326 ground 2882 as badseed
1106                    @ignore badseed
1107                endwhile
1108                while findtype 22326 ground 2451 as badseed
1109                    @ignore badseed
1110                endwhile
1111                while findtype 22326 ground 63 as badseed
1112                    @ignore badseed
1113                endwhile
1114                if index > 0 and findtype "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
1115                    overhead "*loot*" 2091 lootlocation
1116                    @ignore lootlocation
1117                endif
1118                if warmode and findtype 4239|4240 ground -1 -1 2
1119                    break
1120                endif
1121            endfor
1122            @clearignore 
1123            settimer lootsensetimer 0
1124        endif
1125        while findtype 3827 ground 0 as zeroscroll
1126            @ignore zeroscroll
1127        endwhile
1128        while findtype 7154 ground 0 as zeroingot
1129            @ignore zeroingot
1130        endwhile
1131        while findtype 4225 ground 0 as zeroleather
1132            @ignore zeroleather
1133        endwhile
1134        while findtype 7127 ground 0 as zeroboard
1135            @ignore zeroboard
1136        endwhile
1137        while findtype 7154 ground 2419 as zeroingot
1138            @ignore zeroingot
1139        endwhile
1140        while findtype 4225 ground 2419 as zeroleather
1141            @ignore zeroleather
1142        endwhile
1143        while findtype 7127 ground 2419 as zeroboard
1144            @ignore zeroboard
1145        endwhile
1146        while findtype 7154 ground 2406 as zeroingot
1147            @ignore zeroingot
1148        endwhile
1149        while findtype 4225 ground 2406 as zeroleather
1150            @ignore zeroleather
1151        endwhile
1152        while findtype 7127 ground 2406 as zeroboard
1153            @ignore zeroboard
1154        endwhile
1155        while findtype 7154 ground 2413 as zeroingot
1156            @ignore zeroingot
1157        endwhile
1158        while findtype 4225 ground 2413 as zeroleather
1159            @ignore zeroleather
1160        endwhile
1161        while findtype 7127 ground 2413 as zeroboard
1162            @ignore zeroboard
1163        endwhile
1164        while findtype 7154 ground 2418 as zeroingot
1165            @ignore zeroingot
1166        endwhile
1167        while findtype 4225 ground 2418 as zeroleather
1168            @ignore zeroleather
1169        endwhile
1170        while findtype 7127 ground 2418 as zeroboard
1171            @ignore zeroboard
1172        endwhile
1173        while findtype 7154 ground 2213 as zeroingot  
1174            @ignore zeroingot
1175        endwhile
1176        while findtype 4225 ground 2213 as zeroleather
1177            @ignore zeroleather
1178        endwhile
1179        while findtype 7127 ground 2213 as zeroboard
1180            @ignore zeroboard
1181        endwhile
1182        while findtype 22326 ground 2401 as badseed
1183            @ignore badseed
1184        endwhile
1185        while findtype 22326 ground 2882 as badseed
1186            @ignore badseed
1187        endwhile
1188        while findtype 22326 ground 2451 as badseed
1189            @ignore badseed
1190        endwhile
1191        while findtype 22326 ground 63 as badseed
1192            @ignore badseed
1193        endwhile
1194        while not casting and not targetexists and findtype "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
1195            hotkey 'Grab Item' 
1196            target eatloot
1197            if insysmsg "Invalid or inaccessible item."
1198                @ignore eatloot
1199            endif            
1200            while queued
1201                //donothing
1202            endwhile 
1203        endwhile
1204    endif
1205endif
1206
1207if findtype 5912 self and not varexist "bwiz" and findlayer self head as regularhat
1208    getlabel regularhat desc
1209    if "magical" in desc
1210        dclick regularhat
1211        pause 500
1212        getlabel backpack ping
1213        replay
1214    endif
1215endif
1216if not find "bwiz" self and findtype 5912 backpack as wizhat
1217    getlabel wizhat desc
1218    if "restyled" in desc
1219        @ignore wizhat
1220        replay
1221    elseif "armored" in desc
1222        @setvar "bwiz" wizhat
1223    elseif "magical" in desc
1224        @setvar "bwiz" wizhat
1225        @setvar "nonaspectedwiz" wizhat
1226    endif
1227endif
1228if varexist "bwiz" and find "bwiz" backpack
1229    if not find "bmain" self and findlayer self head as hat
1230        @setvar "bmain" hat
1231    endif
1232    if not varexist "bmain"
1233        overhead "I need a primary hat or helm to wear.." 88
1234        pause 2000
1235        overhead "Anything will do, just not a magical wizard hat..." 88
1236        stop
1237    endif
1238endif
1239
1240if varexist "bwiz" and find "bwiz" backpack and find "bmain" self
1241    if not targetexists and not casting and skill "Stealth" >= 80 and hidden and stam = maxstam
1242        while queued
1243            //donothing
1244        endwhile
1245        dclick "bwiz"
1246        while queued
1247            //donothing
1248        endwhile
1249        pause 30
1250        dclick "bmain"
1251        pause 500
1252        getlabel backpack ping
1253    endif
1254    if not targetexists and not casting and not findlayer self head and find "bmain" self
1255        while queued
1256            //donothing
1257        endwhile
1258        dclick "bmain"
1259        pause 500
1260        getlabel backpack ping
1261    endif
1262endif
1263if varexist "bwiz" and find "bmain" self
1264    if not targetexists and not casting and not find "bwiz" backpack
1265        while queued
1266            //donothing
1267        endwhile
1268        dclick "bmain"
1269        pause 500
1270        getlabel backpack ping
1271    endif
1272endif
1273
1274if dead 
1275    overhead "I need a new body..." 88
1276    stop
1277endif
1278loop