public virtual void UseGate(Mobile m) { ClientFlags flags = m.NetState == null ? ClientFlags.None : m.NetState.Flags; bool hasstonewall = false; bool hasgate = false; Item paralyzeField = null; IPooledEnumerable eable; if (m_TargetMap != null) { eable = m_TargetMap.GetItemsInRange(m_Target, 0); foreach (Item i in eable) { if (i.ItemID == 0x80) //Stonewall { hasstonewall = true; } if (i.ItemID == 0xF6C) //Gate { hasgate = true; } if (i.ItemID >= 14695 && i.ItemID <= 14730) //Paralyze field { paralyzeField = i; } } eable.Free(); } if (Sigil.ExistsOn(m)) { m.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil. } //else if ( m_TargetMap == Map.Felucca && m is PlayerMobile && ((PlayerMobile)m).Young ) //{ // m.SendLocalizedMessage( 1049543 ); // You decide against traveling to Felucca while you are still young. //} //else if ( (m.Kills >= 5 && m_TargetMap != Map.Felucca) || ( m_TargetMap == Map.Tokuno && (flags & ClientFlags.Tokuno) == 0 ) || ( m_TargetMap == Map.Malas && (flags & ClientFlags.Malas) == 0 ) || ( m_TargetMap == Map.Ilshenar && (flags & ClientFlags.Ilshenar) == 0 ) ) //{ // m.SendLocalizedMessage( 1019004 ); // You are not allowed to travel there. //} //else if ( m.Spell != null ) //{ // m.SendLocalizedMessage( 1049616 ); // You are too busy to do that at the moment. //} else if (m_TargetMap != null && m_TargetMap != Map.Internal) { if ((hasgate || !Dispellable) && !hasstonewall) { BaseCreature.TeleportPets(m, m_Target, m_TargetMap); m.MoveToWorld(m_Target, m_TargetMap); if (m.AccessLevel == AccessLevel.Player || !m.Hidden) { //Iza - Teleport Poof Effects.SendLocationParticles(EffectItem.Create(m.Location, m.Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 2023); Effects.SendLocationParticles(EffectItem.Create(m_Target, m.Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 5023); m.PlaySound(0x1FE); } if (paralyzeField != null) { paralyzeField.OnMoveOver(m); //Paralyze player if paralyze field exist } OnGateUsed(m); } else { m.SendAsciiMessage("You cannot teleport to that location."); } } else { m.SendMessage("This moongate does not seem to go anywhere."); } }