RATDOG/_module/nss/toship1.nss
Jaysyn904 ee912d2da9 Quest persistence work
Quest persistence work.
2022-07-06 00:35:22 -04:00

29 lines
708 B
Plaintext

// Clears all actions and jumps the caller to the provided object.
// (Useful when this needs to be delayed.)
void ClearAndJumpToObject(object oDestination);
void ClearAndJumpToObject(object oDestination)
{
ClearAllActions();
JumpToObject(oDestination);
}
void main()
{
effect eVFX;
object oTarget;
// Get the creature who triggered this event.
object oPC = GetLastUsedBy();
// Find the location to which to teleport.
oTarget = GetWaypointByTag("WP_PIRATE01");
// Teleport the PC.
eVFX = EffectVisualEffect(VFX_IMP_UNSUMMON);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oPC);
DelayCommand(1.0, AssignCommand(oPC, ClearAndJumpToObject(oTarget)));
}