public RanchStoneGump(RanchStone rs) : base(0, 0) { m_rs = rs; this.Closable = true; this.Disposable = true; this.Dragable = true; this.Resizable = false; this.AddPage(0); this.AddBackground(0, 0, 250, 300, 9200); //this.AddLabel(15, 45, 1160, @"Ranch Name: "+m_rs.Ranch);//ranch name this.AddHtml(15, 40, 220, 35, (String.Format("<CENTER><BIG><BASEFONT SIZE=7 COLOR=#FFFF00>{0}<BASEFONT COLOR=#000000></BIG></CENTER>", m_rs.Ranch)), false, false); //"Ranch Name: "+m_rs.Ranch);//ranch name this.AddHtml(15, 60, 220, 35, (String.Format("<CENTER><BASEFONT SIZE=4 COLOR=#FFFF00>Owner: {0} <BASEFONT COLOR=#000000></CENTER>", m_rs.Owner.Name)), false, false); //ranch owner this.AddLabel(30, 80, 0, @"Toggle Branding Iron"); this.AddLabel(30, 100, 0, @"Reclaim Animal"); this.AddLabel(30, 120, 0, @"Transfer Animal"); this.AddLabel(30, 140, 0, @"Toggle Fencing Hammer"); this.AddLabel(30, 160, 0, @"Unlock Fences"); this.AddLabel(30, 180, 0, @"Rename Ranch"); this.AddLabel(30, 200, 0, @"Redeed Ranch Stone"); this.AddLabel(30, 220, 0, @"Absorb Other Ranch"); this.AddLabel(30, 240, 0, @"Transfer Ownership"); this.AddButton(190, 85, 1209, 1210, (int)Buttons.BrandingIron, GumpButtonType.Reply, 0); this.AddButton(190, 105, 1209, 1210, (int)Buttons.ReclaimAnimal, GumpButtonType.Reply, 0); this.AddButton(190, 125, 1209, 1210, (int)Buttons.TransferAnimal, GumpButtonType.Reply, 0); this.AddButton(190, 145, 1209, 1210, (int)Buttons.FencingHammer, GumpButtonType.Reply, 0); this.AddButton(190, 165, 1209, 1210, (int)Buttons.UnlockFences, GumpButtonType.Reply, 0); this.AddButton(190, 185, 1209, 1210, (int)Buttons.RanchName, GumpButtonType.Reply, 0); this.AddButton(190, 205, 1209, 1210, (int)Buttons.Redeed, GumpButtonType.Reply, 0); this.AddButton(190, 225, 1209, 1210, (int)Buttons.AbsorbRanch, GumpButtonType.Reply, 0); this.AddButton(190, 245, 1209, 1210, (int)Buttons.TransferOwnership, GumpButtonType.Reply, 0); this.AddImage(5, 5, 10460); this.AddImage(210, 5, 10460); this.AddImage(5, 265, 10460); this.AddImage(210, 265, 10460); this.AddImage(42, 262, 11392); this.AddLabel(50, 270, 1160, @"Size: " + m_rs.Size); //ranch size this.AddLabel(120, 270, 1160, @"Area: " + (int)(m_rs.Size * m_rs.Size * 3.14159)); //ranch area this.AddImage(42, 5, 11392); this.AddLabel(85, 12, 1152, @"Ranch Stone"); }
protected override void OnTarget(Mobile from, object targ) { if (targ is RanchStone) { RanchStone stone = (RanchStone)targ; if (stone.Owner == from) { if (t_rs.Map == stone.Map) { int ranchrange = (int)(from.GetDistanceToSqrt(t_rs.Location)); int ranchto = (int)(stone.Size / 2); int ranchfrom = (int)(t_rs.Size / 2); if ((ranchfrom >= (ranchrange - (ranchto + ranchfrom))) && t_rs.Size > stone.Size) { foreach (Item item in stone.GetItemsInRange(stone.Size + 1)) { if (item is FenceGate) { FenceGate fg = (FenceGate)item; if (fg.ranchstone == stone) { fg.ranchstone = t_rs; fg.InvalidateProperties(); } } else if (item is BaseFence) { BaseFence f = (BaseFence)item; if (f.ranchstone == stone) { f.ranchstone = t_rs; f.InvalidateProperties(); } } } RanchDeed rd = new RanchDeed(); from.AddToBackpack(rd); from.SendMessage("You absorb the ranch."); stone.Delete(); } else { from.SendMessage("Your ranch isn't big enough to absorb target ranch!"); } } else { from.SendMessage("That ranch is on a different facet!"); } } else { from.SendMessage("That's not your ranch!"); } } else { from.SendMessage("You can't absorb that!"); } from.SendGump(new RanchStoneGump(t_rs)); }
public AbsorbTarget(RanchStone rs) : base(1, false, TargetFlags.None) { t_rs = rs; }
public TransferToTarget(BaseAnimal ba, RanchStone rs) : base(10, false, TargetFlags.None) { t_ba = ba; t_rs = rs; }
public TransferTarget(RanchStone rs) : base(10, false, TargetFlags.None) { t_rs = rs; }
public ClaimTarget(RanchStone rs) : base(10, false, TargetFlags.None) { t_rs = rs; }
public OwnershipTarget(RanchStone rs) : base(1, false, TargetFlags.None) { t_rs = rs; }
public RenamePrompt(RanchStone RS) { m_RS = RS; }