38 lines
1.3 KiB
Plaintext
38 lines
1.3 KiB
Plaintext
void main()
|
|
{
|
|
object oPC = GetPCSpeaker();
|
|
object oCaster;
|
|
oCaster = GetObjectByTag("ZOLAD");
|
|
|
|
object oTarget;
|
|
oTarget = oPC;
|
|
DelayCommand(2.9, ActionPauseConversation());
|
|
DelayCommand(2.9, ActionCastFakeSpellAtObject(SPELL_NEGATIVE_ENERGY_BURST, oTarget, PROJECTILE_PATH_TYPE_DEFAULT));
|
|
object oTarget1 = GetWaypointByTag("WP_LIGER");
|
|
|
|
location lTarget = GetLocation(oTarget1);
|
|
|
|
//only do the jump if the location is valid.
|
|
//though not flawless, we just check if it is in a valid area.
|
|
//the script will stop if the location isn't valid - meaning that
|
|
//nothing put after the teleport will fire either.
|
|
//the current location won't be stored, either
|
|
|
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
|
|
|
DelayCommand(3.9, AssignCommand(oPC, ClearAllActions()));
|
|
|
|
DelayCommand(3.95, AssignCommand(oPC, JumpToLocation(lTarget)));
|
|
DelayCommand(3.5, ActionResumeConversation());
|
|
oTarget = oPC;
|
|
|
|
//Visual effects can't be applied to waypoints, so if it is a WP
|
|
//apply to the WP's location instead
|
|
|
|
int nInt;
|
|
nInt = GetObjectType(oTarget1);
|
|
|
|
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), oTarget1);
|
|
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), GetLocation(oTarget1));
|
|
}
|