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 3rd - removed hard stops if you dont have carto/tinkering
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 "Paralyze"
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 "Paralyze"
170 if skill "Spirit Speak" >= 80 and findtype "an earth elemental" ground -1 -1 1 as Summon
171 if not find "bsummon1" ground -1 -1
172 while findtype "an earth elemental" ground -1 -1 1 as bsummon1
173 if noto bsummon1 = "friend"
174 @setvar "bsummon1" bsummon1
175 # Name your summon if you like (no spaces must be unique)
176 rename bsummon1 "LootGolem"
177 endif
178 break
179 endwhile
180 getlabel backpack ping
181 elseif not find "bsummon2" ground -1 -1
182 while findtype "an earth elemental" ground -1 -1 1 as bsummon2
183 if noto bsummon2 = "friend"
184 @setvar "bsummon2" bsummon2
185 # Name your summon if you like (no spaces must be unique)
186 rename bsummon2 "LootGolem"
187 endif
188 break
189 endwhile
190 endif
191 endif
192 endwhile
193 pause 1100
194 overhead "Time to slay monsters!!!" 88
195 stop
196 endif
197 else
198 overhead "I will need a shovel..." 38
199 stop
200 endif
201elseif warmode
202 if varexist "TwoChain" and findlayer self talisman as bchain
203 getlabel bchain desc
204 if not find "LootChain" backpack
205 //donothing
206 else
207 lift bchain
208 drop backpack -1 -1 0
209 pause 500
210 getlabel backpack ping
211 lift "LootChain"
212 drop self Talisman
213 overhead "Loot Chain Equipped..." 74
214 cooldown "Chain Swap" 30000
215 pause 500
216 getlabel backpack ping
217 endif
218 elseif varexist "TwoChain"
219 lift "LootChain"
220 drop self Talisman
221 getlabel backpack ping
222 overhead "Loot Chain Equipped..." 74
223 cooldown "Chain Swap" 30000
224 endif
225 if not timerexists checkforharvest and not cooldown "Aspect Proc" and not cooldown "Aspect"
226 clearsysmsg
227 say "[AspectArmor Harvest"
228 getlabel backpack ping
229 if insysmsg "Your armor is already of that aspect"
230 createtimer checkforharvest
231 else
232 createtimer checkforharvest
233 cooldown "Aspect" 30000
234 endif
235 endif
236 removetimer checkforgadget
237 if findtype 3651|3649|3648|3650|3708|2475 ground -1 -1 1 as bchest
238 clearsysmsg
239 dclick bchest
240 getlabel backpack ping
241 if gumpexists 736038070 and ingump "Cleared Of Traps"
242 while gumpexists 736038070
243 gumpresponse 4
244 waitforgump 736038070 500
245 if insysmsg "You attempt to pick the lock"
246 clearsysmsg
247 break
248 elseif insysmsg "You must rid the area"
249 overhead "I must kill these monsters first..." 88
250 stop
251 endif
252 endwhile
253 while not dead
254 if not hidden and mana >= 20
255 cast "Invisibility"
256 wft 5000
257 target self
258 getlabel backpack ping
259 hotkey "Cancel Current Target"
260 endif
261 if insysmsg "You successfully pick the lock"
262 break
263 endif
264 if not findtype 3651|3649|3648|3650|3708|2475 ground -1 -1 2
265 break
266 endif
267 if cooldown "Aspect Proc"
268 createtimer harvestspam
269 endif
270 if timerexists harvestspam
271 clearsysmsg
272 say "[AspectArmor Harvest"
273 getlabel backpack ping
274 if insysmsg "resolved an aspect special"
275 //do nothing
276 elseif insysmsg "Your armor is already of that aspect"
277 cooldown "Aspect Proc" 0
278 removetimer harvestspam
279 else
280 removetimer harvestspam
281 cooldown "Aspect" 30000
282 endif
283 endif
284 endwhile
285 endif
286 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
287 warmode off
288 if not timerexists bchestopen
289 createtimer bchestopen
290 overhead "The treasure is mine!" 2091
291 endif
292 hotkey 'Grab Item'
293 target bitem
294 while queued
295 //donothing
296 endwhile
297 while diffweight <= 0 and findtype "gold coin" backpack as dropgold
298 if not hidden and stam <= 4 and findtype "Red Potion" backpack as redpot
299 while queued
300 //donothing
301 endwhile
302 dclick redpot
303 endif
304 overhead "My cup runneth over..." 1779
305 lift dropgold 444
306 drop 0
307 while queued
308 //donothing
309 endwhile
310 endwhile
311 endwhile
312 endif
313endif
314loop