Stat Item User

Quick update: I noticed a little code error and fixed it.

Since my last foray with Mafia a few years ago, some useful functions have been added. Most notably stat_bonus_today(). My previous attempt at a script that remembers to use your stat items is here.

What it Does:

If it is a stat day, it will go through your items that will boost the proper attribute and use them if it can.

By default, it only goes through your inventory. But you can adjust it to use items in your closet, display case, and/or Hangk's.

It does require the additional file StatItemList.txt, because I found it easier to write a generating script to edit item values in, rather than clutter up the main script.

It is in Beta because I can't set the stat days to verify everything works 100%.
So do use with caution.

User Adjustments
In the function UserVar( string UserVariable), you can adjust what the script does.

ClosetUse: Set to true if you want the script to use stat items in your closet.
StorageUse: Set to true if you want the script to use stat items in Hanghk's.
MajorUse: Set to true id you want to use the Major stat items, like the stat script, meat globe, Bonerdagon chest, etc..
EggUse: Set to true if you want the script to use oyster eggs.
WadUse: Set to true if you want the script to use wads.

In the function MajorUseDay() un-comment the return line that fits what day(s) you want the Major stat items to be used on. Default is "main" which is they will only be used and stat days that match your primary stat. Optionally you can "hard code" it for only Muscle, Mysticality, or Moxie. Or you can set it for "any."

Known issue(s):
There is only one that I know of. If I set it as a login script or logout script I get a "no available namespace in function [path]/StatItemUserASH.ash" error.

I've looked, but I can't seem to find how to fix that yet.
 

Attachments

  • StatItemList.txt
    2.2 KB · Views: 105
  • StatItemUserASH.ash
    6.2 KB · Views: 58
Last edited:
Top