Ancordia_PRC8/_module/nss/wine_cask.nss
Jaysyn904 102ba7dab6 Initial Commit
Initial Commit
2023-09-21 19:51:32 -04:00

24 lines
598 B
Plaintext

void main()
{
string sItem = GetLocalString(OBJECT_SELF, "potion");
if (sItem == "") sItem = "NW_IT_MPOTION023";
object oPC = GetLastUsedBy();
if (!GetIsPC(oPC)) return;
int iToday = GetCalendarDay();
int iDate = GetLocalInt(OBJECT_SELF, "DAY");
if (iDate == 0)
{
SetLocalInt(OBJECT_SELF, "DAY", iToday);
CreateItemOnObject(sItem, oPC);
}
else if (iDate == iToday)
{
SendMessageToPC(oPC, "No more wine today.");
}
else
{
SetLocalInt(OBJECT_SELF, "DAY", iToday);
CreateItemOnObject(sItem, oPC);
}
}