// Includefil til unified teleport systemet // -Seeker- 11/12 2005 const int MN_TELE_NORESTRICT = 0; const int MN_TELE_RESTRICTRING = 1; const int MN_TELE_RESTRICTALL = 2; int PersonBlock( object oPC ) { return GetLocalInt( oPC, "mn_teleblock" ); } int TeleportStatus( object oPC ) { int area = GetLocalInt( GetArea( oPC ), "mn_teleblock" ); int person = PersonBlock( oPC ); return ( area < person )?person:area; // Det er den hoejeste der taeller } void RingTeleport( object oPC, string destination ) { int status = TeleportStatus( oPC ); if (status > MN_TELE_NORESTRICT) { // Warning FloatingTextStringOnCreature( "Something interferes with your teleportation", oPC, FALSE ); ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DAZED_S), oPC); } else { // Teleport object oTarget; location lTarget; oTarget = GetWaypointByTag( destination ); lTarget = GetLocation(oTarget); if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return; AssignCommand(oPC, ClearAllActions()); DelayCommand(3.0, AssignCommand(oPC, ActionJumpToLocation(lTarget))); ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), oPC); } }