PoA_PRC8/_module/nss/motherdoor.nss

26 lines
813 B
Plaintext
Raw Permalink Normal View History

2022-10-07 14:20:31 -04:00
void main()
{
object oPC= GetLastAttacker();
int count = 0;
object member = GetFirstFactionMember(oPC,TRUE);
while (member != OBJECT_INVALID){
if (GetArea(oPC) == GetArea(member)){
count = count +1;
}
member = GetNextFactionMember(oPC,TRUE);
}
if (count >= 5){
SetPlotFlag(OBJECT_SELF, FALSE);
location loc = GetLocation(GetWaypointByTag("motherentrance"));
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_FNF_SCREEN_SHAKE), loc, 9.0);
DelayCommand (1.0, DestroyObject(OBJECT_SELF));
}
if (count <=4){
string number = IntToString(count);
DelayCommand(1.5, SendMessageToPC(oPC, "It will take the combined strength of at least 5 people to knock this door down."));
DelayCommand(1.6, SendMessageToPC(oPC, "You have only " + number + " people nearby in your party."));
}
}