It uses the built in empty_hands and fill_hands routine of lich, which has a whole process for determining wtf to do with your stuff.
for this case, i'm assuming your weapon is in your right hand?
if so you should be able to set uservars for "weapon" and "weaponsack"
;var set weapon = steel broadsword
;var set weaponsack = sheath
and if the thing in your right hand matches that, and your weaponsack exists, it will put it there instead.
the function btw for your LEFT hand will inherently check for shield and ranged weapon verbs and stow those accordingly (a lot fewer nouns to check for shields and bows)
Code:
;e empty_hands
--- Lich: exec1 active.
[exec1]>inventory containers
In the <a exist="252605287" noun="backpack">forest green backpack</a>:
<b>armor (1):</b> <a exist="252605294" noun="helm">a visored helm</a>.
<b>clothing (1):</b> <a exist="252605290" noun="kit">a rations kit</a>.
<b>other (1):</b> <a exist="252605289" noun="token">a travel guide token</a>.
<b>herb (1):</b> <a exist="252605288" noun="leaf">some acantha leaf</a>.
You are wearing a bone-clasped forest green backpack, a leather sheath, and a waxed black leather pouch.
*** normally it just uses your lootsack here, but this F2P didn't have that set so it checked what containers i have ***
[exec1]>put #252605295 in #252605287
You put a falchion in your forest green backpack.
--- Lich: exec1 has exited.
>;e fill_hands
--- Lich: exec1 active.
[exec1]>get #252605295
You remove a falchion from in your forest green backpack.
--- Lich: exec1 has exited.
*** set the vars ***
>;var set weapon = falchion
--- variable "weapon" set to: "falchion"
>;var set weaponsack = sheath
--- variable "weaponsack" set to: "sheath"
*** try again ***
>;e empty_hands
--- Lich: exec1 active.
[exec1]>put #252605295 in #252605296
You put a falchion in your leather sheath.
--- Lich: exec1 has exited.
>;e fill_hands
--- Lich: exec1 active.
[exec1]>get #252605295
You remove a falchion from in your leather sheath.
--- Lich: exec1 has exited.
Obviously if you change weapons or weapon containers, you have to update the vars. it's a regex so if you use multiple weapons, you can separate them with a |
like: shaalk claidhmore|zorchar greatsword|drakar maul
should match all 3 of those weapons
Mithrilschlong, 2015-03-10 to slightly later on 2015-03-10. You will not be forgotten!
usable Meteor Swarm, late 2020-12-30 to early 2020-12-31. You will also not be forgotten!