PWE_PRC8/_module/nss/ats_tcan_onused.nss
Jaysyn904 ee1dc35889 Initial Commit
Initial Commit
2025-04-03 10:29:41 -04:00

25 lines
539 B
Plaintext

void main()
{
int iTimesUsed = GetLocalInt(OBJECT_SELF, "ats_onused");
++iTimesUsed;
if(iTimesUsed == 2)
{
if(GetLocalInt(OBJECT_SELF, "ats_opened") == TRUE)
{
iTimesUsed = 1;
SetLocalInt(OBJECT_SELF, "ats_opened", FALSE);
}
else
{
iTimesUsed = 0;
SetLocalInt(OBJECT_SELF, "ats_onused", 0 );
ActionStartConversation(GetLastUsedBy(), "", TRUE);
}
}
SetLocalInt(OBJECT_SELF, "ats_onused", iTimesUsed );
}