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

Thread: Bug in available_amount() ?

  1. #1
    Junior Member
    Join Date
    Oct 2018
    Posts
    15

    Default Bug in available_amount() ?

    I'm kinda new at this, so maybe I'm not understanding something.

    I am currently a level 9 Pastamancer, and today I got a psychic's circlet from Madam Zatara. I've written a script to equip my "best" rollover stuff, but when I run it I discover that available_amount($item[psychic's circlet]) is zero. I can in fact manually equip my psychic's circlet. What am I missing, or did I find a bug?

  2. #2
    Senior Member AlbinoRhino's Avatar
    Join Date
    May 2008
    Posts
    912

    Default

    Items obtained through kmail aren't added to mafia's inventory until you manually refresh the inventory....I think.

  3. #3
    Junior Member
    Join Date
    Oct 2018
    Posts
    15

    Default

    How would I do that? I'd refreshed the Mafia page several times before I ran my script... I got the circlet first thing, and ran the script when I was done for the day. I will report back after rollover to see if anything has changed.

  4. #4
    Senior Member
    Join Date
    Jun 2016
    Posts
    283

    Default

    Type 'refresh inv' into the mafia cli and hit enter. (Or better, put a line to that effect into the script.)

  5. #5
    Junior Member
    Join Date
    Oct 2018
    Posts
    15

    Default

    Hmm. In the mean time, I'd logged off. I logged back on to try this, but available_amount() now returns the expected value. I'll try it with a new item from Zatara after rollover. I think you've probably got the right answer, though....

  6. #6
    Senior Member
    Join Date
    Jun 2016
    Posts
    283

    Default

    yeah, mafia rechecks everything when you log in (and maybe when you log out too), so that would cover this.

  7. #7
    Senior Member
    Join Date
    Oct 2014
    Posts
    174

    Default

    "refresh inv"

    Bah, I was looking to see if someone said this and didn't see it but The Dictator beat me to it.
    Last edited by cheesecookie; 11-05-2018 at 03:25 AM. Reason: Derpity derp.

  8. #8
    Junior Member
    Join Date
    Oct 2018
    Posts
    15

    Default

    Yes! That was exactly it. Once I did a cli_execute("refresh inv"); everything worked as expected.

    Thanks to everyone who responded. I will figure this stuff out yet!

  9. #9
    Developer
    Join Date
    Apr 2010
    Posts
    4,996

    Default

    Or hit refresh button in inventory pane.
    Or have chat open when the kmail arrives.

  10. #10
    Senior Member Crowther's Avatar
    Join Date
    Nov 2006
    Posts
    1,422

    Default

    I always thought it was "inv refresh" and it seems both work.

Posting Permissions

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