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

53 lines
804 B
Plaintext

void main()
{
object oObject=GetEnteringObject();
int nPCinArea=FALSE;
int nIdx;
object oPC=GetEnteringObject();
if (GetIsDM(oPC))
{
return;
}
if (!GetIsPC(oPC))
{
return;
}
oObject=GetFirstObjectInArea();
while (GetIsObjectValid(oObject))
{
if (GetIsPC(oObject)&&oObject!=oPC)
{
nPCinArea = TRUE;
}
oObject=GetNextObjectInArea();
}
/// this returns true if there are any PCs in the area that are NOT
/// the object that just entered the area
if (nPCinArea != TRUE)
{
if (GetIsObjectValid(GetObjectByTag("jw_silver_trap")))
{
return;
}
else
{
oObject=CreateObject(OBJECT_TYPE_PLACEABLE,"jw_silver_trap",GetLocation(GetObjectByTag("jw_silver_object")));
SignalEvent(oObject,EventUserDefined(10));
}
}
}