Back to "map" tags

Bapeth's Map-Trap Script by barryroser

Description: This script will auto handle digging and looting of treasure maps. Please read the description at the top of the script.

1# Trapper Mapper Script by Bapeth
2#
3# Date updated : Feb 25th - Updated for new Buff Icon Patch
4#
5# This script uses both Harvest and Gadget aspect, both aspects are required.
6# This script also uses two Mastery Chains, one for Trap Damage and the other for Loot Chance.
7# If you only have one chain then set it for both chain settings when prompted.
8#
9# "REQUIRED": User must create three cooldowns named "Aspect" "Chain Swap" "Aspect Proc"
10# "Aspect Proc" cooldown requires an OVERHEAD Trigger Text: *innovation*  Cooldown: 30
11# Cooldowns can be found in the in game options.
12#
13# HOW TO USE:
14#    
15# Items needed in backpack - Shovel, T-map, Adv Pack, Ground Trap, Lockpicks, Trap Kit, Mastery Chain.
16#
17# In "PEACEMODE" - Play the script when you are nearby the map location to being digging for the chest.
18# When the script begins digging the chest it will use the adv pack, summon an earth ele, and place a ground trap.
19# The script will stop when chest is fully dug up.
20#
21# At this time the user should kill all the monsters.
22# It is best to Stay the elemental in the direct center of the trap and wait for the mobs to move in to range.
23# Detonate the trap and ready another trap if needed, repeat as needed.
24# A good trapper template with high gadget and a good chain will only need 2 traps maximum to clear any T-map under level 8.
25#
26# In "WARMODE" - Play the script once again when all monsters are dead and it will switch to Harvest aspect and equip your loot chain.
27# Approach the chest and the script will automatically invis the user and begin picking and looting.
28# Low level tmaps will often open faster then the chain swap cooldown of 30 seconds, so, the user should wait 10 seconds after swapping to begin picking.
29# When the script is done looting it will switch back to gadget aspect and equip the Trap damage chain and stop.
30# You are now ready to go do another T-map!
31#
32# Please remember to "destroy your empty treasure chest" before leaving the site.
33#
34# If at any time you would like to change your chains or reset the script into One or Two Chain mode then delete the varibles from script options. 
35# Varibles are as follows: LootChain, TrapChain, OneChain, TwoChain
36#
37#~~"Recommended Build"~~
38#
39#  "Trapper Mapper"
40# Alchemy -------120
41# Detect Hidden -120
42# Tinkering -----120
43# Magery --------100
44# Cartography ---90
45# Lockpicking ---90
46# Spirit Speak --80
47#
48# Script Starts Here
49if not varexist "OneChain" and not varexist "TwoChain"
50    overhead "The script needs to know if you are using ONE or TWO Mastery Chains" 68
51    pause 5000
52    overhead "Select trap kit if you have 2 chains" 88
53    overhead "Select backpack if you have 1 chain" 78
54    setlasttarget 
55    wft 500
56    while targetexists 
57        //donothing
58    endwhile
59    getlabel lasttarget desc
60    if "trap kit" in desc
61        @setvar "TwoChain" lasttarget 
62        overhead "I have selected for Two Chains" 88
63    elseif "backpack" in desc
64        @setvar "OneChain" lasttarget 
65        overhead "I have selected for One Chain" 78
66    endif
67    pause 2000
68endif
69
70if varexist "TwoChain"
71    if not varexist "TrapChain"
72        overhead "Set Trap Chain..." 88
73        setlasttarget 
74        wft 500
75        while targetexists 
76            //do nothing
77        endwhile
78        @setvar "TrapChain" lasttarget 
79        overhead "Trap Chain Set..." 88
80        pause 1500
81    endif
82
83    if not varexist "LootChain"
84        overhead "Set Loot Chain..." 58
85        setlasttarget 
86        wft 500
87        while targetexists 
88            //do nothing
89        endwhile
90        @setvar "LootChain" lasttarget 
91        overhead "Loot Chain Set..." 58
92    endif
93endif
94
95if skill "Cartography" >= 10 and findtype "adventure pack" backpack as advpack
96    @setvar "bappack" advpack
97endif
98
99if skill "Tinkering" >= 80 and findtype "metal trap" backpack as btrap
100    @setvar "baptrap" btrap
101endif
102
103if timerexists bchestopen
104    removetimer bchestopen
105endif
106
107if not warmode
108    if varexist "TwoChain" and findlayer self talisman as bchain
109        getlabel bchain desc
110        if not find "TrapChain" backpack
111            //donothing
112        else
113            lift bchain
114            drop backpack -1 -1 0
115            pause 500
116            getlabel backpack ping
117            lift "TrapChain"
118            drop self Talisman
119            overhead "Trap Chain Equipped..." 44
120            cooldown "Chain Swap" 30000
121            pause 500
122            getlabel backpack ping
123        endif
124    elseif varexist "TwoChain"
125        lift "TrapChain"
126        drop self Talisman
127        getlabel backpack ping
128        overhead "Trap Chain Equipped..." 44
129        cooldown "Chain Swap" 30000
130    endif
131    if not timerexists checkforgadget
132        clearsysmsg 
133        say "[AspectArmor Gadget"
134        getlabel backpack ping
135        if insysmsg "You must wait a moment before activating another armor aspect"
136            overhead "Aspect swap cooling..." 44
137            pause 1500
138            replay
139        elseif insysmsg "Your armor is already of that aspect"
140            createtimer checkforgadget
141        else
142            createtimer checkforgadget
143            cooldown "Aspect" 30000
144        endif
145        stop
146    endif
147    removetimer checkforharvest
148    if findtype "map" backpack
149        //donothing
150    else
151        overhead "I will need a treasure map..." 38
152        stop
153    endif
154    if findtype "shovel" backpack as bshovel
155        dclick bshovel
156        pause 1200
157        if insysmsg "Perhaps you should step outdoors."
158            overhead "I should hunt outside..." 45
159            pause 2000 
160            replay
161        elseif findbuff "Entangle"
162            if mana >= 50 and followers < 4
163                cast "Earth Elemental"
164            endif
165            dclick "bappack"
166            getlabel backpack ping
167            pause 500
168            dclick "baptrap"
169            while findbuff "Entangle"
170                if 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  
171                    if noto sum1 = "friend"
172                        # Name your summon if you like (no spaces must be unique)
173                        rename sum1 "Bapith"
174                    endif
175                elseif not find "bsummon1" ground and findtype "Bapith" ground as sum1
176                    @setvar "bsummon1" sum1
177                endif
178                if 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  
179                    if noto sum2 = "friend"
180                        # Name your summon if you like (no spaces must be unique)
181                        rename sum2 "Bapath"
182                    endif
183                elseif not find "bsummon2" gorund and findtype "Bapath" ground as sum2
184                    @setvar "bsummon2" sum2
185                endif
186            endwhile
187            pause 1100
188            overhead "Time to slay monsters!!!" 88
189            stop
190        endif
191    else
192        overhead "I will need a shovel..." 38
193        stop
194    endif
195elseif warmode
196    if varexist "TwoChain" and findlayer self talisman as bchain
197        getlabel bchain desc
198        if not find "LootChain" backpack
199            //donothing
200        else
201            lift bchain
202            drop backpack -1 -1 0
203            pause 500
204            getlabel backpack ping
205            lift "LootChain"
206            drop self Talisman
207            overhead "Loot Chain Equipped..." 74
208            cooldown "Chain Swap" 30000
209            pause 500
210            getlabel backpack ping
211        endif
212    elseif varexist "TwoChain"
213        lift "LootChain"
214        drop self Talisman
215        getlabel backpack ping
216        overhead "Loot Chain Equipped..." 74
217        cooldown "Chain Swap" 30000
218    endif
219    if not timerexists checkforharvest and not cooldown "Aspect Proc" and not cooldown "Aspect"
220        clearsysmsg 
221        say "[AspectArmor Harvest"
222        getlabel backpack ping
223        if insysmsg "Your armor is already of that aspect"
224            createtimer checkforharvest
225        else
226            createtimer checkforharvest
227            cooldown "Aspect" 30000
228        endif
229    endif
230    removetimer checkforgadget
231    if findtype 3651|3649|3648|3650|3708|2475 ground -1 -1 1 as bchest
232        clearsysmsg 
233        dclick bchest
234        getlabel backpack ping
235        if gumpexists 736038070 and ingump "Cleared Of Traps"
236            while gumpexists 736038070
237                gumpresponse 4
238                waitforgump 736038070 500
239                if insysmsg "You attempt to pick the lock"
240                    clearsysmsg
241                    break
242                elseif insysmsg "You must rid the area"
243                    overhead "I must kill these monsters first..." 88
244                    stop
245                endif
246            endwhile
247            while not dead 
248                if not hidden and mana >= 20
249                    cast "Invisibility"
250                    wft 5000
251                    target self
252                    getlabel backpack ping
253                    hotkey "Cancel Current Target"
254                endif
255                if insysmsg "You successfully pick the lock"
256                    break
257                endif
258                if not findtype 3651|3649|3648|3650|3708|2475 ground -1 -1 2
259                    break
260                endif
261                if cooldown "Aspect Proc"
262                    createtimer harvestspam
263                endif
264                if timerexists harvestspam
265                    clearsysmsg 
266                    say "[AspectArmor Harvest"
267                    getlabel backpack ping
268                    if insysmsg "resolved an aspect special"
269                        //do nothing
270                    elseif insysmsg "Your armor is already of that aspect"
271                        cooldown "Aspect Proc" 0
272                        removetimer harvestspam
273                    else
274                        removetimer harvestspam
275                        cooldown "Aspect" 30000
276                    endif
277                endif
278            endwhile
279        endif
280        while findtype "54230|44985|glass display|20049|Pig Iron|blackrock 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|4112|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|2594|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|7127|4225|12686|19985|19981|19984|19982|19983|19991|19989|19986|19987|19988|19994|19995|19992|19993|19990|19980|19977|19976|19978|7154|19979|43423|3861|3821" bchest as bitem
281            warmode off
282            if not timerexists bchestopen
283                createtimer bchestopen
284                overhead "The treasure is mine!" 2091
285            endif
286            hotkey 'Grab Item' 
287            target bitem
288            while queued
289                //donothing
290            endwhile
291            while diffweight <= 0 and findtype "gold coin" backpack as dropgold
292                if not hidden and stam <= 4 and findtype "Red Potion" backpack as redpot
293                    while queued
294                        //donothing
295                    endwhile
296                    dclick redpot
297                endif
298                overhead "My cup runneth over..." 1779
299                lift dropgold 444
300                drop 0
301                while queued
302                    //donothing
303                endwhile
304            endwhile
305        endwhile
306    endif
307endif
308loop