LoD_PRC8/_module/nss/atreasurescript.nss
Jaysyn904 94990edc60 Initial Upload
Initial Upload
2023-09-21 21:20:34 -04:00

36 lines
760 B
Plaintext

////////////////////////////////
// Respawning Treasure Script
// By Tolerance0
// Medium Treasure Respawn
///////////////////////////////
#include "NW_o2_CONINCLUDE"
void main()
{
if (GetLocalInt(OBJECT_SELF,"NW_DO_ONCE") != 0)
{
return;
}
object oLastOpener = GetLastOpener();
GenerateMediumTreasure(oLastOpener, OBJECT_SELF);
SetLocalInt(OBJECT_SELF,"NW_DO_ONCE",1);
if(GetLocalInt(OBJECT_SELF, "NW_DO_ONCE") == 1)
{
object oPlayer = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR,
PLAYER_CHAR_IS_PC);
if(oPlayer == oLastOpener)
{
return;
}
ActionWait(10.0);
GenerateMediumTreasure(oLastOpener, OBJECT_SELF);
}
return;
}
//End Respawning Treasure Script