Results 1 to 6 of 6

Thread: what are all the ways mafia can consult a script? like recovery, breakfast

  1. #1

    Default what are all the ways mafia can consult a script? like recovery, breakfast

    I want one that runs automatically when I eat or drink anything

  2. #2
    Developer jasonharper's Avatar
    Join Date
    Sep 2008
    Location
    Oklahoma
    Posts
    1,122

    Default

    A quick search through the source code turned up these scriptable overrides.

    CLI scripts (which can of course invoke an ASH script via "call"):
    loginScript
    logoutScript
    betweenBattleScript
    preAscensionScript
    postAscensionScript

    ASH-only scripts:
    plantingScript
    counterScript
    recoveryScript
    buyScript
    chatbotScript

    There's nothing currently triggered when you eat or drink things. What would this allow you to accomplish? Would it need to be called before the actual consumption (so you could deny or modify the request), or afterwards (so you could see the results), or possibly both?
    In game: Seventh (#363053), originally a Seal clubber. I am the Ap'ostle of Ak'gyxoth! (Or is that Ap'ostrophe?)

  3. #3
    Senior Member mredge73's Avatar
    Join Date
    Dec 2008
    Location
    Houston TX
    Posts
    519

    Default

    I would like to know this too, here is a list that I got from the preferences:

    Breakfast, both on log on and log off
    customCombatScript, after combat is initialized
    betweenBattleScript, works before a battle begins?
    chatbotScript, initializes when you get a private message
    counterScript, initializes when a relaycounter expires
    plantingScript, automatically plants mushrooms
    postAscensionScript, not sure how this one works
    preAscensionScript, not sure how this one works
    recoveryScript, Bale uses this one
    buyScript, not sure how this one works

    Of course these are not documented anywhere, you have to search around the forums her to find code snippets to learn from. Good Luck, I don't think there is one for when you eat or drink anything.


    Edit:
    Looks like we posted at the same time.

  4. #4

    Default

    there is a pvp minigame that compares how many unique foods and drinks you have consumed in the last 30 days

    I want mafia to track all teh food and booze I consume for a month, so I know what new stuff I can eat or drink. I think this is possible to do with a script, but an easier way would be for mafia to just print out a file and use that to track all of it. this would let me print out a list of new possible foods

    I was thinking after, but possibly both

  5. #5
    Developer jasonharper's Avatar
    Join Date
    Sep 2008
    Location
    Oklahoma
    Posts
    1,122

    Default

    Hmmm, if I were implementing that I think I'd just visit the consumption history page every day, parse the items & counts shown there, and write it to a map file with a name based on the current date. To determine what was consumed in the last 30 days, read today's map and the one you have that's closest to 30 days old, and subtract corresponding entries. This approach would handle any food or booze that was consumed outside of mafia, for example newly added items that mafia doesn't know about yet.
    In game: Seventh (#363053), originally a Seal clubber. I am the Ap'ostle of Ak'gyxoth! (Or is that Ap'ostrophe?)

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

    Default

    Yep. No need for that script to execute after eating. Just run it once a day before eating your food so that you know what you should eat.
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.


Similar Threads

  1. Universal Recovery Script
    By Bale in forum Buff Upkeep Scripts
    Replies: 2379
    Last Post: 08-10-2018, 02:11 AM
  2. Replies: 3
    Last Post: 03-08-2012, 02:37 PM
  3. Recovery Script for Hardcore
    By Bale in forum Buff Upkeep Scripts
    Replies: 84
    Last Post: 03-04-2009, 08:17 AM
  4. Call consult script from another consult script.
    By asturia in forum Custom Combat Settings
    Replies: 4
    Last Post: 01-28-2009, 01:22 PM
  5. Very New, Need a MP Recovery Script
    By Willie0248 in forum Scripting Discussion
    Replies: 2
    Last Post: 04-15-2006, 09:30 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
  •