Bug - Fixed Inventory count of rusty hedge trimmers incorrect (after using them?)

r15696.

  1. I have 2 rusty hedge trimmers.
  2. I use 1 of the hedge trimmers.
  3. /count rusty hedge trimmers (in the relay chat)
    You have 1 rusty hedge trimmers.
  4. inventory rusty hedge trimmers (in the CLI)
    [no results]

refresh inventory fixed it.

Is it possible that this inventory is getting set to 0 when one is used, rather than being decremented?
 
Last edited:

Ensiferum

Member
This has been happening for a long time, probably since the twin peak was added to the game. I dont remember if inventory refresh worked for me, but using the trimmers from the CLI definitely removes more than one at some point.

I discussed it with Darzil back in September last year, grabbed a debug log and then never posted it. I'm a slacker, I know.

And apparently i've overwritten the text in that debug log with something completely useless...
 
Last edited:

Darzil

Developer
It may be related to GenericRequest.checkItemRedirection. Many things have a consumed flag that gets set, after which they are consumed. Some of these are marked reusable in items.txt, some are marked usable. I guess which is should be may depend on if you go directly or indirectly into a fight. I suspect if it's direct the item is not consumed unless the consume flag is set, if it is indirect the item is consumed. If this one is one way or the other depending on how it is called that could be tricky. I usually use them from chat command, and haven't seen an issue.
 

Veracity

Developer
Staff member
I always use it from a chat command, too, and it works fine for me.
What does your script do after it uses the item? It has to handle the choice adventure, somehow.
 

Ensiferum

Member
I don't even use a script - I "use trimmer" in the CLI, refresh the relay, select choices 1-4 and press the "auto" button on mafia. Or just "use trimmer" and "choice 1/2/3/4" in the CLI. It always breaks after 2 trimmers are used and claims that no more are available, at least if you start with 4 or 3. Using from chat works fine at that point.

I'm not really sure how I managed to overwrite that "trimmers.txt" I've been keeping for months, but that's the way it is and I won't be ascending in casual enough run to have 4 trimmers any time soon to replicate it.
 

Theraze

Active member
Might be related to dolphin whistles, bowls of scorpions, and some other items irregularly getting out of inventory sync. I don't think those have ever been properly documented and logged well enough to sort out. Hopefully whatever fix gets applied to this will sort out some of those other bits and reduce "refresh inv" calls needed to keep things consistent.
 

Veracity

Developer
Staff member
It was an issue with using the item via a UseItemRequest - i.e., a "use" command or the equivalent; an internal usage of the item, rather than Relay Browser or visit_url() usage.

Revision 15740.
 
Top