protected override void OnTarget(Mobile m, object o) { IPoint3D p = (IPoint3D)o; if (p != null) { if (m_Wondering) { TownCrierb m_Crier = new TownCrierb(); m_Crier.StoneActive = m_Stone.Active; m_Crier.Stone = m_Stone; m_Crier.Map = m.Map; m_Crier.Location = new Point3D(p.X, p.Y, p.Z); m_Crier.Home = new Point3D(p.X, p.Y, p.Z); m.SendGump(new RangeHomeGump(m_Stone, m_Crier)); } else { TownCrierb m_Crier = new TownCrierb(); m_Crier.StoneActive = m_Stone.Active; m_Crier.Stone = m_Stone; m_Crier.Frozen = true; m_Crier.Map = m.Map; m_Crier.Location = new Point3D(p.X, p.Y, p.Z); m.SendGump(new TownCrierbGump(m_Stone, null)); } } }
public EditNewsGump(TownCrierb crier, TownCrierStone stone) : base(10, 10) { m_Stone = stone; m_Crier = crier; AddPage(0); AddImageTiled(0, 0, 620, 460, 0x52); AddAlphaRegion(1, 1, 618, 458); AddLabel(250, 12, 2100, "Edit TownCrier News"); AddLabel(10, 34, 2100, "News Entries"); ArrayList m_Lines = GetFile(); int row = 1; for (int i = 0; i < 15; i++) { string line = m_Lines[i] as string; AddImageTiled(10, 34 + (row * 22), 598, 20, 0xBBC); AddImageTiled(11, 34 + (row * 22) + 1, 596, 18, 0x2426); AddTextEntry(11, 34 + (row++ *22) + 1, 596, 18, 0x480, i, line); } AddLabel(500, 408, 2100, "Update File"); AddButton(576, 408, 4005, 4007, 1, GumpButtonType.Reply, 0); }
public virtual void OnActivate() { foreach (TownCrierb crier in m_Registry) { TownCrierb m_Crier = crier as TownCrierb; m_Crier.StoneActive = Active; } }
public RangeHomeGump(TownCrierStone stone, TownCrierb crier) : base(50, 50) { m_Stone = stone; m_Crier = crier; AddPage(0); AddImageTiled(0, 0, 202, 52, 0x52); AddAlphaRegion(1, 1, 200, 50); string range = Convert.ToString(m_Crier.RangeHome); AddLabel(20, 2, 2100, "Set TownCrierb's RangeHome"); AddButton(10, 24, 4005, 4007, 1, GumpButtonType.Reply, 0); AddImageTiled(50, 24, 140, 20, 0xBBC); AddImageTiled(51, 25, 138, 18, 0x2426); AddTextEntry(51, 25, 138, 18, 0x480, 0, range); }
public override void OnDelete() { foreach (TownCrierb crier in m_Registry) { TownCrierb m_Crier = crier as TownCrierb; if (Active) { Active = false; } m_Crier.Stone = null; } base.OnDelete(); }
public SetStoneTarget(TownCrierb crier) : base(-1, false, TargetFlags.None) { m_Crier = crier; }
public TownCrierbGump(TownCrierStone stone, TownCrierb crier) : base(50, 50) { m_Stone = stone; m_Crier = crier; AddPage(0); AddImageTiled(0, 0, 410, 144, 0x52); AddAlphaRegion(1, 1, 408, 142); if (m_Stone == null) { AddLabel(160, 12, 2100, "TownCrier Controls"); string custom = Convert.ToString(m_Crier.Custom); AddButton(10, 34, 4005, 4007, 1, GumpButtonType.Reply, 0); AddLabel(50, 34, 2100, "Custom = " + custom); string active = Convert.ToString(m_Crier.Active); AddButton(10, 56, 4005, 4007, 2, GumpButtonType.Reply, 0); AddLabel(50, 56, 2100, "Active = " + active); string random = Convert.ToString(m_Crier.Random); AddButton(200, 34, 4005, 4007, 3, GumpButtonType.Reply, 0); AddLabel(240, 34, 2100, "Random = " + random); string delay = Convert.ToString(m_Crier.Delay); AddButton(200, 56, 4005, 4007, 4, GumpButtonType.Reply, 0); AddImageTiled(240, 56, 70, 20, 0xBBC); AddImageTiled(241, 57, 68, 18, 0x2426); AddTextEntry(241, 57, 68, 18, 0x480, 0, delay); AddLabel(315, 56, 2100, "Delay"); AddButton(10, 78, 4005, 4007, 5, GumpButtonType.Reply, 0); AddLabel(50, 78, 2100, "Edit News"); if (crier.Stone == null) { AddButton(200, 78, 4005, 4007, 6, GumpButtonType.Reply, 0); AddLabel(240, 78, 2100, "Control Stone = null"); } } else { AddLabel(140, 12, 2100, "TownCrier Gobal Controls"); string active = Convert.ToString(m_Stone.Active); AddButton(10, 34, 4005, 4007, 7, GumpButtonType.Reply, 0); AddLabel(50, 34, 2100, "Active = " + active); string random = Convert.ToString(m_Stone.Random); AddButton(10, 56, 4005, 4007, 8, GumpButtonType.Reply, 0); AddLabel(50, 56, 2100, "Random = " + random); string delay = Convert.ToString(m_Stone.Delay); AddButton(200, 34, 4005, 4007, 9, GumpButtonType.Reply, 0); AddImageTiled(240, 34, 70, 20, 0xBBC); AddImageTiled(241, 35, 68, 18, 0x2426); AddTextEntry(241, 35, 68, 18, 0x480, 0, delay); AddLabel(315, 34, 2100, "Delay"); AddButton(200, 56, 4005, 4007, 10, GumpButtonType.Reply, 0); AddLabel(240, 56, 2100, "Edit News"); AddButton(10, 78, 4005, 4007, 11, GumpButtonType.Reply, 0); AddLabel(50, 78, 2100, "Give Control Gem"); AddButton(200, 78, 4005, 4007, 12, GumpButtonType.Reply, 0); AddLabel(240, 78, 2100, "Place TownCrier ( Frozen )"); AddButton(10, 100, 4005, 4007, 13, GumpButtonType.Reply, 0); AddLabel(50, 100, 2100, "Place TownCrier ( Wondering )"); } }