///////////////////////////////////////////////////////////////////////// // // www.ultima.smoce.net // Name: CastScroll // ///////////////////////////////////////////////////////////////////////// using Phoenix.WorldData; namespace Phoenix.Plugins { public static partial class Commands { [Command("CastScroll")] public static void CastScroll(Graphic graphic, UOColor color, string name) { CastScroll(graphic, color, UIManager.TargetObject(), name); } [Command("CastScroll")] public static void CastScroll(Graphic graphic, UOColor color, Serial target, string name) { UO.Print(0x008F,"Svitek " + name + ""); UOItem scroll = World.Player.Backpack.AllItems.FindType(graphic, color); if (!scroll.Exist) ScriptErrorException.Throw("Scroll not found"); UOCharacter ch = World.GetCharacter(target); if (ch.Exist && ch.Distance <= 18) ch.WaitTarget(); scroll.Use(); } } }