38 lines
949 B
Plaintext
38 lines
949 B
Plaintext
//Put this script OnEnter
|
|
void main()
|
|
{
|
|
|
|
object oPC = GetEnteringObject();
|
|
|
|
if (!GetIsPC(oPC)) return;
|
|
|
|
if (GetHitDice(oPC) < 30)
|
|
return;
|
|
|
|
object oTarget;
|
|
oTarget = 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
|
|
|
|
int nInt;
|
|
nInt = GetObjectType(oTarget);
|
|
|
|
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SCREEN_BUMP), oTarget);
|
|
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SCREEN_BUMP), GetLocation(oTarget));
|
|
|
|
FloatingTextStringOnCreature("Something is pulling you into another realm!", oPC);
|
|
|
|
location lTarget;
|
|
oTarget = GetWaypointByTag("shadow_way");
|
|
|
|
lTarget = GetLocation(oTarget);
|
|
|
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
|
|
|
DelayCommand(3.0, AssignCommand(oPC, ClearAllActions()));
|
|
|
|
DelayCommand(3.1, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
|
|
|
}
|