No worries, I don't think you're alone in having that problem. I'll tell you how I do it (there are multiple ways, really), but first a little info so you understand what's going on. That way you (and anyone else with this problem) can apply the knowledge to other kinds of deeds.
Each deed is attached to a preference. This is the thing it checks to see if it should be enabled/disabled. In the case of built-in stuff that mafia tracks, these preferences already exist and properly increment when you do the appropriate action. However, for stuff that mafia
doesn't track, you need to do this yourself. The easiest way I've found is just to have a little utility ash script:
Code:
/*
Increments a preference.
*/
script "inc.ash";
void main( string pref )
{
string value = get_property( pref );
int intValue = to_int( value );
set_property( pref, intValue + 1 );
}
called inc.ash in your /scripts folder. Now you can easily increment preferences by putting "; inc <whatever preference>" in the command section of your deed. But I'm getting ahead of myself. There are essentially 2 ways to implement your deed, and I'll go through both (using stabonic scroll as an example). I'll assume you're using the custom deed builder too. You can just hand-edit the dailyDeedsOptions preference, but that's a bit more advanced. I'll talk about that at the end.
Command deed:
The most basic deed. The button will always be shown, regardless of whether you have the item you're using.
displayText: stabonic scroll
preference: _stabby
command: use stabonic scroll; inc _stabby
That's it. Notice that the inc.ash script increments your _stabby preference in order to disable the button.
Combo deed:
This is the advanced one. There is no GUI for building this, but you can collapse all of the use-this-item-once-a-day buttons into one combobox. I've talked about the syntax for this on previous pages, but this is essentially how it would look for you:
$CUSTOM|Combo|Daily Items|false|$ITEM|stabonic scroll|_stabby|use stabonic scroll; inc _stabby|$ITEM|Hobby Horse|...
If you have a lot of daily items, this is a superior method than cluttering up the interface with buttons. You'll have to hand-edit the above into your dailyDeedsOptions preference once it's constructed.