24 lines
564 B
Plaintext
24 lines
564 B
Plaintext
|
// Treasure respawn script created by Luni@luukku.com
|
||
|
//
|
||
|
// Creates a treasure, after the defined time, clears the remaining
|
||
|
// stuff from the chest and spawns new items.
|
||
|
#include "NW_O2_CONINCLUDE"
|
||
|
|
||
|
void main()
|
||
|
{
|
||
|
float fDelay = 1800.0;
|
||
|
if (GetLocalInt(OBJECT_SELF,"NW_DO_ONCE") != 0)
|
||
|
{
|
||
|
return;
|
||
|
}
|
||
|
object oLastOpener = GetLastOpener();
|
||
|
|
||
|
// some gold
|
||
|
CreateGold(OBJECT_SELF, oLastOpener, 1,2);
|
||
|
|
||
|
SetLocalInt(OBJECT_SELF,"NW_DO_ONCE",1);
|
||
|
DelayCommand(fDelay,SetLocalInt(OBJECT_SELF,"NW_DO_ONCE",0));
|
||
|
|
||
|
ShoutDisturbed();
|
||
|
}
|