Battledale_PRC8/_module/nss/jw_cryptarea_exi.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

83 lines
1.5 KiB
Plaintext

void main()
{
{
object oObject = GetFirstObjectInArea();
int nPCinArea=FALSE;
location lLoc;
object oItem;
while (GetIsObjectValid(oObject))
{
if (GetIsPC(oObject))
{
nPCinArea = TRUE;
}
oObject=GetNextObjectInArea();
}
if (nPCinArea != TRUE)
{
// close and lock door
object oDoor=GetObjectByTag("jw_door_down");
AssignCommand(oDoor,ActionCloseDoor(oDoor));
AssignCommand(oDoor,SetLocked(oDoor,TRUE));
object oEnc=GetObjectByTag("guardainskels");
SetEncounterActive(1,oEnc);
//// make new lever
DelayCommand(5.0,SignalEvent(GetObjectByTag("jw_lion"),EventUserDefined(50)));
//// ensure lever "triggered" int is 1
DelayCommand(7.0,SetLocalInt(GetObjectByTag("jw_trap_lever"),"triggered",1));
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) == "jw_guardskel")
{
DestroyObject(oObject);
}
if (GetTag(oObject) == "BodyBag")
{
oItem = GetFirstItemInInventory(oObject);
while (GetIsObjectValid(oItem) == TRUE)
{
DestroyObject(oItem);
oItem=GetNextItemInInventory(oObject);
}
SetPlotFlag(oObject,FALSE);
DestroyObject(oObject);
}
oObject=GetNextObjectInArea();
}
}
}
}