/* * Script generated by LS Script Generator, v.TK.0 * * For download info, please visit: * http://nwvault.ign.com/View.php?view=Other.Detail&id=1502 */ // Put this script OnUsed. // 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(); // Abort if the PC does not have the item "LegacyKey". if ( GetItemPossessedBy(oPC, "LegacyKey") == OBJECT_INVALID ) { SendMessageToPC(oPC, "You need a key to this teleport."); return; } // Find the location to which to teleport. oTarget = GetWaypointByTag("wp_legacy"); // Teleport the PC. eVFX = EffectVisualEffect(VFX_IMP_UNSUMMON); ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oPC); DelayCommand(3.0, AssignCommand(oPC, ClearAndJumpToObject(oTarget))); }