//private QuestDifficulty m_Difficulty = QuestDifficulty.Normal; //private QuestMobGroup m_MobGroup = QuestMobGroup.Undead; //private bool m_IsParty = false; public ArenaRegisterGump(Mobile from, ArenaControlStone arena, ArenaFightType qt) //, QuestMobGroup mg, bool isParty) : base(200, 50) { m_FightType = qt; m_Arena = arena; //m_Difficulty = qd; //m_MobGroup = mg; //m_IsParty = isParty; from.CloseGump(typeof(ArenaRegisterGump)); // from.CloseGump(typeof(PartyQuestGump)); string toDisplay = ""; switch (m_FightType) { case ArenaFightType.None: toDisplay = @"This is the grand arena of Mistas. Please register your preferred type of trainning."; break; case ArenaFightType.SingleFight: toDisplay = @"Test your skill vs a single monster. Right now the opponent is a random one among 5. Leave the arena during combat count as a lose."; break; case ArenaFightType.ChallengeGame: toDisplay = @"In the challange game, you will fight through a series of monsters with progression in difficulty. Your final score is based on how far you go along the chain."; break; case ArenaFightType.PVP: toDisplay = @"Fighting with another player is on a consensual base. Please target another player to invite him/her for a duel. Once he accepts your challange, you can start your fight inside the arena."; break; } this.Closable = true; this.Disposable = true; this.Dragable = true; this.Resizable = false; this.AddPage(0); this.AddBackground(0, 0, 455, 400, 9380); this.AddLabel(168, 57, 0, @"Grand Arena"); this.AddImage(89, 38, 5578); this.AddImage(286, 38, 5578); this.AddButton(118, 203, m_FightType == ArenaFightType.SingleFight ? 209 : 208, 209, (int)Buttons.SingleFightButton, GumpButtonType.Reply, 0); this.AddButton(118, 260, m_FightType == ArenaFightType.ChallengeGame ? 209 : 208, 209, (int)Buttons.ChallengeGameButton, GumpButtonType.Reply, 0); this.AddButton(118, 314, m_FightType == ArenaFightType.PVP ? 209 : 208, 209, (int)Buttons.PVPButton, GumpButtonType.Reply, 0); this.AddHtml(36, 111, 381, 64, toDisplay, (bool)true, (bool)true); this.AddLabel(154, 202, 0, @"Single Fight"); this.AddLabel(149, 260, 0, @"Challenge Game"); this.AddLabel(170, 314, 0, @"PVP"); this.AddItem(60, 190, 8330); this.AddItem(60, 305, 9104); this.AddItem(60, 247, 8344); this.AddButton(269, 324, 247, 248, (int)Buttons.AcceptButton, GumpButtonType.Reply, 0); this.AddButton(346, 324, 241, 242, (int)Buttons.CancelButton, GumpButtonType.Reply, 0); this.AddLabel(270, 290, 0, @"Do you wish to accept?"); }
public void PreparePVMCombat(Mobile from, Type mobType) { Mobile theMob = (Mobile)Activator.CreateInstance(mobType); if (theMob == null || !(theMob is BaseCreature)) { from.SendMessage("That mobile type is not valid."); return; } BaseCreature creature = (BaseCreature)theMob; creature.IsArenaMob = true; foreach (Item item in creature.Items) { item.LootType = LootType.Newbied; } Container pack = creature.Backpack; if (pack != null) { for (int i = pack.Items.Count - 1; i >= 0; --i) { if (i >= pack.Items.Count) { continue; } pack.Items[i].Delete(); } } m_ActiveUser = from; m_NPCOpponent = theMob; m_FightType = ArenaFightType.SingleFight; m_OpponentType = mobType; from.SendMessage("Now prepare for combat!"); Timer.DelayCall(TimeSpan.FromSeconds(4), new TimerStateCallback(StartPVMCombat), new object[] { from, theMob }); }
private void CleanUp() { m_ManageTimer.Stop(); if (m_ActiveUser != null && !m_ActiveUser.Deleted) { m_ActiveUser.MoveToWorld(m_ExpelPoint, Map); if (m_ActiveUser.Corpse != null && IsInsideArena(m_ActiveUser.Corpse)) { m_ActiveUser.Corpse.MoveToWorld(m_ExpelPoint, Map); } } if (m_ActiveUserMount != null && !m_ActiveUserMount.Deleted && m_ActiveUserMount.Map != Map.Internal) { m_ActiveUserMount.MoveToWorld(m_ExpelPoint, Map); } if (m_NPCOpponent != null && !m_NPCOpponent.Deleted) { m_NPCOpponent.Delete(); } m_ActiveUser = null; m_ActiveUserMount = null; m_NPCOpponent = null; m_FightType = ArenaFightType.None; }
private void CleanUp() { m_ManageTimer.Stop(); if (m_ActiveUser != null && !m_ActiveUser.Deleted) { m_ActiveUser.MoveToWorld(m_ExpelPoint, Map); if (m_ActiveUser.Corpse != null && IsInsideArena(m_ActiveUser.Corpse)) m_ActiveUser.Corpse.MoveToWorld(m_ExpelPoint, Map); } if (m_ActiveUserMount != null && !m_ActiveUserMount.Deleted && m_ActiveUserMount.Map!=Map.Internal) m_ActiveUserMount.MoveToWorld(m_ExpelPoint, Map); if (m_NPCOpponent != null && !m_NPCOpponent.Deleted) m_NPCOpponent.Delete(); m_ActiveUser = null; m_ActiveUserMount = null; m_NPCOpponent = null; m_FightType = ArenaFightType.None; }
public void PreparePVMCombat(Mobile from, Type mobType) { Mobile theMob = (Mobile)Activator.CreateInstance(mobType); if (theMob == null || !(theMob is BaseCreature)) { from.SendMessage("That mobile type is not valid."); return; } BaseCreature creature = (BaseCreature)theMob; creature.IsArenaMob = true; foreach (Item item in creature.Items) item.LootType = LootType.Newbied; Container pack = creature.Backpack; if (pack != null) { for (int i = pack.Items.Count - 1; i >= 0; --i) { if (i >= pack.Items.Count) continue; pack.Items[i].Delete(); } } m_ActiveUser = from; m_NPCOpponent = theMob; m_FightType = ArenaFightType.SingleFight; m_OpponentType = mobType; from.SendMessage("Now prepare for combat!"); Timer.DelayCall(TimeSpan.FromSeconds(4), new TimerStateCallback(StartPVMCombat), new object[] { from, theMob }); }