Battledale_PRC8/_module/nss/jw_cyptgen_exit.nss
Jaysyn904 7b9e44ebbb Initial upload
Initial upload.  PRC8 has been added.  Module compiles, PRC's default AI & treasure scripts have been integrated.  Started work on top hak for SLA / Ability / Scripting modifications.
2024-03-11 23:44:08 -04:00

76 lines
1.4 KiB
Plaintext

void main()
{
{
object oObject = GetFirstObjectInArea();
int nPCinArea=FALSE;
location lLoc;
while (GetIsObjectValid(oObject))
{
if (GetIsPC(oObject))
{
nPCinArea = TRUE;
}
oObject=GetNextObjectInArea();
}
if (nPCinArea != TRUE)
{
object oItem;
oObject = GetFirstObjectInArea();
while (GetIsObjectValid(oObject) == TRUE)
{
//if (GetIsEncounterCreature(oObject)&&!GetPlotFlag(oObject))
// {
// DestroyObject(oObject);
// }
// if (GetObjectType(oObject)==OBJECT_TYPE_TRIGGER)
// {
// SetEncounterActive(TRUE,oObject);
// }
if (GetTag(oObject) == "BodyBag")
{
oItem = GetFirstItemInInventory(oObject);
while (GetIsObjectValid(oItem) == TRUE)
{
DestroyObject(oItem);
oItem=GetNextItemInInventory(oObject);
}
SetPlotFlag(oObject,FALSE);
DestroyObject(oObject);
}
if (GetResRef(oObject)=="jw_trap_trigger")
{
SetLocalInt(oObject,"done",0);
SetLocalInt(oObject,"triggered",FALSE);
}
if (GetTag(oObject) == "jw_trap_1_plate"||GetTag(oObject) == "jw_trap_2_plate"||GetTag(oObject) == "jw_trap_3_plate"||GetTag(oObject) == "jw_trap_4_plate"||GetTag(oObject) == "jw_trap_5_plate")
{
SetPlotFlag(oObject,0);
DestroyObject(oObject);
}
oObject=GetNextObjectInArea();
}
}
}
}