86 lines
2.4 KiB
Plaintext
86 lines
2.4 KiB
Plaintext
|
|
|
|
void main()
|
|
{
|
|
|
|
//Declare Variables
|
|
object oPC= GetLastUsedBy();
|
|
object immortal = GetNearestObjectByTag("immortal2");
|
|
object crown = GetItemPossessedBy(oPC, "ImmortalCrown2");
|
|
location sage = GetLocation(GetWaypointByTag("sage1"));
|
|
object immo;
|
|
object area1 = GetArea(oPC);
|
|
object area2;
|
|
object oPlace;
|
|
object party;
|
|
object oWarn;
|
|
location lVis;
|
|
int nHP;
|
|
|
|
if (immortal != OBJECT_INVALID)
|
|
{
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(3000, DAMAGE_TYPE_MAGICAL, DAMAGE_POWER_PLUS_FIVE), oPC);
|
|
return;
|
|
}
|
|
|
|
else if (crown == OBJECT_INVALID)
|
|
{
|
|
SendMessageToPC(oPC, "You must have the Immortal Crown to place in the forge!");
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(3000, DAMAGE_TYPE_MAGICAL, DAMAGE_POWER_PLUS_FIVE), oPC);
|
|
return;
|
|
}
|
|
|
|
else
|
|
{
|
|
|
|
//If the pc has the crown then destroy it..
|
|
AssignCommand(oPC, DestroyObject(crown, 0.0f));
|
|
|
|
party = GetFirstFactionMember(oPC);
|
|
while (party != OBJECT_INVALID)
|
|
{
|
|
|
|
oWarn = GetFirstPC();
|
|
while ((oWarn != OBJECT_INVALID))
|
|
{
|
|
oPlace = GetArea(oWarn);
|
|
//Only do this to people not in the area of the pc, BEFORE the crown break!
|
|
if(oPlace!= area1)
|
|
{
|
|
lVis = GetLocation(oWarn);
|
|
DelayCommand(4.0, SendMessageToPC(oWarn, "The Immortal Crown Has Been Destroyed!!!!!!!!."));
|
|
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_FNF_TIME_STOP), lVis, 5.0);
|
|
DelayCommand(5.0, SendMessageToPC(oWarn, "Suddenly, You feel The Life Energy Being Sucked From You!!!!!."));
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(5000, DAMAGE_TYPE_MAGICAL, DAMAGE_POWER_PLUS_FIVE), oWarn);
|
|
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_FNF_IMPLOSION), lVis, 5.0);
|
|
}
|
|
|
|
oWarn = GetNextPC();
|
|
}
|
|
|
|
area2 = GetArea(party);
|
|
|
|
if (area1==area2)
|
|
{
|
|
nHP = GetMaxHitPoints(party);
|
|
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectHeal(nHP), party);
|
|
ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_PARALYZED), party);
|
|
|
|
//If the member is in the area and does not have a token...
|
|
if(GetItemPossessedBy(party, "immotoken")==OBJECT_INVALID)
|
|
{ CreateItemOnObject("immotoken", party, 1); }
|
|
|
|
DelayCommand(0.1, AssignCommand(party, ClearAllActions()));
|
|
DelayCommand(0.2, AssignCommand(party, JumpToLocation(sage)));
|
|
}
|
|
|
|
party = GetNextFactionMember(oPC);
|
|
}
|
|
|
|
//Else Statement End
|
|
}
|
|
|
|
//Main Script End
|
|
}
|