PDA

View Full Version : Need support for empty_right/left_hand verbiage added to lich



Viekn
09-28-2015, 08:37 AM
Hi Tillmen,

It was suggested I drop you a note about this. When running sloot with bigshot, sloot is using the lich function empty_right_hand (or left depending on the setting) to stow my weapon before searching. I am wearing a climate cloak and on the first attempt, the weapon is put in my climate cloak, but then the function inventory's my containers and continues to try to put the weapon away in each of my remaining containers before giving up and just moving on. So it seems like the function is not recognizing the verbiage from the climate cloak that the weapon has indeed been put away on the first attempt?

Would you be able to do something that would update that function within lich so that it doesn't continue to do that?

I appreciate the help.

Viekn
09-28-2015, 11:15 AM
**Update on this: So I think I found a work around that doesn't affect anything else yet. I set my ;vars lootsack to be my non-scripted weapon harness and that seemed to fix the issue. However if this could somehow be fixed so that I didn't have to use a non-scripted container as my ;vars lootsack, that would be best.

Gnomad
09-28-2015, 02:09 PM
Keeping track of all the possible scripted stow messages is of course untenable, but I would suggest the empty command should at least check whether a hand is successfully empty after a response that doesn't match a default failure or success.

It would also be nice if empty tried to use "sheath" as its first try when a weapon is in the hand, so that those of us with warrior sheaths can get the weight reduction. Plus it'd be more likely to find a container on the first try in that instance.

Viekn
09-28-2015, 02:18 PM
Keeping track of all the possible scripted stow messages is of course untenable, but I would suggest the empty command should at least check whether a hand is successfully empty after a response that doesn't match a default failure or success.

It would also be nice if empty tried to use "sheath" as its first try when a weapon is in the hand, so that those of us with warrior sheaths can get the weight reduction. Plus it'd be more likely to find a container on the first try in that instance.

Well do we know if the ;vars lootsack setting affects any other built in script other than the empty function? So far, if I set my containers the way I want them to for ;sloot, but then set my ;vars lootsack to be a harness that doesn't even hold much, ;sloot still uses whatever I set up in the setup window and the empty command uses whatever I put as my lootsack variable. So if that's the case, you could do ;vars set lootsack=sheath and achieve what you want for warrior sheaths. Honestly, the only major scripts I use are bigshot (but that's only with low level characters while I'm at the keyboard because it's just more efficient than I am at using Stormfront macros or scripts) and sloot. So for now, I would think changing that variable should work for my purpose and your purpose, until someone who knows differently can say whether doing that will mess something else up down the road.

Tgo01
09-28-2015, 02:32 PM
What is the wording for putting something in your climate cloak?

Just curious because it looks like the empty right function tries to cover all of its bases:

^You (?:attempt to shield .*? from view as you |discreetly |carefully |absent-mindedly )?(?:put|place|slip|tuck|add|drop|untie your|find an incomplete bundle|wipe off .*? and sheathe)|^A sigh of grateful pleasure can be heard as you feed .*? to your|^As you place|^I could not find what you were referring to\.$|^Your bundle would be too large|^The .+ is too large to be bundled\.|^As you place your|^The .*? is already a bundle|^Your .*? won't fit in .*?\.$|^You can't .+ It's closed!$

DaCapn
09-28-2015, 03:14 PM
If it's already in there, it's probably just a case of using an outdated version of lich.

One way to possibly push through messaging of scripted items would be to check if the item is in the lootsack before the INVENTORY CONTAINERS fall-back. There might be some slight overhead to this but it's worth noting that this is already a moment where overhead is being experienced from someone having an item that breaks the expected behavior of the method. I think that the updated contents of the container should come through the stream immediately after stowing it, but I could be wrong.

As is, the methods go something like this (severely abbreviated):
Detect lootsack & item
Attempt to stow item in lootsack
Match stow messaging
Fall-back to iterating over INVENTORY CONTAINERS list if messaging isn't caught

Also, not to nerd-snipe Tillmen, but you could imagine some next-level messaging detection for scripted items sort of like how TARGET NPC is used to build a database of non-targetable NPCs. Basically, you could hook whatever messaging comes out after the stow command, and if the messaging isn't caught but the item is stowed (as described above), parse the messaging for a line that contains the lootsack exist tag, store that in a file, and use it to generate the regex for the message of that container.

Gnomad
09-28-2015, 03:26 PM
What is the wording for putting something in your climate cloak?

Just curious because it looks like the empty right function tries to cover all of its bases:

^You (?:attempt to shield .*? from view as you |discreetly |carefully |absent-mindedly )?(?:put|place|slip|tuck|add|drop|untie your|find an incomplete bundle|wipe off .*? and sheathe)|^A sigh of grateful pleasure can be heard as you feed .*? to your|^As you place|^I could not find what you were referring to\.$|^Your bundle would be too large|^The .+ is too large to be bundled\.|^As you place your|^The .*? is already a bundle|^Your .*? won't fit in .*?\.$|^You can't .+ It's closed!$

this is why i should actually spend time looking at the code before running my mouth. better man than me.