37 lines
1.1 KiB
Plaintext
37 lines
1.1 KiB
Plaintext
|
//::///////////////////////////////////////////////
|
||
|
//:: General Treasure Spawn Script
|
||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||
|
//:://////////////////////////////////////////////
|
||
|
/*
|
||
|
Spawns in general purpose treasure, usable
|
||
|
by all classes.
|
||
|
*/
|
||
|
//:://////////////////////////////////////////////
|
||
|
//:: Created By: Brent
|
||
|
//:: Created On: February 26 2001
|
||
|
//:://////////////////////////////////////////////
|
||
|
#include "NW_O2_CONINCLUDE"
|
||
|
|
||
|
void main()
|
||
|
|
||
|
{
|
||
|
if (GetIsDead(OBJECT_SELF)==TRUE)
|
||
|
{
|
||
|
location lSelf = GetLocation(OBJECT_SELF);
|
||
|
object oSelf = CreateObject(OBJECT_TYPE_PLACEABLE, "temporaryplaceho",lSelf,FALSE);
|
||
|
SetLocalString(oSelf,"sType",GetResRef(OBJECT_SELF));
|
||
|
AssignCommand(oSelf,DelayCommand(30.0,ExecuteScript("_chest_respawn",oSelf)));
|
||
|
DestroyObject(oSelf,35.0);
|
||
|
}
|
||
|
|
||
|
if (GetLocalInt(OBJECT_SELF,"NW_DO_ONCE") != 0)
|
||
|
{
|
||
|
return;
|
||
|
}
|
||
|
object oLastOpener = GetLastOpener();
|
||
|
GenerateLowTreasure(oLastOpener, OBJECT_SELF);
|
||
|
SetLocalInt(OBJECT_SELF,"NW_DO_ONCE",1);
|
||
|
DelayCommand(30.0,ExecuteScript("_chest_respawn",OBJECT_SELF));
|
||
|
ShoutDisturbed();
|
||
|
}
|