#include "nw_i0_generic" #include "x0_i0_partywide" void main() { object oTarget; object oSpawn; location lTarget; int nInt; object oActor; object oPC = GetEnteringObject(); // Give 10 experience (to party) to the PC. GiveXPToAll(oPC, 10); SetLocalString(oPC, "hstnfnl", "1"); // Have "Hresstan" perform a sequence of actions. oActor = GetObjectByTag("Hresstan"); AssignCommand(oActor, ActionPlayAnimation(ANIMATION_FIREFORGET_VICTORY1)); // Have "Hresstan" say something. AssignCommand(GetObjectByTag("Hresstan"), SpeakString("Wensbane! Time to pay for your treachery!")); if (!GetIsPC(oPC)) return; int DoOnce = GetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF)); if (DoOnce==TRUE) return; SetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF), TRUE); oTarget = GetWaypointByTag("WP_SPn_Wb2"); lTarget = GetLocation(oTarget); oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "wensbane2", lTarget); oTarget = oSpawn; SetIsTemporaryEnemy(oPC, oTarget); AssignCommand(oTarget, ActionAttack(oPC)); AssignCommand(oTarget, DetermineCombatRound(oPC)); //Visual effects can't be applied to waypoints, so if it is a WP //the VFX will be applied to the WP's location instead nInt = GetObjectType(oTarget); if (nInt != OBJECT_TYPE_WAYPOINT) DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_MYSTICAL_EXPLOSION), oTarget)); else DelayCommand(0.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_MYSTICAL_EXPLOSION), GetLocation(oTarget))); oTarget = GetWaypointByTag("WP_SPn_Wb2"); lTarget = GetLocation(oTarget); oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "undeadpitfigh2", lTarget); oTarget = oSpawn; SetIsTemporaryEnemy(oPC, oTarget); AssignCommand(oTarget, ActionAttack(oPC)); AssignCommand(oTarget, DetermineCombatRound(oPC)); oTarget = GetWaypointByTag("WP_SPn_Wb2"); lTarget = GetLocation(oTarget); oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "undeadpitfigh2", lTarget); oTarget = oSpawn; SetIsTemporaryEnemy(oPC, oTarget); AssignCommand(oTarget, ActionAttack(oPC)); AssignCommand(oTarget, DetermineCombatRound(oPC)); oTarget = GetWaypointByTag("WP_SPn_Wb2"); lTarget = GetLocation(oTarget); oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "undeadpitfigh2", lTarget); oTarget = oSpawn; SetIsTemporaryEnemy(oPC, oTarget); AssignCommand(oTarget, ActionAttack(oPC)); AssignCommand(oTarget, DetermineCombatRound(oPC)); oTarget = GetWaypointByTag("WP_SPn_Wb2"); lTarget = GetLocation(oTarget); oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "undeadpitfigh2", lTarget); oTarget = oSpawn; SetIsTemporaryEnemy(oPC, oTarget); AssignCommand(oTarget, ActionAttack(oPC)); AssignCommand(oTarget, DetermineCombatRound(oPC)); oTarget = GetWaypointByTag("WP_WBPt1"); lTarget = GetLocation(oTarget); if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return; oTarget=GetFirstFactionMember(oPC, FALSE); while (GetIsObjectValid(oTarget)) { AssignCommand(oTarget, ClearAllActions()); AssignCommand(oTarget, ActionJumpToLocation(lTarget)); oTarget=GetNextFactionMember(oPC, FALSE); } AddJournalQuestEntry("Hresstan's Comrades", 8, oPC, TRUE, FALSE); oTarget = GetObjectByTag("pitnote"); DestroyObject(oTarget, 0.1); }