ES_PRC8/_module/nss/falsechest.nss

22 lines
638 B
Plaintext
Raw Normal View History

2023-11-14 12:09:02 -05:00
#include "NW_O2_CONINCLUDE"
void main()
{
// Set respawntime float to the number of seconds.
float respawntime = 120.00;
if (GetLocalInt(OBJECT_SELF,"NW_DO_ONCE") != 0)
{
return;
}
object oLastOpener = GetLastOpener();
CreateItemOnObject("falsemark", OBJECT_SELF, 1);
SetLocalInt(OBJECT_SELF,"NW_DO_ONCE",1);
ShoutDisturbed();
// Command added to delay the <span class="highlight">respawn</span>
AssignCommand( OBJECT_SELF, DelayCommand (respawntime, SetLocalInt(OBJECT_SELF,"NW_DO_ONCE",0) ) );
AssignCommand( OBJECT_SELF, DelayCommand(120.0, SetLocked(OBJECT_SELF, TRUE)) );
}