PoA_PRC8/_module/nss/port2bermuda.nss

44 lines
1.1 KiB
Plaintext
Raw Permalink Normal View History

2022-10-07 14:20:31 -04:00
location lTarget;
int nInt;
object oTarget;
object bTarget;
//Put this script in the OnEnter event of a tracks trigger or area.
void main()
{
object oPC = GetEnteringObject();
/*
if (!GetIsPC(oPC)) return;
int DoOnce = GetLocalInt(oPC, GetTag(OBJECT_SELF));
if (DoOnce==TRUE) return;
SetLocalInt(oPC, GetTag(OBJECT_SELF), TRUE);
*/
if (GetItemPossessedBy(oPC, "immotoken")!= OBJECT_INVALID)
{
FloatingTextStringOnCreature("A magical vortex has opened up and sucked you in!!!", oPC);
oTarget = oPC;
nInt = GetObjectType(oTarget);
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_IMPLOSION), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_IMPLOSION), GetLocation(oTarget));
bTarget = GetWaypointByTag("bermudaway");
lTarget = GetLocation(bTarget);
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
DelayCommand(2.0, AssignCommand(oPC, ClearAllActions()));
DelayCommand(3.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
}
}