Initial Commit
Initial Commit
This commit is contained in:
23
_module/nss/wine_cask.nss
Normal file
23
_module/nss/wine_cask.nss
Normal file
@@ -0,0 +1,23 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user