public ConditionEffect SetAccountTypeIcon() { var icon = new ConditionEffect { DurationMS = -1 }; switch (_accountType) { case AccountType.REGULAR: icon.Effect = ConditionEffectIndex.RegularAccount; break; case AccountType.VIP: icon.Effect = ConditionEffectIndex.VipAccount; break; case AccountType.MOD: icon.Effect = ConditionEffectIndex.ModAccount; break; case AccountType.DEVELOPER: icon.Effect = ConditionEffectIndex.DeveloperAccount; break; case AccountType.ADMIN: icon.Effect = ConditionEffectIndex.AdminAccount; break; } return(icon); }
public ConditionEffect SetAccountTypeIcon() { ConditionEffect icon = new ConditionEffect { DurationMS = -1 }; switch (_accountType) { case AccountType.FREE_ACCOUNT: icon.Effect = ConditionEffectIndex.FreeAccount; break; case AccountType.VIP_ACCOUNT: icon.Effect = ConditionEffectIndex.VipAccount; break; case AccountType.LEGENDS_OF_LOE_ACCOUNT: icon.Effect = ConditionEffectIndex.LegendsofLoEAccount; break; case AccountType.TUTOR_ACCOUNT: icon.Effect = ConditionEffectIndex.TutorAccount; break; case AccountType.LOESOFT_ACCOUNT: icon.Effect = ConditionEffectIndex.LoESoftAccount; break; } return(icon); }
public override void Init(World owner) { visibleTiles = new Dictionary <IntPoint, bool>(); WorldInstance = owner; Random rand = new Random(); int x, y; do { x = rand.Next(0, owner.Map.Width); y = rand.Next(0, owner.Map.Height); } while (owner.Map[x, y].Region != TileRegion.Spawn); Move(x + 0.5f, y + 0.5f); tiles = new byte[owner.Map.Width, owner.Map.Height]; SetNewbiePeriod(); base.Init(owner); List <int> gifts = Client.Account.Gifts.ToList(); if (owner.Id == World.NEXUS_ID || owner.Name == "Vault") { Client.SendMessage(new GLOBAL_NOTIFICATION { Type = 0, Text = gifts.Count > 0 ? "giftChestOccupied" : "giftChestEmpty" }); } SendAccountList(Locked, ACCOUNTLIST.LOCKED_LIST_ID); SendAccountList(Ignored, ACCOUNTLIST.IGNORED_LIST_ID); CheckSetTypeSkin(); ConditionEffect playerType = new ConditionEffect(); playerType.Effect = ConditionEffectIndex.PlayerType; playerType.DurationMS = -1; ApplyConditionEffect(playerType); }
public override void Tick(RealmTime time) { base.Tick(time); if (Players.Count > 0) { if (!Flags["started"] && !Flags["counting"]) { foreach (var i in RealmManager.Clients.Values) i.SendPacket(new TextPacket { Stars = -1, BubbleTime = 0, Name = "#Announcement", Text = "A paid arena game has been started. Closing in 1 minute!" }); Flags["counting"] = true; Countdown(60); } else if (Flags["started"] && !Flags["counting"]) { if (Enemies.Count < 1 + Pets.Count) { Wave++; if (Wave < 6) { RandomBosses = new[] { "Red Demon", "Phoenix Lord", "Henchman of Oryx" }; } if (Wave > 5 && Wave < 11) { RandomBosses = new[] {"Red Demon", "Phoenix Lord", "Henchman of Oryx", "Stheno the Snake Queen"}; } if (Wave > 10 && Wave < 16) { RandomBosses = new[] {"Elder Tree", "Stheno the Snake Queen", "Archdemon Malphas", "Septavius the Ghost God"}; } if (Wave > 15 && Wave < 21) { RandomBosses = new[] { "Elder Tree", "Archdemon Malphas", "Septavius the Ghost God", "Thessal the Mermaid Goddess", "Crystal Prisoner" }; } if (Wave > 20 && Wave < 36) { RandomBosses = new[] { "Thessal the Mermaid Goddess", "Crystal Prisoner", "Tomb Support", "Tomb Defender", "Tomb Attacker", "Oryx the Mad God 2" }; } if (Wave > 35) { RandomBosses = new[] { "Thessal the Mermaid Goddess", "Crystal Prisoner", "Tomb Support", "Tomb Defender", "Tomb Attacker", "Oryx the Mad God 2", "Phoenix Wright", "Bridge Sentinel" }; } var db = new Database(); //FamePot = (Wave/2)*10/(Players.Count == 1 ? 1 : 2); if (Players.Count == 1) { FamePot = Wave / 2 * 10; } else if (Wave % 2 == 1) { FamePot = (Wave + 1) / 4 * 10; } else { FamePot = Wave / 4 * 10; } foreach (var i in Players) { i.Value.CurrentFame = i.Value.Client.Account.Stats.Fame = db.UpdateFame(i.Value.Client.Account, FamePot); i.Value.UpdateCount++; i.Value.Client.SendPacket(new NotificationPacket { Color = new ARGB(0xFFFF6600), ObjectId = i.Value.Id, Text = "+" + FamePot + " Fame" }); if (Math.IEEERemainder(Wave, 15) == 0) { i.Value.Credits = i.Value.Client.Account.Credits = db.UpdateCredit(i.Value.Client.Account, 1); i.Value.UpdateCount++; } } db.Dispose(); var Invincible = new ConditionEffect(); Invincible.Effect = ConditionEffectIndex.Invulnerable; Invincible.DurationMS = 6000; var Healing = new ConditionEffect(); Healing.Effect = ConditionEffectIndex.Healing; Healing.DurationMS = 6000; foreach (var i in Players) { i.Value.Client.SendPacket(new SwitchMusicPacket { Music = "Arena" }); i.Value.ApplyConditionEffect(Invincible, Healing); } foreach (var i in Players) { try { if (!Participants.Contains(i.Value.Client.Account.Name)) Participants.Add(i.Value.Client.Account.Name); } catch { } } Flags["counting"] = true; Timers.Add(new WorldTimer(1000, (world, t) => Countdown(5))); } else { foreach (var i in Enemies) { if (OutOfBounds(i.Value.X, i.Value.Y)) { LeaveWorld(i.Value); } } } } } else { if (Participants.Count > 0) { new Database().AddToArenaLb(Wave, Participants); Participants.Clear(); } } }
public override void Init(World owner) { MaxHackEntries = 0; visibleTiles = new Dictionary <IntPoint, bool>(); WorldInstance = owner; Random rand = new Random(); int x, y; do { x = rand.Next(0, owner.Map.Width); y = rand.Next(0, owner.Map.Height); } while (owner.Map[x, y].Region != TileRegion.Spawn); Move(x + 0.5f, y + 0.5f); tiles = new byte[owner.Map.Width, owner.Map.Height]; SetNewbiePeriod(); base.Init(owner); List <int> gifts = Client.Account.Gifts.ToList(); if (owner.Id == (int)WorldID.NEXUS_ID || owner.Name == "Vault") { Client.SendMessage(new GLOBAL_NOTIFICATION { Type = 0, Text = gifts.Count > 0 ? "giftChestOccupied" : "giftChestEmpty" }); } if (Client.Character.Pet != 0) { HatchlingPet = false; HatchlingNotification = false; Pet = Resolve((ushort)PetID); Pet.Move(x, y); Pet.SetPlayerOwner(this); Owner.EnterWorld(Pet); Pet.IsPet = true; } SendAccountList(Locked, ACCOUNTLIST.LOCKED_LIST_ID); SendAccountList(Ignored, ACCOUNTLIST.IGNORED_LIST_ID); CheckSetTypeSkin(); if ((AccountType)AccountType == Core.config.AccountType.LOESOFT_ACCOUNT) { ConditionEffect invincible = new ConditionEffect { Effect = ConditionEffectIndex.Invincible, DurationMS = -1 }; ApplyConditionEffect(invincible); ConditionEffect invulnerable = new ConditionEffect { Effect = ConditionEffectIndex.Invulnerable, DurationMS = -1 }; ApplyConditionEffect(invulnerable); } ApplyConditionEffect(AccountPerks.SetAccountTypeIcon()); Achievements = ImportAchivementCache(); ActualTask = ImportTaskCache(); MonsterCaches = ImportMonsterCaches(); if (ActualTask != null) { Task = GameTask.Tasks[ActualTask]; } }
public void SpawnBoss() { bossSpawns.Shuffle(); Random rand = new Random(); monster = RandomBosses.ElementAt(rand.Next(0, RandomBosses.Count)); var e = Entity.Resolve(XmlDatas.IdToType[monster.Key]); availableDebuffs = buffs; availableDebuffs = debuffs; if (enemynumber < 3) { getBuffs(1); getDebuffs(1); } else if (enemynumber < 6) { getBuffs(2); getDebuffs(1); } else { getBuffs(4); getDebuffs(2); } foreach (var i in UsedBuffs) { string name = i.Key; var Speedy = new ConditionEffect(); Speedy.Effect = ConditionEffectIndex.Speedy; Speedy.DurationMS = -1; var Berserk = new ConditionEffect(); Berserk.Effect = ConditionEffectIndex.Berserk; Berserk.DurationMS = -1; var Armored = new ConditionEffect(); Armored.Effect = ConditionEffectIndex.Armored; Armored.DurationMS = -1; var Damaging = new ConditionEffect(); Damaging.Effect = ConditionEffectIndex.Damaging; Damaging.DurationMS = -1; switch (name) { case "Speedy": e.ApplyConditionEffect(new[] { Speedy }); break; case "Berserk": e.ApplyConditionEffect(new[] { Berserk }); break; case "Tiny": e.Size = e.Size / 4; break; case "Small": e.Size = e.Size / 2; break; case "Buff": (e as entities.Enemy).HP = (e as entities.Enemy).HP * 2; break; case "Armored": e.ApplyConditionEffect(new[] { Armored }); break; case "Invisible": e.Size = 0; break; case "Damaging": e.ApplyConditionEffect(new[] { Damaging }); break; } } foreach (var i in UsedDebuffs) { string name = i.Key; var Slowed = new ConditionEffect(); Slowed.Effect = ConditionEffectIndex.Slowed; Slowed.DurationMS = -1; var ArmorBroken = new ConditionEffect(); ArmorBroken.Effect = ConditionEffectIndex.ArmorBroken; ArmorBroken.DurationMS = -1; var Weak = new ConditionEffect(); Weak.Effect = ConditionEffectIndex.Weak; Weak.DurationMS = -1; var Dazed = new ConditionEffect(); Dazed.Effect = ConditionEffectIndex.Dazed; Dazed.DurationMS = -1; var Paralyzed = new ConditionEffect(); Paralyzed.Effect = ConditionEffectIndex.Paralyzed; Paralyzed.DurationMS = -1; switch (name) { case "Slow": e.ApplyConditionEffect(new[] { Slowed }); break; case "Giant": e.Size = e.Size * 4; break; case "Large": e.Size = e.Size * 2; break; case "Vulnerable": (e as entities.Enemy).HP = (e as entities.Enemy).HP / 2; break; case "Unarmored": e.ApplyConditionEffect(new[] { ArmorBroken }); break; case "Weak": e.ApplyConditionEffect(new[] { Weak }); break; case "Dazed": e.ApplyConditionEffect(new[] { Dazed }); break; case "Paralyzed": e.ApplyConditionEffect(new[] { Paralyzed }); break; } e.Name = buffs.Keys.ToArray().ToString() + debuffs.Keys.ToArray().ToString() + e.Name; float buffvalue = 0; float debuffvalue = 0; foreach (var x in buffs) { buffvalue += x.Value; } foreach (var y in debuffs) { debuffvalue += y.Value; } monstervalue = (int)Math.Ceiling(monster.Value * buffvalue / debuffvalue); BroadcastPacket(new TextPacket { BubbleTime = 0, Stars = -1, Name = "#Nexus Defense", Text = "New Monster: " + e.Name.ToString() + " Bounty: " + monstervalue.ToString() }, null); e.Move(bossSpawns[0].X, bossSpawns[0].Y); EnterWorld(e); UsedBuffs.Clear(); UsedDebuffs.Clear(); } }
public override void Tick(RealmTime time) { base.Tick(time); if (Players.Count > 0) { if (!Flags["started"] && !Flags["counting"]) { foreach (var i in RealmManager.Clients.Values) { i.SendPacket(new TextPacket { Stars = -1, BubbleTime = 0, Name = "#Announcement", Text = "A free arena game has been started. Closing in 1 minute!" }); } Flags["counting"] = true; Countdown(60); } else if (Flags["started"] && !Flags["counting"]) { if (Enemies.Count < 1 + Pets.Count) { Wave++; if (Wave < 6) { RandomBosses = new[] { "Red Demon", "Phoenix Lord", "Henchman of Oryx" }; } if (Wave > 5 && Wave < 11) { RandomBosses = new[] { "Red Demon", "Phoenix Lord", "Henchman of Oryx", "Stheno the Snake Queen" }; } if (Wave > 10 && Wave < 16) { RandomBosses = new[] { "Elder Tree", "Stheno the Snake Queen", "Archdemon Malphas", "Septavius the Ghost God" }; } if (Wave > 15 && Wave < 21) { RandomBosses = new[] { "Elder Tree", "Archdemon Malphas", "Septavius the Ghost God", "Thessal the Mermaid Goddess", "Crystal Prisoner" }; } if (Wave > 20) { RandomBosses = new[] { "Thessal the Mermaid Goddess", "Crystal Prisoner", "Tomb Support", "Tomb Defender", "Tomb Attacker", "Oryx the Mad God 2", "Heir of the Devil", "Avatar of the Forgotten King" }; } var db = new Database(); foreach (var i in Players) { if (Math.IEEERemainder(Wave, 25) == 0) { i.Value.Credits = i.Value.Client.Account.Credits = db.UpdateCredit(i.Value.Client.Account, 1); i.Value.UpdateCount++; } } db.Dispose(); var invincible = new ConditionEffect { Effect = ConditionEffectIndex.Invulnerable, DurationMS = 5000 }; var healing = new ConditionEffect { Effect = ConditionEffectIndex.Healing, DurationMS = 5000 }; foreach (var i in Players) { i.Value.Client.SendPacket(new SwitchMusicPacket() { Music = "Arena" }); i.Value.ApplyConditionEffect(new[] { invincible, healing }); } foreach (var i in Players) { try { if (!Participants.Contains(i.Value.Client.Account.Name)) { Participants.Add(i.Value.Client.Account.Name); } } catch { } } Flags["counting"] = true; Countdown(5); } else { foreach (var i in Enemies) { if (OutOfBounds(i.Value.X, i.Value.Y)) { LeaveWorld(i.Value); } } } } } else { if (Participants.Count > 0) { new Database().AddToArenaLb(Wave, Participants); Participants.Clear(); } } }
public override void Tick(RealmTime time) { base.Tick(time); if (Players.Count > 0) { if (!Flags["started"] && !Flags["counting"]) { foreach (var i in RealmManager.Clients.Values) { i.SendPacket(new TextPacket { Stars = -1, BubbleTime = 0, Name = "#Announcement", Text = "A paid arena game has been started. Closing in 1 minute!" }); } Flags["counting"] = true; Countdown(60); } else if (Flags["started"] && !Flags["counting"]) { if (Enemies.Count < 1 + Pets.Count) { Wave++; if (Wave < 6) { RandomBosses = new[] { "Red Demon", "Phoenix Lord", "Henchman of Oryx" }; } if (Wave > 5 && Wave < 11) { RandomBosses = new[] { "Red Demon", "Phoenix Lord", "Henchman of Oryx", "Stheno the Snake Queen" }; } if (Wave > 10 && Wave < 16) { RandomBosses = new[] { "Elder Tree", "Stheno the Snake Queen", "Archdemon Malphas", "Septavius the Ghost God" }; } if (Wave > 15 && Wave < 21) { RandomBosses = new[] { "Elder Tree", "Archdemon Malphas", "Septavius the Ghost God", "Thessal the Mermaid Goddess", "Crystal Prisoner" }; } if (Wave > 20) { RandomBosses = new[] { "Thessal the Mermaid Goddess", "Crystal Prisoner", "Tomb Support", "Tomb Defender", "Tomb Attacker", "Oryx the Mad God 2" }; } var db = new Database(); FamePot = Wave * 10 / (Players.Count == 1 ? 1 : 2); foreach (var i in Players) { i.Value.CurrentFame = i.Value.Client.Account.Stats.Fame = db.UpdateFame(i.Value.Client.Account, FamePot); i.Value.UpdateCount++; i.Value.Client.SendPacket(new NotificationPacket { Color = new ARGB(0xFFFF6600), ObjectId = i.Value.Id, Text = "+" + FamePot + " Fame" }); } db.Dispose(); var Invincible = new ConditionEffect(); Invincible.Effect = ConditionEffectIndex.Invulnerable; Invincible.DurationMS = 6000; var Healing = new ConditionEffect(); Healing.Effect = ConditionEffectIndex.Healing; Healing.DurationMS = 6000; foreach (var i in Players) { i.Value.ApplyConditionEffect(new[] { Invincible, Healing }); } foreach (var i in Players) { try { if (!Participants.Contains(i.Value.Client.Account.Name)) { Participants.Add(i.Value.Client.Account.Name); } } catch { } } Flags["counting"] = true; Timers.Add(new WorldTimer(1000, (world, t) => Countdown(5))); } else { foreach (var i in Enemies) { if (OutOfBounds(i.Value.X, i.Value.Y)) { LeaveWorld(i.Value); } } } } } else { if (Participants.Count > 0) { new Database().AddToArenaLb(Wave, Participants); Participants.Clear(); } } }
public override void Tick(RealmTime time) { base.Tick(time); if (Players.Count > 0) { if (Enemies.Count < 1 + Pets.Count) { if (!Waiting) { Wave++; Waiting = true; ConditionEffect Invincible = new ConditionEffect(); Invincible.Effect = ConditionEffectIndex.Invulnerable; Invincible.DurationMS = 5000; ConditionEffect Healing = new ConditionEffect(); Healing.Effect = ConditionEffectIndex.Healing; Healing.DurationMS = 5000; foreach (var i in Players) { i.Value.ApplyConditionEffect(new ConditionEffect[] { Invincible, Healing }); } FullCountdown(5); foreach (var i in Players) { try { if (!Participants.Contains(i.Value.Client.Account.Name)) { Participants.Add(i.Value.Client.Account.Name); } } catch { } } } } else { foreach (var i in Enemies) { if (OutOfBounds(i.Value.X, i.Value.Y)) { LeaveWorld(i.Value); } } } } else { if (Participants.Count > 0) { new Database().AddToArenaLB(Wave, Participants); Participants.Clear(); } foreach (var i in Enemies) { LeaveWorld(i.Value); Wave = 0; } } }
public override void Tick(RealmTime time) { base.Tick(time); if (Players.Count > 0) { if (Enemies.Count < 1 + Pets.Count) { if (!Waiting) { Wave++; Waiting = true; ConditionEffect Invincible = new ConditionEffect(); Invincible.Effect = ConditionEffectIndex.Invulnerable; Invincible.DurationMS = 5000; ConditionEffect Healing = new ConditionEffect(); Healing.Effect = ConditionEffectIndex.Healing; Healing.DurationMS = 5000; foreach (var i in Players) { i.Value.ApplyConditionEffect(new ConditionEffect[]{ Invincible, Healing }); } FullCountdown(5); foreach (var i in Players) { try { if (!Participants.Contains(i.Value.Client.Account.Name)) Participants.Add(i.Value.Client.Account.Name); } catch { } } } } else { foreach (var i in Enemies) { if (OutOfBounds(i.Value.X, i.Value.Y)) { LeaveWorld(i.Value); } } } } else { if (Participants.Count > 0) { new Database().AddToArenaLB(Wave, Participants); Participants.Clear(); } foreach (var i in Enemies) { LeaveWorld(i.Value); Wave = 0; } } }
public override void Tick(RealmTime time) { base.Tick(time); if (Players.Count > 0) { if (!Flags["started"] && !Flags["counting"]) { foreach (var i in RealmManager.Clients.Values) { i.SendPacket(new TextPacket { Stars = -1, BubbleTime = 0, Name = "#Announcement", Text = "The Tournament Arena opened by Devwarlt! Come to join and fight against powerful monsters!!!" }); } Flags["counting"] = true; Countdown(120); } else if (Flags["started"] && !Flags["counting"]) { if (Enemies.Count < 1 + Pets.Count) { Wave++; if (Wave < 6) { RandomBosses = new[] { "Red Demon", "Phoenix Lord", "Henchman of Oryx" }; } if (Wave > 5 && Wave < 11) { RandomBosses = new[] { "Red Demon", "Phoenix Lord", "Henchman of Oryx", "Stheno the Snake Queen" }; } if (Wave > 10 && Wave < 16) { RandomBosses = new[] { "Elder Tree", "Stheno the Snake Queen", "Archdemon Malphas", "Septavius the Ghost God" }; } if (Wave > 15 && Wave < 21) { RandomBosses = new[] { "Elder Tree", "Archdemon Malphas", "Septavius the Ghost God", "Thessal the Mermaid Goddess", "Crystal Prisoner" }; } if (Wave > 20 && Wave < 26) { RandomBosses = new[] { "Thessal the Mermaid Goddess", "Crystal Prisoner", "Tomb Support", "Tomb Defender", "Tomb Attacker", "Oryx the Mad God 2" }; } if (Wave > 25 && Wave < 30) { RandomBosses = new[] { "Thessal the Mermaid Goddess", "Crystal Prisoner", "Tomb Support", "Tomb Defender", "Tomb Attacker", "Oryx the Mad God 2", "Phoenix God Egg", "Bridge Sentinel" }; } if (Wave > 31) { RandomBosses = new[] { "Oryx the Mad God 4", "Oryx the Mad God 5", "Oryx the Mad God 6", "Maurth the Succubus Queen", "McFarvo the Fire God", "Undertaker the Great Juggernaut", "Graw the Overlord" }; } var db = new Database(); //FamePot = (Wave/2)*10/(Players.Count == 1 ? 1 : 2); if (Players.Count == 1) { FamePot = (Wave / 2) * 50; } else if (Wave % 2 == 1) { FamePot = ((Wave + 1) / 4) * 50; } else { FamePot = (Wave / 4) * 50; } foreach (var i in Players) { i.Value.CurrentFame = i.Value.Client.Account.Stats.Fame = db.UpdateFame(i.Value.Client.Account, FamePot); i.Value.UpdateCount++; i.Value.Client.SendPacket(new NotificationPacket { Color = new ARGB(0xFFFF6600), ObjectId = i.Value.Id, Text = "+" + FamePot + " Fame" }); if (Math.IEEERemainder(Wave, 15) == 0) { i.Value.Credits = i.Value.Client.Account.Credits = db.UpdateCredit(i.Value.Client.Account, 1); i.Value.UpdateCount++; } } db.Dispose(); var Invincible = new ConditionEffect(); Invincible.Effect = ConditionEffectIndex.Invulnerable; Invincible.DurationMS = 6000; var Healing = new ConditionEffect(); Healing.Effect = ConditionEffectIndex.Healing; Healing.DurationMS = 6000; foreach (var i in Players) { i.Value.Client.SendPacket(new SwitchMusicPacket() { Music = "Oryx" }); i.Value.ApplyConditionEffect(new[] { Invincible, Healing }); } foreach (var i in Players) { try { if (!Participants.Contains(i.Value.Client.Account.Name)) { Participants.Add(i.Value.Client.Account.Name); } } catch { } } Flags["counting"] = true; Timers.Add(new WorldTimer(1000, (world, t) => Countdown(5))); } else { foreach (var i in Enemies) { if (OutOfBounds(i.Value.X, i.Value.Y)) { LeaveWorld(i.Value); } } } } } else { if (Participants.Count > 0) { new Database().AddToArenaLb(Wave, Participants); Participants.Clear(); } } }
public override void Tick(RealmTime time) { base.Tick(time); if (Players.Count > 0) { if (!Flags["started"] && !Flags["counting"]) { foreach (var i in RealmManager.Clients.Values) i.SendPacket(new TextPacket { Stars = -1, BubbleTime = 0, Name = "#Announcement", Text = "A free arena game has been started. Closing in 1 minute!" }); Flags["counting"] = true; Countdown(60); } else if (Flags["started"] && !Flags["counting"]) { if (Enemies.Count < 1 + Pets.Count) { Wave++; if (Wave < 6) { RandomBosses = new[] {"Red Demon", "Phoenix Lord", "Henchman of Oryx"}; } if (Wave > 5 && Wave < 11) { RandomBosses = new[] {"Red Demon", "Phoenix Lord", "Henchman of Oryx", "Stheno the Snake Queen"}; } if (Wave > 10 && Wave < 16) { RandomBosses = new[] {"Elder Tree", "Stheno the Snake Queen", "Archdemon Malphas", "Septavius the Ghost God"}; } if (Wave > 15 && Wave < 21) { RandomBosses = new[] { "Elder Tree", "Archdemon Malphas", "Septavius the Ghost God", "Thessal the Mermaid Goddess", "Crystal Prisoner" }; } if (Wave > 20) { RandomBosses = new[] { "Thessal the Mermaid Goddess", "Crystal Prisoner", "Tomb Support", "Tomb Defender", "Tomb Attacker", "Oryx the Mad God 2" }; } var db = new Database(); foreach (var i in Players) { if (Math.IEEERemainder(Wave, 25) == 0) { i.Value.Credits = i.Value.Client.Account.Credits = db.UpdateCredit(i.Value.Client.Account, 1); i.Value.UpdateCount++; } } db.Dispose(); var invincible = new ConditionEffect {Effect = ConditionEffectIndex.Invulnerable, DurationMS = 5000}; var healing = new ConditionEffect {Effect = ConditionEffectIndex.Healing, DurationMS = 5000}; foreach (var i in Players) { i.Value.Client.SendPacket(new SwitchMusicPacket() { Music = "Arena" }); i.Value.ApplyConditionEffect(new[] { invincible, healing }); } foreach (var i in Players) { try { if (!Participants.Contains(i.Value.Client.Account.Name)) Participants.Add(i.Value.Client.Account.Name); } catch { } } Flags["counting"] = true; Countdown(5); } else { foreach (var i in Enemies) { if (OutOfBounds(i.Value.X, i.Value.Y)) { LeaveWorld(i.Value); } } } } } else { if (Participants.Count > 0) { new Database().AddToArenaLb(Wave, Participants); Participants.Clear(); } } }