///////////////////////////////////////////////////////////////////////// // // www.ultima.smoce.net // Name: Equip SET IVM // ///////////////////////////////////////////////////////////////////////// using System; using System.Collections.Generic; using System.Text; using Phoenix; using Phoenix.WorldData; using Phoenix.Communication; namespace Phoenix.Plugins { public static partial class Commands { [Command] public static void seteq(string set) { foreach (Layer l in Enum.GetValues(typeof(Layer))) { if (l != Layer.Mount) { UO.Exec("addobjectzalozkascript", string.Format("GearSet_{0}_{1}", set, l), World.Player.Layers[l].Serial); } } UO.Print("Set: '{0}' ulozen!", set); } [Command] public static void eq(string set) { Serial serial; UOItem item; UO.PrintWarning("Oblikam..."); foreach (Layer l in Enum.GetValues(typeof(Layer))) { if (l != Layer.Mount) { serial = Aliases.GetObject(string.Format("GearSet_{0}_{1}", set, l)); item = World.GetItem(serial); if ((serial.IsValid) && (item.Container != World.Player.Serial)) { UO.EquipItem(serial); UO.Wait(Core.Latency + 300); } } } UO.PrintWarning("Obleceno!"); } [Command] public static void unequip() { foreach (Layer l in Enum.GetValues(typeof(Layer))) { if ((l == Layer.Mount) || (l == Layer.Backpack)) continue; Serial serial = World.Player.Layers[l].Serial; if (!serial.IsValid) continue; UO.MoveItem(serial, 1, World.Player.Backpack, 25, 90); UO.Wait(Core.Latency + 300); } } [Command] public static void setarm(string arm) { { foreach (Layer l in Enum.GetValues(typeof(Layer))) { if ((l == Layer.RightHand) || (l == Layer.LeftHand)) { UO.Exec("addobjectzalozkascript", string.Format("Arm_{0}_{1}", arm, l), World.Player.Layers[l].Serial); } } UO.Print("Arms set: '{0}' ulozen!", arm); } } [Command] public static void arm(string arm) { Serial serial; UOItem item; foreach (Layer l in Enum.GetValues(typeof(Layer))) { if ((l == Layer.RightHand) || (l == Layer.LeftHand)) { serial = Aliases.GetObject(string.Format("Arm_{0}_{1}", arm, l)); item = World.GetItem(serial); if ((serial.IsValid) && (item.Container != World.Player.Serial)) { UO.EquipItem(serial); UO.Wait(Core.Latency); } } } UO.PrintWarning("Arm set: '{0}' oblecen!", arm); } [Command] public static void mystic() { Serial serial; UO.PrintInformation("Zameraj mystik"); UOItem mystik = new UOItem(UIManager.TargetObject()); serial = mystik.Serial; if (serial.IsValid) UO.EquipItem(serial); } } }