/// <summary> /// Constructor /// </summary> /// <param name="delay">Amount of time for recuperating</param> /// <param name="spawner">TPSpawner tied this timer is tied to</param> public RecupeTimer(TimeSpan delay, TPSpawner spawner) : base(TimeSpan.FromSeconds(0), TimeSpan.FromSeconds(1)) { m_EndTime = DateTime.Now + delay; m_Spawner = spawner; foreach (Mobile m in m_Spawner.GetMobilesInRange(m_Spawner.PlayerRange)) { if (m_Spawner.CurrentLevel == m_Spawner.LevelAmt) { m.SendMessage("The enemy is preparing its final attack..."); } else { m.SendMessage("The enemy is gathering strength..."); } } }
/// <summary> /// Constructor /// </summary> /// <param name="spawner">TPSpawner this gump is associated with</param> public TPSpawnerGump(TPSpawner spawner) : base(50, 50) { m_Spawner = spawner; AddPage(0); AddBackground(0, 0, 125, 32 + m_Spawner.LevelAmt*22, 5054); AddLabel(32, 1, 0, "Levels List"); for (int i = 0; i < m_Spawner.LevelAmt; i++) { AddButton(5, (22 * i) + 20, 0xFA5, 0xFA7, 1 + i, GumpButtonType.Reply, 0); AddImageTiled(40, (22 * i) + 20, 69, 23, 0xA40); AddImageTiled(41, (22 * i) + 21, 67, 21, 0xBBC); AddLabel(43, (22 * i) + 21, 154, String.Format("Level {0}", (i + 1))); } }
/// <summary> /// Constructor /// </summary> /// <param name="spawner">TPSpawner this gump is associated with</param> public TPSpawnerGump(TPSpawner spawner) : base(50, 50) { m_Spawner = spawner; AddPage(0); AddBackground(0, 0, 125, 32 + m_Spawner.LevelAmt * 22, 5054); AddLabel(32, 1, 0, "Levels List"); for (int i = 0; i < m_Spawner.LevelAmt; i++) { AddButton(5, (22 * i) + 20, 0xFA5, 0xFA7, 1 + i, GumpButtonType.Reply, 0); AddImageTiled(40, (22 * i) + 20, 69, 23, 0xA40); AddImageTiled(41, (22 * i) + 21, 67, 21, 0xBBC); AddLabel(43, (22 * i) + 21, 154, String.Format("Level {0}", (i + 1))); } }
/// <summary> /// Constructor /// </summary> /// <param name="limit">Time limit for the level</param> /// <param name="spawner">TPSpawner tied this timer is tied to</param> public LimitTimer(TimeSpan limit, TPSpawner spawner) : base(TimeSpan.FromSeconds(0), TimeSpan.FromSeconds(1)) { m_EndTime = DateTime.Now + limit; m_Spawner = spawner; }
/// <summary> /// Constructor /// </summary> /// <param name="spawner">TPSpawner tied this timer is tied to</param> public SpawnerTimer(TPSpawner spawner) : base(TimeSpan.FromSeconds(0), TimeSpan.FromSeconds(1)) { m_Spawner = spawner; }
/// <summary> /// Constructor /// </summary> /// <param name="spawner">TPSpawner this gump is associated with</param> /// <param name="level">The Progression level this gump is defining</param> public TPLevelGump(TPSpawner spawner, int level) : base(50, 50) { m_Spawner = spawner; m_Level = level; AddPage(0); AddBackground(0, 0, 262, 371, 5054); AddLabel(75, 1, 0, String.Format("Level {0} Creatures List", m_Level)); AddButton(5, 347, 0xFB1, 0xFB3, 0, GumpButtonType.Reply, 0); AddLabel(38, 347, 0x384, "Cancel"); AddButton(5, 325, 0xFB7, 0xFB9, 1, GumpButtonType.Reply, 0); AddLabel(38, 325, 0x384, "Okay"); AddButton(110, 325, 0xFB4, 0xFB6, 2, GumpButtonType.Reply, 0); AddLabel(143, 325, 0x384, "Bring to Home"); AddButton(110, 347, 0xFA8, 0xFAA, 3, GumpButtonType.Reply, 0); AddLabel(143, 347, 0x384, "Total Respawn"); for (int i = 0; i < 12; i++) { AddButton(5, (22 * i) + 20, 0xFA5, 0xFA7, 4 + (i * 2), GumpButtonType.Reply, 0); AddButton(38, (22 * i) + 20, 0xFA2, 0xFA4, 5 + (i * 2), GumpButtonType.Reply, 0); AddImageTiled(71, (22 * i) + 20, 159, 23, 0xA40); AddImageTiled(72, (22 * i) + 21, 157, 21, 0xBBC); string str = ""; if ( i < spawner.GetLevelMobs(m_Level).Count) { str = (string)spawner.GetLevelMobs(m_Level)[i]; int count = m_Spawner.CountCreatures(str); } AddTextEntry(75, (22 * i) + 21, 154, 21, 0, i, str); AddImageTiled(231, (22 * i) + 20, 24, 23, 0xA40); AddImageTiled(232, (22 * i) + 21, 22, 21, 0xBBC); if (i < spawner.GetLevelAmts(m_Level).Count) AddTextEntry(233, (22 * i) + 21, 21, 21, 0, i + 12, spawner.GetLevelAmts(m_Level)[i].ToString()); else AddTextEntry(233, (22 * i) + 21, 21, 21, 0, i + 12, "0"); } int j = 12; AddImageTiled(60, (22 * j) + 22, 79, 23, 0xA40); AddImageTiled(61, (22 * j) + 23, 77, 21, 0xBBC); AddLabel(63, (22 * j) + 23, 0x384, "Time Limit"); AddImageTiled(147, (22 * j) + 22, 24, 23, 0xA40); AddImageTiled(148, (22 * j) + 23, 22, 21, 0xBBC); AddLabel(174, (22 * j) + 21, 0x384, ":"); AddImageTiled(180, (22 * j) + 22, 24, 23, 0xA40); AddImageTiled(181, (22 * j) + 23, 22, 21, 0xBBC); AddTextEntry(150, (22 * j) + 23, 21, 21, 0, j + 13, spawner.GetLevelLimit(m_Level).Minutes.ToString()); AddTextEntry(183, (22 * j) + 23, 21, 21, 0, j + 14, spawner.GetLevelLimit(m_Level).Seconds.ToString()); }
/// <summary> /// Constructor /// </summary> /// <param name="spawner">TPSpawner tied this timer is tied to</param> public SpawnerTimer( TPSpawner spawner) : base(TimeSpan.FromSeconds(0), TimeSpan.FromSeconds(1)) { m_Spawner = spawner; }
/// <summary> /// Constructor /// </summary> /// <param name="delay">Amount of time for recuperating</param> /// <param name="spawner">TPSpawner tied this timer is tied to</param> public RecupeTimer(TimeSpan delay, TPSpawner spawner) : base(TimeSpan.FromSeconds(0), TimeSpan.FromSeconds(1)) { m_EndTime = DateTime.Now + delay; m_Spawner = spawner; foreach (Mobile m in m_Spawner.GetMobilesInRange(m_Spawner.PlayerRange)) { if (m_Spawner.CurrentLevel == m_Spawner.LevelAmt) m.SendMessage("The enemy is preparing its final attack..."); else m.SendMessage("The enemy is gathering strength..."); } }
/// <summary> /// Constructor /// </summary> /// <param name="spawner">TPSpawner this gump is associated with</param> /// <param name="level">The Progression level this gump is defining</param> public TPLevelGump(TPSpawner spawner, int level) : base(50, 50) { m_Spawner = spawner; m_Level = level; AddPage(0); AddBackground(0, 0, 262, 371, 5054); AddLabel(75, 1, 0, String.Format("Level {0} Creatures List", m_Level)); AddButton(5, 347, 0xFB1, 0xFB3, 0, GumpButtonType.Reply, 0); AddLabel(38, 347, 0x384, "Cancel"); AddButton(5, 325, 0xFB7, 0xFB9, 1, GumpButtonType.Reply, 0); AddLabel(38, 325, 0x384, "Okay"); AddButton(110, 325, 0xFB4, 0xFB6, 2, GumpButtonType.Reply, 0); AddLabel(143, 325, 0x384, "Bring to Home"); AddButton(110, 347, 0xFA8, 0xFAA, 3, GumpButtonType.Reply, 0); AddLabel(143, 347, 0x384, "Total Respawn"); for (int i = 0; i < 12; i++) { AddButton(5, (22 * i) + 20, 0xFA5, 0xFA7, 4 + (i * 2), GumpButtonType.Reply, 0); AddButton(38, (22 * i) + 20, 0xFA2, 0xFA4, 5 + (i * 2), GumpButtonType.Reply, 0); AddImageTiled(71, (22 * i) + 20, 159, 23, 0xA40); AddImageTiled(72, (22 * i) + 21, 157, 21, 0xBBC); string str = ""; if (i < spawner.GetLevelMobs(m_Level).Count) { str = (string)spawner.GetLevelMobs(m_Level)[i]; int count = m_Spawner.CountCreatures(str); } AddTextEntry(75, (22 * i) + 21, 154, 21, 0, i, str); AddImageTiled(231, (22 * i) + 20, 24, 23, 0xA40); AddImageTiled(232, (22 * i) + 21, 22, 21, 0xBBC); if (i < spawner.GetLevelAmts(m_Level).Count) { AddTextEntry(233, (22 * i) + 21, 21, 21, 0, i + 12, spawner.GetLevelAmts(m_Level)[i].ToString()); } else { AddTextEntry(233, (22 * i) + 21, 21, 21, 0, i + 12, "0"); } } int j = 12; AddImageTiled(60, (22 * j) + 22, 79, 23, 0xA40); AddImageTiled(61, (22 * j) + 23, 77, 21, 0xBBC); AddLabel(63, (22 * j) + 23, 0x384, "Time Limit"); AddImageTiled(147, (22 * j) + 22, 24, 23, 0xA40); AddImageTiled(148, (22 * j) + 23, 22, 21, 0xBBC); AddLabel(174, (22 * j) + 21, 0x384, ":"); AddImageTiled(180, (22 * j) + 22, 24, 23, 0xA40); AddImageTiled(181, (22 * j) + 23, 22, 21, 0xBBC); AddTextEntry(150, (22 * j) + 23, 21, 21, 0, j + 13, spawner.GetLevelLimit(m_Level).Minutes.ToString()); AddTextEntry(183, (22 * j) + 23, 21, 21, 0, j + 14, spawner.GetLevelLimit(m_Level).Seconds.ToString()); }