Page 1 of 2 1 2 LastLast
Results 1 to 10 of 16

Thread: Moving exactly two kinds of item from inventory to stash does not update inventory

  1. #1

    Default Moving exactly two kinds of item from inventory to stash does not update inventory

    If I take something out of my Clan Stash, Mafia notes it as gaining that item; however, it is no longer noting the related loss of an item when I return it to the Stash.

    I don't know what the last version I used that handled it correctly was, since this is my first real stint in aftercore since the Valhalla thing, but I'm using r9401 at the moment.

  2. #2
    Developer
    Join Date
    Nov 2008
    Location
    Paris, France
    Posts
    4,510

    Default

    Code:
    > inv asshat
    
    asshat
    
    > stash put 1 asshat
    
    Dropping items into stash...
    
    > inv asshat
    It seems to work for me. Maybe the response was lost in lag?
    Try the Nemesis Quest Script or the FamiliarFeeder interface.
    *shakes KoLMafia tech support magic 8-ball* Update mafia to the latest daily .JAR!
    NEW Dad ASCENSION STARTED 20120730
    ------------------------------
    Welcome to Parenthood, Noob

  3. #3

    Default

    Hm. It's working for me now... I guess it must've been a spot of whitescreening. Apologies for the false report, then.

  4. #4
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,321

    Default

    I've seen this myself. I have the following note on my personal to-do list: "Dropping multiple items in clan stash does not detect transfer correctly". So, perhaps it only happens when you select more than one thing in the Item Manager and drop them in the stash. Or, perhaps, only when you select more than one of one thing - a plurals, issue.
    I'm going to reopen this.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  5. #5

    Default

    Ah. Yeah, I was multi-dropping when it failed to work. Didn't think to consider that as a problem vector.

  6. #6
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,321

    Default

    Well...I multi-dropped 5 items at a time and saw no problems. I only dropped one of each item, so plurals were not involved.

    I'd like a repeatable case: "I dropped in 2 of item x and 1 of item y from the item manager, and KoLmafia did not remove item x from my inventory but did remove item y", for example.

    That's why this is marked "Waiting for Info": if you see a problem, look in your session log and find the line that reports what was happening:

    add to stash: 1 xxx, 1 yyy, 1, zzz

    ...for example, and report it here. That line is printed before you submit the URL. The actual updating of inventory comes after the request is submitted and we can look at the result text to see what KoL said actually happened.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  7. #7

    Default

    Attempt was 2 stars and 2 lines from the Item Manager. Item Manager did not refresh either item's amount. Session log shows:

    add to stash: 2 line, 2 star

  8. #8
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,321

    Default

    This command:

    stash put 5 line, 5 star

    logs as this:

    add to stash: 5 line, 5 star

    submits this URL:

    clan_stash.php?action=addgoodies&item1=655&qty1=5& item2=654&qty2=5

    which results in this text from KoLmafia:

    You add 5 stars and 5 lines to the Goodies Hoard.

    ClanStashRequest uses this pattern to match that string

    "You add (.*?) to the Goodies Hoard"

    and get

    5 stars and 5 lines

    TransferItemRequest.getItemList( String, Pattern) uses this pattern to extract the items from that:

    "(\\d+) ([^,]*)"

    ...and fails.

    Doing the same thing for 5 line, 5 star, 5 star chart submits this:

    clan_stash.php?action=addgoodies&item1=654&qty1=5& item2=655&qty2=5&item3=656&qty3=5

    and results in this:

    You add 5 stars, 5 lines, and 5 star charts to the Goodies Hoard.

    And that works.

    In other words, it works fine for "1 a, 2 b, and 3 c" but when you have exactly two items, there is no comma and we screw up.

    I now know what needs to be done. It's just a Simple Matter of Coding to make it so.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  9. #9
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,321

    Default

    Or not so easy. I'm looking for a regular expression which will match this:

    1 Rock and Roll Legend

    once and return groups like this:

    group(1) = 1
    group(2) = Rock and Roll Legend

    Match this:

    1 Rock and Roll Legend and 1 5-alarm saucepan

    twice and return groups like this:

    group(1) = 1
    group(2) = Rock and Roll Legend
    group(1) = 1
    group(2) = 5-alarm saucepan

    Match this:

    1 Rock and Roll Legend, 1 5-alarm saucepan, and 1 gin and tonic

    thrice and return groups like this:

    group(1) = 1
    group(2) = Rock and Roll Legend
    group(1) = 1
    group(2) = 5-alarm saucepan
    group(1) = 1
    group(2) = gin and tonic

    No joy, so far.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  10. #10
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,287

    Default

    When you consider 1337 7r0uZ0RZ and 1.21 jigawatts I consider that the solution might actually be impossible.
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.


Similar Threads

  1. Replies: 0
    Last Post: 04-09-2015, 08:04 AM
  2. Replies: 0
    Last Post: 09-29-2013, 05:40 PM
  3. Replies: 0
    Last Post: 06-09-2011, 11:20 PM
  4. Anyone else having problems with clan stash/inventory?
    By wubbie in forum Community Support
    Replies: 1
    Last Post: 03-29-2008, 06:44 PM
  5. Item of the Month Inventory
    By Camber in forum Scripting Discussion
    Replies: 3
    Last Post: 03-27-2008, 08:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •