Melee weapons swap and hide in a trapped pouch by DoubleDuke
Description: A thief proof (hope so! hahaha) script to automatically hide your preferred weapons into a random trapped pouch.
The script ask you to set 3 weapons and shield (optional): 1x onehanded (and shield) - 1x twohanded - 1x secondary twohanded or bow/heavycrossbow.
Then equip the first weapon in line and hide the others in your next free trapped pouch available.
1# Melee weapons swap and hide in a trapped pouch by Double Duke
2# Version 0.6 2023/04/18
3# Script for UO Outlands
4#
5# The script ask you to set 3 weapons and a shield (optional):
6# 1x onehanded (+ shield) - 1x twohanded - 1x secondary twohanded or bow/heavycrossbow
7# Then equip the first weapon in line and hide the others in your next free trapped pouch available
8#
9# After setup, every trigger of the script, will do this for you:
10#
11# - check for free trapped pouches available and set as safepouch (thief proof)
12# - check if your weapons are still there
13# - look into actually equipped weapon and swap with the next
14# - hide all the selected weapons and shield left laying in backpack
15#
16# Remove the variables (in option section of Razor) myFirstWeapon, mySecondWeapon and myThirdWeapon if:
17# - your char dies and lose weapons
18# - you change your weapons
19# or....simply copy these lines to another script and run it once to re-set your weapons (remove the hash before play):
20#
21# @setvar! myThirdWeaponEquip 1
22# @setvar! myShieldEquip 0
23# overhead "Set your Onehanded weapon" 2843
24# @setvar! myFirstWeapon
25# overhead "Set your Twohanded Weapon" 2843
26# @setvar! mySecondWeapon
27# if myThirdWeaponEquip = 1
28# overhead "Set your Bow or another Twohanded weapon" 2843
29# @setvar! myThirdWeapon
30# endif
31# if myShieldEquip = 1
32# overhead "Set your Shield" 2843
33# @setvar! myShield
34# endif
35#
36# NOTE: try the script before intensive use (pvp or dungeon crawling), test it with your thief or friends
37#
38# CHANGELOG:
39# - v0.6 2023/04/18, added shield equip variable selector and third weapon selector
40# - v0.5 2023/04/14, initial release
41#
42# ROADMAP:
43# - free weapons type choice (ex: 3 onehanded or 3 twohanded etc..)
44# - variable selector for more than 3 weapons
45# - speed improvement
46#
47# WARNING: the script is not pefect, always set a stop script macro for emergency;
48# Set a normal equip weapon macro for all your weapons, for your safety.
49#
50# REPORT: any feedback or collaboration on Discord @ DoubleDuke#6321
51
52#############
53### EDIT TO MEET YOUR PREFERENCES
54#############
55
56### Fine tune this to your Latency or Personal Preferences
57# GlobalWaitTime safe value is 650
58@setvar! globalWaitTimeLiftAndDrop 650
59# WaitForPing safe value is 200
60@setvar! minimumWaitForPing 200
61
62#############
63### DEXXER VARIABLES
64### the more you add, the slower the script
65#############
66
67# Do you want to equip a Shield with your OneHanded weapon? (1=yes, 0=no [default])
68@setvar! myShieldEquip 0
69
70# Do you want to equip the Third Weapon? (twohanded or bow/heavycrossbow) (1=yes [default], 0=no)
71@setvar! myThirdWeaponEquip 1
72
73
74#############
75### DO NOT EDIT BELOW THIS
76#############
77
78
79// Automatically set your trapped pouch every time
80// Even if you or someone trigger it (thief proof)
81if findtype "pouch" backpack 38 as trappedsafepouch
82 @setvar! safepouch trappedsafepouch
83endif
84
85// Weapons Variable selector
86
87if not varexist myFirstWeapon
88 overhead "Set your Onehanded weapon" 2843
89 @setvar! myFirstWeapon
90endif
91
92if not varexist mySecondWeapon
93 overhead "Set your Twohanded Weapon" 2843
94 @setvar! mySecondWeapon
95endif
96
97if not varexist myThirdWeapon and myThirdWeaponEquip = 1
98 overhead "Set your Bow or another Twohanded weapon" 2843
99 @setvar! myThirdWeapon
100endif
101
102if not varexist myShield and myShieldEquip = 1
103 overhead "Set your Shield" 2843
104 @setvar! myShield
105endif
106
107// Check if wrong weapon equipped
108
109if not find righthand myFirstWeapon and not find lefthand mySecondWeapon and not find lefthand myThirdWeapon
110 if find myFirstWeapon backpack as item
111 overhead "Wrong weapon! Now swapping..." 2843
112 dclick item
113 wait minimumWaitForPing
114 if myShieldEquip = 1
115 dclick myShield
116 wait minimumWaitForPing
117 endif
118 elseif find mySecondWeapon backpack as item
119 overhead "Wrong weapon! Now swapping..." 2843
120 dclick item
121 wait minimumWaitForPing
122 elseif myThirdWeaponEquip = 1 and find myThirdWeapon backpack as item
123 overhead "Wrong weapon! Now swapping..." 2843
124 dclick item
125 wait minimumWaitForPing
126 else
127 overhead "No weapon at all in backpack!" 2843
128 endif
129
130
131// Check if you need to equip a weapon and equip the first available
132
133elseif not findlayer self lefthand and not findlayer self righthand
134 if find myFirstWeapon backpack as item
135 dclick item
136 wait minimumWaitForPing
137 if myShieldEquip = 1 and find myShield backpack as equipShield
138 dclick equipShield
139 wait minimumWaitForPing
140 endif
141 if find mySecondWeapon backpack as upSecondWpn and find myThirdWeapon backpack as upThirdWpn
142 lift upSecondWpn
143 drop safepouch -1 -1 -1
144 wait globalWaitTimeLiftAndDrop
145 if myThirdWeaponEquip = 1
146 lift upThirdWpn
147 drop safepouch -1 -1 -1
148 wait globalWaitTimeLiftAndDrop
149 endif
150 elseif find mySecondWeapon backpack as upSecondWpn
151 lift upSecondWpn
152 drop safepouch -1 -1 -1
153 wait globalWaitTimeLiftAndDrop
154 elseif myThirdWeaponEquip = 1 and find myThirdWeapon backpack as upThirdWpn
155 lift upThirdWpn
156 drop safepouch -1 -1 -1
157 wait globalWaitTimeLiftAndDrop
158 endif
159 elseif find mySecondWeapon backpack as item
160 dclick item
161 wait minimumWaitForPing
162 if myThirdWeaponEquip = 1 and find myThirdWeapon backpack as upThirdWpn
163 lift upThirdWpn
164 drop safepouch -1 -1 -1
165 wait globalWaitTimeLiftAndDrop
166 endif
167 elseif myThirdWeaponEquip = 1 and find myThirdWeapon backpack as item
168 dclick item
169 wait minimumWaitForPing
170 else
171 overhead "No weapon at all in backpack!" 2843
172 endif
173
174// Equip Second Weapon
175
176elseif find myFirstWeapon righthand
177 if find mySecondWeapon backpack as item
178 dclick item
179 wait minimumWaitForPing
180 if find myFirstWeapon backpack as upFirstWpn and find myThirdWeapon backpack as upThirdWpn
181 lift upFirstWpn
182 drop safepouch -1 -1 -1
183 wait globalWaitTimeLiftAndDrop
184 if myShieldEquip = 1 and find myShield backpack as equipShield
185 lift equipShield
186 drop safepouch -1 -1 -1
187 wait globalWaitTimeLiftAndDrop
188 endif
189 if myThirdWeaponEquip = 1
190 lift upThirdWpn
191 drop safepouch -1 -1 -1
192 wait globalWaitTimeLiftAndDrop
193 endif
194 elseif find myFirstWeapon backpack as upFirstWpn
195 lift upFirstWpn
196 drop safepouch -1 -1 -1
197 wait globalWaitTimeLiftAndDrop
198 if myShieldEquip = 1 and find myShield backpack as equipShield
199 lift equipShield
200 drop safepouch -1 -1 -1
201 wait globalWaitTimeLiftAndDrop
202 endif
203 elseif myThirdWeaponEquip = 1 and find myThirdWeapon backpack as upThirdWpn
204 lift upThirdWpn
205 drop safepouch -1 -1 -1
206 wait globalWaitTimeLiftAndDrop
207 endif
208 elseif myThirdWeaponEquip = 1 and find myThirdWeapon backpack as item
209 dclick item
210 wait minimumWaitForPing
211 if find myFirstWeapon backpack as upFirstWpn and find mySecondWeapon backpack as upSecondWpn
212 lift upFirstWpn
213 drop safepouch -1 -1 -1
214 wait globalWaitTimeLiftAndDrop
215 if myShieldEquip = 1 and find myShield backpack as equipShield
216 lift equipShield
217 drop safepouch -1 -1 -1
218 wait globalWaitTimeLiftAndDrop
219 endif
220 lift upSecondWpn
221 drop safepouch -1 -1 -1
222 wait globalWaitTimeLiftAndDrop
223 elseif find myFirstWeapon backpack as upFirstWpn
224 lift upFirstWpn
225 drop safepouch -1 -1 -1
226 wait globalWaitTimeLiftAndDrop
227 if myShieldEquip = 1 and find myShield backpack as equipShield
228 lift equipShield
229 drop safepouch -1 -1 -1
230 wait globalWaitTimeLiftAndDrop
231 endif
232 elseif find mySecondWeapon backpack as upSecondWpn
233 lift upSecondWpn
234 drop safepouch -1 -1 -1
235 wait globalWaitTimeLiftAndDrop
236 endif
237 else
238 overhead "No more weapons left!" 2843
239 endif
240
241// Equip Third Weapon
242
243elseif find mySecondWeapon lefthand
244 if myThirdWeaponEquip = 1 and find myThirdWeapon backpack as item
245 dclick item
246 wait minimumWaitForPing
247 if find myFirstWeapon backpack as upFirstWpn and find mySecondWeapon backpack as upSecondWpn
248 lift upFirstWpn
249 drop safepouch -1 -1 -1
250 wait globalWaitTimeLiftAndDrop
251 if myShieldEquip = 1 and find myShield backpack as equipShield
252 lift equipShield
253 drop safepouch -1 -1 -1
254 wait globalWaitTimeLiftAndDrop
255 endif
256 lift upSecondWpn
257 drop safepouch -1 -1 -1
258 wait globalWaitTimeLiftAndDrop
259 elseif find myFirstWeapon backpack as upFirstWpn
260 lift upFirstWpn
261 drop safepouch -1 -1 -1
262 wait globalWaitTimeLiftAndDrop
263 if myShieldEquip = 1 and find myShield backpack as equipShield
264 lift equipShield
265 drop safepouch -1 -1 -1
266 wait globalWaitTimeLiftAndDrop
267 endif
268 elseif find mySecondWeapon backpack as upSecondWpn
269 lift upSecondWpn
270 drop safepouch -1 -1 -1
271 wait globalWaitTimeLiftAndDrop
272 endif
273 elseif find myFirstWeapon backpack as item
274 dclick item
275 wait minimumWaitForPing
276 if find mySecondWeapon backpack as upSecondWpn and find myThirdWeapon backpack as upThirdWpn
277 lift upSecondWpn
278 drop safepouch -1 -1 -1
279 wait globalWaitTimeLiftAndDrop
280 if myThirdWeaponEquip = 1
281 lift upThirdWpn
282 drop safepouch -1 -1 -1
283 wait globalWaitTimeLiftAndDrop
284 endif
285 elseif find mySecondWeapon backpack as upSecondWpn
286 lift upSecondWpn
287 drop safepouch -1 -1 -1
288 wait globalWaitTimeLiftAndDrop
289 elseif myThirdWeaponEquip = 1 and find myThirdWeapon backpack as upThirdWpn
290 lift upThirdWpn
291 drop safepouch -1 -1 -1
292 wait globalWaitTimeLiftAndDrop
293 endif
294 else
295 overhead "No more weapons left!" 2843
296 endif
297
298// Equip First Weapon
299
300elseif myThirdWeaponEquip = 1 and find myThirdWeapon lefthand
301 if find myFirstWeapon backpack as item
302 dclick item
303 wait minimumWaitForPing
304 if myShieldEquip = 1 and find myShield backpack as item
305 dclick item
306 wait minimumWaitForPing
307 endif
308 if find mySecondWeapon backpack as upSecondWpn and find myThirdWeapon backpack as upThirdWpn
309 lift upSecondWpn
310 drop safepouch -1 -1 -1
311 wait globalWaitTimeLiftAndDrop
312 if myThirdWeaponEquip = 1
313 lift upThirdWpn
314 drop safepouch -1 -1 -1
315 wait globalWaitTimeLiftAndDrop
316 endif
317 elseif find mySecondWeapon backpack as upSecondWpn
318 lift upSecondWpn
319 drop safepouch -1 -1 -1
320 wait globalWaitTimeLiftAndDrop
321 elseif myThirdWeaponEquip = 1 and find myThirdWeapon backpack as upThirdWpn
322 lift upThirdWpn
323 drop safepouch -1 -1 -1
324 wait globalWaitTimeLiftAndDrop
325 endif
326 elseif find mySecondWeapon backpack as item
327 dclick item
328 wait minimumWaitForPing
329 if find myFirstWeapon backpack as upFirstWpn and find myThirdWeapon backpack as upThirdWpn
330 lift upFirstWpn
331 drop safepouch -1 -1 -1
332 wait globalWaitTimeLiftAndDrop
333 if myShieldEquip = 1 and find myShield backpack as equipShield
334 lift equipShield
335 drop safepouch -1 -1 -1
336 wait globalWaitTimeLiftAndDrop
337 endif
338 if myThirdWeaponEquip = 1
339 lift upThirdWpn
340 drop safepouch -1 -1 -1
341 wait globalWaitTimeLiftAndDrop
342 endif
343 elseif find myFirstWeapon backpack as upFirstWpn
344 lift upFirstWpn
345 drop safepouch -1 -1 -1
346 wait globalWaitTimeLiftAndDrop
347 if myShieldEquip = 1 and find myShield backpack as equipShield
348 lift equipShield
349 drop safepouch -1 -1 -1
350 wait globalWaitTimeLiftAndDrop
351 endif
352 elseif myThirdWeaponEquip = 1 and find myThirdWeapon backpack as upThirdWpn
353 lift upThirdWpn
354 drop safepouch -1 -1 -1
355 wait globalWaitTimeLiftAndDrop
356 endif
357 else
358 overhead "No more weapons left!" 2843
359 endif
360endif
361
362// If you wish to collaborate to improve this script please contact me in Discord @ DoubleDuke#6321
363//
364//