Search results

  1. P

    How can I detect new kmails in a script?

    Thanks. I never noticed the "New!" tag in messages.php. This works perfectly in my login script. (I'm not looking for anything more complicated than an alert that there is, in fact, a new message.) contains_text(visit_url("messages.php"), "<span style="color:blue;">New!</span>") For reference...
  2. P

    How can I detect new kmails in a script?

    api.php says "retrieve all events after this date/time (parseable by strtotime())" The linked http://us3.php.net/strtotime says "The function expects to be given a string containing an English date format..." It links to http://us3.php.net/manual/en/datetime.formats.date.php, which gives...
  3. P

    How can I detect new kmails in a script?

    Okay, that makes sense. So I tried visit_url("api.php?what=messages&since=11/13/15&for=paladinwhitecheckkmails") ... but all I get is the api.php documentation. I think maybe I should be using what=events instead, (then using what=kmails&id=[] to read them), but that also doesn't work.
  4. P

    Bug - Fixed Stranglin' algae drops sea lace

    The wiki lists it (at 30%), and a stranglin' algae just dropped one for me. But Mafia doesn't seem to know.
  5. P

    How can I detect new kmails in a script?

    Bale, thanks for the chatbot tip. That will certainly come in handy for other things. But it's not exactly what I was hoping for here... What I'm really looking for is a one-time, on-demand check for messages, not an always-on listener. Specifically, I'm hoping to check for messages in my login...
  6. P

    How can I detect new kmails in a script?

    So, Mafia will notify me of new kmails in the chat and gCLI. I'd like to detect and handle new kmails myself. But I can't figure out how to do it. I thought it would be as simple as contains_text(visit_url("main.php"), "New message received"). But that never seems to return true - main.php...
  7. P

    Is there a way to get Mafia to close completely upon logout?

    When I log out of Mafia, either by clicking the close-window (X) button, or by using "logout" in the CLI, I'm returned to the login screen. Is there a way to cause Mafia to close completely, other than waiting to be returned to the login screen and X-ing out of the window again? eg. is there an...
  8. P

    The Towering Inferno Discotheque visit

    Nothing I love more than dumping a custom preference in favor of a built-in one that's guaranteed to be named the same as everyone else's. Thanks, Darzil!
  9. P

    The Towering Inferno Discotheque visit

    Someone also wondered about this on the KoL forums. An underscore preference would be great; maybe 0 when nothing's been taken that day, and and 1 - 6 to denote which floor you've visited?
  10. P

    Bug - Not A Bug buy() won't buy (in hardcore/ronin?)

    r16393. boolean buy(int qty ,item it ) and int buy(int qty ,item it ,int price ) aren't working for me. Presumably because I'm in hardcore/ronin? Mafia knows there are items available at my specified price, and it knows I have enough meat in storage, but it simply declines to purchase the item...
  11. P

    Feature - Implemented Overload put_shop() to stock from Hagnk's

    That sounds fine to me, too. I guess in that case, it would have two versions, a la put_shop(): boolean put_shop_using_storage( int price, int limit, item it ) boolean put_shop_using_storage( int price, int limit, int qty, item it )
  12. P

    Feature - Implemented Overload put_shop() to stock from Hagnk's

    I'd love a version of put_shop() to be able to stock my shop from Hagnk's instead of only from inventory. The Store Manager interface can already do this, but as far as I can tell, there's not currently an ASH equivalent. I'd propose boolean put_shop( int, int, int, item, boolean from_hagnks )
  13. P

    What do the plus/minus options in Preferences > Automation do?

    In General > Preferences > Automation, each script line is preceded by a toggle-able plus/minus sign. What does that setting do? I can't find anything else that it affects, and in fact, the selection doesn't persist after I close the Preferences window. (All pluses revert to minuses when I...
  14. P

    Bug - Not A Bug Bone rattle is not smashable, but Mafia thinks it is (I think?)

    Bone rattle is listed in the Pulverize section of the Item Manager. However, if you send one to smashbot, he replies "1 bone rattles: send back, as it doesn't malus or pulverise." I don't see a smashable field in $item[bone rattle], so I'm not sure where this is tracked, but it appears that...
  15. P

    Feature int user_input_int() and string user_input_string()

    Hellno, is there a particular use you'd imagine for the feature? Some devs have requested use-cases, and I can totally understand how that can be the difference between "an interesting thought" and "worth my time to code up."
  16. P

    Feature int user_input_int() and string user_input_string()

    wellthatescalatedquickly.gif. What you're hearing as "defending this idea to the death" was intended as "offering a variety of reasons why I think this would be a good idea." I do apologize if I've crossed some invisible line by discussing the idea at offensive length. It's true that I'm saying...
  17. P

    Feature int user_input_int() and string user_input_string()

    I never run Mafia headless, so it'd be interesting to hear from someone who does. "Whatever happens now with user_confirm()" does seem like a good place to start. That said, two things occur to me. (1) What portion of the userbase ever runs headless? I can only imagine it's a tiny fraction...
  18. P

    Feature int user_input_int() and string user_input_string()

    Couldn't have said it better.
  19. P

    Feature int user_input_int() and string user_input_string()

    I'd be interesting in reading that discussion, if anyone remembers where it is. I guess my take is that, yeah, we don't want people to be constantly pestered. But there's a difference between asking scripters to "do this in a non-annoying way" and not letting scripters do this at all. Other...
  20. P

    Feature int user_input_int() and string user_input_string()

    AFAIK, currently, the only way to prompt for user input is via boolean user_confirm(). Other types are hard to input. There are many times when I want to take non-boolean user inputs in order to determine how a script will execute. Currently, I'm using some silly workarounds. For instance...
Back
Top