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.
103 lines
2.0 KiB
Plaintext
103 lines
2.0 KiB
Plaintext
void main()
|
|
{
|
|
|
|
|
|
object oObject = GetFirstObjectInArea();
|
|
|
|
object oPC=GetEnteringObject();
|
|
|
|
if (!GetIsPC(oPC))
|
|
{
|
|
return;
|
|
}
|
|
|
|
if (GetIsDM(oPC))
|
|
{
|
|
return;
|
|
}
|
|
|
|
|
|
int nPCinArea=FALSE;
|
|
location lLoc;
|
|
int nIdx;
|
|
object oGolem;
|
|
// ENTERING
|
|
|
|
//int nPCinArea=FALSE;
|
|
//location lLoc;
|
|
object oItem;
|
|
|
|
|
|
//
|
|
object oTest=GetFirstPC();
|
|
|
|
|
|
|
|
|
|
while (GetIsObjectValid(oTest) == TRUE)
|
|
{
|
|
if ((GetArea(oTest) == OBJECT_SELF)&&(!GetIsDM(oTest))&&(oTest!=oPC))
|
|
{
|
|
nPCinArea = TRUE;
|
|
return;
|
|
}
|
|
oTest=GetNextPC();
|
|
}
|
|
|
|
/// this returns true if there are any PCs in the area that are NOT
|
|
/// the object that just entered the area
|
|
|
|
if (nPCinArea != TRUE)
|
|
{
|
|
nIdx=0;
|
|
oObject=GetObjectByTag("jw_gol_wp",nIdx);
|
|
|
|
while (GetIsObjectValid(oObject))
|
|
{
|
|
oGolem=CreateObject(OBJECT_TYPE_CREATURE,"jw_neutral_gol",GetLocation(oObject));
|
|
AssignCommand(oGolem,SetFacing(GetFacing(oObject)));
|
|
nIdx++;
|
|
oObject=GetObjectByTag("jw_gol_wp",nIdx);
|
|
}
|
|
|
|
nIdx=0;
|
|
oObject=GetObjectByTag("jw_fake_tres_wp",nIdx);
|
|
|
|
while (GetIsObjectValid(oObject))
|
|
{
|
|
oGolem=CreateObject(OBJECT_TYPE_PLACEABLE,"jw_fake_tres",GetLocation(oObject));
|
|
AssignCommand(oGolem,SetFacing(GetFacing(oObject)));
|
|
nIdx++;
|
|
oObject=GetObjectByTag("jw_fake_tres_wp",nIdx);
|
|
}
|
|
|
|
|
|
CreateObject(OBJECT_TYPE_CREATURE,"kethoth",GetLocation(GetWaypointByTag("jw_kethoth_wp")));
|
|
|
|
}
|
|
|
|
|
|
if (GetLocalInt(OBJECT_SELF,"donesetup")!=2)
|
|
|
|
{
|
|
for (nIdx=1;nIdx<=3;nIdx++)
|
|
{
|
|
|
|
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT,ExtraordinaryEffect(EffectAreaOfEffect(AOE_PER_WEB,"jw_web_effect","jw_empty_script","jw_empty_script")),GetLocation(GetObjectByTag("jw_web_object"+IntToString(nIdx))));
|
|
|
|
}
|
|
|
|
//for (nIdx=1;nIdx<=5;nIdx++)
|
|
// {
|
|
|
|
// ApplyEffectAtLocation(DURATION_TYPE_PERMANENT,EffectAreaOfEffect(AOE_PER_FOGFIRE,"jw_fire_smoke","jw_empty_script","jw_empty_script"),GetLocation(GetObjectByTag("jw_fire_object"+IntToString(nIdx))));
|
|
|
|
// }
|
|
|
|
|
|
SetLocalInt(OBJECT_SELF,"donesetup",2);
|
|
}
|
|
|
|
|
|
}
|