///////////////////////////////////////////////////////////////////////// // // www.ultima.smoce.net // Name: Bishop HAT by smoce // ///////////////////////////////////////////////////////////////////////// using System; using System.Collections.Generic; using System.Text; using Phoenix; using Phoenix.WorldData; using System.Linq; using Phoenix.Communication; using Phoenix.Runtime; using Phoenix.Runtime.Reflection; namespace Scripts.DarkParadise { public class ultima_smoce_net_1779635037 { [Executable] public void BishopHat() { UOItem bishopHat = World.GetItem(Aliases.GetObject("bishophat")); UOItem helm = World.GetItem(Aliases.GetObject("helm")); if (World.Player.Backpack.AllItems.Contains(bishopHat.Serial)) { UO.PrintObject(World.Player.Serial, 0x0BB0, "Bishop Hat nasazena!"); bishopHat.Use(); } else if (World.Player.Layers[Layer.Hat].Serial == bishopHat.Serial) { if (World.Player.Hits > 30) { bishopHat.Move(1, World.Player.Backpack); if (World.Player.Backpack.AllItems.Contains(helm.Serial)) { helm.Use(); } UO.PrintObject(World.Player.Serial, 0x0BB0, "Bishop Hat sundana."); return; } UO.PrintObject(World.Player.Serial, 0x0BB0, "Malo hp na sundani."); } else { UO.PrintObject(World.Player.Serial, 0x0BB0, "Nemas Bishop Hat!"); } } } }