void main() { object oPC; object oTarget; oTarget = oPC; int nInt; nInt = GetObjectType(oTarget); if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_EPIC_UNDEAD), oTarget); else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_EPIC_UNDEAD), GetLocation(oTarget)); oPC = GetItemActivator(); location lTarget; oTarget = GetWaypointByTag("wp_cloak_potion"); lTarget = GetLocation(oTarget); if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return; AssignCommand(oPC, ClearAllActions()); AssignCommand(oPC, ActionJumpToLocation(lTarget)); }