107 lines
4.2 KiB
Plaintext
107 lines
4.2 KiB
Plaintext
|
void main()
|
||
|
{
|
||
|
|
||
|
object oPC = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC, OBJECT_SELF, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN);
|
||
|
|
||
|
if (IsInConversation(OBJECT_SELF) || GetIsInCombat()) return;
|
||
|
|
||
|
if (GetItemPossessedBy(oPC, "wizardstaff")!= OBJECT_INVALID)
|
||
|
return;
|
||
|
|
||
|
object oTarget;
|
||
|
oTarget = GetObjectByTag("demon");
|
||
|
|
||
|
//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
|
||
|
|
||
|
int nInt;
|
||
|
nInt = GetObjectType(oTarget);
|
||
|
|
||
|
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_LIGHTNING_M), oTarget);
|
||
|
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_LIGHTNING_M), GetLocation(oTarget));
|
||
|
|
||
|
ActionPlayAnimation(ANIMATION_FIREFORGET_SPASM);
|
||
|
|
||
|
oTarget = GetObjectByTag("demlght1");
|
||
|
|
||
|
//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) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD), oTarget);
|
||
|
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD), GetLocation(oTarget));
|
||
|
|
||
|
oTarget = GetObjectByTag("demlght2");
|
||
|
|
||
|
//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) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD), oTarget);
|
||
|
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD), GetLocation(oTarget));
|
||
|
|
||
|
oTarget = GetObjectByTag("demlght3");
|
||
|
|
||
|
//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) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD), oTarget);
|
||
|
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD), GetLocation(oTarget));
|
||
|
|
||
|
oTarget = GetObjectByTag("demlght4");
|
||
|
|
||
|
//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) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD), oTarget);
|
||
|
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD), GetLocation(oTarget));
|
||
|
|
||
|
oTarget = GetObjectByTag("demlght5");
|
||
|
|
||
|
//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) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD), oTarget);
|
||
|
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD), GetLocation(oTarget));
|
||
|
|
||
|
oTarget = GetObjectByTag("demlght6");
|
||
|
|
||
|
//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) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD), oTarget);
|
||
|
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD), GetLocation(oTarget));
|
||
|
|
||
|
oTarget = GetObjectByTag("demlght7");
|
||
|
|
||
|
//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) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD), oTarget);
|
||
|
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD), GetLocation(oTarget));
|
||
|
|
||
|
oTarget = GetObjectByTag("demlght8");
|
||
|
|
||
|
//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) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD), oTarget);
|
||
|
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD), GetLocation(oTarget));
|
||
|
|
||
|
}
|
||
|
|