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