private bool CheckTravel(Point3D p) { if (!User.InRange(Moonstone.GetWorldLocation(), 2) || User.Map != Moonstone.Map) { User.SendLocalizedMessage(500295); // You are too far away to do that. } else if (User.Murderer) { User.SendLocalizedMessage(1019004); // You are not allowed to travel there. } else if (User.Criminal) { User.SendLocalizedMessage(1005561, "", 0x22); // Thou'rt a criminal and cannot escape so easily. } else if (Spells.SpellHelper.CheckCombat(User)) { User.SendLocalizedMessage(1005564, "", 0x22); // Wouldst thou flee during the heat of battle?? } else if (User.Spell != null) { User.SendLocalizedMessage(1049616); // You are too busy to do that at the moment. } else if (User.Map == Map.TerMur && User.InRange(p, 1)) { User.SendLocalizedMessage(1019003); // You are already there. } else { return(true); } return(false); }
protected override void OnTarget(Mobile from, object targeted) { if (m_Powder.Deleted) { return; } if (!from.InRange(m_Powder.GetWorldLocation(), 2)) { from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that. } else if (targeted is Moonstone) { Moonstone stone = (Moonstone)targeted; if (!from.CanSee(stone)) { from.SendLocalizedMessage(500237); // Target can not be seen. } else if (!SpellHelper.CheckTravel(from, TravelCheckType.Mark)) { } else if (SpellHelper.CheckMulti(from.Location, from.Map, !Core.AOS)) { from.SendLocalizedMessage(501942); // That location is blocked. } else if (!stone.IsChildOf(from.Backpack)) { from.LocalOverheadMessage(MessageType.Regular, 0x3B2, true, "That must be in your pack"); } else { stone.Mark(from); from.PlaySound(0x1FA); Effects.SendLocationEffect(from, from.Map, 14201, 16); m_Powder.Amount = m_Powder.Amount - 1; if (m_Powder.Amount <= 0) { m_Powder.Delete(); } } } else { from.SendMessage("Powder of translocation has no effect on this item"); // Powder of translocation has no effect on this item. } }
private bool CheckTravel(Point3D p) { if (!User.InRange(Moonstone.GetWorldLocation(), 1) || User.Map != Moonstone.Map) { User.SendLocalizedMessage(1019002); // You are too far away to use the gate. } /* CEO - 02/20/06 - Removed to allow Reds access to other lands * else if ( User.Murderer ) * { * User.SendLocalizedMessage( 1019004 ); // You are not allowed to travel there. * } */ else if (Server.Factions.Sigil.ExistsOn(User)) { User.SendLocalizedMessage(1019004); // You are not allowed to travel there. } else if (User.Criminal) { User.SendLocalizedMessage(1005561, "", 0x22); // Thou'rt a criminal and cannot escape so easily. } else if (Server.Spells.SpellHelper.CheckCombat(User)) { User.SendLocalizedMessage(1005564, "", 0x22); // Wouldst thou flee during the heat of battle?? } else if (User.Spell != null) { User.SendLocalizedMessage(1049616); // You are too busy to do that at the moment. } else if (User.Map == Map.TerMur && User.InRange(p, 1)) { User.SendLocalizedMessage(1019003); // You are already there. } else { return(true); } return(false); }