LoT_PRC8/_module/nss/lot_musheattest.nss
Jaysyn904 ec287507a1 Initial upload
Initial upload.
2023-09-25 21:32:17 -04:00

27 lines
882 B
Plaintext

int StartingConditional()
{
int iPiecesEaten = GetLocalInt(OBJECT_SELF, "PIECES_EATEN");
if(iPiecesEaten < 6){
return FALSE;
}
int iEatenDay = GetLocalInt(OBJECT_SELF, "DAY_EATEN");
int iEatenMonth = GetLocalInt(OBJECT_SELF, "MONTH_EATEN");
int iEatenYear = GetLocalInt(OBJECT_SELF, "YEAR_EATEN");
int iCalendarDay = GetCalendarDay();
int iCalendarMonth = GetCalendarMonth();
int iCalendarYear = GetCalendarYear();
if(iCalendarYear > iEatenYear){
SetLocalInt(OBJECT_SELF, "PIECES_EATEN", 0);
return FALSE;
}else if(iCalendarMonth > iEatenMonth + 1){
SetLocalInt(OBJECT_SELF, "PIECES_EATEN", 0);
return FALSE;
}else if((iCalendarMonth - iEatenMonth) * 28 + (iCalendarDay - iEatenDay) >= 14){
SetLocalInt(OBJECT_SELF, "PIECES_EATEN", 0);
return FALSE;
}
return TRUE;
}