93 lines
1.4 KiB
Plaintext
93 lines
1.4 KiB
Plaintext
|
void main()
|
||
|
{
|
||
|
|
||
|
|
||
|
|
||
|
{
|
||
|
object oObject = GetFirstObjectInArea();
|
||
|
int nPCinArea=FALSE;
|
||
|
location lLoc;
|
||
|
object oItem;
|
||
|
|
||
|
|
||
|
// first of all, check every object in the area and see if it is a PC.
|
||
|
|
||
|
while (GetIsObjectValid(oObject))
|
||
|
{
|
||
|
if (GetIsPC(oObject))
|
||
|
{
|
||
|
nPCinArea = TRUE;
|
||
|
}
|
||
|
oObject=GetNextObjectInArea();
|
||
|
}
|
||
|
|
||
|
|
||
|
// if not, then run the next bit of the script
|
||
|
|
||
|
if (nPCinArea != TRUE)
|
||
|
{
|
||
|
// create the coffin if it's not there
|
||
|
if (!GetIsObjectValid(GetObjectByTag("ah_evil_coffin")))
|
||
|
|
||
|
{
|
||
|
lLoc=GetLocation(GetObjectByTag("ah_coffin_wp"));
|
||
|
CreateObject(OBJECT_TYPE_PLACEABLE,"ah_evil_coffin",lLoc);
|
||
|
}
|
||
|
|
||
|
oObject = GetFirstObjectInArea();
|
||
|
while (GetIsObjectValid(oObject) == TRUE)
|
||
|
{
|
||
|
|
||
|
if (GetTag(oObject) == "ah_crypt_portal")
|
||
|
{
|
||
|
SetPlotFlag(oObject,FALSE);
|
||
|
|
||
|
DestroyObject(oObject);
|
||
|
}
|
||
|
|
||
|
if (GetTag(oObject) == "ah_evil_bodak")
|
||
|
{
|
||
|
SetPlotFlag(oObject,FALSE);
|
||
|
|
||
|
DestroyObject(oObject);
|
||
|
}
|
||
|
|
||
|
if (GetResRef(oObject)=="jw_mobstransf_tr")
|
||
|
{
|
||
|
SignalEvent(oObject,EventUserDefined(50));
|
||
|
}
|
||
|
|
||
|
if (GetLocalInt(oObject,"jw_hidden_int")==TRUE)
|
||
|
{
|
||
|
SetPlotFlag(oObject,0);
|
||
|
DestroyObject(oObject);
|
||
|
}
|
||
|
|
||
|
|
||
|
if (GetTag(oObject) == "Body Bag")
|
||
|
{
|
||
|
|
||
|
oItem = GetFirstItemInInventory(oObject);
|
||
|
while (GetIsObjectValid(oItem) == TRUE)
|
||
|
{
|
||
|
|
||
|
|
||
|
DestroyObject(oItem);
|
||
|
|
||
|
oItem=GetNextItemInInventory(oObject);
|
||
|
}
|
||
|
|
||
|
SetPlotFlag(oObject,FALSE);
|
||
|
|
||
|
DestroyObject(oObject);
|
||
|
}
|
||
|
oObject=GetNextObjectInArea();
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|
||
|
}
|
||
|
|