32 lines
634 B
Plaintext
32 lines
634 B
Plaintext
|
|
#include "NW_O2_CONINCLUDE"
|
|
|
|
void main()
|
|
|
|
{
|
|
// Get the creature who triggered this event.
|
|
object oPC = GetLastOpenedBy();
|
|
|
|
// Only fire once.
|
|
if ( GetLocalInt(GetModule(), "DO_ONCE__" + GetTag(OBJECT_SELF)) )
|
|
return;
|
|
SetLocalInt(GetModule(), "DO_ONCE__" + GetTag(OBJECT_SELF), TRUE);
|
|
|
|
// Set a local string.
|
|
SetLocalString(oPC, "cbtbsmntky1", "1");
|
|
|
|
if (GetLocalInt(OBJECT_SELF,"NW_DO_ONCE") != 0)
|
|
{
|
|
return;
|
|
}
|
|
object oLastOpener = GetLastOpener();
|
|
GenerateHighTreasure(oLastOpener, OBJECT_SELF);
|
|
SetLocalInt(OBJECT_SELF,"NW_DO_ONCE",1);
|
|
|
|
ShoutDisturbed();
|
|
|
|
}
|
|
|
|
|
|
|