ES_PRC8/_module/nss/evilchest.nss
Jaysyn904 08e84b4e71 Initial upload
Initial upload.
2023-11-14 12:09:02 -05:00

27 lines
1000 B
Plaintext

#include "NW_O2_CONINCLUDE"
void main()
{
// Set respawntime float to the number of seconds.
float respawntime = 1200.00;
if (GetLocalInt(OBJECT_SELF,"NW_DO_ONCE") != 0)
{
return;
}
object oLastOpener = GetLastOpener();
GenerateHighTreasure(oLastOpener, OBJECT_SELF);
GenerateHighTreasure(oLastOpener, OBJECT_SELF);
GenerateHighTreasure(oLastOpener, OBJECT_SELF);
GenerateHighTreasure(oLastOpener, OBJECT_SELF);
GenerateHighTreasure(oLastOpener, OBJECT_SELF);
GenerateMediumTreasure(oLastOpener, OBJECT_SELF);
GenerateLowTreasure(oLastOpener, OBJECT_SELF);
GenerateLowTreasure(oLastOpener, OBJECT_SELF);
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)) );
}