private static void GetMobile(string[] param) { Targeting.OneTimeTarget(OnGetMobileTarget); Client.Instance.SendToClient(new UnicodeMessage(0xFFFFFFFF, -1, MessageType.Regular, 0x3B2, 3, Language.CliLocName, "System", "Select a mobile to get information on")); }
private static void OnClearQueue() { Targeting.ClearQueue(); World.Player.OverheadMessage(LocString.TQCleared); }
public override void OnPositionChanging(Point3D oldPos) { if (!IsGhost) { StealthSteps.OnMove(); } AutoOpenDoors(false); List <Mobile> mlist = new List <Mobile>(World.Mobiles.Values); for (int i = 0; i < mlist.Count; i++) { Mobile m = mlist[i]; if (m != this) { if (!Utility.InRange(m.Position, Position, VisRange)) { m.Remove(); } else { Targeting.CheckLastTargetRange(m); } } } mlist = null; List <Item> ilist = new List <Item>(World.Items.Values); ScavengerAgent s = ScavengerAgent.Instance; for (int i = 0; i < ilist.Count; i++) { Item item = ilist[i]; if (item.Deleted || item.Container != null) { continue; } int dist = Utility.Distance(item.GetWorldPosition(), Position); if (item != DragDropManager.Holding && (dist > MultiVisRange || (!item.IsMulti && dist > VisRange))) { item.Remove(); } else if (!IsGhost && Visible && dist <= 2 && s.Enabled && item.Movable) { s.Scavenge(item); } } ilist = null; if (Engine.MainWindow != null && Engine.MainWindow.MapWindow != null) { Engine.MainWindow.SafeAction(f => f.MapWindow.PlayerMoved()); } base.OnPositionChanging(oldPos); }
private static void GetItemHue(string[] param) { Targeting.OneTimeTarget(OnGetItemHueTarget); Client.Instance.SendToClient(new UnicodeMessage(0xFFFFFFFF, -1, MessageType.Regular, 0x3B2, 3, Language.CliLocName, "System", "Select an item to get the hue value")); }
internal MobileIncoming(Mobile m) : base(0x78) { int count = m.Contains.Count; int ltHue = Engine.MainWindow.LTHilight; int hue = m.Hue; if (ltHue != 0 && Targeting.IsLastTarget(m)) { hue = ltHue; } else // Inizio controllo flag { if (m.Poisoned) // Caso Poison { hue = (int)RazorEnhanced.Filters.HighLightColor.Poison; } else if (m.Blessed) // Caso Mortal { hue = (int)RazorEnhanced.Filters.HighLightColor.Mortal; } else if (m.Paralized) // Caso Paral { hue = (int)RazorEnhanced.Filters.HighLightColor.Paralized; } } EnsureCapacity(3 + 4 + 2 + 2 + 2 + 1 + 1 + 2 + 1 + 1 + 4 + count * (4 + 2 + 1 + 2)); Write((uint)m.Serial); Write((ushort)m.Body); Write((ushort)m.Position.X); Write((ushort)m.Position.Y); Write((sbyte)m.Position.Z); Write((byte)m.Direction); Write((ushort)hue); Write((byte)m.GetPacketFlags()); Write((byte)m.Notoriety); for (int i = 0; i < count; ++i) { Item item = (Item)m.Contains[i]; Write((uint)item.Serial); Write((ushort)item.ItemID); Write((byte)item.Layer); if (ltHue != 0 && Targeting.IsLastTarget(m)) { Write((ushort)ltHue); } else // Inizio controllo flag { if (m.Poisoned) // Caso Poison { hue = (int)RazorEnhanced.Filters.HighLightColor.Poison; } else if (m.Blessed) // Caso Mortal { hue = (int)RazorEnhanced.Filters.HighLightColor.Mortal; } else if (m.Paralized) // Caso Paral { hue = (int)RazorEnhanced.Filters.HighLightColor.Paralized; } else { Write((ushort)item.Hue); } } } Write((uint)0); // terminate }
private void cancel_Click(object sender, System.EventArgs e) { Targeting.CancelOneTimeTarget(); }
private static void GetInfo(string[] param) { Assistant.Client.Instance.ForceSendToClient(new UnicodeMessage(0xFFFFFFFF, -1, MessageType.Regular, 0x25, 3, Language.CliLocName, "System", "Target a player or item to open object inspect.")); Targeting.OneTimeTarget(true, new Targeting.TargetResponseCallback(GetInfoTarget_Callback)); }
private static void DropItem(string[] param) { Assistant.Client.Instance.ForceSendToClient(new UnicodeMessage(0xFFFFFFFF, -1, MessageType.Regular, 0x25, 3, Language.CliLocName, "System", "Target item to Drop at feet.")); Targeting.OneTimeTarget(new Targeting.TargetResponseCallback(RazorEnhanced.HotKey.dropitemTarget_Callback)); }
private static void GetSerial(string[] param) { Assistant.Client.Instance.ForceSendToClient(new UnicodeMessage(0xFFFFFFFF, -1, MessageType.Regular, 0x25, 3, Language.CliLocName, "System", "Target a player or item to get their serial number.")); Targeting.OneTimeTarget(new Targeting.TargetResponseCallback(GetSerialTarget_Callback)); }
private static void HideItem(string[] param) { Assistant.Client.Instance.ForceSendToClient(new UnicodeMessage(0xFFFFFFFF, -1, MessageType.Regular, 0x25, 3, Language.CliLocName, "System", "Target a item to hide.")); Targeting.OneTimeTarget(new Targeting.TargetResponseCallback(HideItem_Callback)); }
private static void GetGumpInfo(string[] param) { Targeting.OneTimeTarget(OnGetItemInfoTarget); Client.Instance.SendToClient(new UnicodeMessage(0xFFFFFFFF, -1, MessageType.Regular, 0x3B2, 3, Language.CliLocName, "System", "Select an item or mobile to view/inspect")); }
private void bandagehealsettargetButton_Click(object sender, EventArgs e) { Targeting.OneTimeTarget(new Targeting.TargetResponseCallback(BandageHeakMobileTarget_Callback)); }
private void toolboxcountTargetButton_Click(object sender, EventArgs e) { Targeting.OneTimeTarget(new Targeting.TargetResponseCallback(ToolBarItemTarget_Callback)); }