View Full Version : Useherbs
Gnissa68
04-10-2019, 02:10 PM
I have noticed even though I have a sheath set when I run useherbs it puts my weapon in my backpack. Is there anyway to fix that? I looked in the script but didn't see where to adjust that.
Maerit
04-10-2019, 03:26 PM
Is your backpack set to your stow container? If so, the code probably uses your stowsack.
Gnissa68
04-10-2019, 05:56 PM
no when I type stow it goes to my cloak
JNewhall
04-10-2019, 06:34 PM
I think the setting is called herbsack. Set herbsack=x or something like that.
Gnissa68
04-10-2019, 09:45 PM
herbsack it set to my survival kit, what happens is when I use the script instead of putting my weapon in my sheath it puts it in my knapsack which is not set as any type of container at all. When I look at my inventory my knapsack is the first bag in my inventory. But it still can't figure out why it doesn't sheath my weapon. This is what comes up on my screen when I first start useherbs
>;useherbs
--- Lich: useherbs active.
[useherbs]>inventory containers
You are wearing an onyx-studded crimson suede knapsack with twin metal plates, a knee-length leather jacket with carved haon buttons, an ermine-lined russet scabbard, and a silver-threaded indigo survival kit.
!J>
[useherbs]>put #251271711 in #251271655
You can't put your bulawa in the crimson suede knapsack. It's closed!
!J>
[useherbs]>open #251271655
Sliding the lever on the side of the crimson suede knapsack, you can feel tension increasing against the lever. The metal plates at the top of the knapsack slide away, revealing the opening.
!J>
[useherbs]>put #251271711 in #251271655
You put an ash-hafted imflass bulawa in your crimson suede knapsack.
Donquix
04-10-2019, 10:05 PM
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)
;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
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.