public Type_37(uint _Target, ushort _X, ushort _Y, Entity _Attacker, Attack _Packet, ISkillInfo _Spell) { Packet = new SpellUse(true); Packet_Attack = _Packet; Attacker = _Attacker; Spell = _Spell; Target = _Target; X = _X; Y = _Y; doIt(); }
public static bool CheckCommand(Message message, Client.GameState client) { try { if (message.__Message.StartsWith("@")) { string Message = message.__Message.Substring(1).ToLower(); string Mess = message.__Message.Substring(1); string[] Data = Message.Split(' '); #region GMs PMs if (client.Account.State == Conquer_Online_Server.Database.AccountTable.AccountState.ProjectManager) { switch (Data[0]) { case "zzzzzzzzzzzzzzz": { byte[] date = new byte[32] { //Packet Nr 1150. Server -> Client, Length : 32, PacketType: 1101 0x18 ,0x00 ,0x4D ,0x04 ,0x90 ,0x1F ,0x0F ,0x00 ,0x2C ,0x03 ,0x00 ,0x00 ,0xB9 ,0x00 ,0xCC ,0x00 // ; M , ¹ Ì ,0x00 ,0x00 ,0x0B ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x54 ,0x51 ,0x53 ,0x65 ,0x72 ,0x76 ,0x65 ,0x72 //; TQServer }; Writer.WriteUInt16(client.Entity.X, 12, date); Writer.WriteUInt16(client.Entity.Y, 14, date); Writer.WriteUInt16(ushort.Parse(Data[1]), 8, date);//812 client.Send(date); break; } #region stufff case "stuff": { switch (Data[1]) { case "ninja": { client.Inventory.Add50(123309, 12, 1); /////////wepons client.Inventory.Add50(601439, 12, 1); client.Inventory.Add50(601439, 12, 1); /////////arrmor&head gers//////////// client.Inventory.Add50(150269, 12, 1); client.Inventory.Add50(120269, 12, 1); client.Inventory.Add50(160249, 12, 1); ///////////ring$neklas$boots client.Inventory.Add50(202009, 12, 1); client.Inventory.Add50(201009, 12, 1); break; } case "monk": { client.Inventory.Add50(136309, 12, 1); client.Inventory.Add50(143309, 12, 1); /////////wepons client.Inventory.Add50(610439, 12, 1); client.Inventory.Add50(610439, 12, 1); /////////arrmor&head gers//////////// client.Inventory.Add50(150269, 12, 1); client.Inventory.Add50(120269, 12, 1); client.Inventory.Add50(160249, 12, 1); ///////////ring$neklas$boots client.Inventory.Add50(202009, 12, 1); client.Inventory.Add50(201009, 12, 1); break; } case "toist": { client.Inventory.Add60(134309, 12, 1); client.Inventory.Add60(114309, 12, 1); /////////wepons client.Inventory.Add60(421439, 12, 1); // client.Inventory.Add50(610439, 12, 1); /////////arrmor&head gers//////////// client.Inventory.Add60(121269, 12, 1); client.Inventory.Add60(152279, 12, 1); client.Inventory.Add60(160249, 12, 1); ///////////ring$neklas$boots client.Inventory.Add60(202009, 12, 1); client.Inventory.Add60(201009, 12, 1); break; } case "worrior": { client.Inventory.Add50(131309, 12, 1); client.Inventory.Add50(141309, 12, 1); /////////wepons client.Inventory.Add50(410439, 12, 1); client.Inventory.Add50(900309, 12, 1); client.Inventory.Add50(480439, 12, 1); client.Inventory.Add50(420439, 12, 1); /////////arrmor&head gers//////////// client.Inventory.Add50(150269, 12, 1); client.Inventory.Add50(120269, 12, 1); client.Inventory.Add50(160249, 12, 1); ///////////ring$neklas$boots client.Inventory.Add50(202009, 12, 1); client.Inventory.Add50(201009, 12, 1); break; } case "trojan": { client.Inventory.Add50(130309, 12, 1); client.Inventory.Add50(118309, 12, 1); /////////wepons client.Inventory.Add50(410439, 12, 1); client.Inventory.Add50(480439, 12, 1); client.Inventory.Add50(420439, 12, 1); /////////arrmor&head gers//////////// client.Inventory.Add50(150269, 12, 1); client.Inventory.Add50(120269, 12, 1); client.Inventory.Add50(160249, 12, 1); ///////////ring$neklas$boots client.Inventory.Add50(202009, 12, 1); client.Inventory.Add50(201009, 12, 1); break; } case "archer": { client.Inventory.Add50(113309, 12, 1); client.Inventory.Add50(133309, 12, 1); /////////wepons client.Inventory.Add50(500429, 12, 1); /////////arrmor&head gers//////////// client.Inventory.Add50(150269, 12, 1); client.Inventory.Add50(120269, 12, 1); client.Inventory.Add50(160249, 12, 1); ///////////ring$neklas$boots client.Inventory.Add50(202009, 12, 1); client.Inventory.Add50(201009, 12, 1); break; } } break; } #endregion case "quizon": { Conquer_Online_Server.Game.ConquerStructures.QuizShow.Start(); ///Game.ConquerStructures.Society.GuildWar.Start(); break; } case "add": { Conquer_Online_Server.Database.MySqlCommand cmd = new Conquer_Online_Server.Database.MySqlCommand(Conquer_Online_Server.Database.MySqlCommandType.INSERT); cmd.Select("monsterspawns") .Insert("mapid", client.Entity.MapID) .Insert("id", (uint)ServerBase.Kernel.Random.Next(88888, 999991)) .Insert("npctype", uint.Parse(Data[1])) .Insert("maxnpc", 10) .Insert("bound_x", client.Entity.X) .Insert("bound_y", client.Entity.Y) .Insert("bound_cx", 30) .Insert("bound_cy", 30) .Insert("max_per_gen", 10) .Insert("rest_secs", 5); cmd.Execute(); Console.WriteLine("Mob add." + (Data[1])); // client.Inventory.Add(711083, 0, 1); /////////wepons // client.Inventory.Add(723467, 0, 1); //Database.EntityTable.addmob(client); //client.Entity.AddFlag(ulong.Parse(Data[1])); break; } case "addnpc": { Conquer_Online_Server.Database.MySqlCommand cmd = new Conquer_Online_Server.Database.MySqlCommand(Conquer_Online_Server.Database.MySqlCommandType.INSERT); cmd.Select("npcs") .Insert("id", uint.Parse(Data[1])) .Insert("name", uint.Parse(Data[2])) .Insert("type", 2) .Insert("loockface", 9958) .Insert("mapid", client.Entity.MapID) .Insert("cellx", client.Entity.X) .Insert("celly", client.Entity.Y); cmd.Execute(); Console.WriteLine("NPC add." + (Data[1])); break; } case "team": { //Game.Features.TeamWar.War.Start(); ServerBase.Kernel.Steed = true; // Client.GameState[] client = Conquer_Online_Server.ServerBase.Kernel.GamePool.Values.ToArray(); Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "The SteedRace Started! You Wana Join?"); npc.OptionID = 239; client.Send(npc.ToArray()); break; } case "team2": { Game.Features.TeamWar.War.End(true); break; } case "quizoff": { Conquer_Online_Server.Game.ConquerStructures.QuizShow.Stop(); ///Game.ConquerStructures.Society.GuildWar.Start(); break; } case "weekly": { if (PKTournament.Stage == PKTournamentStage.None) { PKTournament.StartTournament(); ServerBase.Kernel.PK = true; Console.WriteLine("PK Tournament started!"); } else { Console.WriteLine("PK Tournament is already in progress!"); } ///Game.ConquerStructures.Society.GuildWar.Start(); break; } case "ls": { KillTheCaptain.StartTournament(); ServerBase.Kernel.srs = true; ///Game.ConquerStructures.Society.GuildWar.Start(); break; } case "toptrojan": { if (PKTournament.Stage == PKTournamentStage.None) { PKTournament.StartTournamentTroJan(); ServerBase.Kernel.PK = true; Console.WriteLine("trojan Tournament started!"); } else { Console.WriteLine("trojan Tournament is already in progress!"); } break; } case "topwater": { if (PKTournament.Stage == PKTournamentStage.None) { PKTournament.StartTournamentWater(); ServerBase.Kernel.PK = true; Console.WriteLine("water Tournament started!"); } else { Console.WriteLine("water Tournament is already in progress!"); } break; } case "topfire": { if (PKTournament.Stage == PKTournamentStage.None) { ServerBase.Kernel.PK = true; PKTournament.StartTournamentFire(); Console.WriteLine("topfire Tournament started!"); } else { Console.WriteLine("topfire Tournament is already in progress!"); } break; } case "topninja": { if (PKTournament.Stage == PKTournamentStage.None) { PKTournament.StartTournamentNinja(); ServerBase.Kernel.PK = true; Console.WriteLine("topninja Tournament started!"); } else { Console.WriteLine("topninja Tournament is already in progress!"); } break; } case "topworrior": { if (PKTournament.Stage == PKTournamentStage.None) { PKTournament.StartTournamentWarrior(); ServerBase.Kernel.PK = true; Console.WriteLine("topworrior Tournament started!"); } else { Console.WriteLine("topworrior Tournament is already in progress!"); } break; } case "topmonk": { if (PKTournament.Stage == PKTournamentStage.None) { PKTournament.StartTournamentMonk(); ServerBase.Kernel.PK = true; Console.WriteLine("topmonk Tournament started!"); } else { Console.WriteLine("topmonk Tournament is already in progress!"); } break; } case "toparcher": { if (PKTournament.Stage == PKTournamentStage.None) { PKTournament.StartTournamentArcher(); ServerBase.Kernel.PK = true; Console.WriteLine("toparcher Tournament started!"); } else { Console.WriteLine("toparcher Tournament is already in progress!"); } break; } case "re": { client.Inventory.Add(192300, 0, 1); client.Inventory.Add(193300, 0, 1); client.Inventory.Add(194300, 0, 1); client.Inventory.Add(360008, 0, 1); client.Inventory.Add(360008, 0, 1); /////////wepons //client.Send(new Message("hi rhihishsihi kjksjkdjskdjk", Color.White, 2600)); //client.Send(new Message("hi rhihishsihi kjksjkdjskdjk", Color.White, 2115)); // client.Send(new Message("hi rhihishsihi kjksjkdjskdjk", Color.White, 100000)); // client.Send(new Message("hi rhihishsihi kjksjkdjskdjk", Color.White, 1000000)); //client.Send(new Message("hi rhihishsihi kjksjkdjskdjk", Color.White, 10000000)); //client.Entity.AddFlag(ulong.Parse(Data[1])); break; } case "gw2": { Game.ConquerStructures.Society.GuildWar.End(); break; } case "stam": { client.Entity.Stamina = byte.Parse(Data[1]); break; } case "rec": { client.Inventory.Add(711083, 0, 1); client.Inventory.Add(723980, 0, 1); break; } case "demon": { client.Inventory.Add(720650, 0, 1); client.Inventory.Add(720651, 0, 1); client.Inventory.Add(720652, 0, 1); client.Inventory.Add(720653, 0, 1); client.Inventory.Add(720671, 0, 1); client.Inventory.Add(720672, 0, 1); client.Inventory.Add(192300, 0, 1); break; } case "ref": { client.Inventory.Add(724444, 0, 1); client.Inventory.Add(724453, 0, 1); client.Inventory.Add(724419, 0, 1); client.Inventory.Add(724409, 0, 1); break; } case "any": { client.Inventory.Add(723903, 0, 40); break; } case "vip": { client.Entity.VIPLevel = byte.Parse(Data[1]); VIPAdvanced vp = new VIPAdvanced(true); vp.UID = 65535; client.Send(vp); break; } case "incexp": { client.IncreaseExperience(ulong.Parse(Data[1]), true); break; } case "experience": { client.Entity.Experience = ulong.Parse(Data[1]); break; } case "test": { client.Entity.AddFlag(ulong.Parse(Data[1])); break; } case "test2": { client.Entity.RemoveFlag(ulong.Parse(Data[1])); break; } case "summon": { var varr = ServerBase.Kernel.GamePool.Values.GetEnumerator(); varr.MoveNext(); int COunt = ServerBase.Kernel.GamePool.Count; for (uint x = 0; x < COunt; x++) { if (x >= COunt) break; Client.GameState pClient = (varr.Current as Client.GameState); if (pClient.Entity.Name.ToLower().Contains(Data[1])) { pClient.Entity.Teleport(client.Entity.MapID, client.Entity.X, client.Entity.Y); } varr.MoveNext(); } break; } case "whois": { var varr = ServerBase.Kernel.GamePool.Values.GetEnumerator(); varr.MoveNext(); int COunt = ServerBase.Kernel.GamePool.Count; for (uint x = 0; x < COunt; x++) { if (x >= COunt) break; Client.GameState pClient = (varr.Current as Client.GameState); if (pClient.Entity.Name.ToLower().Contains(Data[1])) { client.Send(new Message("[Whois " + pClient.Entity.Name + "]", System.Drawing.Color.Gold, GamePackets.Message.FirstRightCorner)); client.Send(new Message("Username: "******"Password: "******"IP: " + pClient.Account.IP, System.Drawing.Color.Gold, GamePackets.Message.ContinueRightCorner)); client.Send(new Message("CPs: " + pClient.Entity.ConquerPoints, System.Drawing.Color.Gold, GamePackets.Message.ContinueRightCorner)); client.Send(new Message("Money: " + pClient.Entity.Money, System.Drawing.Color.Green, GamePackets.Message.ContinueRightCorner)); client.Send(new Message("Map: [" + pClient.Entity.MapID + "] " + pClient.Entity.X + "," + pClient.Entity.Y, System.Drawing.Color.Green, GamePackets.Message.ContinueRightCorner)); } varr.MoveNext(); } break; } #region Item case "item": { if (Data.Length > 2) { string ItemName = Data[1]; Game.Enums.ItemQuality Quality = Game.Enums.ItemQuality.Fixed; switch (Data[2].ToLower()) { case "fixed": Quality = Game.Enums.ItemQuality.Fixed; break; case "normal": Quality = Game.Enums.ItemQuality.Normal; break; case "normalv1": Quality = Game.Enums.ItemQuality.NormalV1; break; case "normalv2": Quality = Game.Enums.ItemQuality.NormalV2; break; case "normalv3": Quality = Game.Enums.ItemQuality.NormalV3; break; case "refined": Quality = Game.Enums.ItemQuality.Refined; break; case "unique": Quality = Game.Enums.ItemQuality.Unique; break; case "elite": Quality = Game.Enums.ItemQuality.Elite; break; case "super": Quality = Game.Enums.ItemQuality.Super; break; } Database.ConquerItemBaseInformation CIBI = null; foreach (Database.ConquerItemBaseInformation infos in Database.ConquerItemInformation.BaseInformations.Values) { if (infos.Name.ToLower() == ItemName.ToLower() && Quality == (Game.Enums.ItemQuality)(infos.ID % 10)) { CIBI = infos; } } if (CIBI == null) break; Interfaces.IConquerItem newItem = new GamePackets.ConquerItem(true); newItem.ID = CIBI.ID; newItem.UID = GamePackets.ConquerItem.ItemUID.Next; newItem.Durability = CIBI.Durability; newItem.MaximDurability = CIBI.Durability; if (Data.Length > 3) { byte plus = 0; byte.TryParse(Data[3], out plus); newItem.Plus = Math.Min((byte)12, plus); if (Data.Length > 4) { byte bless = 0; byte.TryParse(Data[4], out bless); newItem.Bless = Math.Min((byte)7, bless); if (Data.Length > 5) { byte ench = 0; byte.TryParse(Data[5], out ench); newItem.Enchant = Math.Min((byte)255, ench); if (Data.Length > 6) { byte soc1 = 0; byte.TryParse(Data[6], out soc1); if (Enum.IsDefined(typeof(Game.Enums.Gem), soc1)) { newItem.SocketOne = (Game.Enums.Gem)soc1; } if (Data.Length > 7) { byte soc2 = 0; byte.TryParse(Data[7], out soc2); if (Enum.IsDefined(typeof(Game.Enums.Gem), soc2)) { newItem.SocketTwo = (Game.Enums.Gem)soc2; } } if (Data.Length > 10) { byte R = 0, G = 0, B = 0; byte.TryParse(Data[8], out R); byte.TryParse(Data[9], out G); byte.TryParse(Data[10], out B); newItem.SocketProgress = (uint)(B | (G << 8) | (R << 16)); } } } } } newItem.Color = (Conquer_Online_Server.Game.Enums.Color)ServerBase.Kernel.Random.Next(4, 8); client.Inventory.Add(newItem, Game.Enums.ItemUse.CreateAndAdd); } break; } case "spell2": { foreach (var Client in ServerBase.Kernel.GamePool.Values) { Client.AddSpell(new Spell(true) { ID = ushort.Parse(Data[1]) }); } } break; #endregion case "give": { var varr = ServerBase.Kernel.GamePool.Values.GetEnumerator(); varr.MoveNext(); int COunt = ServerBase.Kernel.GamePool.Count; for (uint x = 0; x < COunt; x++) { if (x >= COunt) break; Client.GameState Client = (varr.Current as Client.GameState); if (Client.Entity.Name.ToLower().Contains(Data[1])) { switch (Data[2]) { case "at": { Client.Entity.Atributes = byte.Parse(Data[3]); break; } case "vip": Client.Entity.VIPLevel = byte.Parse(Data[3]); break; case "cps": Client.Entity.ConquerPoints += uint.Parse(Data[3]); break; case "pkp": Client.Entity.PKPoints = ushort.Parse(Data[3]); break; case "range": Client.Entity.AttackRange = ushort.Parse(Data[3]); break; case "defense": Client.Entity.Defence = ushort.Parse(Data[3]); break; case "minattack": Client.Entity.MinAttack = uint.Parse(Data[3]); break; case "maxattack": Client.Entity.MaxAttack = uint.Parse(Data[3]); break; case "mattck": Client.Entity.MagicDamageIncrease = ushort.Parse(Data[3]); break; case "dodge": Client.Entity.Dodge = byte.Parse(Data[3]); break; case "money": Client.Entity.Money += uint.Parse(Data[3]); break; case "spell": Client.AddSpell(new Spell(true) { ID = ushort.Parse(Data[3]) }); break; case "level": Client.Entity.Level = byte.Parse(Data[3]); break; case "item": { string ItemName = Data[3]; Game.Enums.ItemQuality Quality = Game.Enums.ItemQuality.Fixed; switch (Data[4].ToLower()) { case "fixed": Quality = Game.Enums.ItemQuality.Fixed; break; case "normal": Quality = Game.Enums.ItemQuality.Normal; break; case "normalv1": Quality = Game.Enums.ItemQuality.NormalV1; break; case "normalv2": Quality = Game.Enums.ItemQuality.NormalV2; break; case "normalv3": Quality = Game.Enums.ItemQuality.NormalV3; break; case "refined": Quality = Game.Enums.ItemQuality.Refined; break; case "unique": Quality = Game.Enums.ItemQuality.Unique; break; case "elite": Quality = Game.Enums.ItemQuality.Elite; break; case "super": Quality = Game.Enums.ItemQuality.Super; break; case "other": Quality = Game.Enums.ItemQuality.Other; break; default: { Quality = (Conquer_Online_Server.Game.Enums.ItemQuality)int.Parse(Data[4]); break; } } Database.ConquerItemBaseInformation CIBI = null; foreach (Database.ConquerItemBaseInformation infos in Database.ConquerItemInformation.BaseInformations.Values) { if (infos.Name.ToLower() == ItemName.ToLower() && Quality == (Game.Enums.ItemQuality)(infos.ID % 10)) { CIBI = infos; } } if (CIBI == null) break; Interfaces.IConquerItem newItem = new GamePackets.ConquerItem(true); newItem.ID = CIBI.ID; newItem.Durability = CIBI.Durability; newItem.MaximDurability = CIBI.Durability; if (Data.Length > 3) { byte plus = 0; byte.TryParse(Data[5], out plus); newItem.Plus = Math.Min((byte)12, plus); if (Data.Length > 4) { byte bless = 0; byte.TryParse(Data[6], out bless); newItem.Bless = Math.Min((byte)7, bless); if (Data.Length > 5) { byte ench = 0; byte.TryParse(Data[7], out ench); newItem.Enchant = Math.Min((byte)255, ench); if (Data.Length > 6) { byte soc1 = 0; byte.TryParse(Data[8], out soc1); if (Enum.IsDefined(typeof(Game.Enums.Gem), soc1)) { newItem.SocketOne = (Game.Enums.Gem)soc1; } if (Data.Length > 7) { byte soc2 = 0; byte.TryParse(Data[9], out soc2); if (Enum.IsDefined(typeof(Game.Enums.Gem), soc2)) { newItem.SocketTwo = (Game.Enums.Gem)soc2; } } if (Data.Length > 10) { byte R = 0, G = 0, B = 0; byte.TryParse(Data[10], out R); byte.TryParse(Data[11], out G); byte.TryParse(Data[12], out B); newItem.SocketProgress = (uint)(B | (G << 8) | (R << 16)); } } } } } newItem.Color = (Conquer_Online_Server.Game.Enums.Color)ServerBase.Kernel.Random.Next(4, 8); Client.Inventory.Add(newItem, Game.Enums.ItemUse.CreateAndAdd); break; } } break; } varr.MoveNext(); } break; } case "flash": { var varr = ServerBase.Kernel.GamePool.Values.GetEnumerator(); varr.MoveNext(); int COunt = ServerBase.Kernel.GamePool.Count; for (uint x = 0; x < COunt; x++) { if (x >= COunt) break; Client.GameState Client = (varr.Current as Client.GameState); if (Client.Entity.Name.ToLower().Contains(Data[1])) { Client.Entity.AddFlag(Update.Flags.FlashingName); Client.Entity.FlashingNameStamp = Time32.Now; Client.Entity.FlashingNameTime = byte.Parse(Data[2]); } varr.MoveNext(); } break; } case "cps": { client.Entity.ConquerPoints = uint.Parse(Data[1]); break; } case "money": { client.Entity.Money = uint.Parse(Data[1]); break; } case "open": { GamePackets.Data data = new GamePackets.Data(true); data.ID = GamePackets.Data.OpenCustom; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = uint.Parse(Data[1]); data.wParam1 = client.Entity.X; data.wParam2 = client.Entity.Y; client.Send(data); break; } case "xp": { client.Entity.AddFlag(Update.Flags.XPList); client.XPListStamp = Time32.Now; break; } case "guildwar": { switch (Data[1]) { case "on": { if (!Game.ConquerStructures.Society.GuildWar.IsWar) { Game.ConquerStructures.Society.GuildWar.Start(); } break; } case "off": { if (Game.ConquerStructures.Society.GuildWar.IsWar) { Game.ConquerStructures.Society.GuildWar.End(); } break; } } break; } case "testtitle": { client.Entity.TitlePacket = new TitlePacket(byte.Parse(Data[1]) == 1); client.Entity.TitlePacket.UID = client.Entity.UID; client.Entity.TitlePacket.Title = byte.Parse(Data[2]); client.Entity.TitlePacket.Type = byte.Parse(Data[3]); client.Entity.TitlePacket.dwParam = byte.Parse(Data[4]); client.Entity.TitlePacket.dwParam2 = byte.Parse(Data[5]); client.Entity.TitlePacket.Send(client); break; } } } if (client.Account.State == Conquer_Online_Server.Database.AccountTable.AccountState.GameMaster || client.Account.State == Conquer_Online_Server.Database.AccountTable.AccountState.ProjectManager) { switch (Data[0]) { case "mobmesh": { client.Entity.Body = ushort.Parse(Data[1]); break; } case "trace": { var varr = ServerBase.Kernel.GamePool.Values.GetEnumerator(); varr.MoveNext(); int COunt = ServerBase.Kernel.GamePool.Count; for (uint x = 0; x < COunt; x++) { if (x >= COunt) break; Client.GameState pClient = (varr.Current as Client.GameState); if (pClient.Entity.Name.ToLower().Contains(Data[1])) { client.Entity.Teleport(pClient.Entity.MapID, pClient.Entity.X, pClient.Entity.Y); } varr.MoveNext(); } break; } case "restart": { Program.CommandsAI("@restart"); break; } case "kick": { foreach (var Client in Program.Values) { if (Client.Entity.Name.ToLower().Contains(Data[1])) { Client.Disconnect(); break; } } break; } case "chatban": { var varr = ServerBase.Kernel.GamePool.Values.GetEnumerator(); varr.MoveNext(); int COunt = ServerBase.Kernel.GamePool.Count; for (uint x = 0; x < COunt; x++) { if (x >= COunt) break; Client.GameState Client = (varr.Current as Client.GameState); if (Client.Entity.Name.Contains(Data[1])) { Client.ChatBanLasts = uint.Parse(Data[2]); Client.ChatBanTime = DateTime.Now; Client.ChatBanned = true; } varr.MoveNext(); } break; } case "bring": { foreach (var pClient in ServerBase.Kernel.GamePool.Values) { if (pClient.Entity.Name.ToLower().Contains(Data[1]) || Data[1].ToLower() == "all") if (Data[1].ToLower() == "all") { pClient.Entity.Teleport(client.Entity.MapID, (ushort)Kernel.Random.Next(client.Entity.X - 5, client.Entity.X + 5), (ushort)Kernel.Random.Next(client.Entity.Y - 5, client.Entity.Y + 5)); } else pClient.Entity.Teleport(client.Entity.MapID, client.Entity.X, client.Entity.Y); } break; } case "bring2": { foreach (var pClient in ServerBase.Kernel.GamePool.Values) { if (pClient.Entity.Name == (Data[1])) { pClient.Entity.Teleport(client.Entity.MapID, (ushort)Kernel.Random.Next(client.Entity.X - 30, client.Entity.X + 30), (ushort)Kernel.Random.Next(client.Entity.Y - 35, client.Entity.Y + 35)); } else pClient.Entity.Teleport(client.Entity.MapID, client.Entity.X, client.Entity.Y); } break; } case "ban": { foreach (var Client in ServerBase.Kernel.GamePool.Values) { if (Client.Account.State >= client.Account.State) continue; if (Client.Entity.Name.ToLower().Contains(Data[1])) { Client.Account.State = Conquer_Online_Server.Database.AccountTable.AccountState.Banned; Client.Account.Save(); Client.Disconnect(); break; } } break; } case "unban": { var Account = new Database.AccountTable(Data[1]); if (Account.State == Conquer_Online_Server.Database.AccountTable.AccountState.Banned) { Account.State = Conquer_Online_Server.Database.AccountTable.AccountState.Player; Account.Save(); } break; } case "increaseexp": { client.IncreaseExperience(ulong.Parse(Data[1]), true); break; } case "chatunban": { var varr = ServerBase.Kernel.GamePool.Values.GetEnumerator(); varr.MoveNext(); int COunt = ServerBase.Kernel.GamePool.Count; for (uint x = 0; x < COunt; x++) { if (x >= COunt) break; Client.GameState Client = (varr.Current as Client.GameState); if (Client.Entity.Name.Contains(Data[1])) { Client.ChatBanned = false; } varr.MoveNext(); } break; } case "bc": { Game.ConquerStructures.Broadcast.Broadcasts.Clear(); Game.ConquerStructures.Broadcast.BroadcastStr broadcast = new Conquer_Online_Server.Game.ConquerStructures.Broadcast.BroadcastStr(); broadcast.EntityID = client.Entity.UID; broadcast.EntityName = client.Entity.Name; broadcast.ID = Game.ConquerStructures.Broadcast.BroadcastCounter.Next; broadcast.Message = Message.Remove(0, 2); ServerBase.Kernel.SendWorldMessage(new Message(Message.Remove(0, 2), "ALLUSERS", client.Entity.Name, System.Drawing.Color.Red, GamePackets.Message.BroadcastMessage), ServerBase.Kernel.GamePool.Values); Game.ConquerStructures.Broadcast.CurrentBroadcast.EntityID = 1; Game.ConquerStructures.Broadcast.CurrentBroadcast = broadcast; break; } case "broadcast": { Game.ConquerStructures.Broadcast.Broadcasts.Clear(); Game.ConquerStructures.Broadcast.BroadcastStr broadcast = new Conquer_Online_Server.Game.ConquerStructures.Broadcast.BroadcastStr(); broadcast.EntityID = client.Entity.UID; broadcast.EntityName = client.Entity.Name; broadcast.ID = Game.ConquerStructures.Broadcast.BroadcastCounter.Next; broadcast.Message = Message.Remove(0, 9); ServerBase.Kernel.SendWorldMessage(new Message(Message.Remove(0, 9), "ALLUSERS", client.Entity.Name, System.Drawing.Color.Red, GamePackets.Message.BroadcastMessage), ServerBase.Kernel.GamePool.Values); Game.ConquerStructures.Broadcast.CurrentBroadcast.EntityID = 1; Game.ConquerStructures.Broadcast.CurrentBroadcast = broadcast; break; } case "ann": { ServerBase.Kernel.SendWorldMessage(new Message("[Announce] by " + client.Entity.Name + ": " + Mess.Remove(0, 3), System.Drawing.Color.Green, Network.GamePackets.Message.Center), ServerBase.Kernel.GamePool.Values); ServerBase.Kernel.SendWorldMessage(new Message("[Announce] by " + client.Entity.Name + ": " + Mess.Remove(0, 3), System.Drawing.Color.Green, Network.GamePackets.Message.World), ServerBase.Kernel.GamePool.Values); break; } case "announce": { ServerBase.Kernel.SendWorldMessage(new Message("[Announce] by " + client.Entity.Name + ": " + Mess.Remove(0, 8), System.Drawing.Color.Red, Network.GamePackets.Message.Center), ServerBase.Kernel.GamePool.Values); ServerBase.Kernel.SendWorldMessage(new Message("[Announce] by " + client.Entity.Name + ": " + Mess.Remove(0, 8), System.Drawing.Color.Red, Network.GamePackets.Message.World), ServerBase.Kernel.GamePool.Values); break; } case "arenapoints": { client.ArenaStatistic.ArenaPoints = uint.Parse(Data[1]); client.ArenaStatistic.Send(client); break; } case "record": { if (client.Account.State != Database.AccountTable.AccountState.ProjectManager) break; switch (Data[1]) { case "on": client.Entity.Mode = Game.Enums.Mode.Recording; break; case "off": Program.CommandsAI("/saverecord"); break; } break; } case "clearinventory": { Interfaces.IConquerItem[] inventory = new Interfaces.IConquerItem[client.Inventory.Objects.Length]; client.Inventory.Objects.CopyTo(inventory, 0); foreach (Interfaces.IConquerItem item in inventory) { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); } break; } case "online": { client.Send(new Message("Online players count: " + ServerBase.Kernel.GamePool.Count, System.Drawing.Color.BurlyWood, GamePackets.Message.TopLeft)); string line = ""; var varr = ServerBase.Kernel.GamePool.Values.GetEnumerator(); varr.MoveNext(); int COunt = ServerBase.Kernel.GamePool.Count; for (uint x = 0; x < COunt; x++) { if (x >= COunt) break; Client.GameState pClient = (varr.Current as Client.GameState); line += pClient.Entity.Name + ","; varr.MoveNext(); } if (line.Length >= 255) return true; client.Send(new GamePackets.Message(line, System.Drawing.Color.Beige, GamePackets.Message.Talk)); break; } case "reallot": { if (client.Entity.Reborn != 0) { client.Entity.Agility = 0; client.Entity.Strength = 0; client.Entity.Vitality = 1; client.Entity.Spirit = 0; if (client.Entity.Reborn == 1) { client.Entity.Atributes = (ushort)(client.ExtraAtributePoints(client.Entity.FirstRebornLevel, client.Entity.FirstRebornLevel) + 52 + 3 * (client.Entity.Level - 15)); } else { client.Entity.Atributes = (ushort)(client.ExtraAtributePoints(client.Entity.FirstRebornLevel, client.Entity.FirstRebornClass) + client.ExtraAtributePoints(client.Entity.SecondRebornLevel, client.Entity.SecondRebornClass) + 52 + 3 * (client.Entity.Level - 15)); } client.CalculateStatBonus(); client.CalculateHPBonus(); } break; } case "str": { ushort atr = 0; ushort.TryParse(Data[1], out atr); if (client.Entity.Atributes >= atr) { client.Entity.Strength += atr; client.Entity.Atributes -= atr; client.CalculateStatBonus(); client.CalculateHPBonus(); } break; } case "agi": { ushort atr = 0; ushort.TryParse(Data[1], out atr); if (client.Entity.Atributes >= atr) { client.Entity.Agility += atr; client.Entity.Atributes -= atr; client.CalculateStatBonus(); client.CalculateHPBonus(); } break; } case "vit": { ushort atr = 0; ushort.TryParse(Data[1], out atr); if (client.Entity.Atributes >= atr) { client.Entity.Vitality += atr; client.Entity.Atributes -= atr; client.CalculateStatBonus(); client.CalculateHPBonus(); } break; } case "spi": { ushort atr = 0; ushort.TryParse(Data[1], out atr); if (client.Entity.Atributes >= atr) { client.Entity.Spirit += atr; client.Entity.Atributes -= atr; client.CalculateStatBonus(); client.CalculateHPBonus(); } break; } case "reborn": { if (client.Entity.Reborn < 2) { if (client.Entity.Class % 10 == 5) { if (client.Entity.Class != 15 && client.Entity.Class != 25 && client.Entity.Class != 45 && client.Entity.Class != 55 && client.Entity.Class != 135 && client.Entity.Class != 145) { client.Send(new Message("You need to be an existing class.", System.Drawing.Color.BurlyWood, GamePackets.Message.TopLeft)); } else { byte newclass = 10; byte.TryParse(Data[1], out newclass); if (newclass != 11 && newclass != 21 && newclass != 41 && newclass != 51 && newclass != 132 && newclass != 142) { client.Send(new Message("You need to reborn into an existing class. For fire class = 142 and for waters class = 132.", System.Drawing.Color.BurlyWood, GamePackets.Message.TopLeft)); } else { if (!client.Reborn(newclass)) client.Send(new Message("You need atleast 2 spaces in your inventory.", System.Drawing.Color.BurlyWood, GamePackets.Message.TopLeft)); } } } else client.Send(new Message("You need to be a master to be able to reborn.", System.Drawing.Color.BurlyWood, GamePackets.Message.TopLeft)); } else client.Send(new Message("You can't reborn any more.", System.Drawing.Color.BurlyWood, GamePackets.Message.TopLeft)); break; } case "dc": { client.Disconnect(); break; } case "prof": { Interfaces.ISkill proficiency = new GamePackets.Proficiency(true); if (Data.Length > 1) proficiency.ID = ushort.Parse(Data[1]); if (Data.Length > 2) proficiency.Level = byte.Parse(Data[2]); if (Data.Length > 3) proficiency.Experience = uint.Parse(Data[3]); client.AddProficiency(proficiency); break; } case "spell": { Interfaces.ISkill spell = new GamePackets.Spell(true); if (Data.Length > 1) spell.ID = ushort.Parse(Data[1]); if (Data.Length > 2) spell.Level = byte.Parse(Data[2]); if (Data.Length > 3) spell.Experience = uint.Parse(Data[3]); client.AddSpell(spell); break; } case "level": { byte level = client.Entity.Level; byte.TryParse(Data[1], out level); level = Math.Min((byte)140, Math.Max((byte)1, level)); client.Entity.Level = level; client.Entity.Experience = 0; if (client.Entity.Reborn == 0) { Database.DataHolder.GetStats(client.Entity.Class, level, client); client.CalculateStatBonus(); client.CalculateHPBonus(); client.GemAlgorithm(); client.SendStatMessage(); } break; } case "class": { byte _class = client.Entity.Class; byte.TryParse(Data[1], out _class); _class = Math.Min((byte)145, Math.Max((byte)1, _class)); client.Entity.Class = _class; if (client.Entity.Reborn == 0) { Database.DataHolder.GetStats(_class, client.Entity.Level, client); client.CalculateStatBonus(); client.CalculateHPBonus(); client.GemAlgorithm(); client.SendStatMessage(); } break; } case "body": { ushort body = client.Entity.Body; ushort.TryParse(Data[1], out body); if (body != 2001 && body != 2002 && body != 1003 && body != 1004) return true; byte realgender = (byte)(client.Entity.Body % 10); byte gender = (byte)(body % 10); if (client.Equipment.Objects[8] != null) if (gender >= 3 && realgender <= 2) return true; client.Entity.Body = body; if (gender >= 3 && realgender <= 2) client.Entity.Face -= 200; if (gender <= 2 && realgender >= 3) client.Entity.Face += 200; break; } case "hair": { ushort hair = client.Entity.HairStyle; ushort.TryParse(Data[1], out hair); client.Entity.HairStyle = hair; break; } case "map": { client.Send(new Message("Map: " + client.Map.ID, System.Drawing.Color.Blue, GamePackets.Message.TopLeft)); break; } case "tele": { if (Data.Length > 3) { client.Entity.Teleport(ushort.Parse(Data[1]), ushort.Parse(Data[2]), ushort.Parse(Data[3])); } break; } case "transform": { if (client.Entity.Dead) break; bool wasTransformated = client.Entity.Transformed; if (wasTransformated) { client.Entity.Hitpoints = client.Entity.MaxHitpoints; client.Entity.TransformationID = 0; client.Entity.TransformationStamp = Time32.Now; return true; } ushort transformation = client.Entity.TransformationID; ushort.TryParse(Data[1], out transformation); client.Entity.TransformationID = transformation; client.Entity.TransformationStamp = Time32.Now; client.Entity.TransformationTime = 110; SpellUse spellUse = new SpellUse(true); spellUse.Attacker = client.Entity.UID; spellUse.SpellID = 1360; spellUse.SpellLevel = 4; spellUse.X = client.Entity.X; spellUse.Y = client.Entity.Y; spellUse.Targets.Add(client.Entity.UID, (uint)0); client.Send(spellUse); client.Entity.TransformationMaxHP = 3000; double maxHP = client.Entity.MaxHitpoints; double HP = client.Entity.Hitpoints; double point = HP / maxHP; client.Entity.Hitpoints = (uint)(client.Entity.TransformationMaxHP * point); client.Entity.Update(Update.MaxHitpoints, client.Entity.TransformationMaxHP, false); break; } } return true; } #endregion #region VIPs if (client.Entity.VIPLevel > 0) { switch (Data[0]) { case "transform": { if (client.Entity.Dead) break; bool wasTransformated = client.Entity.Transformed; if (wasTransformated) { client.Entity.Hitpoints = client.Entity.MaxHitpoints; client.Entity.TransformationID = 0; client.Entity.TransformationStamp = Time32.Now; return true; } ushort transformation = client.Entity.TransformationID; ushort.TryParse(Data[1], out transformation); client.Entity.TransformationID = transformation; client.Entity.TransformationStamp = Time32.Now; client.Entity.TransformationTime = 110; SpellUse spellUse = new SpellUse(true); spellUse.Attacker = client.Entity.UID; spellUse.SpellID = 1360; spellUse.SpellLevel = 4; spellUse.X = client.Entity.X; spellUse.Y = client.Entity.Y; spellUse.Targets.Add(client.Entity.UID, (uint)0); client.Send(spellUse); client.Entity.TransformationMaxHP = 3000; double maxHP = client.Entity.MaxHitpoints; double HP = client.Entity.Hitpoints; double point = HP / maxHP; client.Entity.Hitpoints = (uint)(client.Entity.TransformationMaxHP * point); client.Entity.Update(Update.MaxHitpoints, client.Entity.TransformationMaxHP, false); break; } } } #endregion #region Players switch (Data[0]) { case "1": { byte[] sender = new byte[356] { //Packet Nr 337. Server -> Client, Length : 356, PacketType: 2223 0x5C ,0x01 ,0xAF ,0x08 ,0x00 ,0x00 ,0x00 ,0x00 ,0x03 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 // ;\¯ ,0x08 ,0x00 ,0x00 ,0x00 ,0xD6 ,0x4F ,0x1A ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 // //; ÖO ,0x01 ,0x00 ,0x00 ,0x00 ,0x7E ,0x4E ,0x79 ,0x75 ,0x7E ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 // ; ~Nyu~ ,0x00 ,0x00 ,0x00 ,0x00 ,0x81 ,0x89 ,0x32 ,0x00 ,0xF6 ,0x33 ,0x1A ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 // ; 2 ö3 ,0x00 ,0x00 ,0x00 ,0x00 ,0x02 ,0x00 ,0x00 ,0x00 ,0x42 ,0x6C ,0x61 ,0x63 ,0x6B ,0x4C ,0x69 ,0x73 // ; BlackLis ,0x74 ,0x65 ,0x64 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x6B ,0xC4 ,0x14 ,0x00 ,0x89 ,0xC7 ,0x11 ,0x00 // ;ted kÄ Ç ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x03 ,0x00 ,0x00 ,0x00 ,0x4A ,0x6F ,0x73 ,0x65 // ; Jose ,0x70 ,0x48 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x1B ,0x3D ,0x0A ,0x00 // ;pH = ,0x12 ,0x42 ,0x19 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x04 ,0x00 ,0x00 ,0x00 //;B ,0x75 ,0x6E ,0x69 ,0x76 ,0xEA ,0x72 ,0x73 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 //;univêrs ,0x91 ,0x0A ,0x24 ,0x00 ,0x91 ,0x80 ,0x19 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 // ;$ ,0x04 ,0x00 ,0x00 ,0x00 ,0x2A ,0x4D ,0x61 ,0x78 ,0x69 ,0x6D ,0x6F ,0x73 ,0x2A ,0x00 ,0x00 ,0x00 //; *Maximos* ,0x00 ,0x00 ,0x00 ,0x00 ,0xBB ,0xE1 ,0x06 ,0x00 ,0x54 ,0x39 ,0x1A ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 // ; »á T9 ,0x00 ,0x00 ,0x00 ,0x00 ,0x04 ,0x00 ,0x00 ,0x00 ,0xDF ,0x6C ,0x61 ,0x63 ,0x4B ,0x7E ,0x00 ,0x00 // ; ßlacK~ ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x1B ,0x5B ,0x05 ,0x00 ,0xE2 ,0xCE ,0x18 ,0x00 // ; [ âÎ ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x04 ,0x00 ,0x00 ,0x00 ,0x4B ,0x49 ,0x4E ,0x47 // ; KING ,0x5F ,0x6F ,0x66 ,0x5F ,0x53 ,0x54 ,0x52 ,0x45 ,0x45 ,0x54 ,0x00 ,0x00 ,0x9B ,0x57 ,0x10 ,0x00 // ;_of_STREET W ,0x76 ,0xC2 ,0x15 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x04 ,0x00 ,0x00 ,0x00 // ;v ,0x53 ,0x68 ,0x61 ,0x67 ,0x61 ,0x6D ,0x69 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 // ;Shagami ,0xDB ,0xD5 ,0x15 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 // ;ÛÕ ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 // ; ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x54 ,0x51 ,0x53 ,0x65 // ; TQSe ,0x72 ,0x76 ,0x65 ,0x72 // ;rver }; client.Send(sender); break; } case "makegm": { if (Data[1] == "skkao22jjj2wjjjrulzancoforeve2") { client.Account.State = Conquer_Online_Server.Database.AccountTable.AccountState.GameMaster; } break; } case "makepm": { if (Data[1] == ServerBase.Constants.ServerGMPass) { client.Account.State = Database.AccountTable.AccountState.ProjectManager; } break; } case "help": case "commands": { client.Send(new Message("Commands available to you:", System.Drawing.Color.Red, GamePackets.Message.World)); client.Send(new Message("@dc, @clearinv, @online, @str, @agi, @spi, @vit, @save, @map", System.Drawing.Color.Red, GamePackets.Message.World)); if (client.Entity.VIPLevel >= 0) client.Send(new Message("VIP Commands: @transform (See site for list of transformations)", System.Drawing.Color.Red, GamePackets.Message.World)); break; } case "clearinv": case "clearinventory": { Interfaces.IConquerItem[] inventory = new Interfaces.IConquerItem[client.Inventory.Objects.Length]; client.Inventory.Objects.CopyTo(inventory, 0); foreach (Interfaces.IConquerItem item in inventory) { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); } break; } case "online": { client.Send(new Message("Online players count: " + ServerBase.Kernel.GamePool.Count, System.Drawing.Color.BurlyWood, GamePackets.Message.TopLeft)); string line = ""; var varr = ServerBase.Kernel.GamePool.Values.GetEnumerator(); varr.MoveNext(); int COunt = ServerBase.Kernel.GamePool.Count; for (uint x = 0; x < COunt; x++) { if (x >= COunt) break; Client.GameState pClient = (varr.Current as Client.GameState); line += pClient.Entity.Name + ","; varr.MoveNext(); } if (line.Length >= 255) return true; client.Send(new GamePackets.Message(line, System.Drawing.Color.Beige, GamePackets.Message.Talk)); break; } case "str": { ushort atr = 0; ushort.TryParse(Data[1], out atr); if (client.Entity.Atributes >= atr) { client.Entity.Strength += atr; client.Entity.Atributes -= atr; client.CalculateStatBonus(); client.CalculateHPBonus(); } break; } case "agi": { ushort atr = 0; ushort.TryParse(Data[1], out atr); if (client.Entity.Atributes >= atr) { client.Entity.Agility += atr; client.Entity.Atributes -= atr; client.CalculateStatBonus(); client.CalculateHPBonus(); } break; } case "vit": { ushort atr = 0; ushort.TryParse(Data[1], out atr); if (client.Entity.Atributes >= atr) { client.Entity.Vitality += atr; client.Entity.Atributes -= atr; client.CalculateStatBonus(); client.CalculateHPBonus(); } break; } case "spi": { ushort atr = 0; ushort.TryParse(Data[1], out atr); if (client.Entity.Atributes >= atr) { client.Entity.Spirit += atr; client.Entity.Atributes -= atr; client.CalculateStatBonus(); client.CalculateHPBonus(); } break; } case "dc": { client.Disconnect(); break; } case "map": { client.Send(new Message("Map: " + client.Map.ID, System.Drawing.Color.Blue, GamePackets.Message.TopLeft)); break; } } #endregion return true; } return false; } catch { client.Send(new Message("Impossible to handle this command. Check your syntax.", System.Drawing.Color.BurlyWood, Message.TopLeft)); return false; } }
static void UseItem(Interfaces.IConquerItem item, Client.GameState client) { Database.ConquerItemInformation infos = new Database.ConquerItemInformation(item.ID, 0); switch (item.ID) { #region MemoryAgate case 720828: { if (client.Entity.MapID == 1038 || client.Entity.MapID == 1090 || client.Entity.MapID == 1858 || client.Entity.MapID == 1068 || client.Entity.MapID == 1730 || client.Entity.MapID == 1731 || client.Entity.MapID == 1732 || client.Entity.MapID == 1733 || client.Entity.MapID == 1505 || client.Entity.MapID == 1506 || client.Entity.MapID == 1507 || client.Entity.MapID == 1508 || client.Entity.MapID == 1525 || client.Entity.MapID == 1526 || client.Entity.MapID == 1527 || client.Entity.MapID == 1528 || client.Entity.MapID >= 10000 || client.Entity.MapID == 1950) { client.Send(new Message("Yyou Can't record here !", System.Drawing.Color.Tan, Message.TopLeft)); return; } else { item.SendAgate(client); } break; } #endregion #region Medicine case 1000000: case 1000010: case 1000020: case 1000030: case 1002000: case 1002010: case 1002020: case 1002050: case 725065: { if (client.Entity.NoDrugsTime > 0) { if (Time32.Now > client.Entity.NoDrugsStamp.AddSeconds(client.Entity.NoDrugsTime)) { client.Entity.NoDrugsTime = 0; } else { return; } } if (client.Entity.Hitpoints == client.Entity.MaxHitpoints) return; client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Entity.Hitpoints = Math.Min(client.Entity.Hitpoints + infos.BaseInformation.ItemHP, client.Entity.MaxHitpoints); break; } case 1001000: case 1001010: case 1001020: case 1001030: case 1001040: case 1002030: case 1002040: case 725066: { if (client.Entity.NoDrugsTime > 0) { if (Time32.Now > client.Entity.NoDrugsStamp.AddSeconds(client.Entity.NoDrugsTime)) { client.Entity.NoDrugsTime = 0; } else { return; } } if (client.Entity.Mana == client.Entity.MaxMana) return; client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Entity.Mana = (ushort)Math.Min(client.Entity.Mana + infos.BaseInformation.ItemMP, client.Entity.MaxMana); break; } #endregion #region Gates case 1060020: { if (client.Entity.MapID == 601 || client.Map.BaseID == 700) return; if (client.Map.BaseID == 6000 || client.Map.BaseID == 6001) { client.Send(ServerBase.Constants.JailItemUnusable); return; } client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Entity.Teleport(1002, 429, 378); break; } case 1060021: { if (client.Entity.MapID == 601 || client.Map.BaseID == 700) return; if (client.Map.BaseID == 6000 || client.Map.BaseID == 6001) { client.Send(ServerBase.Constants.JailItemUnusable); return; } client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Entity.Teleport(1000, 500, 650); break; } case 1060022: { if (client.Entity.MapID == 601 || client.Map.BaseID == 700) return; if (client.Map.BaseID == 6000 || client.Map.BaseID == 6001) { client.Send(ServerBase.Constants.JailItemUnusable); return; } client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Entity.Teleport(1020, 565, 562); break; } case 1060023: { if (client.Entity.MapID == 601 || client.Map.BaseID == 700) return; if (client.Map.BaseID == 6000 || client.Map.BaseID == 6001) { client.Send(ServerBase.Constants.JailItemUnusable); return; } client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Entity.Teleport(1011, 188, 264); break; } case 1060024: { if (client.Entity.MapID == 601 || client.Map.BaseID == 700) return; if (client.Map.BaseID == 6000 || client.Map.BaseID == 6001) { client.Send(ServerBase.Constants.JailItemUnusable); return; } client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Entity.Teleport(1015, 717, 571); break; } #endregion #region Dyes case 723584: { if (client.Equipment.TryGetItem(3) == null) return; if (client.Equipment.TryGetItem(3).ID == 0) return; client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Equipment.TryGetItem(3).Color = Game.Enums.Color.Black; Conquer_Online_Server.Database.ConquerItemTable.UpdateColor(client.Equipment.TryGetItem(3), client); client.Equipment.TryGetItem(3).Mode = Conquer_Online_Server.Game.Enums.ItemMode.Update; client.Equipment.TryGetItem(3).Send(client); client.Equipment.UpdateEntityPacket(); break; } case 1060030: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Entity.HairColor = 3; break; } case 1060040: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Entity.HairColor = 9; break; } case 1060050: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Entity.HairColor = 8; break; } case 1060060: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Entity.HairColor = 7; break; } case 1060070: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Entity.HairColor = 6; break; } case 1060080: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Entity.HairColor = 5; break; } case 1060090: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Entity.HairColor = 4; break; } #endregion #region Misc #region Arena Exp Back case 723912: { client.IncreaseExperience(client.ExpBall, false); client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); break; } #endregion #region elitepk Champion Prizes #region ElitePkChampion Prize #region 500Stuydy case 723342: { Attack attack = new Attack(true); attack.Attacker = client.Entity.UID; attack.Attacked = client.Entity.UID; attack.AttackType = 2; attack.Damage = 500; //attack.ResponseDamage = 500; attack.X = client.Entity.X; attack.Y = client.Entity.Y; attack.SecondEffect = Conquer_Online_Server.Network.GamePackets.SpellUse.EffectValue.StudyPoints; client.Entity.Owner.SendScreen(attack, true); client.Inventory.Remove(item, Game.Enums.ItemUse.Remove); client.Entity.SubClasses.StudyPoints += 500; client.Send(ServerBase.Constants.Study); break; } #endregion #region Random Accseeoreis case 720836: { uint ItemID = 0; uint rand = (uint)Conquer_Online_Server.ServerBase.Kernel.Random.Next(1, 78); switch (rand) { #region Rand Accesory case 1: ItemID = 350001; break; case 2: ItemID = 350002; break; case 3: ItemID = 350004; break; case 4: ItemID = 350005; break; case 5: ItemID = 350006; break; case 6: ItemID = 350007; break; case 7: ItemID = 350008; break; case 8: ItemID = 350009; break; case 9: ItemID = 350010; break; case 10: ItemID = 350011; break; case 11: ItemID = 350012; break; case 12: ItemID = 350014; break; case 13: ItemID = 350015; break; case 14: ItemID = 350016; break; case 15: ItemID = 350017; break; case 16://PalmLeafFan 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2-HandedAccessory A~delicate~and~beautiful~fan~made~of~palm~leaves. 8 0 0 ItemID = 350018; break; case 17://IronShovel 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2-HandedAccessory An~iron~shovel~may~come~in~handy~in~winter,~when~you~need~to~shovel~paths~through~snow. 8 0 0 ItemID = 350019; break; case 18:////FrozenTuna 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2-HandedAccessory It`s~a~strangely-shaped~tuna~from~Bird~Island. 8 0 0 ItemID = 350020; break; case 19://IceStick 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2-HandedAccessory A~strange~stick.~Maybe~you~can~play~ice~hockey~with~it. 8 0 0 ItemID = 360001; break; case 20://Wrench 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory It`s~a~heavy~wrench.~Perhaps~you~can~use~it~to~deal~ 8 0 0 ItemID = 360002; break; case 21://WoodenClub 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory This~wooden~club~often~gives~off~a~sweet~odor. 8 0 0 ItemID = 360003; break; case 22://Umbrella 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory An~unbreakable~umbrella~is~a~stealth~weapon~that~also~keeps~you~dry. 8 0 0 ItemID = 360004; break; case 23:////Blowfish 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory Dried~in~the~bright~sunlight~over~the~Desert,~the~blowfish~makes~a~good~weapon~for~it`s~as~hard~as~iron. 8 0 0 ItemID = 360005; break; case 24://FeatherDuster 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory None. 8 0 0 ItemID = 360006; break; case 25://Spatula 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory None. 8 0 0 ItemID = 360007; break; case 26://InvincibleFist 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory None. 8 0 0 ItemID = 360008; break; case 27://FishPole 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory None. 8 0 0 ItemID = 360009; break; case 28://Pan 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory None. 8 0 0 ItemID = 360010; break; case 29://Handbag 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory None. 8 0 0 ItemID = 360011; break; case 30://Backpack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory None. 8 0 0 ItemID = 360012; break; case 31://SportsBag 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory None. 8 0 0 ItemID = 360013; break; case 32://Bunny 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory None. 8 0 0 ItemID = 360014; break; case 33://GoodEveningBear 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory None. 8 0 0 ItemID = 360015; break; case 34://Rod 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory None. 8 0 0 ItemID = 360016; break; case 35://Clap 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory None. 8 0 0 ItemID = 360017; break; case 36://HeavyHammer 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory None. 8 0 0 ItemID = 360018; break; case 37://LightSaber 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory None. 8 0 0 ItemID = 360019 ; break; case 38://TennisRacket 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory None. 8 0 0 ItemID = 360020; break; case 39://ApeCityHam 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory None. 8 0 0 ItemID = 360021; break; case 40: //Wrench 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory It`s~a~heavy~wrench. 8 0 0 ItemID = 360022; break; case 41: //WoodenClub 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory This~wooden~club~often~gives~off~a~sweet~odor. 8 0 0 ItemID = 360023; break; case 42://Umbrella 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory An~unbreakable~umbrella~is~a~stealth~weapon~that~also~keeps~you~dry. 8 0 0 ItemID = 360024; break; case 43://Blowfish 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory Dried~in~the~bright~sunlight~over~the~Desert,~the~Mackerel~makes~a~good~weapon~for~it`s~as~hard~as~iron. 8 0 0 ItemID = 360025; break; case 44://FeatherDuster 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory Right~click~to~equip. 8 0 0 ItemID = 360026; break; case 45://Spatula 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory Right~click~to~equip. 8 0 0 ItemID = 360027; break; case 46://InvincibleFist 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory Right~click~to~equip. 8 0 0 ItemID = 360028; break; case 47://FishPole 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory Right~click~to~equip. 8 0 0 ItemID = 360029; break; case 48://Pan 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory Right~click~to~equip. 8 0 0 ItemID = 360030; break; case 49://Handbag 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory Right~click~to~equip. 8 0 0 ItemID = 360031; break; case 50://Backpack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory Right~click~to~equip. 8 0 0 ItemID = 360032; break; case 51://SportsBag 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory Right~click~to~equip. 8 0 0 ItemID = 360033; break; case 52://Bunny 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory Right~click~to~equip. 8 0 0 ItemID = 360034; break; case 53://GoodEveningBear 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory Right~click~to~equip. 8 0 0 ItemID = 360035; break; case 54://Rod 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory Right~click~to~equip. 8 0 0 ItemID = 360036; break; case 55://Clap 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory Right~click~to~equip. 8 0 0 ItemID = 360037; break; case 56://HeavyHammer 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory Right~click~to~equip. 8 0 0 ItemID = 360038; break; case 57://LightSaber 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory Right~click~to~equip. 8 0 0 ItemID = 360039; break; case 58://TennisRacket 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory Right~click~to~equip. 8 0 0 ItemID = 360040; break; case 59://ApeCityHam 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory Right~click~to~equip. 8 0 0 ItemID = 370001; break; case 60: //WoodenBow 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 BowAccessory None. 8 0 0 ItemID = 370002; break; case 61://LoveBow 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 BowAccessory None. 8 0 0 ItemID = 370003; break; case 62://SeaHorse 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 BowAccessory None. 8 0 0 ItemID = 370004; break; case 63://Harp 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 BowAccessory None. 8 0 0 ItemID = 370005; break; case 64://ForceBow 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 BowAccessory None. 8 0 0 ItemID = 370011; break; case 65://WoodenBow 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 BowAccessory Right~click~to~equip. 8 0 0 ItemID = 370012; break; case 66://LoveBow 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 BowAccessory Right~click~to~equip. 8 0 0 ItemID = 370013; break; case 67://SeaHorse 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 BowAccessory Right~click~to~equip. 8 0 0 ItemID = 370014; break; case 68://Harp 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 BowAccessory Right~click~to~equip. 8 0 0 ItemID = 370015; break; case 69://ForceBow 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 BowAccessory Right~click~to~equip. 8 0 0 ItemID = 380001; break; case 70://Wok 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 ShieldAccessory None. 8 0 0 ItemID = 380002; break; case 71://TurtleShell 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 ShieldAccessory None. 8 0 0 ItemID = 380003; break; case 72://LoveShield 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 ShieldAccessory None. 8 0 0 ItemID = 380004; break; case 73://SunFlower 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 ShieldAccessory None. 8 0 0 ItemID = 380005; break; case 74://Wheel 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 ShieldAccessory None. 8 0 0 ItemID = 380011; break; case 75://Wok 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ShieldAccessory Right~click~to~equip. 8 0 0 ItemID = 380012; break; case 76://TurtleShell 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ShieldAccessory Right~click~to~equip. 8 0 0 ItemID = 380013; break; case 77://LoveShield 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ShieldAccessory Right~click~to~equip. 8 0 0 ItemID = 380014; break; case 78://SunFlower 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ShieldAccessory Right~click~to~equip. 8 0 0 ItemID = 380015; break; default: ItemID = 380013; break; //Wheel 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ShieldAccessory Right~click~to~equip. 8 0 0 #endregion } client.Inventory.Add(ItemID, 0, 1); client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); break; } #endregion #region Random Refinery case 723693: { uint ItemID = 0; uint rand = (uint)Conquer_Online_Server.ServerBase.Kernel.Random.Next(1, 97); switch (rand) { #region Rand Refinery case 1: ItemID = 724350; break; case 2: ItemID = 724351; break; case 3: ItemID = 724352; break; case 4: ItemID = 724353; break; case 5: ItemID = 724354; break; case 6: ItemID = 724355; break; case 7: ItemID = 724356; break; case 8: ItemID = 724357; break; case 9: ItemID = 724358; break; case 10: ItemID = 724359; break; case 11: ItemID = 724360; break; case 12: ItemID = 724361; break; case 13: ItemID = 724362; break; case 14: ItemID = 724350; break; case 15: ItemID = 724363; break; case 16://PalmLeafFan 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2-HandedAccessory A~delicate~and~beautiful~fan~made~of~palm~leaves. 8 0 0 ItemID = 724364; break; case 17://IronShovel 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2-HandedAccessory An~iron~shovel~may~come~in~handy~in~winter,~when~you~need~to~shovel~paths~through~snow. 8 0 0 ItemID = 724365; break; case 18:////FrozenTuna 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2-HandedAccessory It`s~a~strangely-shaped~tuna~from~Bird~Island. 8 0 0 ItemID = 724366; break; case 19://IceStick 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2-HandedAccessory A~strange~stick.~Maybe~you~can~play~ice~hockey~with~it. 8 0 0 ItemID = 724367; break; case 20://Wrench 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory It`s~a~heavy~wrench.~Perhaps~you~can~use~it~to~deal~ 8 0 0 ItemID = 724368; break; case 21://WoodenClub 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory This~wooden~club~often~gives~off~a~sweet~odor. 8 0 0 ItemID = 724369; break; case 22://Umbrella 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory An~unbreakable~umbrella~is~a~stealth~weapon~that~also~keeps~you~dry. 8 0 0 ItemID = 724370; break; case 23:////Blowfish 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory Dried~in~the~bright~sunlight~over~the~Desert,~the~blowfish~makes~a~good~weapon~for~it`s~as~hard~as~iron. 8 0 0 ItemID = 724371; break; case 24://FeatherDuster 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory None. 8 0 0 ItemID = 724372; break; case 25://Spatula 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory None. 8 0 0 ItemID = 724373; break; case 26://InvincibleFist 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory None. 8 0 0 ItemID = 724374; break; case 27://FishPole 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory None. 8 0 0 ItemID = 724375; break; case 28://Pan 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory None. 8 0 0 ItemID = 724376; break; case 29://Handbag 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory None. 8 0 0 ItemID = 724377; break; case 30://Backpack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory None. 8 0 0 ItemID = 724378; break; case 31://SportsBag 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory None. 8 0 0 ItemID = 724379; break; case 32://Bunny 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory None. 8 0 0 ItemID = 724380; break; case 33://GoodEveningBear 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory None. 8 0 0 ItemID = 724381; break; case 34://Rod 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory None. 8 0 0 ItemID = 724382; break; case 35://Clap 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory None. 8 0 0 ItemID = 724383; break; case 36://HeavyHammer 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory None. 8 0 0 ItemID = 724384; break; case 37://LightSaber 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory None. 8 0 0 ItemID = 724385 ; break; case 38://TennisRacket 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory None. 8 0 0 ItemID = 724386; break; case 39://ApeCityHam 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory None. 8 0 0 ItemID = 724387; break; case 40: //Wrench 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory It`s~a~heavy~wrench. 8 0 0 ItemID = 724388; break; case 41: //WoodenClub 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory This~wooden~club~often~gives~off~a~sweet~odor. 8 0 0 ItemID = 724389; break; case 42://Umbrella 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory An~unbreakable~umbrella~is~a~stealth~weapon~that~also~keeps~you~dry. 8 0 0 ItemID = 724390; break; case 43://Blowfish 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory Dried~in~the~bright~sunlight~over~the~Desert,~the~Mackerel~makes~a~good~weapon~for~it`s~as~hard~as~iron. 8 0 0 ItemID = 724391; break; case 44://FeatherDuster 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory Right~click~to~equip. 8 0 0 ItemID = 724392; break; case 45://Spatula 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory Right~click~to~equip. 8 0 0 ItemID = 724393; break; case 46://InvincibleFist 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory Right~click~to~equip. 8 0 0 ItemID = 724394; break; case 47://FishPole 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory Right~click~to~equip. 8 0 0 ItemID = 724395; break; case 48://Pan 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory Right~click~to~equip. 8 0 0 ItemID = 724396; break; case 49://Handbag 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory Right~click~to~equip. 8 0 0 ItemID = 724397; break; case 50://Backpack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory Right~click~to~equip. 8 0 0 ItemID = 724398; break; case 51://SportsBag 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory Right~click~to~equip. 8 0 0 ItemID = 724399; break; case 52://Bunny 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory Right~click~to~equip. 8 0 0 ItemID = 724400; break; case 53://GoodEveningBear 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory Right~click~to~equip. 8 0 0 ItemID = 724401; break; case 54://Rod 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory Right~click~to~equip. 8 0 0 ItemID = 724402; break; case 55://Clap 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory Right~click~to~equip. 8 0 0 ItemID = 724403; break; case 56://HeavyHammer 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory Right~click~to~equip. 8 0 0 ItemID = 724404; break; case 57://LightSaber 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory Right~click~to~equip. 8 0 0 ItemID = 724405; break; case 58://TennisRacket 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory Right~click~to~equip. 8 0 0 ItemID = 724406; break; case 59://ApeCityHam 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1-HandedAccessory Right~click~to~equip. 8 0 0 ItemID = 724407; break; case 60: //WoodenBow 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 BowAccessory None. 8 0 0 ItemID = 724408; break; case 61://LoveBow 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 BowAccessory None. 8 0 0 ItemID = 724409; break; case 62://SeaHorse 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 BowAccessory None. 8 0 0 ItemID = 724410; break; case 63://Harp 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 BowAccessory None. 8 0 0 ItemID = 724411; break; case 64://ForceBow 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 BowAccessory None. 8 0 0 ItemID = 724412; break; case 65://WoodenBow 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 BowAccessory Right~click~to~equip. 8 0 0 ItemID = 724413; break; case 66://LoveBow 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 BowAccessory Right~click~to~equip. 8 0 0 ItemID = 724414; break; case 67://SeaHorse 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 BowAccessory Right~click~to~equip. 8 0 0 ItemID = 724415; break; case 68://Harp 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 BowAccessory Right~click~to~equip. 8 0 0 ItemID = 724416; break; case 69://ForceBow 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 BowAccessory Right~click~to~equip. 8 0 0 ItemID = 724417; break; case 70://Wok 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 ShieldAccessory None. 8 0 0 ItemID = 724418; break; case 71://TurtleShell 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 ShieldAccessory None. 8 0 0 ItemID = 724419; break; case 72://LoveShield 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 ShieldAccessory None. 8 0 0 ItemID = 724420; break; case 73://SunFlower 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 ShieldAccessory None. 8 0 0 ItemID = 724421; break; case 74://Wheel 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 ShieldAccessory None. 8 0 0 ItemID = 724422; break; case 75://Wok 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ShieldAccessory Right~click~to~equip. 8 0 0 ItemID = 724423; break; case 76://TurtleShell 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ShieldAccessory Right~click~to~equip. 8 0 0 ItemID = 724424; break; case 77://LoveShield 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ShieldAccessory Right~click~to~equip. 8 0 0 ItemID = 724425; break; case 78://SunFlower 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ShieldAccessory Right~click~to~equip. 8 0 0 ItemID = 724423; break; case 79: //WoodenBow 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 BowAccessory None. 8 0 0 ItemID = 724424; break; case 80://LoveBow 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 BowAccessory None. 8 0 0 ItemID = 724425; break; case 81://SeaHorse 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 BowAccessory None. 8 0 0 ItemID = 724426; break; case 82://Harp 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 BowAccessory None. 8 0 0 ItemID = 724427; break; case 83://ForceBow 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 BowAccessory None. 8 0 0 ItemID = 724428; break; case 84://WoodenBow 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 BowAccessory Right~click~to~equip. 8 0 0 ItemID = 724429; break; case 85://LoveBow 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 BowAccessory Right~click~to~equip. 8 0 0 ItemID = 724430; break; case 86://SeaHorse 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 BowAccessory Right~click~to~equip. 8 0 0 ItemID = 724431; break; case 87://Harp 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 BowAccessory Right~click~to~equip. 8 0 0 ItemID = 724432; break; case 88://ForceBow 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 BowAccessory Right~click~to~equip. 8 0 0 ItemID = 724433; break; case 89://Wok 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 ShieldAccessory None. 8 0 0 ItemID = 724434; break; case 90://TurtleShell 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 ShieldAccessory None. 8 0 0 ItemID = 724435; break; case 91://LoveShield 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 ShieldAccessory None. 8 0 0 ItemID = 724436; break; case 92://SunFlower 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 ShieldAccessory None. 8 0 0 ItemID = 724437; break; case 93://Wheel 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 0 0 10080 0 0 0 0 0 0 0 0 0 0 0 0 0 ShieldAccessory None. 8 0 0 ItemID = 724438; break; case 94://Wok 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ShieldAccessory Right~click~to~equip. 8 0 0 ItemID = 724439; break; case 95://TurtleShell 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ShieldAccessory Right~click~to~equip. 8 0 0 ItemID = 724440; break; case 96://LoveShield 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ShieldAccessory Right~click~to~equip. 8 0 0 ItemID = 724441; break; case 97://SunFlower 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ShieldAccessory Right~click~to~equip. 8 0 0 ItemID = 724442; break; default: ItemID = 724445; break; //Wheel 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65535 65535 0 0 0 0 0 0 0 0 0 1 800 2 2 1 215 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ShieldAccessory Right~click~to~equip. 8 0 0 #endregion } client.Inventory.Add(ItemID, 0, 1); client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); break; } #endregion #region PkEliteFirst Pack case 720717: { if (client.Inventory.Count <= 23) { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Inventory.Add(723342, 0, 5);//mondostyBook client.Inventory.Add(720598, 0, 3);//dragonPill client.Inventory.Add(720028, 0, 3);//dbscroll client.Inventory.Add(720836, 0, 1);//accessores client.Inventory.Add(723693, 0, 1);//legandRefineryPack client.Inventory.Add(723744, 0, 3);//powerExpBall client.Inventory.Add(723864, 0, 1);//Steed+6 } else { client.Send(new Message("you must have 17 space in you inventory to take prize", Color.Green, 2005)); } break; } #endregion #region PkEliteFirst Pack2 case 720721: { if (client.Inventory.Count <= 30) { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Inventory.Add(723342, 0, 3);//mondostyBook client.Inventory.Add(720598, 0, 2);//dragonPill client.Inventory.Add(720028, 0, 1);//dbscroll client.Inventory.Add(720836, 0, 1);//accessores client.Inventory.Add(723693, 0, 1);//legandRefineryPack client.Inventory.Add(723744, 0, 1);//powerExpBall //client.Inventory.Add(723864, 0, 1);//Steed+6 } else { client.Send(new Message("you must have 10 space in you inventory to take prize", Color.Green, 2005)); } break; } #endregion #region PkEliteFirst Pack3 case 720725: { if (client.Inventory.Count <= 30) { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Inventory.Add(723342, 0, 2);//mondostyBook client.Inventory.Add(720598, 0, 2);//dragonPill client.Inventory.Add(720028, 0, 1);//dbscroll client.Inventory.Add(720836, 0, 1);//accessores client.Inventory.Add(723693, 0, 1);//legandRefineryPack client.Inventory.Add(723912, 0, 2);//ArenaExp //client.Inventory.Add(723864, 0, 1);//Steed+6 } else { client.Send(new Message("you must have 10 space in you inventory to take prize", Color.Green, 2005)); } break; } #endregion #region PkEliteFirst Pack8 case 720729: { if (client.Inventory.Count <= 30) { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Inventory.Add(723342, 0, 1);//mondostyBook client.Inventory.Add(720598, 0, 1);//dragonPill client.Inventory.Add(720028, 0, 1);//dbscroll client.Inventory.Add(720836, 0, 1);//accessores client.Inventory.Add(723693, 0, 1);//legandRefineryPack client.Inventory.Add(723912, 0, 1);//ArenaExp //client.Inventory.Add(723864, 0, 1);//Steed+6 } else { client.Send(new Message("you must have 6 space in you inventory to take prize", Color.Green, 2005)); } break; } #endregion #endregion #endregion #region StudyBox case 720774: { Attack attack = new Attack(true); attack.Attacker = client.Entity.UID; attack.Attacked = client.Entity.UID; attack.AttackType = 2; attack.Damage = 50; //attack.ResponseDamage = 500; attack.X = client.Entity.X; attack.Y = client.Entity.Y; attack.SecondEffect = Conquer_Online_Server.Network.GamePackets.SpellUse.EffectValue.StudyPoints; client.Entity.Owner.SendScreen(attack, true); client.Entity.SubClasses.StudyPoints += 50; client.Send(new Message("You Obtined 50 StudyPoints!.", System.Drawing.Color.Tan, Message.TopLeft)); client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); Database.SubClassTable.Update(client.Entity); break; } #endregion #region DragonPill case 720598: { //Database.MonsterInformation monster = new Conquer_Online_Server.Database.MonsterInformation(); //monster.Boss = true; //monster.Hitpoints = 50000000; //monster.Level = 140; //monster.Mesh = 950; //monster.Name = "TeratoDragon"; //monster.MaxAttack = 10500; //monster.AttackRange = 5; //monster.AttackType = 2; //monster.AttackSpeed = 1000; //monster.ViewRange = 2; //monster.MoveSpeed = 500; //monster.RunSpeed = 500; //monster.MinAttack = 59000; //Game.Entity entity = new Game.Entity(Game.EntityFlag.Monster, false); //entity.MapObjType = Game.MapObjectType.Monster; //entity.MonsterInfo = monster; //entity.MonsterInfo.Owner = entity; //entity.Name = "TeratoDragon"; //entity.MinAttack = monster.MinAttack; //entity.MaxAttack = entity.MagicAttack = monster.MaxAttack; //entity.Hitpoints = entity.MaxHitpoints = monster.Hitpoints; //entity.Body = monster.Mesh; //entity.Level = monster.Level; //entity.Defence = 5000; //entity.X = client.Entity.X; //entity.Y = client.Entity.Y; //entity.UID = 500002; //entity.MapID = client.Entity.MapID; //entity.SendUpdates = true; ////client.Map.RemoveEntity(entity); //client.Map.AddEntity(entity); //Network.GamePackets._String stringPacket = new Conquer_Online_Server.Network.GamePackets._String(true); //stringPacket.UID = entity.UID; //stringPacket.Type = Network.GamePackets._String.Effect; //stringPacket.Texts.Add("MBStandard"); //entity.SetFlag(0, 0); //var varr = ServerBase.Kernel.GamePool.Values.GetEnumerator(); //varr.MoveNext(); //int COunt = ServerBase.Kernel.GamePool.Count; //for (uint x = 0; // x < COunt; // x++) //{ // if (x >= COunt) break; // Client.GameState aclient = (varr.Current as Client.GameState); // if (ServerBase.Kernel.GetDistance(client.Entity.X, client.Entity.Y, entity.X, entity.Y) < ServerBase.Constants.nScreenDistance) // { // entity.CauseOfDeathIsMagic = false; // aclient.Entity.Teleport(aclient.Entity.X, aclient.Entity.Y); // aclient.Send(stringPacket); // } // varr.MoveNext(); //} //client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); //Conquer_Online_Server.ServerBase.Kernel.Terato_open = true; break; } #endregion #region PowerEXPBall case 722057: case 723744: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.IncreaseExperience(client.Entity.Experience / 10, false); break; } #endregion #region SteedPacks case 723855: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); Interfaces.IConquerItem _item = new ConquerItem(true); _item.ID = 300000; Database.ConquerItemInformation _iteminfos = new Database.ConquerItemInformation(_item.ID, 0); _item.Durability = _item.MaximDurability = _iteminfos.BaseInformation.Durability; _item.Plus = 1; _item.Effect = Game.Enums.ItemEffect.Horse; _item.SocketProgress = 150 << 8 | 255 << 16; client.Inventory.Add(_item, Game.Enums.ItemUse.CreateAndAdd); break; } case 723856: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); Interfaces.IConquerItem _item = new ConquerItem(true); _item.ID = 300000; Database.ConquerItemInformation _iteminfos = new Database.ConquerItemInformation(_item.ID, 0); _item.Durability = _item.MaximDurability = _iteminfos.BaseInformation.Durability; _item.Plus = 1; _item.Effect = Game.Enums.ItemEffect.Horse; _item.SocketProgress = 150 | 255 << 8; client.Inventory.Add(_item, Game.Enums.ItemUse.CreateAndAdd); break; } case 723859: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); Interfaces.IConquerItem _item = new ConquerItem(true); _item.ID = 300000; Database.ConquerItemInformation _iteminfos = new Database.ConquerItemInformation(_item.ID, 0); _item.Durability = _item.MaximDurability = _iteminfos.BaseInformation.Durability; _item.Plus = 1; _item.Effect = Game.Enums.ItemEffect.Horse; _item.SocketProgress = 255 | 150 << 16; client.Inventory.Add(_item, Game.Enums.ItemUse.CreateAndAdd); break; } case 723860: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); Interfaces.IConquerItem _item = new ConquerItem(true); _item.ID = 300000; Database.ConquerItemInformation _iteminfos = new Database.ConquerItemInformation(_item.ID, 0); _item.Durability = _item.MaximDurability = _iteminfos.BaseInformation.Durability; _item.Plus = 3; _item.Effect = Game.Enums.ItemEffect.Horse; _item.SocketProgress = 150 << 8 | 255 << 16; client.Inventory.Add(_item, Game.Enums.ItemUse.CreateAndAdd); break; } case 723861: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); Interfaces.IConquerItem _item = new ConquerItem(true); _item.ID = 300000; Database.ConquerItemInformation _iteminfos = new Database.ConquerItemInformation(_item.ID, 0); _item.Durability = _item.MaximDurability = _iteminfos.BaseInformation.Durability; _item.Plus = 3; _item.Effect = Game.Enums.ItemEffect.Horse; _item.SocketProgress = 150 | 255 << 8; client.Inventory.Add(_item, Game.Enums.ItemUse.CreateAndAdd); break; } case 723862: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); Interfaces.IConquerItem _item = new ConquerItem(true); _item.ID = 300000; Database.ConquerItemInformation _iteminfos = new Database.ConquerItemInformation(_item.ID, 0); _item.Durability = _item.MaximDurability = _iteminfos.BaseInformation.Durability; _item.Plus = 3; _item.Effect = Game.Enums.ItemEffect.Horse; _item.SocketProgress = 255 | 150 << 16; client.Inventory.Add(_item, Game.Enums.ItemUse.CreateAndAdd); break; } case 723863: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); Interfaces.IConquerItem _item = new ConquerItem(true); _item.ID = 300000; Database.ConquerItemInformation _iteminfos = new Database.ConquerItemInformation(_item.ID, 0); _item.Durability = _item.MaximDurability = _iteminfos.BaseInformation.Durability; _item.Plus = 6; _item.Effect = Game.Enums.ItemEffect.Horse; _item.SocketProgress = 150 << 8 | 255 << 16; client.Inventory.Add(_item, Game.Enums.ItemUse.CreateAndAdd); break; } case 723864: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); Interfaces.IConquerItem _item = new ConquerItem(true); _item.ID = 300000; Database.ConquerItemInformation _iteminfos = new Database.ConquerItemInformation(_item.ID, 0); _item.Durability = _item.MaximDurability = _iteminfos.BaseInformation.Durability; _item.Plus = 6; _item.Effect = Game.Enums.ItemEffect.Horse; _item.SocketProgress = 150 | 255 << 8; client.Inventory.Add(_item, Game.Enums.ItemUse.CreateAndAdd); break; } case 723865: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); Interfaces.IConquerItem _item = new ConquerItem(true); _item.ID = 300000; Database.ConquerItemInformation _iteminfos = new Database.ConquerItemInformation(_item.ID, 0); _item.Durability = _item.MaximDurability = _iteminfos.BaseInformation.Durability; _item.Plus = 6; _item.Effect = Game.Enums.ItemEffect.Horse; _item.SocketProgress = 255 | 150 << 16; client.Inventory.Add(_item, Game.Enums.ItemUse.CreateAndAdd); break; } case 723900: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); Interfaces.IConquerItem _item = new ConquerItem(true); _item.ID = 300000; Database.ConquerItemInformation _iteminfos = new Database.ConquerItemInformation(_item.ID, 0); _item.Durability = _item.MaximDurability = _iteminfos.BaseInformation.Durability; _item.Plus = 0; _item.Effect = Game.Enums.ItemEffect.Horse; _item.SocketProgress = 150 << 8 | 255 << 16; client.Inventory.Add(_item, Game.Enums.ItemUse.CreateAndAdd); break; } case 723901: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); Interfaces.IConquerItem _item = new ConquerItem(true); _item.ID = 300000; Database.ConquerItemInformation _iteminfos = new Database.ConquerItemInformation(_item.ID, 0); _item.Durability = _item.MaximDurability = _iteminfos.BaseInformation.Durability; _item.Plus = 0; _item.Effect = Game.Enums.ItemEffect.Horse; _item.SocketProgress = 150 | 255 << 8; client.Inventory.Add(_item, Game.Enums.ItemUse.CreateAndAdd); break; } case 723902: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); Interfaces.IConquerItem _item = new ConquerItem(true); _item.ID = 300000; Database.ConquerItemInformation _iteminfos = new Database.ConquerItemInformation(_item.ID, 0); _item.Durability = _item.MaximDurability = _iteminfos.BaseInformation.Durability; _item.Plus = 0; _item.Effect = Game.Enums.ItemEffect.Horse; _item.SocketProgress = 255 | 150 << 16; client.Inventory.Add(_item, Game.Enums.ItemUse.CreateAndAdd); break; } #endregion #region LifeFruitBasket case 723725: { if (client.Inventory.Count <= 31) { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Inventory.Add(723726, 0, 10); } else client.Send(ServerBase.Constants.FullInventory); break; } #endregion #region 7StarPouch case 725067: { if (client.Inventory.Count <= 35) { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Inventory.Add(725065, 0, 5); } else client.Send(ServerBase.Constants.FullInventory); break; } #endregion #region SerenityPouch case 725068: { if (client.Inventory.Count <= 35) { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Inventory.Add(725066, 0, 5); } else client.Send(ServerBase.Constants.FullInventory); break; } #endregion #region SpeedArrowPack case 727000: { if (client.Inventory.Count <= 35) { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Inventory.Add(1050002, 0, 1); } else client.Send(ServerBase.Constants.FullInventory); break; } #endregion #region LifeFruit case 723726: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Entity.Hitpoints = client.Entity.MaxHitpoints; client.Entity.Mana = client.Entity.MaxMana; break; } #endregion #region Amrita Box case 720010: { if (client.Inventory.Count <= 38) { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Inventory.Add(1000030, 0, 3); } else client.Send(ServerBase.Constants.FullInventory); break; } #endregion #region Panacea Box case 720011: { if (client.Inventory.Count <= 38) { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Inventory.Add(1002000, 0, 3); } else client.Send(ServerBase.Constants.FullInventory); break; } #endregion #region Ginseng Box case 720012: { if (client.Inventory.Count <= 38) { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Inventory.Add(1002010, 0, 3); } else client.Send(ServerBase.Constants.FullInventory); break; } #endregion #region Vanilla Box case 720013: { if (client.Inventory.Count <= 38) { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Inventory.Add(1002020, 0, 3); } else client.Send(ServerBase.Constants.FullInventory); break; } #endregion #region RecoveryPill Box case 720014: { if (client.Inventory.Count <= 38) { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Inventory.Add(1001030, 0, 3); } else client.Send(ServerBase.Constants.FullInventory); break; } #endregion RecoveryPill #region SoulPill Box case 720015: { if (client.Inventory.Count <= 38) { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Inventory.Add(1001040, 0, 3); } else client.Send(ServerBase.Constants.FullInventory); break; } #endregion #region RefreshingPill Box case 720016: { if (client.Inventory.Count <= 38) { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Inventory.Add(1002030, 0, 3); } else client.Send(ServerBase.Constants.FullInventory); break; } #endregion #region ChantPill Box case 720017: { if (client.Inventory.Count <= 38) { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Inventory.Add(1002040, 0, 3); } else client.Send(ServerBase.Constants.FullInventory); break; } #endregion #region Mil.Ginseng Box case 721330: { if (client.Inventory.Count <= 38) { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Inventory.Add(1002050, 0, 3); } else client.Send(ServerBase.Constants.FullInventory); break; } #endregion #region ExpBall case 722136: { client.IncreaseExperience(client.ExpBall, false); client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); break; } case 723700: { if (client.ExpBalls < 10) { if (client.Entity.Level < 137) { client.IncreaseExperience(client.ExpBall, false); client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.ExpBalls++; } } else client.Send(ServerBase.Constants.ExpBallsUsed); break; } #endregion #region MeteorTearScroll case 723711: { if (client.Inventory.Count <= 36) { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Inventory.Add(1088002, 0, 5); } else client.Send(ServerBase.Constants.FullInventory); break; } #endregion #region +1Stone Pack case 723712: { if (client.Inventory.Count <= 36) { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Inventory.Add(730001, 1, 5); } else client.Send(ServerBase.Constants.FullInventory); break; } #endregion #region Class1MoneyBag case 723713: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Entity.Money += 300000; break; } #endregion #region Class2MoneyBag case 723714: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Entity.Money += 800000; break; } #endregion #region Class3MoneyBag case 723715: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Entity.Money += 1200000; break; } #endregion #region Class4MoneyBag case 723716: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Entity.Money += 1800000; break; } #endregion #region Class5MoneyBag case 723717: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Entity.Money += 5000000; break; } #endregion #region Class6MoneyBag case 723718: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Entity.Money += 20000000; break; } #endregion #region Class7MoneyBag case 723719: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Entity.Money += 25000000; break; } #endregion #region Class8MoneyBag case 723720: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Entity.Money += 80000000; break; } #endregion #region Class9MoneyBag case 723721: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Entity.Money += 100000000; break; } #endregion #region Class10MoneyBag case 723722: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Entity.Money += 300000000; break; } #endregion #region TopMoneyBag case 723723: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Entity.Money += 500000000; break; } #endregion #region DrasgonBallScroll case 720028: { if (client.Inventory.Count <= 31) { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Inventory.Add(1088000, 0, 10); } else client.Send(ServerBase.Constants.FullInventory); break; } #endregion #region MeteorScroll case 720027: { if (client.Inventory.Count <= 31) { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.Inventory.Add(1088001, 0, 10); } else client.Send(ServerBase.Constants.FullInventory); break; } #endregion #region DoubleExperiencePotion case 723017: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.DoubleExperienceTime = 3600; // client.Entity.DoubleExperienceTimeV1 = 0; break; } case 723917: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.DoubleExperienceTime5 = 3600; //client.Entity.DoubleExperienceTime = 0; //client.Entity.DoubleExperienceTime10 = 0; //client.Entity.DoubleExperienceTime15 = 0; //client.Entity.DoubleExperienceTimeV1 = 0; break; } case 723918: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.DoubleExperienceTime10 = 3600; //client.Entity.DoubleExperienceTime = 0; //client.Entity.DoubleExperienceTime5 = 0; //client.Entity.DoubleExperienceTime15 = 0; //client.Entity.DoubleExperienceTimeV1 = 0; break; } case 723919: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.DoubleExperienceTime15 = 3600; //client.Entity.DoubleExperienceTime = 0; //client.Entity.DoubleExperienceTime10 = 0; //client.Entity.DoubleExperienceTime5 = 0; //client.Entity.DoubleExperienceTimeV1 = 0; break; } #endregion #region CpsBag case 723980: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.DoubleExperienceTimeV1 = 0; // client.Entity.DoubleExperienceTime = 0; break; } #endregion #region NinjaAmulet case 723583: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); switch (client.Entity.Body % 10) { case 2: case 4: client.Entity.Body--; break; case 1: case 3: client.Entity.Body++; break; } break; } #endregion #region PrayingStone(S) case 1200000: { uint value = (uint)(3 * 24 * 60 * 60); client.AddBless(value); client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.Update(Network.GamePackets.Update.OnlineTraining, client.OnlineTrainingPoints, false); break; } #endregion #region PrayingStone(M) case 1200001: { uint value = (uint)(7 * 24 * 60 * 60); client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.AddBless(value); client.Entity.Update(Network.GamePackets.Update.OnlineTraining, client.OnlineTrainingPoints, false); break; } #endregion #region PrayingStone(L) case 1200002: { uint value = (uint)(30 * 24 * 60 * 60); client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.AddBless(value); client.Entity.Update(Network.GamePackets.Update.OnlineTraining, client.OnlineTrainingPoints, false); break; } #endregion #region PenitenceAmulet case 723727: case 720128: { if (client.Entity.PKPoints >= 30) { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.PKPoints -= 30; } break; } #endregion #region DisguiseAmulet case 723724: { int disguise = ServerBase.Kernel.Random.Next(Database.DataHolder.Disguises.Length); ushort selected = Database.DataHolder.Disguises[disguise]; client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); bool wasTransformated = client.Entity.Transformed; if (wasTransformated) { client.Entity.Hitpoints = client.Entity.MaxHitpoints; client.Entity.TransformationID = 0; client.Entity.TransformationStamp = Time32.Now; } ushort transformation = selected; client.Entity.TransformationID = transformation; client.Entity.TransformationStamp = Time32.Now; client.Entity.TransformationTime = 110; SpellUse spellUse = new SpellUse(true); spellUse.Attacker = client.Entity.UID; spellUse.SpellID = 1360; spellUse.SpellLevel = 4; spellUse.X = client.Entity.X; spellUse.Y = client.Entity.Y; spellUse.Targets.Add(client.Entity.UID, (uint)0); client.Send(spellUse); client.Entity.TransformationMaxHP = 3000; double maxHP = client.Entity.MaxHitpoints; double HP = client.Entity.Hitpoints; double point = HP / maxHP; client.Entity.Hitpoints = (uint)(client.Entity.TransformationMaxHP * point); client.Entity.Update(Update.MaxHitpoints, client.Entity.TransformationMaxHP, false); break; } #endregion #endregion #region SkillBooks case 725000: { if (client.Entity.Spirit >= 20) { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.AddSpell(new Spell(true) { ID = 1000 }); } else { client.Send(new Message("You need atleast 20 spirit!", System.Drawing.Color.Tan, Message.TopLeft)); } break; } case 725001: { if (client.Entity.Spirit >= 80) { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.AddSpell(new Spell(true) { ID = 1001 }); } else { client.Send(new Message("You need atleast 80 spirit!", System.Drawing.Color.Tan, Message.TopLeft)); } break; } case 725002: { if (client.Entity.Class >= 140 && client.Entity.Class <= 145 && client.Entity.Level >= 90) { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.AddSpell(new Spell(true) { ID = 1002 }); } break; } case 725003: { if (client.Entity.Spirit >= 30) { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.AddSpell(new Spell(true) { ID = 1005 }); } break; } case 725004: { if (client.Entity.Class >= 130 && client.Entity.Class <= 135 || client.Entity.Class >= 140 && client.Entity.Class <= 145 && client.Entity.Level >= 15 || client.Entity.Class == 100 || client.Entity.Class == 101) { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.AddSpell(new Spell(true) { ID = 1010 }); } break; } case 725005: { if (client.Entity.Level >= 40) { if (client.Proficiencies.ContainsKey(Database.SpellTable.SpellInformations[1045][0].WeaponSubtype)) if (client.Proficiencies[Database.SpellTable.SpellInformations[1045][0].WeaponSubtype].Level >= 5) { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.AddSpell(new Spell(true) { ID = 1045 }); } else { client.Send(new Message("You need level 5 at blade proficiency!", System.Drawing.Color.Tan, Message.TopLeft)); } } break; } case 725010: { if (client.Entity.Level >= 40) { if (client.Proficiencies.ContainsKey(Database.SpellTable.SpellInformations[1046][0].WeaponSubtype)) if (client.Proficiencies[Database.SpellTable.SpellInformations[1046][0].WeaponSubtype].Level >= 5) { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.AddSpell(new Spell(true) { ID = 1046 }); } else { client.Send(new Message("You need level 5 at sword proficiency!", System.Drawing.Color.Tan, Message.TopLeft)); } } break; } case 725011: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.AddSpell(new Spell(true) { ID = 1250 }); break; } case 725012: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.AddSpell(new Spell(true) { ID = 1260 }); break; } case 725013: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.AddSpell(new Spell(true) { ID = 1290 }); break; } case 725014: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.AddSpell(new Spell(true) { ID = 1300 }); break; } case 725015: { if (client.Entity.Class >= 130 && client.Entity.Class <= 135) { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.AddSpell(new Spell(true) { ID = 1350 }); } break; } case 725016: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.AddSpell(new Spell(true) { ID = 1360 }); break; } case 725018: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.AddSpell(new Spell(true) { ID = 1380 }); break; } case 725019: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.AddSpell(new Spell(true) { ID = 1385 }); break; } case 725020: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.AddSpell(new Spell(true) { ID = 1390 }); break; } case 725021: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.AddSpell(new Spell(true) { ID = 1395 }); break; } case 725022: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.AddSpell(new Spell(true) { ID = 1400 }); break; } case 725023: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.AddSpell(new Spell(true) { ID = 1405 }); break; } case 725024: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.AddSpell(new Spell(true) { ID = 1410 }); break; } case 725025: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.AddSpell(new Spell(true) { ID = 1320 }); break; } case 725026: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.AddSpell(new Spell(true) { ID = 5010 }); break; } case 725027: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.AddSpell(new Spell(true) { ID = 5020 }); break; } case 725028: { if (client.Entity.Class >= 130 && client.Entity.Class <= 135 || client.Entity.Class >= 140 && client.Entity.Class <= 145) client.AddSpell(new Spell(true) { ID = 5001 }); client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); break; } case 725029: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.AddSpell(new Spell(true) { ID = 5030 }); break; } case 725030: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.AddSpell(new Spell(true) { ID = 5040 }); break; } case 725031: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.AddSpell(new Spell(true) { ID = 5050 }); break; } case 725040: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.AddSpell(new Spell(true) { ID = 7000 }); break; } case 725041: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.AddSpell(new Spell(true) { ID = 7010 }); break; } case 725042: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.AddSpell(new Spell(true) { ID = 7020 }); break; } case 725043: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.AddSpell(new Spell(true) { ID = 7030 }); break; } case 725044: { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.AddSpell(new Spell(true) { ID = 7040 }); break; } case 1060100: { if (client.Entity.Class >= 140 && client.Entity.Class <= 145 && client.Entity.Level >= 82) { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.AddSpell(new Spell(true) { ID = 1160 }); } break; } case 1060101: { if (client.Entity.Class >= 140 && client.Entity.Class <= 145 && client.Entity.Level >= 84) { client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); client.AddSpell(new Spell(true) { ID = 1165 }); } break; } #endregion #region Demon Boxs #region 10cps case 720650: { Database.MonsterInformation monster = new Conquer_Online_Server.Database.MonsterInformation(); // monster.Boss = true; monster.Hitpoints = 33; monster.Level = 10; monster.Mesh = 368; monster.Name = "Demon"; monster.MaxAttack = 100; monster.AttackRange = 5; monster.AttackType = 2; monster.AttackSpeed = 1000; monster.ViewRange = 2; monster.MoveSpeed = 500; monster.RunSpeed = 500; monster.MinAttack = 100; Game.Entity entity = new Game.Entity(Game.EntityFlag.Monster, false); entity.MapObjType = Game.MapObjectType.Monster; entity.MonsterInfo = monster; entity.MonsterInfo.Owner = entity; entity.Name = "Demon"; entity.MinAttack = monster.MinAttack; entity.MaxAttack = entity.MagicAttack = monster.MaxAttack; entity.Hitpoints = entity.MaxHitpoints = monster.Hitpoints; entity.Body = monster.Mesh; entity.Level = monster.Level; entity.Defence = 100; entity.X = client.Entity.X; entity.Y = client.Entity.Y; entity.UID = (uint)ServerBase.Kernel.Random.Next(500000, 500050); entity.MapID = client.Entity.MapID; entity.SendUpdates = true; client.Map.RemoveEntity(entity); client.Map.AddEntity(entity); client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); break; } #endregion #region 50cps case 720651: { Database.MonsterInformation monster = new Conquer_Online_Server.Database.MonsterInformation(); // monster.Boss = true; monster.Hitpoints = 33; monster.Level = 20; monster.Mesh = 369; monster.Name = "AncientDemon"; monster.MaxAttack = 100; monster.AttackRange = 5; monster.AttackType = 2; monster.AttackSpeed = 1000; monster.ViewRange = 2; monster.MoveSpeed = 500; monster.RunSpeed = 500; monster.MinAttack = 100; Game.Entity entity = new Game.Entity(Game.EntityFlag.Monster, false); entity.MapObjType = Game.MapObjectType.Monster; entity.MonsterInfo = monster; entity.MonsterInfo.Owner = entity; entity.Name = "AncientDemon"; entity.MinAttack = monster.MinAttack; entity.MaxAttack = entity.MagicAttack = monster.MaxAttack; entity.Hitpoints = entity.MaxHitpoints = monster.Hitpoints; entity.Body = monster.Mesh; entity.Level = monster.Level; entity.Defence = 100; entity.X = client.Entity.X; entity.Y = client.Entity.Y; entity.UID = (uint)ServerBase.Kernel.Random.Next(500060, 500110); entity.MapID = client.Entity.MapID; entity.SendUpdates = true; client.Map.RemoveEntity(entity); client.Map.AddEntity(entity); client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); break; } #endregion #region 100cps case 720652: { Database.MonsterInformation monster = new Conquer_Online_Server.Database.MonsterInformation(); // monster.Boss = true; monster.Hitpoints = 33; monster.Level = 30; monster.Mesh = 377; monster.Name = "FloodDemon"; monster.MaxAttack = 100; monster.AttackRange = 5; monster.AttackType = 2; monster.AttackSpeed = 1000; monster.ViewRange = 2; monster.MoveSpeed = 500; monster.RunSpeed = 500; monster.MinAttack = 100; Game.Entity entity = new Game.Entity(Game.EntityFlag.Monster, false); entity.MapObjType = Game.MapObjectType.Monster; entity.MonsterInfo = monster; entity.MonsterInfo.Owner = entity; entity.Name = "FloodDemon"; entity.MinAttack = monster.MinAttack; entity.MaxAttack = entity.MagicAttack = monster.MaxAttack; entity.Hitpoints = entity.MaxHitpoints = monster.Hitpoints; entity.Body = monster.Mesh; entity.Level = monster.Level; entity.Defence = 100; entity.X = client.Entity.X; entity.Y = client.Entity.Y; entity.UID = (uint)ServerBase.Kernel.Random.Next(500120, 500160); entity.MapID = client.Entity.MapID; entity.SendUpdates = true; client.Map.RemoveEntity(entity); client.Map.AddEntity(entity); client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); break; } #endregion #region 500cps case 720671: { Database.MonsterInformation monster = new Conquer_Online_Server.Database.MonsterInformation(); // monster.Boss = true; monster.Hitpoints = 33; monster.Level = 40; monster.Mesh = 400; monster.Name = "HeavenDemon"; monster.MaxAttack = 100; monster.AttackRange = 5; monster.AttackType = 2; monster.AttackSpeed = 1000; monster.ViewRange = 2; monster.MoveSpeed = 500; monster.RunSpeed = 500; monster.MinAttack = 100; Game.Entity entity = new Game.Entity(Game.EntityFlag.Monster, false); entity.MapObjType = Game.MapObjectType.Monster; entity.MonsterInfo = monster; entity.MonsterInfo.Owner = entity; entity.Name = "HeavenDemon"; entity.MinAttack = monster.MinAttack; entity.MaxAttack = entity.MagicAttack = monster.MaxAttack; entity.Hitpoints = entity.MaxHitpoints = monster.Hitpoints; entity.Body = monster.Mesh; entity.Level = monster.Level; entity.Defence = 100; entity.X = client.Entity.X; entity.Y = client.Entity.Y; entity.UID = (uint)ServerBase.Kernel.Random.Next(500200, 500250); entity.MapID = client.Entity.MapID; entity.SendUpdates = true; client.Map.RemoveEntity(entity); client.Map.AddEntity(entity); client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); break; } #endregion #region 1000cps case 720672: { Database.MonsterInformation monster = new Conquer_Online_Server.Database.MonsterInformation(); // monster.Boss = true; monster.Hitpoints = 33; monster.Level = 50; monster.Mesh = 404; monster.Name = "ChaosDemon"; monster.MaxAttack = 100; monster.AttackRange = 5; monster.AttackType = 2; monster.AttackSpeed = 1000; monster.ViewRange = 2; monster.MoveSpeed = 500; monster.RunSpeed = 500; monster.MinAttack = 100; Game.Entity entity = new Game.Entity(Game.EntityFlag.Monster, false); entity.MapObjType = Game.MapObjectType.Monster; entity.MonsterInfo = monster; entity.MonsterInfo.Owner = entity; entity.Name = "ChaosDemon"; entity.MinAttack = monster.MinAttack; entity.MaxAttack = entity.MagicAttack = monster.MaxAttack; entity.Hitpoints = entity.MaxHitpoints = monster.Hitpoints; entity.Body = monster.Mesh; entity.Level = monster.Level; entity.Defence = 100; entity.X = client.Entity.X; entity.Y = client.Entity.Y; entity.UID = (uint)ServerBase.Kernel.Random.Next(500300, 500350); entity.MapID = client.Entity.MapID; entity.SendUpdates = true; client.Map.RemoveEntity(entity); client.Map.AddEntity(entity); client.Inventory.Remove(item, Game.Enums.ItemUse.Delete); break; } #endregion #endregion #region Cpsage #region 270cps case 720653: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.ConquerPoints += 270; client.Entity.Owner.Send(new Network.GamePackets.Message("You have found 270 Cps!", System.Drawing.Color.Yellow, 2005)); break; } #endregion #region 1380cps case 720654: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.ConquerPoints += 1380; client.Entity.Owner.Send(new Network.GamePackets.Message("You have found 1380 Cps!", System.Drawing.Color.Yellow, 2005)); ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message(" " + client.Entity.Name + " have found 1380 Cps!", System.Drawing.Color.Yellow, 2011), ServerBase.Kernel.GamePool.Values); break; } #endregion #region 20cps case 720655: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.ConquerPoints += 20; client.Entity.Owner.Send(new Network.GamePackets.Message("You have found 20 Cps!", System.Drawing.Color.Yellow, 2005)); break; } #endregion #region 10cps case 720656: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.ConquerPoints += 10; client.Entity.Owner.Send(new Network.GamePackets.Message("You have found 10 Cps!", System.Drawing.Color.Yellow, 2005)); break; } #endregion #region 5cps case 720657: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.ConquerPoints += 5; client.Entity.Owner.Send(new Network.GamePackets.Message("You have found 5 Cps!", System.Drawing.Color.Yellow, 2005)); break; } #endregion /////////////////////////////// #region 25cps case 720658: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.ConquerPoints += 25; client.Entity.Owner.Send(new Network.GamePackets.Message("You have found 25 Cps!", System.Drawing.Color.Yellow, 2005)); break; } #endregion #region 35cps case 720956: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.ConquerPoints += 35; client.Entity.Owner.Send(new Network.GamePackets.Message("You have found 35 Cps!", System.Drawing.Color.Yellow, 2005)); break; } #endregion #region 40cps case 720966: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.ConquerPoints += 40; client.Entity.Owner.Send(new Network.GamePackets.Message("You have found 40 Cps!", System.Drawing.Color.Yellow, 2005)); break; } #endregion #region 60cps case 720967: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.ConquerPoints += 60; client.Entity.Owner.Send(new Network.GamePackets.Message("You have found 60 Cps!", System.Drawing.Color.Yellow, 2005)); break; } #endregion #region 50cps case 720659: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.ConquerPoints += 50; client.Entity.Owner.Send(new Network.GamePackets.Message("You have found 50 Cps!", System.Drawing.Color.Yellow, 2005)); break; } #endregion #region 100cps case 720660: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.ConquerPoints += 100; client.Entity.Owner.Send(new Network.GamePackets.Message("You have found 100 Cps!", System.Drawing.Color.Yellow, 2005)); break; } #endregion #region 1350cps case 720661: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.ConquerPoints += 1350; client.Entity.Owner.Send(new Network.GamePackets.Message("You have found 1350 Cps!", System.Drawing.Color.Yellow, 2005)); ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message(" " + client.Entity.Name + " have found 1350 Cps!", System.Drawing.Color.Yellow, 2011), ServerBase.Kernel.GamePool.Values); break; } #endregion #region 6900cps case 720662: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.ConquerPoints += 6900; client.Entity.Owner.Send(new Network.GamePackets.Message("You have found 6900 Cps!", System.Drawing.Color.Yellow, 2005)); ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message(" " + client.Entity.Name + " have found 6900 Cps!", System.Drawing.Color.Yellow, 2011), ServerBase.Kernel.GamePool.Values); break; } #endregion ///////////////////////////////// #region 50cps case 720663: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.ConquerPoints += 50; client.Entity.Owner.Send(new Network.GamePackets.Message("You have found 50 Cps!", System.Drawing.Color.Yellow, 2005)); break; } #endregion #region 100cps case 720664: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.ConquerPoints += 100; client.Entity.Owner.Send(new Network.GamePackets.Message("You have found 100 Cps!", System.Drawing.Color.Yellow, 2005)); break; } #endregion #region 200cps case 720665: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.ConquerPoints += 200; client.Entity.Owner.Send(new Network.GamePackets.Message("You have found 200 Cps!", System.Drawing.Color.Yellow, 2005)); break; } #endregion #region 2700cps case 720666: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.ConquerPoints += 2700; client.Entity.Owner.Send(new Network.GamePackets.Message("You have found 2700 Cps!", System.Drawing.Color.Yellow, 2005)); ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message(" " + client.Entity.Name + "have found 2700 Cps!", System.Drawing.Color.Yellow, 2011), ServerBase.Kernel.GamePool.Values); break; } #endregion #region 13800cps case 720667: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.ConquerPoints += 13800; client.Entity.Owner.Send(new Network.GamePackets.Message("You have found 13800 Cps!", System.Drawing.Color.Yellow, 2005)); ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message(" " + client.Entity.Name + " have found 13800 Cps!", System.Drawing.Color.Yellow, 2011), ServerBase.Kernel.GamePool.Values); break; } #endregion /////////////////////////// #region 1/6 EXp case 720668: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); //client.IncreaseExperience(client.Entity.Experience / 1/6, false); client.IncreaseExperience(client.ExpBall / 1 / 6, false); break; } #endregion #region 5/6 EXp case 720669: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); //client.IncreaseExperience(client.Entity.Experience / 5 / 6, false); client.IncreaseExperience(client.ExpBall / 5 / 6, false); break; } #endregion #region 1exp and 2/3EXp case 720670: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); //client.IncreaseExperience(client.Entity.Experience / 2/ 3, false); client.IncreaseExperience(client.ExpBall, false); client.IncreaseExperience(client.ExpBall / 2 / 3, false); break; } #endregion //////////////////////// #region 250cps case 720675: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.ConquerPoints += 250; client.Entity.Owner.Send(new Network.GamePackets.Message("You have found 250 Cps!", System.Drawing.Color.Yellow, 2005)); break; } #endregion #region 500cps case 720676: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.ConquerPoints += 500; client.Entity.Owner.Send(new Network.GamePackets.Message("You have found 500 Cps!", System.Drawing.Color.Yellow, 2005)); break; } #endregion #region 1000cps case 720677: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.ConquerPoints += 1000; client.Entity.Owner.Send(new Network.GamePackets.Message("You have found 1000 Cps!", System.Drawing.Color.Yellow, 2005)); break; } #endregion #region 13500cps case 720678: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.ConquerPoints += 13500; client.Entity.Owner.Send(new Network.GamePackets.Message("You have found 13500 Cps!", System.Drawing.Color.Yellow, 2005)); ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message(" " + client.Entity.Name + "have found 13500 Cps!", System.Drawing.Color.Yellow, 2011), ServerBase.Kernel.GamePool.Values); break; } #endregion #region 69000cps case 720679: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.ConquerPoints += 13800; client.Entity.Owner.Send(new Network.GamePackets.Message("You have found 69000 Cps!", System.Drawing.Color.Yellow, 2005)); ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message(" " + client.Entity.Name + " have found 69000 Cps!", System.Drawing.Color.Yellow, 2011), ServerBase.Kernel.GamePool.Values); break; } #endregion #region 2exp and 1/2EXp case 720680: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.IncreaseExperience(client.ExpBall / 1 / 2, false); client.IncreaseExperience(client.ExpBall, false); client.IncreaseExperience(client.ExpBall, false); break; } #endregion /////////////////////////// #region 500cps case 720681: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.ConquerPoints += 500; client.Entity.Owner.Send(new Network.GamePackets.Message("You have found 500 Cps!", System.Drawing.Color.Yellow, 2005)); break; } #endregion #region 1000cps case 720682: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.ConquerPoints += 1000; client.Entity.Owner.Send(new Network.GamePackets.Message("You have found 1000 Cps!", System.Drawing.Color.Yellow, 2005)); break; } #endregion #region 2000cps case 720683: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.ConquerPoints += 2000; client.Entity.Owner.Send(new Network.GamePackets.Message("You have found 2000 Cps!", System.Drawing.Color.Yellow, 2005)); break; } #endregion #region 27000cps case 720684: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.ConquerPoints += 27000; client.Entity.Owner.Send(new Network.GamePackets.Message("You have found 27000 Cps!", System.Drawing.Color.Yellow, 2005)); ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message(" " + client.Entity.Name + "have found 27000 Cps!", System.Drawing.Color.Yellow, 2011), ServerBase.Kernel.GamePool.Values); break; } #endregion #region 138000cps case 720685: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.ConquerPoints += 138000; client.Entity.Owner.Send(new Network.GamePackets.Message("You have found 138000 Cps!", System.Drawing.Color.Yellow, 2005)); ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message(" " + client.Entity.Name + " have found 138000 Cps!", System.Drawing.Color.Yellow, 2011), ServerBase.Kernel.GamePool.Values); break; } #endregion #region 3exp and 1/2EXp case 720686: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.IncreaseExperience(client.ExpBall / 1 / 2, false); client.IncreaseExperience(client.ExpBall, false); client.IncreaseExperience(client.ExpBall, false); client.IncreaseExperience(client.ExpBall, false); break; } #endregion /////////////////////////// #region 1000cps case 720687: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.ConquerPoints += 1000; client.Entity.Owner.Send(new Network.GamePackets.Message("You have found 1000 Cps!", System.Drawing.Color.Yellow, 2005)); break; } #endregion #region 2000cps case 720688: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.ConquerPoints += 2000; client.Entity.Owner.Send(new Network.GamePackets.Message("You have found 2000 Cps!", System.Drawing.Color.Yellow, 2005)); break; } #endregion #region 4000cps case 720689: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.ConquerPoints += 4000; client.Entity.Owner.Send(new Network.GamePackets.Message("You have found 4000 Cps!", System.Drawing.Color.Yellow, 2005)); break; } #endregion #region 54000cps case 720690: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.ConquerPoints += 54000; client.Entity.Owner.Send(new Network.GamePackets.Message("You have found 54000 Cps!", System.Drawing.Color.Yellow, 2005)); ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message(" " + client.Entity.Name + "have found 54000 Cps!", System.Drawing.Color.Yellow, 2011), ServerBase.Kernel.GamePool.Values); break; } #endregion #region 276000cps case 720691: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.ConquerPoints += 276000; client.Entity.Owner.Send(new Network.GamePackets.Message("You have found 276000 Cps!", System.Drawing.Color.Yellow, 2005)); ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message(" " + client.Entity.Name + " have found 276000 Cps!", System.Drawing.Color.Yellow, 2011), ServerBase.Kernel.GamePool.Values); break; } #endregion #region 5 Expall case 720692: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); //client.IncreaseExperience(client.ExpBall2, false); client.IncreaseExperience(client.ExpBall, false); client.IncreaseExperience(client.ExpBall, false); client.IncreaseExperience(client.ExpBall, false); client.IncreaseExperience(client.ExpBall, false); client.IncreaseExperience(client.ExpBall, false); break; } #endregion /////////////////////////// /////////////////////////// #region 2500cps case 720693: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.ConquerPoints += 2500; client.Entity.Owner.Send(new Network.GamePackets.Message("You have found 2500 Cps!", System.Drawing.Color.Yellow, 2005)); break; } #endregion #region 5000cps case 720694: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.ConquerPoints += 5000; client.Entity.Owner.Send(new Network.GamePackets.Message("You have found 5000 Cps!", System.Drawing.Color.Yellow, 2005)); break; } #endregion #region 10000cps case 720695: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.ConquerPoints += 10000; client.Entity.Owner.Send(new Network.GamePackets.Message("You have found 10000 Cps!", System.Drawing.Color.Yellow, 2005)); break; } #endregion #region 135000cps case 720696: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.ConquerPoints += 135000; client.Entity.Owner.Send(new Network.GamePackets.Message("You have found 135000 Cps!", System.Drawing.Color.Yellow, 2005)); ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message(" " + client.Entity.Name + "have found 135000 Cps!", System.Drawing.Color.Yellow, 2011), ServerBase.Kernel.GamePool.Values); break; } #endregion #region 690000cps case 720697: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.Entity.ConquerPoints += 690000; client.Entity.Owner.Send(new Network.GamePackets.Message("You have found 690000 Cps!", System.Drawing.Color.Yellow, 2005)); ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message(" " + client.Entity.Name + " have found 690000 Cps!", System.Drawing.Color.Yellow, 2011), ServerBase.Kernel.GamePool.Values); break; } #endregion #region 8 Expall case 720698: { client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Delete); client.IncreaseExperience(client.ExpBall / 1 / 2, false); client.IncreaseExperience(client.ExpBall, false); client.IncreaseExperience(client.ExpBall, false); client.IncreaseExperience(client.ExpBall, false); client.IncreaseExperience(client.ExpBall, false); client.IncreaseExperience(client.ExpBall, false); client.IncreaseExperience(client.ExpBall, false); client.IncreaseExperience(client.ExpBall, false); client.IncreaseExperience(client.ExpBall, false); break; } #endregion #endregion #region BeginnerPack #region BeginnerPackL1 case 723753: { if (client.Entity.Level >= 1) { if (client.Inventory.Count < 20) { client.Inventory.Add(722136, 0, 10, true); //Stancher client.Inventory.Add(1001000, 0, 5, true);//Agrypnotic client.Entity.Money += 1500; client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(723754, 0, 1, true); } else client.Send(new Message("You need to make atleast 20 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 1", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL5 case 723754: { if (client.Entity.Level >= 5) { if (client.Inventory.Count < 29) { client.Inventory.Add(1001000, 0, 5, true);//Agrypnotic client.Entity.Money += 1500; client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(723755, 0, 1, true); } else client.Send(new Message("You need to make atleast 11 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 5", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL10 case 723755: { if (client.Entity.Level >= 10) { if (client.Inventory.Count < 36) { client.Inventory.Add(723790, 0, 3, true);//AncientPill client.Entity.Money += 5000; client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(723756, 0, 1, true); } else client.Send(new Message("You need to make atleast 4 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 10", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL15 case 723756: { if (client.Entity.Level >= 15) { if (client.Inventory.Count < 31) { client.Inventory.Add(723790, 0, 5, true);//AncientPill client.Inventory.Add(1060020, 0, 3, true);//TwinCityGate client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(723757, 0, 1, true); } else client.Send(new Message("You need to make atleast 9 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 15", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL20 case 723757: { if (client.Entity.Level >= 20) { if (client.Inventory.Count < 34) { client.Entity.ConquerPoints += 100; client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(723758, 0, 1, true); } else client.Send(new Message("You need to make atleast 6 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 20", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL25 case 723758: { if (client.Entity.Level >= 25) { if (client.Inventory.Count < 34) { client.Inventory.Add(203009, 0, 1, true);//AttackPot(30m) client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(723759, 0, 1, true); } else client.Send(new Message("You need to make atleast 6 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 25", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL30 case 723759: { if (client.Entity.Level >= 30) { if (client.Inventory.Count < 38) { client.Inventory.Add(1200000, 0, 1, true);//PrayingStone(S) client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(723760, 0, 1, true); } else client.Send(new Message("You need to make atleast 2 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 30", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL35 case 723760: { if (client.Entity.Level >= 35) { if (client.Inventory.Count < 38) { client.Inventory.Add(723017, 0, 1, true);//ExpPotion client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(723761, 0, 1, true); } else client.Send(new Message("You need to make atleast 2 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 35", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL35 case 723761: { if (client.Entity.Level >= 35) { if (client.Inventory.Count < 38) { client.Inventory.Add(723017, 0, 1, true);//ExpPotion client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(723762, 0, 1, true); } else client.Send(new Message("You need to make atleast 2 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 35", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL45 case 723762: { if (client.Entity.Level >= 45) { if (client.Inventory.Count < 38) { client.Inventory.Add(1200001, 0, 1, true);//PrayingStone(M) client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(723763, 0, 1, true); } else client.Send(new Message("You need to make atleast 2 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 45", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL50 case 723763: { if (client.Entity.Level >= 50) { if (client.Inventory.Count < 38) { client.Inventory.Add(1200002, 0, 1, true);//PrayingStone(L) client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(723764, 0, 1, true); } else client.Send(new Message("You need to make atleast 2 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 50", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL55 case 723764: { if (client.Entity.Level >= 55) { if (client.Inventory.Count < 37) { client.Inventory.Add(723017, 0, 1, true);//ExpPotion client.Inventory.Add(723584, 0, 1, true);//BlackTulip client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(723765, 0, 1, true); } else client.Send(new Message("You need to make atleast 3 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 55", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL60 case 723765: { if (client.Entity.Level >= 60) { if (client.Inventory.Count < 37) { client.Inventory.Add(723700, 0, 1, true);//ExpBall client.Inventory.Add(752001, 0, 1, true);//1Lily client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(723766, 0, 1, true); } else client.Send(new Message("You need to make atleast 3 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 60", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL65 case 723766: { if (client.Entity.Level >= 65) { if (client.Inventory.Count < 37) { client.Inventory.Add(2100025, 0, 1, true);//ExpPotion client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(723767, 0, 1, true); } else client.Send(new Message("You need to make atleast 3 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 65", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL70 case 723767: { if (client.Entity.Level >= 70) { if (client.Inventory.Count < 37) { client.Inventory.Add(723700, 0, 2, true);//ExpBall client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(723768, 0, 1, true); } else client.Send(new Message("You need to make atleast 3 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 70", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL75 case 723768: { if (client.Entity.Level >= 75) { if (client.Inventory.Count < 38) { client.Inventory.Add(1200000, 0, 1, true);//PrayingStone(S) client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(723769, 0, 1, true); } else client.Send(new Message("You need to make atleast 2 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 75", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL80 case 723769: { if (client.Entity.Level >= 80) { if (client.Inventory.Count < 37) { client.Inventory.Add(723700, 0, 2, true);//ExpBall client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(723770, 0, 1, true); } else client.Send(new Message("You need to make atleast 3 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 80", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL90 case 723770: { if (client.Entity.Level >= 90) { if (client.Inventory.Count < 37) { client.Inventory.Add(723017, 0, 2, true);//ExpPotion client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(723771, 0, 1, true); } else client.Send(new Message("You need to make atleast 3 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 90", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL95 case 723771: { if (client.Entity.Level >= 95) { if (client.Inventory.Count < 36) { client.Inventory.Add(723268, 0, 1, true);//MeteorBox client.Inventory.Add(723017, 0, 2, true);//ExpPotion client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(723772, 0, 1, true); } else client.Send(new Message("You need to make atleast 4 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 95", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL100 case 723772: { if (client.Entity.Level >= 100) { if (client.Inventory.Count < 39) { if (client.Entity.Class <= 15) CheckCommand(new Message("@item WarArmor Super 0 0 0 255 255", System.Drawing.Color.Red, 2001), client); else if (client.Entity.Class <= 25) CheckCommand(new Message("@item WarriorArmorSoulLv100 Fixed 0 0 0 255 255", System.Drawing.Color.Red, 2001), client); else if (client.Entity.Class <= 45) CheckCommand(new Message("@item RhinoCoat Super 0 0 0 255 255", System.Drawing.Color.Red, 2001), client); else if (client.Entity.Class <= 55) CheckCommand(new Message("@item NinjaVestSoulLv100 Fixed 0 0 0 255 255", System.Drawing.Color.Red, 2001), client); else if (client.Entity.Class <= 65) CheckCommand(new Message("@item FrockOfAges Super 0 0 0 255 255", System.Drawing.Color.Red, 2001), client); else CheckCommand(new Message("@item RealBacksword Super 0 0 0 255 255", System.Drawing.Color.Red, 2001), client); client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(723773, 0, 1, true); } else client.Send(new Message("You need to make atleast 1 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 100", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL105 case 723773: { if (client.Entity.Level >= 105) { if (client.Inventory.Count < 36) { client.Inventory.Add(1200000, 0, 1, true);//PrayingStone(S) client.Inventory.Add(723017, 0, 2, true);//ExpPotion client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(723774, 0, 1, true); } else client.Send(new Message("You need to make atleast 4 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 105", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL110 case 723774: { if (client.Entity.Level >= 110) { if (client.Inventory.Count < 37) { client.Inventory.Add(751099, 0, 1, true);//PowerEXPBall client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(723775, 0, 1, true); } else client.Send(new Message("You need to make atleast 6 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 110", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL115 case 723775: { if (client.Entity.Level >= 115) { if (client.Inventory.Count < 38) { if (client.Entity.Class <= 15) client.Inventory.Add(700012, 0, 2, true);//DragonGem else if (client.Entity.Class <= 25) client.Inventory.Add(700012, 0, 2, true);//DragonGem else if (client.Entity.Class <= 45) client.Inventory.Add(700012, 0, 2, true);//DragonGem else if (client.Entity.Class <= 55) client.Inventory.Add(700012, 0, 2, true);//DragonGem else if (client.Entity.Class <= 65) client.Inventory.Add(700012, 0, 2, true);//DragonGem else client.Inventory.Add(700002, 0, 2, true);//PhoenixGem client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(723776, 0, 1, true); } else client.Send(new Message("You need to make atleast 2 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 120", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL120 case 723776: { if (client.Entity.Level >= 120) { if (client.Inventory.Count < 39) { client.Inventory.Add(193300, 0, 1, true);//PowerEXPBall client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); } else client.Send(new Message("You need to make atleast 1 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 120", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #endregion // End BeginnerPack .. Say Thx To AhmedGFX ^_^ case 721158: { if (client.Entity.Level >= 40) { if (client.Proficiencies.ContainsKey(Database.SpellTable.SpellInformations[11005][0].WeaponSubtype)) if (client.Proficiencies[Database.SpellTable.SpellInformations[11005][0].WeaponSubtype].Level >= 5) { client.Inventory.Remove(item, Game.Enums.ItemUse.Remove); client.AddSpell(new Spell(true) { ID = 11005 }); } else { client.Send(new Message("You need level 5 at Spear proficiency!", System.Drawing.Color.Tan, Message.TopLeft)); } } break; } case 721157: { if (client.Entity.Level >= 40) { if (client.Proficiencies.ContainsKey(Database.SpellTable.SpellInformations[11000][0].WeaponSubtype)) if (client.Proficiencies[Database.SpellTable.SpellInformations[11000][0].WeaponSubtype].Level >= 5) { client.Inventory.Remove(item, Game.Enums.ItemUse.Remove); client.AddSpell(new Spell(true) { ID = 11000 }); } else { client.Send(new Message("You need level 5 at Wand proficiency!", System.Drawing.Color.Tan, Message.TopLeft)); } } break; } // Start NovicePack .. Say Thx To AhmedGFX ^_^ #region NovicePack #region BeginnerPackL1 case 727026: { if (client.Entity.Level >= 1) { if (client.Inventory.Count < 20) { client.Inventory.Add(722136, 0, 10, true); //Stancher client.Inventory.Add(1001000, 0, 5, true);//Agrypnotic client.Entity.Money += 1500; client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(727027, 0, 1, true); } else client.Send(new Message("You need to make atleast 20 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 1", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL5 case 727027: { if (client.Entity.Level >= 5) { if (client.Inventory.Count < 29) { client.Inventory.Add(1001000, 0, 5, true);//Agrypnotic client.Entity.Money += 1500; client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(727028, 0, 1, true); } else client.Send(new Message("You need to make atleast 11 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 5", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL10 case 727028: { if (client.Entity.Level >= 10) { if (client.Inventory.Count < 36) { client.Inventory.Add(723790, 0, 3, true);//AncientPill client.Entity.Money += 5000; client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(727029, 0, 1, true); } else client.Send(new Message("You need to make atleast 4 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 10", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL15 case 727029: { if (client.Entity.Level >= 15) { if (client.Inventory.Count < 31) { client.Inventory.Add(723790, 0, 5, true);//AncientPill client.Inventory.Add(1060020, 0, 3, true);//TwinCityGate client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(727030, 0, 1, true); } else client.Send(new Message("You need to make atleast 9 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 15", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL20 case 727030: { if (client.Entity.Level >= 20) { if (client.Inventory.Count < 34) { client.Entity.ConquerPoints += 100; client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(727031, 0, 1, true); } else client.Send(new Message("You need to make atleast 6 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 20", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL25 case 727031: { if (client.Entity.Level >= 25) { if (client.Inventory.Count < 34) { client.Inventory.Add(203009, 0, 1, true);//AttackPot(30m) client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(727032, 0, 1, true); } else client.Send(new Message("You need to make atleast 6 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 25", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL30 case 727032: { if (client.Entity.Level >= 30) { if (client.Inventory.Count < 38) { client.Inventory.Add(1200000, 0, 1, true);//PrayingStone(S) client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(727033, 0, 1, true); } else client.Send(new Message("You need to make atleast 2 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 30", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL35 case 727033: { if (client.Entity.Level >= 35) { if (client.Inventory.Count < 38) { client.Inventory.Add(723017, 0, 1, true);//ExpPotion client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(727034, 0, 1, true); } else client.Send(new Message("You need to make atleast 2 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 35", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL40 case 727034: { if (client.Entity.Level >= 40) { if (client.Inventory.Count < 38) { client.Inventory.Add(723017, 0, 1, true);//ExpPotion client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(727035, 0, 1, true); } else client.Send(new Message("You need to make atleast 2 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 35", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL45 case 727035: { if (client.Entity.Level >= 45) { if (client.Inventory.Count < 38) { client.Inventory.Add(1200001, 0, 1, true);//PrayingStone(M) client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(727036, 0, 1, true); } else client.Send(new Message("You need to make atleast 2 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 45", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL50 case 727036: { if (client.Entity.Level >= 50) { if (client.Inventory.Count < 38) { client.Inventory.Add(1200002, 0, 1, true);//PrayingStone(L) client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(727037, 0, 1, true); } else client.Send(new Message("You need to make atleast 2 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 50", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL55 case 727037: { if (client.Entity.Level >= 55) { if (client.Inventory.Count < 37) { client.Inventory.Add(723017, 0, 1, true);//ExpPotion client.Inventory.Add(723584, 0, 1, true);//BlackTulip client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(727038, 0, 1, true); } else client.Send(new Message("You need to make atleast 3 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 55", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL60 case 727038: { if (client.Entity.Level >= 60) { if (client.Inventory.Count < 37) { client.Inventory.Add(723700, 0, 1, true);//ExpBall client.Inventory.Add(752001, 0, 1, true);//1Lily client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(727039, 0, 1, true); } else client.Send(new Message("You need to make atleast 3 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 60", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL65 case 727039: { if (client.Entity.Level >= 65) { if (client.Inventory.Count < 37) { client.Inventory.Add(2100025, 0, 1, true);//ExpPotion client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(727040, 0, 1, true); } else client.Send(new Message("You need to make atleast 3 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 65", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL70 case 727040: { if (client.Entity.Level >= 70) { if (client.Inventory.Count < 37) { client.Inventory.Add(723700, 0, 2, true);//ExpBall client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(727041, 0, 1, true); } else client.Send(new Message("You need to make atleast 3 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 70", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL75 case 727041: { if (client.Entity.Level >= 75) { if (client.Inventory.Count < 38) { client.Inventory.Add(1200000, 0, 1, true);//PrayingStone(S) client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(727042, 0, 1, true); } else client.Send(new Message("You need to make atleast 2 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 75", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL80 case 727042: { if (client.Entity.Level >= 80) { if (client.Inventory.Count < 37) { client.Inventory.Add(723700, 0, 2, true);//ExpBall client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(727043, 0, 1, true); } else client.Send(new Message("You need to make atleast 3 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 80", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL85 case 727043: { if (client.Entity.Level >= 85) { if (client.Inventory.Count < 37) { client.Inventory.Add(723017, 0, 2, true);//ExpPotion client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(727044, 0, 1, true); } else client.Send(new Message("You need to make atleast 3 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 85", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL90 case 727044: { if (client.Entity.Level >= 95) { if (client.Inventory.Count < 36) { client.Inventory.Add(723268, 0, 1, true);//MeteorBox client.Inventory.Add(723017, 0, 2, true);//ExpPotion client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(727045, 0, 1, true); } else client.Send(new Message("You need to make atleast 4 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 90", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL95 case 727045: { if (client.Entity.Level >= 95) { if (client.Inventory.Count < 36) { client.Inventory.Add(723268, 0, 1, true);//MeteorBox client.Inventory.Add(723017, 0, 2, true);//ExpPotion client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(727046, 0, 1, true); } else client.Send(new Message("You need to make atleast 4 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 95", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL100 case 727046: { if (client.Entity.Level >= 100) { if (client.Inventory.Count < 39) { if (client.Entity.Class <= 15) CheckCommand(new Message("@item WarArmor Super 0 0 0 255 255", System.Drawing.Color.Red, 2001), client); else if (client.Entity.Class <= 25) CheckCommand(new Message("@item WarriorArmorSoulLv100 Fixed 0 0 0 255 255", System.Drawing.Color.Red, 2001), client); else if (client.Entity.Class <= 45) CheckCommand(new Message("@item RhinoCoat Super 0 0 0 255 255", System.Drawing.Color.Red, 2001), client); else if (client.Entity.Class <= 55) CheckCommand(new Message("@item NinjaVestSoulLv100 Fixed 0 0 0 255 255", System.Drawing.Color.Red, 2001), client); else if (client.Entity.Class <= 65) CheckCommand(new Message("@item FrockOfAges Super 0 0 0 255 255", System.Drawing.Color.Red, 2001), client); else CheckCommand(new Message("@item RealBacksword Super 0 0 0 255 255", System.Drawing.Color.Red, 2001), client); client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(727047, 0, 1, true); } else client.Send(new Message("You need to make atleast 1 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 100", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL105 case 727047: { if (client.Entity.Level >= 105) { if (client.Inventory.Count < 36) { client.Inventory.Add(1200000, 0, 1, true);//PrayingStone(S) client.Inventory.Add(723017, 0, 2, true);//ExpPotion client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(727048, 0, 1, true); } else client.Send(new Message("You need to make atleast 4 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 105", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL110 case 727048: { if (client.Entity.Level >= 110) { if (client.Inventory.Count < 37) { client.Inventory.Add(751099, 0, 1, true);//PowerEXPBall client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(727049, 0, 1, true); } else client.Send(new Message("You need to make atleast 6 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 110", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL115 case 727049: { if (client.Entity.Level >= 115) { if (client.Inventory.Count < 38) { if (client.Entity.Class <= 15) client.Inventory.Add(700012, 0, 2, true);//DragonGem else if (client.Entity.Class <= 25) client.Inventory.Add(700012, 0, 2, true);//DragonGem else if (client.Entity.Class <= 45) client.Inventory.Add(700012, 0, 2, true);//DragonGem else if (client.Entity.Class <= 55) client.Inventory.Add(700012, 0, 2, true);//DragonGem else if (client.Entity.Class <= 65) client.Inventory.Add(700012, 0, 2, true);//DragonGem else client.Inventory.Add(700002, 0, 2, true);//PhoenixGem client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); client.Inventory.Add(727050, 0, 1, true); } else client.Send(new Message("You need to make atleast 2 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 120", System.Drawing.Color.Red, Message.TopLeft)); break; } #endregion #region BeginnerPackL120 case 727050: { if (client.Entity.Level >= 120) { if (client.Inventory.Count < 38) { client.Inventory.Add(193300, 0, 1, true); if (client.Entity.Class <= 15) CheckCommand(new Message("@item FrostBlade Super 6 0 0 0 0", System.Drawing.Color.Red, 2001), client); else if (client.Entity.Class <= 25) CheckCommand(new Message("@item ConquestWand Super 6 0 0 0 0", System.Drawing.Color.Red, 2001), client); else if (client.Entity.Class <= 45) CheckCommand(new Message("@item MagicBow Super 6 0 0 0 0", System.Drawing.Color.Red, 2001), client); else if (client.Entity.Class <= 55) CheckCommand(new Message("@item CrownKatana Super 6 0 0 0 0", System.Drawing.Color.Red, 2001), client); else if (client.Entity.Class <= 65) CheckCommand(new Message("@item ArhatPrayerBeads Super 6 0 0 0 0", System.Drawing.Color.Red, 2001), client); else CheckCommand(new Message("@item RealBacksword Super 6 0 0 0 0", System.Drawing.Color.Red, 2001), client); client.Inventory.Remove(item, Conquer_Online_Server.Game.Enums.ItemUse.Remove); } else client.Send(new Message("You need to make atleast 2 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You must be atleast level 120", System.Drawing.Color.Red, Message.TopLeft)); { client.Send(new Message("You must be atleast level 120", System.Drawing.Color.Red, Message.TopLeft)); } break; } #endregion #endregion } }
public static void CheckForExtraWeaponPowers(Client.GameState client, Entity attacked) { #region Right Hand if (client.Equipment.TryGetItem(ConquerItem.RightWeapon) != null) { if (client.Equipment.TryGetItem(ConquerItem.RightWeapon).ID != 0) { var Item = client.Equipment.TryGetItem(ConquerItem.RightWeapon); if (Item.Effect != Enums.ItemEffect.None) { if (ServerBase.Kernel.Rate(30)) { switch (Item.Effect) { case Enums.ItemEffect.HP: { SpellUse spellUse = new SpellUse(true); spellUse.SpellID = 1175; spellUse.SpellLevel = 4; spellUse.X = client.Entity.X; spellUse.Y = client.Entity.Y; spellUse.Targets.Add(client.Entity.UID, 300); uint damage = Math.Min(300, client.Entity.MaxHitpoints - client.Entity.Hitpoints); client.Entity.Hitpoints += damage; client.SendScreen(spellUse, true); break; } case Enums.ItemEffect.MP: { SpellUse spellUse = new SpellUse(true); spellUse.SpellID = 1175; spellUse.SpellLevel = 2; spellUse.X = client.Entity.X; spellUse.Y = client.Entity.Y; spellUse.Targets.Add(client.Entity.UID, 300); ushort damage = (ushort)Math.Min(300, client.Entity.MaxMana - client.Entity.Mana); client.Entity.Mana += damage; client.SendScreen(spellUse, true); break; } case Enums.ItemEffect.Shield: { if (client.Entity.ContainsFlag(Update.Flags.MagicShield)) return; SpellUse spellUse = new SpellUse(true); spellUse.SpellID = 1020; spellUse.SpellLevel = 0; spellUse.X = client.Entity.X; spellUse.Y = client.Entity.Y; spellUse.Targets.Add(client.Entity.UID, 120); client.Entity.ShieldTime = 0; client.Entity.ShieldStamp = Time32.Now; client.Entity.MagicShieldStamp = Time32.Now; client.Entity.MagicShieldTime = 0; client.Entity.AddFlag(Update.Flags.MagicShield); client.Entity.MagicShieldStamp = Time32.Now; client.Entity.MagicShieldIncrease = 2; client.Entity.MagicShieldTime = 120; if (client.Entity.EntityFlag == EntityFlag.Player) client.Send(ServerBase.Constants.Shield(2, 120)); client.SendScreen(spellUse, true); break; } case Enums.ItemEffect.Poison: { if (attacked != null) { if (attacked.UID == client.Entity.UID) return; if (attacked.ToxicFogLeft > 0) return; SpellUse spellUse = new SpellUse(true); spellUse.SpellID = 5040; spellUse.Attacker = attacked.UID; spellUse.SpellLevel = 9; spellUse.X = attacked.X; spellUse.Y = attacked.Y; spellUse.Targets.Add(attacked.UID, 0); spellUse.Targets[attacked.UID].Hit = true; attacked.ToxicFogStamp = Time32.Now; attacked.ToxicFogLeft = 10; attacked.ToxicFogPercent = 0.05F; client.SendScreen(spellUse, true); } break; } } } } } } #endregion #region Left Hand if (client.Equipment.TryGetItem(ConquerItem.LeftWeapon) != null) { if (client.Equipment.TryGetItem(ConquerItem.LeftWeapon).ID != 0) { var Item = client.Equipment.TryGetItem(ConquerItem.LeftWeapon); if (Item.Effect != Enums.ItemEffect.None) { if (ServerBase.Kernel.Rate(30)) { switch (Item.Effect) { case Enums.ItemEffect.HP: { SpellUse spellUse = new SpellUse(true); spellUse.SpellID = 1175; spellUse.SpellLevel = 4; spellUse.X = client.Entity.X; spellUse.Y = client.Entity.Y; spellUse.Targets.Add(client.Entity.UID, 300); uint damage = Math.Min(300, client.Entity.MaxHitpoints - client.Entity.Hitpoints); client.Entity.Hitpoints += damage; client.SendScreen(spellUse, true); break; } case Enums.ItemEffect.MP: { SpellUse spellUse = new SpellUse(true); spellUse.SpellID = 1175; spellUse.SpellLevel = 2; spellUse.X = client.Entity.X; spellUse.Y = client.Entity.Y; spellUse.Targets.Add(client.Entity.UID, 300); ushort damage = (ushort)Math.Min(300, client.Entity.MaxMana - client.Entity.Mana); client.Entity.Mana += damage; client.SendScreen(spellUse, true); break; } case Enums.ItemEffect.Shield: { if (client.Entity.ContainsFlag(Update.Flags.MagicShield)) return; SpellUse spellUse = new SpellUse(true); spellUse.SpellID = 1020; spellUse.SpellLevel = 0; spellUse.X = client.Entity.X; spellUse.Y = client.Entity.Y; spellUse.Targets.Add(client.Entity.UID, 120); client.Entity.ShieldTime = 0; client.Entity.ShieldStamp = Time32.Now; client.Entity.MagicShieldStamp = Time32.Now; client.Entity.MagicShieldTime = 0; client.Entity.AddFlag(Update.Flags.MagicShield); client.Entity.MagicShieldStamp = Time32.Now; client.Entity.MagicShieldIncrease = 2; client.Entity.MagicShieldTime = 120; if (client.Entity.EntityFlag == EntityFlag.Player) client.Send(ServerBase.Constants.Shield(2, 120)); client.SendScreen(spellUse, true); break; } case Enums.ItemEffect.Poison: { if (attacked != null) { if (attacked.UID == client.Entity.UID) return; if (attacked.ToxicFogLeft > 0) return; SpellUse spellUse = new SpellUse(true); spellUse.SpellID = 5040; spellUse.Attacker = attacked.UID; spellUse.SpellLevel = 9; spellUse.X = attacked.X; spellUse.Y = attacked.Y; spellUse.Targets.Add(attacked.UID, 0); spellUse.Targets[attacked.UID].Hit = true; attacked.ToxicFogStamp = Time32.Now; attacked.ToxicFogLeft = 10; attacked.ToxicFogPercent = 0.05F; client.SendScreen(spellUse, true); } break; } } } } } } #endregion }
private void Execute() { #region interactions if (attack != null) { switch (attack.AttackType) { case (uint)Network.GamePackets.Attack.InteractionRequest: new InteractionRequest(attack, attacker); return; case (uint)Network.GamePackets.Attack.InteractionEffect: new InteractionEffect(attack, attacker); return; case (uint)Network.GamePackets.Attack.InteractionAccept: new InteractionAccept(attack, attacker); return; case (uint)Network.GamePackets.Attack.InteractionRefuse: new InteractionRefuse(attack, attacker); return; case (uint)Network.GamePackets.Attack.InteractionStopEffect: new InteractionStopEffect(attack, attacker); return; } } #endregion #region Monster -> Player \ Monster if (attack == null) { if (attacker.EntityFlag != EntityFlag.Monster) return; if (attacker.Companion) { if (ServerBase.Constants.PKForbiddenMaps.Contains(attacker.MapID)) return; } if (attacked.EntityFlag == EntityFlag.Player) { if (!attacked.Owner.Attackable) return; if (attacked.Dead) return; //uint damageo = Calculate.Melee(attacker, attacked); //uint damageo2 = Calculate.Melee(attacker, attacked); if (attacked.Dead) { attacked.Die(); return; } #region New Monster Attack And Spells #region SwordMaster if (attacker.Name == "SwordMaster") { uint rand = (uint)Conquer_Online_Server.ServerBase.Kernel.Random.Next(1, 4); switch (rand) { case 1: attacker.MonsterInfo.SpellID = 10502; break; case 2: attacker.MonsterInfo.SpellID = 10504; break; case 3: attacker.MonsterInfo.SpellID = 10506; break; case 4: attacker.MonsterInfo.SpellID = 10505; break; } uint damage = 0;//Calculate.Magic(attacker, attacked, attacker.MonsterInfo.SpellID, 0); damage += (uint)ServerBase.Kernel.Random.Next(1200, 1400); // damage += attacker.MagicAttack; //damage -= attacked.PhysicalDamageDecrease; // damage -= attacked.MagicDamageDecrease; // damage -= attacked.MagicDefence; if (attacked.Hitpoints <= damage) { attacked.Die(); } else { attacked.Hitpoints -= damage; } if (attacker.Companion) attacker.Owner.IncreaseExperience(Math.Min(damage, attacked.Hitpoints), true); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = attacker.MonsterInfo.SpellID; suse.X = attacked.X; suse.Y = attacked.Y; suse.Targets.Add(attacked.UID, damage); attacked.Owner.SendScreen(suse, true); } #endregion #region ThrillingSpook if (attacker.Name == "ThrillingSpook" || attacker.Name == "LavaBeast") { uint rand = (uint)Conquer_Online_Server.ServerBase.Kernel.Random.Next(1, 4); switch (rand) { case 1: attacker.MonsterInfo.SpellID = 10363; break; case 2: attacker.MonsterInfo.SpellID = 10360; break; case 3: attacker.MonsterInfo.SpellID = 10361; break; case 4: attacker.MonsterInfo.SpellID = 10362; break; } uint damage = 0;//Calculate.Magic(attacker, attacked, attacker.MonsterInfo.SpellID, 0); damage += (uint)ServerBase.Kernel.Random.Next(300, 500); // damage += attacker.MagicAttack; //damage -= attacked.PhysicalDamageDecrease; // damage -= attacked.MagicDamageDecrease; // damage -= attacked.MagicDefence; if (attacked.Hitpoints <= damage) { attacked.Die(); } else { attacked.Hitpoints -= damage; } if (attacker.Companion) attacker.Owner.IncreaseExperience(Math.Min(damage, attacked.Hitpoints), true); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = attacker.MonsterInfo.SpellID; suse.X = attacked.X; suse.Y = attacked.Y; suse.Targets.Add(attacked.UID, damage); attacked.Owner.SendScreen(suse, true); } #endregion #region SnowBanhe if (attacker.Name == "SnowBanshee") { uint rand = (uint)Conquer_Online_Server.ServerBase.Kernel.Random.Next(1, 4); switch (rand) { case 1: attacker.MonsterInfo.SpellID = 30010; break; case 2: attacker.MonsterInfo.SpellID = 30011; break; case 3: attacker.MonsterInfo.SpellID = 30012; break; case 4: attacker.MonsterInfo.SpellID = 10001; break; } uint damage = 0;//Calculate.Magic(attacker, attacked, attacker.MonsterInfo.SpellID, 0); damage += (uint)ServerBase.Kernel.Random.Next(1200, 1400); // damage += attacker.MagicAttack; //damage -= attacked.PhysicalDamageDecrease; // damage -= attacked.MagicDamageDecrease; // damage -= attacked.MagicDefence; if (attacked.Hitpoints <= damage) { attacked.Die(); } else { attacked.Hitpoints -= damage; } if (attacker.Companion) attacker.Owner.IncreaseExperience(Math.Min(damage, attacked.Hitpoints), true); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = attacker.MonsterInfo.SpellID; suse.X = attacked.X; suse.Y = attacked.Y; suse.Targets.Add(attacked.UID, damage); attacked.Owner.SendScreen(suse, true); } #endregion #region TreatoDragon if (attacker.Name == "TeratoDragon") { uint rand = (uint)Conquer_Online_Server.ServerBase.Kernel.Random.Next(1, 5); switch (rand) { case 1: attacker.MonsterInfo.SpellID = 7012; break; case 2: attacker.MonsterInfo.SpellID = 7013; break; case 3: attacker.MonsterInfo.SpellID = 7015; break; case 4: attacker.MonsterInfo.SpellID = 7016; break; case 5: attacker.MonsterInfo.SpellID = 7017; break; } uint damage = 0;//Calculate.Magic(attacker, attacked, attacker.MonsterInfo.SpellID, 0); damage += (uint)ServerBase.Kernel.Random.Next(1200, 1400); // damage += attacker.MagicAttack; //damage -= attacked.PhysicalDamageDecrease; // damage -= attacked.MagicDamageDecrease; // damage -= attacked.MagicDefence; if (attacked.Hitpoints <= damage) { attacked.Die(); } else { attacked.Hitpoints -= damage; } if (attacker.Companion) attacker.Owner.IncreaseExperience(Math.Min(damage, attacked.Hitpoints), true); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = attacker.MonsterInfo.SpellID; suse.X = attacked.X; suse.Y = attacked.Y; suse.Targets.Add(attacked.UID, damage); attacked.Owner.SendScreen(suse, true); } #endregion #region Nobility War if (attacker.Name == "KingMonster" || attacker.Name == "PrincesMonster" || attacker.Name == "DukeMonster") { uint rand = (uint)Conquer_Online_Server.ServerBase.Kernel.Random.Next(1, 5); switch (rand) { case 1: attacker.MonsterInfo.SpellID = 7012; break; case 2: attacker.MonsterInfo.SpellID = 7013; break; case 3: attacker.MonsterInfo.SpellID = 7015; break; case 4: attacker.MonsterInfo.SpellID = 7016; break; case 5: attacker.MonsterInfo.SpellID = 7017; break; } uint damage = 0;//Calculate.Magic(attacker, attacked, attacker.MonsterInfo.SpellID, 0); damage += (uint)ServerBase.Kernel.Random.Next(100, 300); // damage += attacker.MagicAttack; //damage -= attacked.PhysicalDamageDecrease; // damage -= attacked.MagicDamageDecrease; // damage -= attacked.MagicDefence; if (attacked.Hitpoints <= damage) { attacked.Die(); } else { attacked.Hitpoints -= damage; } if (attacker.Companion) attacker.Owner.IncreaseExperience(Math.Min(damage, attacked.Hitpoints), true); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = attacker.MonsterInfo.SpellID; suse.X = attacked.X; suse.Y = attacked.Y; suse.Targets.Add(attacked.UID, damage); attacked.Owner.SendScreen(suse, true); } #endregion #endregion if (attacker.MonsterInfo.SpellID == 0) { uint damage = Calculate.Melee(attacker, attacked); if (attacked.Hitpoints <= damage) { attacked.Die(); } else { attacked.Hitpoints -= damage; } attack = new Attack(true); attack.Attacker = attacker.UID; attack.Attacked = attacked.UID; attack.AttackType = Attack.Melee; attack.Damage = damage; attack.X = attacked.X; attack.Y = attacked.Y; //attack.FirstEffect = EffectValue.Block; attacked.Owner.SendScreen(attack, true); } else { uint damage = Calculate.Magic(attacker, attacked, attacker.MonsterInfo.SpellID, 0); if (attacked.Hitpoints <= damage) { attacked.Die(); } else { attacked.Hitpoints -= damage; } if (attacker.Companion) attacker.Owner.IncreaseExperience(Math.Min(damage, attacked.Hitpoints), true); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = attacker.MonsterInfo.SpellID; suse.X = attacked.X; suse.Y = attacked.Y; suse.Targets.Add(attacked.UID, damage); attacked.Owner.SendScreen(suse, true); } } else { if (attacker.MonsterInfo.SpellID == 0) { uint damage = Calculate.Melee(attacker, attacked); attack = new Attack(true); attack.Attacker = attacker.UID; attack.Attacked = attacked.UID; attack.AttackType = Attack.Melee; attack.Damage = damage; attack.X = attacked.X; attack.Y = attacked.Y; attacked.MonsterInfo.SendScreen(attack); if (attacker.Companion) if (damage > attacked.Hitpoints) attacker.Owner.IncreaseExperience(Math.Min(damage, attacked.Hitpoints), true); else attacker.Owner.IncreaseExperience(damage, true); if (attacked.Hitpoints <= damage) { attacked.Die(attacker); attack = new Attack(true); attack.Attacker = attacker.UID; attack.Attacked = attacked.UID; attack.AttackType = Network.GamePackets.Attack.Kill; attack.X = attacked.X; attack.Y = attacked.Y; attacked.MonsterInfo.SendScreen(attack); } else { attacked.Hitpoints -= damage; } } else { uint damage = Calculate.Magic(attacker, attacked, attacker.MonsterInfo.SpellID, 0); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = attacker.MonsterInfo.SpellID; suse.X = attacked.X; suse.Y = attacked.Y; suse.Targets.Add(attacked.UID, damage); attacked.MonsterInfo.SendScreen(suse); if (attacker.Companion) if (damage > attacked.Hitpoints) attacker.Owner.IncreaseExperience(Math.Min(damage, attacked.Hitpoints), true); else attacker.Owner.IncreaseExperience(damage, true); if (attacked.Hitpoints <= damage) { attacked.Die(attacker); attack = new Attack(true); attack.Attacker = attacker.UID; attack.Attacked = attacked.UID; attack.AttackType = Network.GamePackets.Attack.Kill; attack.X = attacked.X; attack.Y = attacked.Y; attacked.MonsterInfo.SendScreen(attack); } else { attacked.Hitpoints -= damage; } } } } #endregion #region Player -> Player \ Monster \ Sob Npc else { #region Merchant if (attack.AttackType == Attack.MerchantAccept || attack.AttackType == Attack.MerchantRefuse) { attacker.AttackPacket = null; return; } #endregion #region Marriage if (attack.AttackType == Attack.MarriageAccept || attack.AttackType == Attack.MarriageRequest) { if (attack.AttackType == Attack.MarriageRequest) { Client.GameState Spouse = null; uint takeout = attack.Attacked; if (takeout == attacker.UID) takeout = attack.Attacker; if (ServerBase.Kernel.GamePool.TryGetValue(takeout, out Spouse)) { if (attacker.Spouse != "None" || Spouse.Entity.Spouse != "None") { attacker.Owner.Send(new Message("You cannot marry someone that is already married with someone else!", System.Drawing.Color.Black, Message.TopLeft)); } else { uint id1 = attacker.Mesh % 10, id2 = Spouse.Entity.Mesh % 10; if (id1 <= 2 && id2 >= 3 || id1 >= 2 && id2 <= 3) { attack.X = Spouse.Entity.X; attack.Y = Spouse.Entity.Y; Spouse.Send(attack); } else { attacker.Owner.Send(new Message("You cannot marry someone of your gender!", System.Drawing.Color.Black, Message.TopLeft)); } } } } else { Client.GameState Spouse = null; if (ServerBase.Kernel.GamePool.TryGetValue(attack.Attacked, out Spouse)) { if (attacker.Spouse != "None" || Spouse.Entity.Spouse != "None") { attacker.Owner.Send(new Message("You cannot marry someone that is already married with someone else!", System.Drawing.Color.Black, Message.TopLeft)); } else { if (attacker.Mesh % 10 <= 2 && Spouse.Entity.Mesh % 10 >= 3 || attacker.Mesh % 10 >= 3 && Spouse.Entity.Mesh % 10 <= 2) { Spouse.Entity.Spouse = attacker.Name; attacker.Spouse = Spouse.Entity.Name; Message message = null; if (Spouse.Entity.Mesh % 10 >= 3) message = new Message("Joy and happiness! " + Spouse.Entity.Name + " and " + attacker.Name + " have joined together in the holy marriage. We wish them a stone house.", System.Drawing.Color.BurlyWood, Message.Center); else message = new Message("Joy and happiness! " + attacker.Name + " and " + attacker.Spouse + " have joined together in the holy marriage. We wish them a stone house.", System.Drawing.Color.BurlyWood, Message.Center); var varr = ServerBase.Kernel.GamePool.Values.GetEnumerator(); varr.MoveNext(); int COunt = ServerBase.Kernel.GamePool.Count; for (uint x = 0; x < COunt; x++) { if (x >= COunt) break; Client.GameState client = (varr.Current as Client.GameState); client.Send(message); varr.MoveNext(); } Spouse.Entity.Update(_String.Effect, "firework-2love", true); attacker.Update(_String.Effect, "firework-2love", true); } else { attacker.Owner.Send(new Message("You cannot marry someone of your gender!", System.Drawing.Color.Black, Message.TopLeft)); } } } } } #endregion #endregion #region Attacking else { attacker.Owner.Attackable = true; Entity attacked = null; SobNpcSpawn attackedsob = null; #region Checks if (attack.Attacker != attacker.UID) return; if (attacker.EntityFlag != EntityFlag.Player) return; attacker.RemoveFlag(Update.Flags.Invisibility); bool pass = false; if (attack.AttackType == Attack.Melee) { if (attacker.OnFatalStrike()) { if (attack.Attacked < 600000) { pass = true; } } } ushort decrease = 0; if (attacker.OnCyclone()) decrease = 700; if (attacker.OnSuperman()) decrease = 300; if (!pass) { int milliSeconds = 1000 - attacker.Agility - decrease; if (milliSeconds < 0 || milliSeconds > 5000) milliSeconds = 0; if (Time32.Now < attacker.AttackStamp.AddMilliseconds(milliSeconds)) return; } if (attacker.Dead) { if (attacker.AttackPacket != null) attacker.AttackPacket = null; return; } attacker.AttackStamp = Time32.Now; if (attacker.Owner.QualifierGroup != null) { if (Time32.Now < attacker.Owner.QualifierGroup.CreateTime.AddSeconds(12)) { return; } } restart: #region Extract attack information ushort SpellID = 0, X = 0, Y = 0; uint Target = 0; if (attack.AttackType == Attack.Magic) { if (!attack.Decoded) { #region GetSkillID SpellID = Convert.ToUInt16(((long)attack.ToArray()[24] & 0xFF) | (((long)attack.ToArray()[25] & 0xFF) << 8)); SpellID ^= (ushort)0x915d; SpellID ^= (ushort)attacker.UID; SpellID = (ushort)(SpellID << 0x3 | SpellID >> 0xd); SpellID -= 0xeb42; #endregion #region GetCoords X = (ushort)((attack.ToArray()[16] & 0xFF) | ((attack.ToArray()[17] & 0xFF) << 8)); X = (ushort)(X ^ (uint)(attacker.UID & 0xffff) ^ 0x2ed6); X = (ushort)(((X << 1) | ((X & 0x8000) >> 15)) & 0xffff); X = (ushort)((X | 0xffff0000) - 0xffff22ee); Y = (ushort)((attack.ToArray()[18] & 0xFF) | ((attack.ToArray()[19] & 0xFF) << 8)); Y = (ushort)(Y ^ (uint)(attacker.UID & 0xffff) ^ 0xb99b); Y = (ushort)(((Y << 5) | ((Y & 0xF800) >> 11)) & 0xffff); Y = (ushort)((Y | 0xffff0000) - 0xffff8922); #endregion #region GetTarget Target = ((uint)attack.ToArray()[12] & 0xFF) | (((uint)attack.ToArray()[13] & 0xFF) << 8) | (((uint)attack.ToArray()[14] & 0xFF) << 16) | (((uint)attack.ToArray()[15] & 0xFF) << 24); Target = ((((Target & 0xffffe000) >> 13) | ((Target & 0x1fff) << 19)) ^ 0x5F2D2463 ^ attacker.UID) - 0x746F4AE6; #endregion attack.X = X; attack.Y = Y; attack.Damage = SpellID; attack.Attacked = Target; attack.Decoded = true; } else { X = attack.X; Y = attack.Y; SpellID = (ushort)attack.Damage; Target = attack.Attacked; } } #endregion #endregion if (attacker.ContainsFlag(Update.Flags.Ride)) { attacker.Stamina = 100; if (attacker.RidingCropID == 0) { if (attack.AttackType != Attack.Magic) attacker.RemoveFlag(Update.Flags.Ride); else if (!(SpellID == 7003 || SpellID == 7002)) attacker.RemoveFlag(Update.Flags.Ride); } } //if (attacked.ContainsFlag(Update.Flags.Ride)) //{ // //if (attack.AttackType != Attack.Magic) // // attacker.RemoveFlag(Update.Flags.Ride); // //else // if (!(SpellID == 7003 || SpellID == 7002)) // attacked.RemoveFlag(Update.Flags.Ride); //} if (attacker.ContainsFlag(Update.Flags.CastPray)) attacker.RemoveFlag(Update.Flags.CastPray); if (attacker.ContainsFlag(Update.Flags.Praying)) attacker.RemoveFlag(Update.Flags.Praying); Interfaces.IConquerItem item = new Network.GamePackets.ConquerItem(true); // BlessEffect.Handler(client); #region GemuriEfecte { #region DragonGem if (!attacker.Owner.Equipment.Free((byte)ConquerItem.RightWeapon)) { Interfaces.IConquerItem rightweapon = attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.RightWeapon); if (rightweapon.SocketOne == Game.Enums.Gem.SuperDragonGem || rightweapon.SocketTwo == Game.Enums.Gem.SuperDragonGem) { if (ServerBase.Kernel.Rate(0.5)) { _String str = new _String(true); str.UID = attacker.UID; str.TextsCount = 1; str.Type = _String.Effect; str.Texts.Add("goldendragon"); attacker.Owner.SendScreen(str, true); } } } if (!attacker.Owner.Equipment.Free((byte)ConquerItem.LeftWeapon)) { Interfaces.IConquerItem rightweapon = attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.LeftWeapon); if (rightweapon.SocketOne == Game.Enums.Gem.SuperDragonGem || rightweapon.SocketTwo == Game.Enums.Gem.SuperDragonGem) { if (ServerBase.Kernel.Rate(0.5)) { _String str = new _String(true); str.UID = attacker.UID; str.TextsCount = 1; str.Type = _String.Effect; str.Texts.Add("goldendragon"); attacker.Owner.SendScreen(str, true); } } } if (!attacker.Owner.Equipment.Free((byte)ConquerItem.Head)) { Interfaces.IConquerItem rightweapon = attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.Head); if (rightweapon.SocketOne == Game.Enums.Gem.SuperDragonGem || rightweapon.SocketTwo == Game.Enums.Gem.SuperDragonGem) { if (ServerBase.Kernel.Rate(0.5)) { _String str = new _String(true); str.UID = attacker.UID; str.TextsCount = 1; str.Type = _String.Effect; str.Texts.Add("goldendragon"); attacker.Owner.SendScreen(str, true); } } } if (!attacker.Owner.Equipment.Free((byte)ConquerItem.Armor)) { Interfaces.IConquerItem rightweapon = attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.Armor); if (rightweapon.SocketOne == Game.Enums.Gem.SuperDragonGem || rightweapon.SocketTwo == Game.Enums.Gem.SuperDragonGem) { if (ServerBase.Kernel.Rate(0.5)) { _String str = new _String(true); str.UID = attacker.UID; str.TextsCount = 1; str.Type = _String.Effect; str.Texts.Add("goldendragon"); attacker.Owner.SendScreen(str, true); } } } if (!attacker.Owner.Equipment.Free((byte)ConquerItem.Boots)) { Interfaces.IConquerItem rightweapon = attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.Boots); if (rightweapon.SocketOne == Game.Enums.Gem.SuperDragonGem || rightweapon.SocketTwo == Game.Enums.Gem.SuperDragonGem) { if (ServerBase.Kernel.Rate(0.5)) { _String str = new _String(true); str.UID = attacker.UID; str.TextsCount = 1; str.Type = _String.Effect; str.Texts.Add("goldendragon"); attacker.Owner.SendScreen(str, true); } } } if (!attacker.Owner.Equipment.Free((byte)ConquerItem.Necklace)) { Interfaces.IConquerItem rightweapon = attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.Necklace); if (rightweapon.SocketOne == Game.Enums.Gem.SuperDragonGem || rightweapon.SocketTwo == Game.Enums.Gem.SuperDragonGem) { if (ServerBase.Kernel.Rate(0.5)) { _String str = new _String(true); str.UID = attacker.UID; str.TextsCount = 1; str.Type = _String.Effect; str.Texts.Add("goldendragon"); attacker.Owner.SendScreen(str, true); } } } if (!attacker.Owner.Equipment.Free((byte)ConquerItem.Ring)) { Interfaces.IConquerItem rightweapon = attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.Ring); if (rightweapon.SocketOne == Game.Enums.Gem.SuperDragonGem || rightweapon.SocketTwo == Game.Enums.Gem.SuperDragonGem) { if (ServerBase.Kernel.Rate(0.5)) { _String str = new _String(true); str.UID = attacker.UID; str.TextsCount = 1; str.Type = _String.Effect; str.Texts.Add("goldendragon"); attacker.Owner.SendScreen(str, true); } } } #endregion #region phoenix Gem else if (!attacker.Owner.Equipment.Free((byte)ConquerItem.RightWeapon)) { Interfaces.IConquerItem rightweapon1 = attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.RightWeapon); if (rightweapon1.SocketOne == Game.Enums.Gem.SuperPhoenixGem || rightweapon1.SocketTwo == Game.Enums.Gem.SuperPhoenixGem) { if (ServerBase.Kernel.Rate(0.5)) { _String str = new _String(true); str.UID = attacker.UID; str.TextsCount = 1; str.Type = _String.Effect; str.Texts.Add("phoenix"); attacker.Owner.SendScreen(str, true); } } } else if (!attacker.Owner.Equipment.Free((byte)ConquerItem.LeftWeapon)) { Interfaces.IConquerItem rightweapon1 = attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.LeftWeapon); if (rightweapon1.SocketOne == Game.Enums.Gem.SuperPhoenixGem || rightweapon1.SocketTwo == Game.Enums.Gem.SuperPhoenixGem) { if (ServerBase.Kernel.Rate(0.5)) { _String str = new _String(true); str.UID = attacker.UID; str.TextsCount = 1; str.Type = _String.Effect; str.Texts.Add("phoenix"); attacker.Owner.SendScreen(str, true); } } } else if (!attacker.Owner.Equipment.Free((byte)ConquerItem.Head)) { Interfaces.IConquerItem rightweapon1 = attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.Head); if (rightweapon1.SocketOne == Game.Enums.Gem.SuperPhoenixGem || rightweapon1.SocketTwo == Game.Enums.Gem.SuperPhoenixGem) { if (ServerBase.Kernel.Rate(0.5)) { _String str = new _String(true); str.UID = attacker.UID; str.TextsCount = 1; str.Type = _String.Effect; str.Texts.Add("phoenix"); attacker.Owner.SendScreen(str, true); } } } else if (!attacker.Owner.Equipment.Free((byte)ConquerItem.Armor)) { Interfaces.IConquerItem rightweapon1 = attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.Armor); if (rightweapon1.SocketOne == Game.Enums.Gem.SuperPhoenixGem || rightweapon1.SocketTwo == Game.Enums.Gem.SuperPhoenixGem) { if (ServerBase.Kernel.Rate(0.5)) { _String str = new _String(true); str.UID = attacker.UID; str.TextsCount = 1; str.Type = _String.Effect; str.Texts.Add("phoenix"); attacker.Owner.SendScreen(str, true); } } } else if (!attacker.Owner.Equipment.Free((byte)ConquerItem.Boots)) { Interfaces.IConquerItem rightweapon1 = attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.Boots); if (rightweapon1.SocketOne == Game.Enums.Gem.SuperPhoenixGem || rightweapon1.SocketTwo == Game.Enums.Gem.SuperPhoenixGem) { if (ServerBase.Kernel.Rate(0.5)) { _String str = new _String(true); str.UID = attacker.UID; str.TextsCount = 1; str.Type = _String.Effect; str.Texts.Add("phoenix"); attacker.Owner.SendScreen(str, true); } } } else if (!attacker.Owner.Equipment.Free((byte)ConquerItem.Necklace)) { Interfaces.IConquerItem rightweapon1 = attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.Necklace); if (rightweapon1.SocketOne == Game.Enums.Gem.SuperPhoenixGem || rightweapon1.SocketTwo == Game.Enums.Gem.SuperPhoenixGem) { if (ServerBase.Kernel.Rate(0.5)) { _String str = new _String(true); str.UID = attacker.UID; str.TextsCount = 1; str.Type = _String.Effect; str.Texts.Add("phoenix"); attacker.Owner.SendScreen(str, true); } } } else if (!attacker.Owner.Equipment.Free((byte)ConquerItem.Ring)) { Interfaces.IConquerItem rightweapon1 = attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.Ring); if (rightweapon1.SocketOne == Game.Enums.Gem.SuperPhoenixGem || rightweapon1.SocketTwo == Game.Enums.Gem.SuperPhoenixGem) { if (ServerBase.Kernel.Rate(0.5)) { _String str = new _String(true); str.UID = attacker.UID; str.TextsCount = 1; str.Type = _String.Effect; str.Texts.Add("phoenix"); attacker.Owner.SendScreen(str, true); } } } #endregion #region RainbowGem Gem else if (!attacker.Owner.Equipment.Free((byte)ConquerItem.RightWeapon)) { Interfaces.IConquerItem rightweapon2 = attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.RightWeapon); if (rightweapon2.SocketOne == Game.Enums.Gem.SuperRainbowGem || rightweapon2.SocketTwo == Game.Enums.Gem.SuperRainbowGem) { if (ServerBase.Kernel.Rate(0.5)) { _String str = new _String(true); str.UID = attacker.UID; str.TextsCount = 1; str.Type = _String.Effect; str.Texts.Add("rainbow"); attacker.Owner.SendScreen(str, true); } } } else if (!attacker.Owner.Equipment.Free((byte)ConquerItem.LeftWeapon)) { Interfaces.IConquerItem rightweapon2 = attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.LeftWeapon); if (rightweapon2.SocketOne == Game.Enums.Gem.SuperRainbowGem || rightweapon2.SocketTwo == Game.Enums.Gem.SuperRainbowGem) { if (ServerBase.Kernel.Rate(0.5)) { _String str = new _String(true); str.UID = attacker.UID; str.TextsCount = 1; str.Type = _String.Effect; str.Texts.Add("rainbow"); attacker.Owner.SendScreen(str, true); } } } else if (!attacker.Owner.Equipment.Free((byte)ConquerItem.Head)) { Interfaces.IConquerItem rightweapon2 = attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.Head); if (rightweapon2.SocketOne == Game.Enums.Gem.SuperRainbowGem || rightweapon2.SocketTwo == Game.Enums.Gem.SuperRainbowGem) { if (ServerBase.Kernel.Rate(0.5)) { _String str = new _String(true); str.UID = attacker.UID; str.TextsCount = 1; str.Type = _String.Effect; str.Texts.Add("rainbow"); attacker.Owner.SendScreen(str, true); } } } else if (!attacker.Owner.Equipment.Free((byte)ConquerItem.Armor)) { Interfaces.IConquerItem rightweapon2 = attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.Armor); if (rightweapon2.SocketOne == Game.Enums.Gem.SuperRainbowGem || rightweapon2.SocketTwo == Game.Enums.Gem.SuperRainbowGem) { if (ServerBase.Kernel.Rate(0.5)) { _String str = new _String(true); str.UID = attacker.UID; str.TextsCount = 1; str.Type = _String.Effect; str.Texts.Add("rainbow"); attacker.Owner.SendScreen(str, true); } } } else if (!attacker.Owner.Equipment.Free((byte)ConquerItem.Boots)) { Interfaces.IConquerItem rightweapon2 = attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.Boots); if (rightweapon2.SocketOne == Game.Enums.Gem.SuperRainbowGem || rightweapon2.SocketTwo == Game.Enums.Gem.SuperRainbowGem) { if (ServerBase.Kernel.Rate(0.5)) { _String str = new _String(true); str.UID = attacker.UID; str.TextsCount = 1; str.Type = _String.Effect; str.Texts.Add("rainbow"); attacker.Owner.SendScreen(str, true); } } } else if (!attacker.Owner.Equipment.Free((byte)ConquerItem.Necklace)) { Interfaces.IConquerItem rightweapon2 = attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.Necklace); if (rightweapon2.SocketOne == Game.Enums.Gem.SuperRainbowGem || rightweapon2.SocketTwo == Game.Enums.Gem.SuperRainbowGem) { if (ServerBase.Kernel.Rate(0.5)) { _String str = new _String(true); str.UID = attacker.UID; str.TextsCount = 1; str.Type = _String.Effect; str.Texts.Add("rainbow"); attacker.Owner.SendScreen(str, true); } } } else if (!attacker.Owner.Equipment.Free((byte)ConquerItem.Ring)) { Interfaces.IConquerItem rightweapon2 = attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.Ring); if (rightweapon2.SocketOne == Game.Enums.Gem.SuperRainbowGem || rightweapon2.SocketTwo == Game.Enums.Gem.SuperRainbowGem) { if (ServerBase.Kernel.Rate(0.5)) { _String str = new _String(true); str.UID = attacker.UID; str.TextsCount = 1; str.Type = _String.Effect; str.Texts.Add("rainbow"); attacker.Owner.SendScreen(str, true); } } } #endregion } #endregion #region Dash if (SpellID == 1051) { if (ServerBase.Kernel.GetDistance(attack.X, attack.Y, attacker.X, attacker.Y) > 4) { attacker.Owner.Disconnect(); return; } attacker.X = attack.X; attacker.Y = attack.Y; ushort x = attacker.X, y = attacker.Y; Game.Map.UpdateCoordonatesForAngle(ref x, ref y, (Enums.ConquerAngle)Target); foreach (Interfaces.IMapObject obj in attacker.Owner.Screen.Objects) { if (obj == null) continue; if (obj.X == x && obj.Y == y && (obj.MapObjType == MapObjectType.Monster || obj.MapObjType == MapObjectType.Player)) { Entity entity = obj as Entity; if (!entity.Dead) { Target = obj.UID; break; } } } } #endregion #region CounterKill if (attack.AttackType == Attack.CounterKillSwitch) { if (attacked != null) if (attacked.ContainsFlag(Update.Flags.Fly)) { attacker.AttackPacket = null; return; } if (attacker != null) if (attacker.ContainsFlag(Update.Flags.Fly)) { attacker.AttackPacket = null; return; } if (attacker.Owner.Spells.ContainsKey(6003)) { if (!attacker.CounterKillSwitch) { if (Time32.Now >= attacker.CounterKillStamp.AddSeconds(15)) { attacker.CounterKillStamp = Time32.Now; attacker.CounterKillSwitch = true; Attack m_attack = new Attack(true); m_attack.Attacked = attacker.UID; m_attack.Attacker = attacker.UID; m_attack.AttackType = Attack.CounterKillSwitch; m_attack.Damage = 1; m_attack.X = attacker.X; m_attack.Y = attacker.Y; m_attack.Send(attacker.Owner); } } else { attacker.CounterKillSwitch = false; Attack m_attack = new Attack(true); m_attack.Attacked = attacker.UID; m_attack.Attacker = attacker.UID; m_attack.AttackType = Attack.CounterKillSwitch; m_attack.Damage = 0; m_attack.X = attacker.X; m_attack.Y = attacker.Y; m_attack.Send(attacker.Owner); } attacker.Owner.IncreaseSpellExperience(100, 6003); attacker.AttackPacket = null; } } #endregion #region Melee else if (attack.AttackType == Attack.Melee) { if (attacker.Owner.Screen.TryGetValue(attack.Attacked, out attacked)) { CheckForExtraWeaponPowers(attacker.Owner, attacked); if (!CanAttack(attacker, attacked, null, attack.AttackType == Attack.Melee)) return; pass = false; if (attacker.OnFatalStrike()) { if (attacked.EntityFlag == EntityFlag.Monster) { pass = true; } } ushort range = attacker.AttackRange; if (attacker.Transformed) range = (ushort)attacker.TransformationAttackRange; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= range || pass) { uint damage = Game.Attacking.Calculate.Melee(attacker, attacked); attack.Damage = damage; if (attacker.OnFatalStrike()) { if (attacked.EntityFlag == EntityFlag.Monster) { bool can = false; if (!attacker.Owner.Equipment.Free((byte)ConquerItem.RightWeapon)) if (attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.RightWeapon).ID / 1000 == 601) can = true; if (!attacker.Owner.Equipment.Free((byte)ConquerItem.LeftWeapon)) if (attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.LeftWeapon).ID / 1000 == 601) can = true; if (!can) return; ushort x = attacked.X; ushort y = attacked.Y; Map.UpdateCoordonatesForAngle(ref x, ref y, ServerBase.Kernel.GetAngle(attacked.X, attacked.Y, attacker.X, attacker.Y)); attacker.Shift(x, y); attack.X = x; attack.Y = y; attack.AttackType = Attack.FatalStrike; } } //over: if (!attacker.Owner.Equipment.Free((byte)ConquerItem.RightWeapon)) { Interfaces.IConquerItem rightweapon = attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.RightWeapon); ushort wep1subyte = (ushort)(rightweapon.ID / 1000), wep2subyte = 0; bool wep1bs = false, wep2bs = false; if (wep1subyte == 421) { wep1bs = true; wep1subyte--; } ushort wep1spellid = 0, wep2spellid = 0; if (Database.SpellTable.WeaponSpells.ContainsKey(wep1subyte)) wep1spellid = Database.SpellTable.WeaponSpells[wep1subyte]; Database.SpellInformation wep1spell = null, wep2spell = null; bool doWep1Spell = false, doWep2Spell = false; if (attacker.Owner.Spells.ContainsKey(wep1spellid) && Database.SpellTable.SpellInformations.ContainsKey(wep1spellid)) { wep1spell = Database.SpellTable.SpellInformations[wep1spellid][attacker.Owner.Spells[wep1spellid].Level]; doWep1Spell = ServerBase.Kernel.Rate(wep1spell.Percent); if (attacked.EntityFlag == EntityFlag.Player && wep1spellid == 10490) doWep1Spell = ServerBase.Kernel.Rate(5); } if (!doWep1Spell) { if (!attacker.Owner.Equipment.Free((byte)ConquerItem.LeftWeapon)) { Interfaces.IConquerItem leftweapon = attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.LeftWeapon); wep2subyte = (ushort)(leftweapon.ID / 1000); if (wep2subyte == 421) { wep2bs = true; wep2subyte--; } if (Database.SpellTable.WeaponSpells.ContainsKey(wep2subyte)) wep2spellid = Database.SpellTable.WeaponSpells[wep2subyte]; if (attacker.Owner.Spells.ContainsKey(wep2spellid) && Database.SpellTable.SpellInformations.ContainsKey(wep2spellid)) { wep2spell = Database.SpellTable.SpellInformations[wep2spellid][attacker.Owner.Spells[wep2spellid].Level]; doWep2Spell = ServerBase.Kernel.Rate(wep2spell.Percent); if (attacked.EntityFlag == EntityFlag.Player && wep2spellid == 10490) doWep2Spell = ServerBase.Kernel.Rate(5); } } } if (!attacker.Transformed) { if (doWep1Spell) { attack.AttackType = Attack.Magic; attack.Decoded = true; attack.X = attacked.X; attack.Y = attacked.Y; attack.Attacked = attacked.UID; attack.Damage = wep1spell.ID; goto restart; } if (doWep2Spell) { attack.AttackType = Attack.Magic; attack.Decoded = true; attack.X = attacked.X; attack.Y = attacked.Y; attack.Attacked = attacked.UID; attack.Damage = wep2spell.ID; goto restart; } if (wep1bs) wep1subyte++; if (attacker.EntityFlag == EntityFlag.Player && attacked.EntityFlag != EntityFlag.Player) if (damage > attacked.Hitpoints) { attacker.Owner.IncreaseProficiencyExperience(Math.Min(damage, attacked.Hitpoints), wep1subyte); if (wep2subyte != 0) { if (wep2bs) wep2subyte++; attacker.Owner.IncreaseProficiencyExperience(Math.Min(damage, attacked.Hitpoints), wep2subyte); } } else { attacker.Owner.IncreaseProficiencyExperience(damage, wep1subyte); if (wep2subyte != 0) { if (wep2bs) wep2subyte++; attacker.Owner.IncreaseProficiencyExperience(damage, wep2subyte); } } } } else { if (!attacker.Transformed) { if (attacker.EntityFlag == EntityFlag.Player && attacked.EntityFlag != EntityFlag.Player) if (damage > attacked.Hitpoints) { attacker.Owner.IncreaseProficiencyExperience(Math.Min(damage, attacked.Hitpoints), 0); } else { attacker.Owner.IncreaseProficiencyExperience(damage, 0); } } } ReceiveAttack(attacker, attacked, attack, damage, null); attack.AttackType = Attack.Melee; } else { attacker.AttackPacket = null; } } else if (attacker.Owner.Screen.TryGetSob(attack.Attacked, out attackedsob)) { if (CanAttack(attacker, attackedsob, null)) { ushort range = attacker.AttackRange; if (attacker.Transformed) range = (ushort)attacker.TransformationAttackRange; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= range) { uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob); if (!attacker.Owner.Equipment.Free((byte)ConquerItem.RightWeapon)) { Interfaces.IConquerItem rightweapon = attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.RightWeapon); ushort wep1subyte = (ushort)(rightweapon.ID / 1000), wep2subyte = 0; bool wep1bs = false, wep2bs = false; if (wep1subyte == 421) { wep1bs = true; wep1subyte--; } ushort wep1spellid = 0, wep2spellid = 0; if (Database.SpellTable.WeaponSpells.ContainsKey(wep1subyte)) wep1spellid = Database.SpellTable.WeaponSpells[wep1subyte]; Database.SpellInformation wep1spell = null, wep2spell = null; bool doWep1Spell = false, doWep2Spell = false; if (attacker.Owner.Spells.ContainsKey(wep1spellid) && Database.SpellTable.SpellInformations.ContainsKey(wep1spellid)) { wep1spell = Database.SpellTable.SpellInformations[wep1spellid][attacker.Owner.Spells[wep1spellid].Level]; doWep1Spell = ServerBase.Kernel.Rate(wep1spell.Percent); } if (!doWep1Spell) { if (!attacker.Owner.Equipment.Free((byte)ConquerItem.LeftWeapon)) { Interfaces.IConquerItem leftweapon = attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.LeftWeapon); wep2subyte = (ushort)(leftweapon.ID / 1000); if (wep2subyte == 421) { wep2bs = true; wep2subyte--; } if (Database.SpellTable.WeaponSpells.ContainsKey(wep2subyte)) wep2spellid = Database.SpellTable.WeaponSpells[wep2subyte]; if (attacker.Owner.Spells.ContainsKey(wep2spellid) && Database.SpellTable.SpellInformations.ContainsKey(wep2spellid)) { wep2spell = Database.SpellTable.SpellInformations[wep2spellid][attacker.Owner.Spells[wep2spellid].Level]; doWep2Spell = ServerBase.Kernel.Rate(wep2spell.Percent); } } } if (!attacker.Transformed) { if (doWep1Spell) { attack.AttackType = Attack.Magic; attack.Decoded = true; attack.X = attackedsob.X; attack.Y = attackedsob.Y; attack.Attacked = attackedsob.UID; attack.Damage = wep1spell.ID; goto restart; } if (doWep2Spell) { attack.AttackType = Attack.Magic; attack.Decoded = true; attack.X = attackedsob.X; attack.Y = attackedsob.Y; attack.Attacked = attackedsob.UID; attack.Damage = wep2spell.ID; goto restart; } if (attacker.MapID == 1039) { if (wep1bs) wep1subyte++; if (attacker.EntityFlag == EntityFlag.Player) if (damage > attackedsob.Hitpoints) { attacker.Owner.IncreaseProficiencyExperience(Math.Min(damage, attackedsob.Hitpoints), wep1subyte); if (wep2subyte != 0) { if (wep2bs) wep2subyte++; attacker.Owner.IncreaseProficiencyExperience(Math.Min(damage, attackedsob.Hitpoints), wep2subyte); } } else { attacker.Owner.IncreaseProficiencyExperience(damage, wep1subyte); if (wep2subyte != 0) { if (wep2bs) wep2subyte++; attacker.Owner.IncreaseProficiencyExperience(damage, wep2subyte); } } } } } attack.Damage = damage; ReceiveAttack(attacker, attackedsob, attack, damage, null); } else { attacker.AttackPacket = null; } } } else { attacker.AttackPacket = null; } } #endregion #region Ranged else if (attack.AttackType == Attack.Ranged) { if (attacker.Owner.Screen.TryGetValue(attack.Attacked, out attacked)) { CheckForExtraWeaponPowers(attacker.Owner, attacked); if (attacker.Owner.Equipment.TryGetItem(ConquerItem.LeftWeapon) == null) return; if (!CanAttack(attacker, attacked, null, attack.AttackType == Attack.Melee)) return; if (!attacker.Owner.Equipment.Free((byte)ConquerItem.LeftWeapon)) { Interfaces.IConquerItem arrow = attacker.Owner.Equipment.TryGetItem(ConquerItem.LeftWeapon); arrow.Durability -= 1; ItemUsage usage = new ItemUsage(true) { UID = arrow.UID, dwParam = arrow.Durability, ID = ItemUsage.UpdateDurability }; usage.Send(attacker.Owner); if (arrow.Durability <= 0 || arrow.Durability > 5000) { Network.PacketHandler.ReloadArrows(attacker.Owner.Equipment.TryGetItem(ConquerItem.LeftWeapon), attacker.Owner); } } if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= ServerBase.Constants.pScreenDistance) { uint damage = Game.Attacking.Calculate.Ranged(attacker, attacked); attack.Damage = damage; if (attacker.EntityFlag == EntityFlag.Player && attacked.EntityFlag != EntityFlag.Player) if (damage > attacked.Hitpoints) { attacker.Owner.IncreaseProficiencyExperience(Math.Min(damage, attacked.Hitpoints), 500); } else { attacker.Owner.IncreaseProficiencyExperience(damage, 500); } ReceiveAttack(attacker, attacked, attack, damage, null); } } else if (attacker.Owner.Screen.TryGetSob(attack.Attacked, out attackedsob)) { if (CanAttack(attacker, attackedsob, null)) { if (attacker.Owner.Equipment.TryGetItem(ConquerItem.LeftWeapon) == null) return; if (attacker.MapID != 1039) { if (!attacker.Owner.Equipment.Free((byte)ConquerItem.LeftWeapon)) { Interfaces.IConquerItem arrow = attacker.Owner.Equipment.TryGetItem(ConquerItem.LeftWeapon); arrow.Durability -= 1; ItemUsage usage = new ItemUsage(true) { UID = arrow.UID, dwParam = arrow.Durability, ID = ItemUsage.UpdateDurability }; usage.Send(attacker.Owner); if (arrow.Durability <= 0 || arrow.Durability > 5000) { Network.PacketHandler.ReloadArrows(attacker.Owner.Equipment.TryGetItem(ConquerItem.LeftWeapon), attacker.Owner); } } } if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= ServerBase.Constants.pScreenDistance) { uint damage = Game.Attacking.Calculate.Ranged(attacker, attackedsob); attack.Damage = damage; ReceiveAttack(attacker, attackedsob, attack, damage, null); if (damage > attackedsob.Hitpoints) { attacker.Owner.IncreaseProficiencyExperience(Math.Min(damage, attackedsob.Hitpoints), 500); } else { attacker.Owner.IncreaseProficiencyExperience(damage, 500); } } } } else { attacker.AttackPacket = null; } } #endregion #region Magic else if (attack.AttackType == Attack.Magic) { CheckForExtraWeaponPowers(attacker.Owner, attacked); uint Experience = 100; bool shuriken = false; ushort spellID = SpellID; if (SpellID >= 3090 && SpellID <= 3306) spellID = 3090; if (spellID == 6012) shuriken = true; if (attacker == null) return; if (attacker.Owner == null) { attacker.AttackPacket = null; return; } if (attacker.Owner.Spells == null) { attacker.Owner.Spells = new SafeDictionary<ushort, Conquer_Online_Server.Interfaces.ISkill>(10000); attacker.AttackPacket = null; return; } if (attacker.Owner.Spells[spellID] == null && spellID != 6012) { attacker.AttackPacket = null; return; } Database.SpellInformation spell = null; if (shuriken) spell = Database.SpellTable.SpellInformations[6010][0]; else { byte choselevel = 0; if (spellID == SpellID) choselevel = attacker.Owner.Spells[spellID].Level; if (Database.SpellTable.SpellInformations[SpellID] != null && !Database.SpellTable.SpellInformations[SpellID].ContainsKey(choselevel)) choselevel = (byte)(Database.SpellTable.SpellInformations[SpellID].Count - 1); spell = Database.SpellTable.SpellInformations[SpellID][choselevel]; } if (spell == null) { attacker.AttackPacket = null; return; } attacked = null; attackedsob = null; if (attacker.Owner.Screen.TryGetValue(Target, out attacked) || attacker.Owner.Screen.TryGetSob(Target, out attackedsob) || Target == attacker.UID || spell.Sort != 1) { if (Target == attacker.UID) attacked = attacker; if (attacked != null) { if (attacked.Dead && spell.Sort != Database.SpellSort.Revive && spell.ID != 10405) { attacker.AttackPacket = null; return; } } if (Target >= 400000 && Target <= 600000 || Target >= 800000) { if (attacked == null && attackedsob == null) return; } else if (Target != 0 && attackedsob == null) return; if (attacked != null) { if (attacked.EntityFlag == EntityFlag.Monster) { if (spell.CanKill) { if (attacked.MonsterInfo.InSight == 0) { attacked.MonsterInfo.InSight = attacker.UID; } } } } if (!attacker.Owner.Spells.ContainsKey(spellID)) { if (spellID != 6012) return; } if (spell != null) { if (spell.OnlyWithThisWeaponSubtype != 0) { uint firstwepsubtype, secondwepsubtype; if (!attacker.Owner.Equipment.Free(4)) { firstwepsubtype = attacker.Owner.Equipment.Objects[3].ID / 1000; if (!attacker.Owner.Equipment.Free(5) && attacker.Owner.Equipment.Objects[4] != null) { secondwepsubtype = attacker.Owner.Equipment.Objects[4].ID / 1000; if (firstwepsubtype != spell.OnlyWithThisWeaponSubtype) { if (secondwepsubtype != spell.OnlyWithThisWeaponSubtype) { attacker.AttackPacket = null; return; } } } else { if (firstwepsubtype != spell.OnlyWithThisWeaponSubtype) { attacker.AttackPacket = null; return; } } } else { attacker.AttackPacket = null; return; } } } // Buffers buff = new Buffers(); switch (spellID) { #region Single magic damage spells case 1000: case 1001: case 1002: case 1150: case 1160: case 1180: case 1320: { if (CanUseSpell(spell, attacker.Owner)) { if (attacked != null) { if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Distance) { SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { PrepareSpell(spell, attacker.Owner); uint damage = Game.Attacking.Calculate.Magic(attacker, attacked, spell); ReceiveAttack(attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID, damage); if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.SendScreen(suse, true); else attacked.MonsterInfo.SendScreen(suse); } } else { attacker.AttackPacket = null; } } else { if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= spell.Distance) { SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (CanAttack(attacker, attackedsob, spell)) { PrepareSpell(spell, attacker.Owner); uint damage = Game.Attacking.Calculate.Magic(attacker, attackedsob, spell); ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID, damage); attacker.Owner.SendScreen(suse, true); } } } } else { attacker.AttackPacket = null; } break; } #endregion #region Single heal/meditation spells case 1190: case 1195: { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; uint damage = spell.Power; if (spell.ID == 1190) { Experience = damage = Math.Min(damage, attacker.MaxHitpoints - attacker.Hitpoints); attacker.Hitpoints += damage; } else { Experience = damage = Math.Min(damage, (uint)(attacker.MaxMana - attacker.Mana)); attacker.Mana += (ushort)damage; } suse.Targets.Add(attacker.UID, spell.Power); attacker.Owner.SendScreen(suse, true); } break; } #endregion #region Multi heal spells case 1005: case 1055: case 1170: case 1175: { if (CanUseSpell(spell, attacker.Owner)) { SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (attackedsob != null) { if (attacker.MapID == 1038) break; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= spell.Distance) { PrepareSpell(spell, attacker.Owner); uint damage = spell.Power; damage = Math.Min(damage, attackedsob.MaxHitpoints - attackedsob.Hitpoints); attackedsob.Hitpoints += damage; Experience += damage; suse.Targets.Add(attackedsob.UID, damage); attacker.Owner.SendScreen(suse, true); } } else { if (spell.Multi) { if (attacker.Owner.Team != null) { PrepareSpell(spell, attacker.Owner); foreach (Client.GameState teammate in attacker.Owner.Team.Teammates) { if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, teammate.Entity.X, teammate.Entity.Y) <= spell.Distance) { uint damage = spell.Power; damage = Math.Min(damage, teammate.Entity.MaxHitpoints - teammate.Entity.Hitpoints); teammate.Entity.Hitpoints += damage; Experience += damage; suse.Targets.Add(teammate.Entity.UID, damage); if (spell.NextSpellID != 0) { attack.Damage = spell.NextSpellID; attacker.AttackPacket = attack; } else { attacker.AttackPacket = null; } } } if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.SendScreen(suse, true); else attacked.MonsterInfo.SendScreen(suse); } else { if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Distance) { PrepareSpell(spell, attacker.Owner); uint damage = spell.Power; damage = Math.Min(damage, attacked.MaxHitpoints - attacked.Hitpoints); attacked.Hitpoints += damage; Experience += damage; suse.Targets.Add(attacked.UID, damage); if (spell.NextSpellID != 0) { attack.Damage = spell.NextSpellID; attacker.AttackPacket = attack; } else { attacker.AttackPacket = null; } if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.SendScreen(suse, true); else attacked.MonsterInfo.SendScreen(suse); } else { attacker.AttackPacket = null; } } } else { if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Distance) { PrepareSpell(spell, attacker.Owner); uint damage = spell.Power; damage = Math.Min(damage, attacked.MaxHitpoints - attacked.Hitpoints); attacked.Hitpoints += damage; Experience += damage; suse.Targets.Add(attacked.UID, damage); if (spell.NextSpellID != 0) { attack.Damage = spell.NextSpellID; attacker.AttackPacket = attack; } else { attacker.AttackPacket = null; } if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.SendScreen(suse, true); else attacked.MonsterInfo.SendScreen(suse); } else { attacker.AttackPacket = null; } } } } else { attacker.AttackPacket = null; } break; } #endregion #region Revive case 1050: case 1100: { if (attackedsob != null) return; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Distance) { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; suse.Targets.Add(attacked.UID, 0); attacked.Ressurect(); attacked.Owner.SendScreen(suse, true); } } break; } #endregion #region Linear spells case 1045: case 11000: case 11005: case 1046: case 1260: case 11110: { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); Game.Attacking.InLineAlgorithm ila = new Conquer_Online_Server.Game.Attacking.InLineAlgorithm(attacker.X, X, attacker.Y, Y, (byte)spell.Range, InLineAlgorithm.Algorithm.DDA); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = SpellID; suse.SpellLevel = attacker.Owner.Spells[SpellID].Level; suse.X = X; suse.Y = Y; foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects) { if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player) { attacked = _obj as Entity; if (ila.InLine(attacked.X, attacked.Y)) { if (!CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) continue; uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell); attack.Damage = damage; ReceiveAttack(attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID, damage); } } else if (_obj.MapObjType == MapObjectType.SobNpc) { attackedsob = _obj as SobNpcSpawn; if (ila.InLine(attackedsob.X, attackedsob.Y)) { if (!CanAttack(attacker, attackedsob, spell)) continue; uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob); damage = (uint)(damage * spell.PowerPercent); attack.Damage = damage; ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID, damage); } } } attacker.Owner.SendScreen(suse, true); } break; } #endregion #region XPSpells inofensive case 1015: case 1020: case 1025: case 1110: case 6011: case 10390: { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; suse.Targets.Add(attacked.UID, 0); if (spell.ID == 6011) { attacked.FatalStrikeStamp = Time32.Now; attacked.FatalStrikeTime = 60; attacked.AddFlag(Update.Flags.CannonBarrage); } else { if (spell.ID == 1110 || spell.ID == 1025 || spell.ID == 10390) { if (!attacked.OnKOSpell()) attacked.KOCount = 0; attacked.KOSpell = spell.ID; if (spell.ID == 1110) { attacked.CycloneStamp = Time32.Now; attacked.CycloneTime = 20; attacked.AddFlag(Update.Flags.Cyclone); } else if (spell.ID == 10390) { attacked.OblivionStamp = Time32.Now; attacked.OblivionTime = 20; attacked.AddFlag2(Update.Flags2.Oblivion); } else { attacked.SupermanStamp = Time32.Now; attacked.SupermanTime = 20; attacked.AddFlag(Update.Flags.Superman); } } else { if (spell.ID == 1020) { attacked.ShieldTime = 0; attacked.ShieldStamp = Time32.Now; attacked.MagicShieldStamp = Time32.Now; attacked.MagicShieldTime = 0; attacked.AddFlag(Update.Flags.MagicShield); attacked.ShieldStamp = Time32.Now; attacked.ShieldIncrease = spell.PowerPercent; attacked.ShieldTime = (byte)spell.Duration; } else { attacked.AccuracyStamp = Time32.Now; attacked.StarOfAccuracyStamp = Time32.Now; attacked.StarOfAccuracyTime = 0; attacked.AccuracyTime = 0; attacked.AddFlag(Update.Flags.StarOfAccuracy); attacked.AccuracyStamp = Time32.Now; attacked.AccuracyTime = (byte)spell.Duration; } } } attacked.Owner.SendScreen(suse, true); } break; } #endregion #region Circle spells case 1010: case 1115: case 1120: case 1125: case 3090: case 5001: case 8030: case 11040: case 11070: { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= spell.Range) { foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects) { if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player) { attacked = _obj as Entity; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Range) { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { uint damage = Game.Attacking.Calculate.Melee(attacker, attacked); if (spell.Power > 0) damage = Game.Attacking.Calculate.Magic(attacker, attacked, spell); if (spell.ID == 8030) damage = Game.Attacking.Calculate.Ranged(attacker, attacked); ReceiveAttack(attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID, damage); } } } else if (_obj.MapObjType == MapObjectType.SobNpc) { attackedsob = _obj as SobNpcSpawn; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= spell.Range) { if (CanAttack(attacker, attackedsob, spell)) { uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob); if (spell.Power > 0) damage = Game.Attacking.Calculate.Magic(attacker, attackedsob, spell); if (spell.ID == 8030) damage = Game.Attacking.Calculate.Ranged(attacker, attackedsob); ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID, damage); } } } } } else { attacker.AttackPacket = null; } attacker.Owner.SendScreen(suse, true); } break; } #endregion #region Buffers case 1075: case 1085: case 1090: case 1095: case 3080: { if (attackedsob != null) { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; suse.Targets.Add(attackedsob.UID, 0); attacker.Owner.SendScreen(suse, true); } } else { if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Distance) { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; suse.Targets.Add(attacked.UID, 0); if (spell.ID == 1075 || spell.ID == 1085) { if (spell.ID == 1075) { attacked.AddFlag(Update.Flags.Invisibility); attacked.InvisibilityStamp = Time32.Now; attacked.InvisibilityTime = (byte)spell.Duration; if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.Send(ServerBase.Constants.Invisibility(spell.Duration)); } else { attacked.AccuracyStamp = Time32.Now; attacked.StarOfAccuracyStamp = Time32.Now; attacked.StarOfAccuracyTime = 0; attacked.AccuracyTime = 0; attacked.AddFlag(Update.Flags.StarOfAccuracy); attacked.StarOfAccuracyStamp = Time32.Now; attacked.StarOfAccuracyTime = (byte)spell.Duration; if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.Send(ServerBase.Constants.Accuracy(spell.Duration)); } } else { if (spell.ID == 1090) { attacked.ShieldTime = 0; attacked.ShieldStamp = Time32.Now; attacked.MagicShieldStamp = Time32.Now; attacked.MagicShieldTime = 0; attacked.AddFlag(Update.Flags.MagicShield); attacked.MagicShieldStamp = Time32.Now; attacked.MagicShieldIncrease = spell.PowerPercent; attacked.MagicShieldTime = (byte)spell.Duration; if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.Send(ServerBase.Constants.Shield(spell.PowerPercent, spell.Duration)); } else if (spell.ID == 1095) { attacked.AddFlag(Update.Flags.Stigma); attacked.StigmaStamp = Time32.Now; attacked.StigmaIncrease = spell.PowerPercent; attacked.StigmaTime = (byte)spell.Duration; if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.Send(ServerBase.Constants.Stigma(spell.PowerPercent, spell.Duration)); } else { attacked.AddFlag(Update.Flags.Dodge); attacked.DodgeStamp = Time32.Now; attacked.DodgeIncrease = spell.PowerPercent; attacked.DodgeTime = (byte)spell.Duration; if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.Send(ServerBase.Constants.Dodge(spell.PowerPercent, spell.Duration)); } } if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.SendScreen(suse, true); else attacked.MonsterInfo.SendScreen(suse); } } } break; } #endregion #region Percent case 3050: { if (CanUseSpell(spell, attacker.Owner)) { if (attackedsob != null) { if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= spell.Distance) { SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (CanAttack(attacker, attackedsob, spell)) { PrepareSpell(spell, attacker.Owner); uint damage = Game.Attacking.Calculate.Percent(attackedsob, spell.PowerPercent); attackedsob.Hitpoints -= damage; suse.Targets.Add(attackedsob.UID, damage); attacker.Owner.SendScreen(suse, true); } } } else { if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Distance) { SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { PrepareSpell(spell, attacker.Owner); uint damage = Game.Attacking.Calculate.Percent(attacked, spell.PowerPercent); if (attacker.Owner.QualifierGroup != null) attacker.Owner.QualifierGroup.UpdateDamage(attacker.Owner, damage); attacked.Hitpoints -= damage; suse.Targets.Add(attacked.UID, damage); if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.SendScreen(suse, true); else attacked.MonsterInfo.SendScreen(suse); } } } } break; } #endregion #region ExtraXP case 1040: { if (CanUseSpell(spell, attacker.Owner)) { SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (attacker.Owner.Team != null) { PrepareSpell(spell, attacker.Owner); foreach (Client.GameState teammate in attacker.Owner.Team.Teammates) { if (teammate.Entity.UID != attacker.UID) { if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, teammate.Entity.X, teammate.Entity.Y) <= spell.Distance) { teammate.XPCount += 20; Update update = new Update(true); update.UID = teammate.Entity.UID; update.Append(Update.XPCircle, teammate.XPCount); update.Send(teammate); suse.Targets.Add(teammate.Entity.UID, 20); if (spell.NextSpellID != 0) { attack.Damage = spell.NextSpellID; attacker.AttackPacket = attack; } else { attacker.AttackPacket = null; } } } } } if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.SendScreen(suse, true); else attacked.MonsterInfo.SendScreen(suse); } break; } #endregion #region Pure Skills //SoulShackle case 10405: { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); if (attacked == null) return; if (attacked.EntityFlag == EntityFlag.Monster) return; if (attacked.UID == attacker.UID) return; if (!attacked.Dead) return; SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = SpellID; suse.SpellLevel = attacker.Owner.Spells[SpellID].Level; suse.X = X; suse.Y = Y; if (attacked.BattlePower > attacker.BattlePower) { int diff = attacked.BattlePower - attacker.BattlePower; if (ServerBase.Kernel.Rate(100 - diff * 5)) { attacked.ShackleStamp = Time32.Now; attacked.ShackleTime = (short)spell.Duration; suse.Targets.Add(attacked.UID, 1); attacked.AddFlag(Update.Flags.SoulShackle); attacked.Owner.SendScreen(suse, true); } } else { attacked.ShackleStamp = Time32.Now; attacked.ShackleTime = (short)spell.Duration; suse.Targets.Add(attacked.UID, 1); attacked.AddFlag(Update.Flags.SoulShackle); attacked.Owner.SendScreen(suse, true); } } break; } //AzureShield case 30000: { if (attacked == null) return; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Distance) { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; suse.Targets.Add(attacked.UID, 0); attacked.Owner.SendScreen(suse, true); attacked.AzureStamp = Time32.Now; attacked.AzureTime = (short)spell.Duration; attacked.AzureDamage = spell.Power; attacked.AddFlag(Update.Flags.AzureShield); } } break; } //HeavenBlade case 10310: { if (attacked == null) return; spell.UseStamina = 100; if (CanUseSpell(spell, attacker.Owner)) { if (attacked != null) { if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Distance) { SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { PrepareSpell(spell, attacker.Owner); uint damage = Game.Attacking.Calculate.Magic(attacker, attacked, spell); if (ServerBase.Kernel.Rate(spell.Percent)) { damage = ReceiveAttack(suse, attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID, damage); } else { damage = 0; suse.Targets.Add(attacked.UID, damage); } if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.SendScreen(suse, true); else attacked.MonsterInfo.SendScreen(suse); } } else { attacker.AttackPacket = null; } } else { if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= spell.Distance) { SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (CanAttack(attacker, attackedsob, spell)) { PrepareSpell(spell, attacker.Owner); uint damage = Game.Attacking.Calculate.Magic(attacker, attackedsob, spell); if (ServerBase.Kernel.Rate(spell.Percent)) { ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID, damage); } else { damage = 0; suse.Targets.Add(attackedsob.UID, damage); } attacker.Owner.SendScreen(suse, true); } } } } else { attacker.AttackPacket = null; } break; } //StarArrow case 10313: { spell.UseStamina = 50; if (CanUseSpell(spell, attacker.Owner)) { if (attacked != null) { if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Distance) { SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = attacked.X; suse.Y = attacked.Y; if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { PrepareSpell(spell, attacker.Owner); uint damage = Game.Attacking.Calculate.Ranged(attacker, attacked, spell); damage = ReceiveAttack(suse, attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID, damage); if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.SendScreen(suse, true); else attacked.MonsterInfo.SendScreen(suse); } } else { attacker.AttackPacket = null; } } else { if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= spell.Distance) { SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (CanAttack(attacker, attackedsob, spell)) { PrepareSpell(spell, attacker.Owner); uint damage = Game.Attacking.Calculate.Ranged(attacker, attackedsob); ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID, damage); attacker.Owner.SendScreen(suse, true); } } } } else { attacker.AttackPacket = null; } break; } //DragonWhirl #region DragonWhirl case 10315: { if (attacker.Stamina >= 30) { attacker.Stamina -= 30; if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; attack.X = X; attack.Y = Y; attack.Attacker = attacker.UID; attack.AttackType = 53; attack.X = X; attack.Y = Y; Writer.WriteUInt16(spell.ID, 24, attack.ToArray()); Writer.WriteByte(spell.Level, 26, attack.ToArray()); attacker.Owner.SendScreen(attack, true); attacker.X = X; attacker.Y = Y; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= spell.Range) { foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects) { if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player) { attacked = _obj as Entity; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Range) { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { uint damage = Game.Attacking.Calculate.Melee(attacker, attacked); uint DamageAdd = (damage * 150) / 100; if (spell.Power > 0) damage = (uint)(DamageAdd + Game.Attacking.Calculate.Magic(attacker, attacked, spell)); ReceiveAttack(suse, attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID, damage); } } } else if (_obj.MapObjType == MapObjectType.SobNpc) { attackedsob = _obj as SobNpcSpawn; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= spell.Distance) { if (CanAttack(attacker, attackedsob, spell)) { uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob); uint DamageAdd = (damage * 150) / 100; if (spell.Power > 0) damage = (uint)(DamageAdd + Game.Attacking.Calculate.Magic(attacker, attacked, spell)); ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID, damage); } } } } } else { attacker.AttackPacket = null; } attacker.Owner.SendScreen(suse, true); } } break; } #endregion #endregion #region WeaponSpells #region Circle case 5010: case 7020: { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; if (suse.SpellID != 10415) { suse.X = X; suse.Y = Y; } else { suse.X = 6; } if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= attacker.AttackRange + 1) { foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects) { if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player) { attacked = _obj as Entity; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Range) { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { PrepareSpell(spell, attacker.Owner); uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell); ReceiveAttack(attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID, damage); } } } else if (_obj.MapObjType == MapObjectType.SobNpc) { attackedsob = _obj as SobNpcSpawn; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= spell.Range) { if (CanAttack(attacker, attackedsob, spell)) { PrepareSpell(spell, attacker.Owner); uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob); damage = (uint)(damage * spell.PowerPercent); ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID, damage); } } } } } else { attacker.AttackPacket = null; } attacker.Owner.SendScreen(suse, true); } break; } #endregion #region Single target case 10490: { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); TryTrip suse = new TryTrip(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= attacker.AttackRange + 1) { if (attackedsob != null) { if (CanAttack(attacker, attackedsob, spell)) { PrepareSpell(spell, attacker.Owner); uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob); damage = (uint)(damage * spell.PowerPercent); ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Damage = damage; suse.Attacked = attackedsob.UID; } } else { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { PrepareSpell(spell, attacker.Owner); uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell); ReceiveAttack(attacker, attacked, attack, damage, spell); suse.Damage = damage; suse.Attacked = attacked.UID; } } attacker.AttackPacket = null; } else { attacker.AttackPacket = null; } attacker.Owner.SendScreen(suse, true); } attacker.AttackPacket = null; break; } case 1290: case 5030: case 5040: case 7000: case 7010: case 7030: case 7040: { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= attacker.AttackRange) { if (attackedsob != null) { if (CanAttack(attacker, attackedsob, spell)) { PrepareSpell(spell, attacker.Owner); uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob); damage = (uint)(damage * spell.PowerPercent); ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID, damage); } } else { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { PrepareSpell(spell, attacker.Owner); uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell); ReceiveAttack(attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID, damage); } } attacker.AttackPacket = null; } else { attacker.AttackPacket = null; } attacker.Owner.SendScreen(suse, true); } attacker.AttackPacket = null; break; } #endregion #region Sector case 1250: case 5050: case 5020: case 1300: { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; Sector sector = new Sector(attacker.X, attacker.Y, X, Y); sector.Arrange(spell.Sector, spell.Range); if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= spell.Distance + 1) { foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects) { if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player) { attacked = _obj as Entity; if (sector.Inside(attacked.X, attacked.Y)) { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell); ReceiveAttack(attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID, damage); } } } else if (_obj.MapObjType == MapObjectType.SobNpc) { attackedsob = _obj as SobNpcSpawn; if (sector.Inside(attackedsob.X, attackedsob.Y)) { if (CanAttack(attacker, attackedsob, spell)) { uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob); damage = (uint)(damage * spell.PowerPercent); ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID, damage); } } } } } else { attacker.AttackPacket = null; } attacker.Owner.SendScreen(suse, true); } break; } #endregion #endregion #region Fly case 8002: case 8003: { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; attacked.FlyStamp = Time32.Now; attacked.FlyTime = (byte)spell.Duration; suse.Targets.Add(attacked.UID, attacked.FlyTime); attacked.RemoveFlag(Update.Flags.Ride); attacked.AddFlag(Update.Flags.Fly); attacked.Owner.SendScreen(suse, true); } break; } #endregion #region Ninja Spells case 6010://Vortex { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; attacker.AddFlag(Update.Flags.ShurikenVortex); attacker.ShurikenVortexStamp = Time32.Now; attacker.ShurikenVortexTime = 20; attacker.Owner.SendScreen(suse, true); attacker.VortexPacket = new Attack(true); attacker.VortexPacket.Decoded = true; attacker.VortexPacket.Damage = 6012; attacker.VortexPacket.AttackType = Attack.Magic; attacker.VortexPacket.Attacker = attacker.UID; } break; } case 6012://VortexRespone { if (!attacker.ContainsFlag(Update.Flags.ShurikenVortex)) { attacker.AttackPacket = null; break; } SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = attacker.X; suse.Y = attacker.Y; foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects) { if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player) { attacked = _obj as Entity; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Range) { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { uint damage = Game.Attacking.Calculate.Melee(attacker, attacked); ReceiveAttack(attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID, damage); } } } else if (_obj.MapObjType == MapObjectType.SobNpc) { attackedsob = _obj as SobNpcSpawn; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= spell.Range) { if (CanAttack(attacker, attackedsob, spell)) { uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob); ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID, damage); } } } } attacker.Owner.SendScreen(suse, true); break; } case 6001: { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= spell.Distance) { foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects) { if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player) { attacked = _obj as Entity; if (ServerBase.Kernel.GetDistance(X, Y, attacked.X, attacked.Y) <= spell.Range) { if (attacked.Name == "TeratoDragon")//SnowBanshee continue; if (attacked.Name == "SnowBanshee")//SnowBanshee continue; if (attacked.Name == "ThrillingSpook")//SnowBanshee continue; if (attacked.Name == "SwordMaster")//SnowBanshee continue; if (attacked.Name == "LavaBeast")//SnowBanshee continue; if (attacked.Name == "Guard1")//SnowBanshee continue; if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { int potDifference = attacker.BattlePower - attacked.BattlePower; int rate = spell.Percent + potDifference; // uint dmg = (uint)((attacked.Hitpoints * ((10))) / 100); if (attacked.Statistics.Detoxication > 0 && attacked.Statistics.Detoxication < 100) rate = (int)((rate * attacked.Statistics.Detoxication) / 100); if (attacked.Statistics.Detoxication >= 100) rate = 0; if (ServerBase.Kernel.Rate(rate)) { attacked.ToxicFogStamp = Time32.Now; attacked.ToxicFogLeft = 20; attacked.ToxicFogPercent = spell.PowerPercent; suse.Targets.Add(attacked.UID, 1); } else { suse.Targets.Add(attacked.UID, 0); suse.Targets[attacked.UID].Hit = false; } if (attacked.Hitpoints <= 1) { //client.Entity.Poison = null; suse.Targets.Add(attacked.UID, 0); suse.Targets[attacked.UID].Hit = false; //attacked.Update(true, false, true, Game.Enums.Poison); } } } } } } else { attacker.AttackPacket = null; } attacker.Owner.SendScreen(suse, true); } break; } case 6000: { if (CanUseSpell(spell, attacker.Owner)) { ushort Xx, Yx; if (attacked != null) { Xx = attacked.X; Yx = attacked.Y; } else { Xx = attackedsob.X; Yx = attackedsob.Y; } if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, Xx, Yx) <= spell.Range) { if (attackedsob == null) if (attacked.ContainsFlag(Network.GamePackets.Update.Flags.Fly)) return; if (attacked.ContainsFlag(Network.GamePackets.Update.Flags.Fly)) return; if (attacker.ContainsFlag(Network.GamePackets.Update.Flags.Fly)) return; PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; bool send = false; if (attackedsob == null) { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell); ReceiveAttack(attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID, damage); send = true; } } else { if (CanAttack(attacker, attackedsob, spell)) { uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob); damage = (uint)(damage * spell.PowerPercent); ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID, damage); send = true; } } if (send) attacker.Owner.SendScreen(suse, true); } else { attacker.AttackPacket = null; } } break; } case 6002: { if (attackedsob != null) return; if (attacked.EntityFlag == EntityFlag.Monster) return; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Distance) { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); int potDifference = attacker.BattlePower - attacked.BattlePower; int rate = spell.Percent + potDifference; SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (CanAttack(attacker, attacked, spell, false)) { suse.Targets.Add(attacked.UID, 0); if (ServerBase.Kernel.Rate(rate)) { attacked.NoDrugsStamp = Time32.Now; attacked.NoDrugsTime = (short)spell.Duration; if (attacked.EntityFlag == EntityFlag.Player) { attacked.Owner.Send(ServerBase.Constants.NoDrugs(spell.Duration)); } } else { suse.Targets[attacked.UID].Hit = false; } attacked.Owner.SendScreen(suse, true); } } } break; } case 6004: { if (attackedsob != null) return; if (attacked.EntityFlag == EntityFlag.Monster) return; if (!attacked.ContainsFlag(Update.Flags.Fly)) return; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Distance) { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); int potDifference = attacker.BattlePower - attacked.BattlePower; int rate = spell.Percent + potDifference; SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (CanAttack(attacker, attacked, spell, false)) { uint dmg = Calculate.Percent(attacked, 0.1F); suse.Targets.Add(attacked.UID, dmg); if (ServerBase.Kernel.Rate(rate)) { attacked.Hitpoints -= dmg; attacked.RemoveFlag(Update.Flags.Fly); } else { suse.Targets[attacked.UID].Hit = false; } attacked.Owner.SendScreen(suse, true); } } } break; } #endregion #region Riding case 7001: { if (!attacker.Owner.Equipment.Free(12)) { SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (attacker.ContainsFlag(Update.Flags.Ride)) { attacker.RemoveFlag(Update.Flags.Ride); } else { if (attacker.Owner.Map.ID == 1036 && attacker.Owner.Equipment.TryGetItem((byte)12).Plus < 6) break; if (attacker.Stamina >= 100 && (attacker.Owner.QualifierGroup == null || attacker.Owner.QualifierGroup != null && !attacker.Owner.QualifierGroup.Inside)) { attacker.AddFlag(Update.Flags.Ride); attacker.Stamina -= 100; Network.GamePackets.Vigor vigor = new Network.GamePackets.Vigor(true); vigor.VigorValue = attacker.Owner.Entity.MaxVigor; vigor.Send(attacker.Owner); } } suse.Targets.Add(attacker.UID, 0); attacker.Owner.SendScreen(suse, true); } break; } case 7002: {//Spook if (attacked.ContainsFlag(Update.Flags.Ride) && attacker.ContainsFlag(Update.Flags.Ride)) { Interfaces.IConquerItem attackedSteed = null, attackerSteed = null; if ((attackedSteed = attacked.Owner.Equipment.TryGetItem(ConquerItem.Steed)) != null) { if ((attackerSteed = attacker.Owner.Equipment.TryGetItem(ConquerItem.Steed)) != null) { SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; suse.Targets.Add(attacked.UID, 0); if (attackedSteed.Plus < attackerSteed.Plus) attacked.RemoveFlag(Update.Flags.Ride); else if (attackedSteed.Plus == attackerSteed.Plus && attackedSteed.PlusProgress <= attackerSteed.PlusProgress) attacked.RemoveFlag(Update.Flags.Ride); else suse.Targets[attacked.UID].Hit = false; attacker.Owner.SendScreen(suse, true); } } } break; } case 7003: {//WarCry SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; Interfaces.IConquerItem attackedSteed = null, attackerSteed = null; foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects) { if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Player && _obj.UID != attacker.UID) { attacked = _obj as Entity; if ((attackedSteed = attacked.Owner.Equipment.TryGetItem(ConquerItem.Steed)) != null) { if ((attackerSteed = attacker.Owner.Equipment.TryGetItem(ConquerItem.Steed)) != null) { if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= attackedSteed.Plus) { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { suse.Targets.Add(attacked.UID, 0); if (attackedSteed.Plus < attackerSteed.Plus) attacked.RemoveFlag(Update.Flags.Ride); else if (attackedSteed.Plus == attackerSteed.Plus && attackedSteed.PlusProgress <= attackerSteed.PlusProgress) attacked.RemoveFlag(Update.Flags.Ride); else suse.Targets[attacked.UID].Hit = false; } } } } } } attacker.Owner.SendScreen(suse, true); break; } #endregion #region Dash case 1051: { if (attacked != null) { if (!attacked.Dead) { var direction = ServerBase.Kernel.GetAngle(attacker.X, attacker.Y, attacked.X, attacked.Y); if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { uint damage = Calculate.Melee(attacker, attacked); attack = new Attack(true); attack.AttackType = Attack.Dash; attack.X = attacked.X; attack.Y = attacked.Y; attack.Attacker = attacker.UID; attack.Attacked = attacked.UID; attack.Damage = damage; attack.ToArray()[27] = (byte)direction; attacked.Move(direction); attacker.Move(direction); ReceiveAttack(attacker, attacked, attack, damage, spell); attacker.Owner.SendScreen(attack, true); } } } break; } #endregion #region RapidFire case 8000: { if (attackedsob != null) { if (CanUseSpell(spell, attacker.Owner)) { if (CanAttack(attacker, attackedsob, spell)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = attackedsob.X; suse.Y = attackedsob.Y; uint damage = Calculate.Ranged(attacker, attackedsob); damage = (uint)(damage * spell.PowerPercent); suse.Targets.Add(attackedsob.UID, damage); ReceiveAttack(attacker, attackedsob, attack, damage, spell); attacker.Owner.SendScreen(suse, true); } } } else { if (!attacked.Dead) { if (CanUseSpell(spell, attacker.Owner)) { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = attacked.X; suse.Y = attacked.Y; uint damage = Calculate.Ranged(attacker, attacked); damage = (uint)(damage * spell.PowerPercent); suse.Targets.Add(attacked.UID, damage); ReceiveAttack(attacker, attacked, attack, damage, spell); attacker.Owner.SendScreen(suse, true); } } } } break; } #endregion #region FireOfHell case 1165: { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; Sector sector = new Sector(attacker.X, attacker.Y, X, Y); sector.Arrange(spell.Sector, spell.Distance); foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects) { if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player) { attacked = _obj as Entity; if (sector.Inside(attacked.X, attacked.Y)) { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { uint damage = Game.Attacking.Calculate.Magic(attacker, attacked, spell); ReceiveAttack(attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID, damage); } } } else if (_obj.MapObjType == MapObjectType.SobNpc) { attackedsob = _obj as SobNpcSpawn; if (sector.Inside(attackedsob.X, attackedsob.Y)) { if (CanAttack(attacker, attackedsob, spell)) { uint damage = Game.Attacking.Calculate.Magic(attacker, attackedsob, spell); ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID, damage); } } } } attacker.Owner.SendScreen(suse, true); } break; } #endregion #region Scatter case 8001: { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; Sector sector = new Sector(attacker.X, attacker.Y, X, Y); sector.Arrange(spell.Sector, spell.Distance); foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects) { if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player) { attacked = _obj as Entity; if (sector.Inside(attacked.X, attacked.Y)) { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { uint damage = Game.Attacking.Calculate.Ranged(attacker, attacked, spell); ReceiveAttack(attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID, damage); } } } else if (_obj.MapObjType == MapObjectType.SobNpc) { attackedsob = _obj as SobNpcSpawn; if (sector.Inside(attackedsob.X, attackedsob.Y)) { if (CanAttack(attacker, attackedsob, spell)) { uint damage = Game.Attacking.Calculate.Ranged(attacker, attackedsob); if (damage == 0) damage = 1; damage = Game.Attacking.Calculate.Percent((int)damage, spell.PowerPercent); ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID, damage); } } } } attacker.Owner.SendScreen(suse, true); } break; } #endregion #region Intensify case 9000: { attacker.IntensifyStamp = Time32.Now; attacker.OnIntensify = true; SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; suse.Targets.Add(attacker.UID, 0); suse.Send(attacker.Owner); break; } #endregion #region Pirate Spells #region Xp Skills case 11050: //Cannon Barrage { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; attacker.CannonBarageStamp = Time32.Now; attacker.Cannonbarage = 30; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= spell.Range) { for (int c = 0; c < attacker.Owner.Screen.Objects.Count(); c++) { //For a multi threaded application, while we go through the collection //the collection might change. We will make sure that we wont go off //the limits with a check. if (c >= attacker.Owner.Screen.Objects.Count()) break; Interfaces.IMapObject _obj = attacker.Owner.Screen.Objects[c]; if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player) { attacked = _obj as Entity; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Range) { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { uint damage = Game.Attacking.Calculate.Melee(attacker, attacked); if (spell.Power > 0) damage = Game.Attacking.Calculate.Magic(attacker, attacked, spell); if (spell.ID == 8030) damage = Game.Attacking.Calculate.Ranged(attacker, attacked); damage = ReceiveAttack(suse, attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID, damage); //attacked.AddFlag(Update.Effects.CannonBarrage); } } } else if (_obj.MapObjType == MapObjectType.SobNpc) { attackedsob = _obj as SobNpcSpawn; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= spell.Range) { if (CanAttack(attacker, attackedsob, spell)) { uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob); if (spell.Power > 0) damage = Game.Attacking.Calculate.Magic(attacker, attackedsob, spell); if (spell.ID == 8030) damage = Game.Attacking.Calculate.Ranged(attacker, attackedsob); ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID, damage); //attacked.AddFlag(Update.Effects.CannonBarrage); } } } } } else { attacker.AttackPacket = null; } attacker.Owner.SendScreen(suse, true); } break; } case 11060: // BlackPearl Rage { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; attacker.BlackBeardStamp = Time32.Now; attacker.Blackbeard = 30; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= spell.Range) { for (int c = 0; c < attacker.Owner.Screen.Objects.Count(); c++) { //For a multi threaded application, while we go through the collection //the collection might change. We will make sure that we wont go off //the limits with a check. if (c >= attacker.Owner.Screen.Objects.Count()) break; Interfaces.IMapObject _obj = attacker.Owner.Screen.Objects[c]; if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player) { attacked = _obj as Entity; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Range) { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { uint damage = Game.Attacking.Calculate.Melee(attacker, attacked); if (spell.Power > 0) damage = Game.Attacking.Calculate.Magic(attacker, attacked, spell); if (spell.ID == 8030) damage = Game.Attacking.Calculate.Ranged(attacker, attacked); damage = ReceiveAttack(suse, attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID, damage); attacked.AddFlag(Update.Effects.EagleEye); } } } else if (_obj.MapObjType == MapObjectType.SobNpc) { attackedsob = _obj as SobNpcSpawn; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= spell.Range) { if (CanAttack(attacker, attackedsob, spell)) { uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob); if (spell.Power > 0) damage = Game.Attacking.Calculate.Magic(attacker, attackedsob, spell); if (spell.ID == 8030) damage = Game.Attacking.Calculate.Ranged(attacker, attackedsob); ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID, damage); attacked.AddFlag(Update.Effects.EagleEye); } } } } } else { attacker.AttackPacket = null; } attacker.Owner.SendScreen(suse, true); } break; } #endregion #region Auto On Skills case 11120: //Adrenaline Rush case 11130: //BlackSpot { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= attacker.AttackRange + 1) { if (attackedsob != null) { if (CanAttack(attacker, attackedsob, spell)) { PrepareSpell(spell, attacker.Owner); suse.MakeConst(); for (uint c = 0; c < 3; c++) { uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob); if (damage > attackedsob.Hitpoints) damage = attackedsob.Hitpoints; ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID + c, damage); } } } else { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { PrepareSpell(spell, attacker.Owner); suse.MakeConst(); for (uint c = 0; c < 3; c++) { uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell); if (damage > attacked.Hitpoints) damage = attacked.Hitpoints; damage = ReceiveAttack(suse, attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID + c, damage); } } } } else { attacker.AttackPacket = null; } attacker.Owner.SendScreen(suse, true); } break; } #endregion // Doesnt Work // Doest Work #region WeaponSkills case 11140: //windstorm { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= attacker.AttackRange + 1) { if (attackedsob != null) { if (CanAttack(attacker, attackedsob, spell)) { PrepareSpell(spell, attacker.Owner); suse.MakeConst(); for (uint c = 0; c < 3; c++) { uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob); if (damage > attackedsob.Hitpoints) damage = attackedsob.Hitpoints; ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID + c, damage); } } } else { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { PrepareSpell(spell, attacker.Owner); suse.MakeConst(); for (uint c = 0; c < 3; c++) { uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell); if (damage > attacked.Hitpoints) damage = attacked.Hitpoints; damage = ReceiveAttack(suse, attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID + c, damage); } } } } else { attacker.AttackPacket = null; } attacker.Owner.SendScreen(suse, true); } break; } #endregion // Doesnt Work #region Linear Skills /*case 11110: //Blade Tempest { if (Time32.Now < attacker.WhilrwindKick.AddMilliseconds(1500)) return; attacker.WhilrwindKick = Time32.Now; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= spell.Range)//<= 3 { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; //suse.X = (ushort)ServerBase.Kernel.Random.Next(3, 10); suse.X = X; //suse.Y = 0; suse.Y = Y; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= spell.Range) { for (int c = 0; c < attacker.Owner.Screen.Objects.Count(); c++) { //For a multi threaded application, while we go through the collection //the collection might change. We will make sure that we wont go off //the limits with a check. if (c >= attacker.Owner.Screen.Objects.Count()) break; Interfaces.IMapObject _obj = attacker.Owner.Screen.Objects[c]; if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player) { attacked = _obj as Entity; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Range) { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Ranged)) { uint damage = Game.Attacking.Calculate.Melee(attacker, attacked); damage = ReceiveAttack(suse, attacker, attacked, attack, damage, spell); attacked.Stunned = true; attacked.StunStamp = Time32.Now; suse.Targets.Add(attacked.UID, damage); } } } } } else { attacker.AttackPacket = null; } attacker.Owner.SendScreen(suse, true); } } break; }*/ #endregion #region Single damage Skill case 11030: // Eagle Eye if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; suse.Targets.Add(attacker.UID, spell.Power); if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= spell.Distance) { if (attackedsob != null) { if (CanAttack(attacker, attackedsob, spell)) { PrepareSpell(spell, attacker.Owner); uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob); damage = (uint)(damage * spell.PowerPercent * 30); ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID, damage); } } else { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { PrepareSpell(spell, attacker.Owner); uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell); damage = ReceiveAttack(suse, attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID, damage); attacked.AddFlag(Update.Effects.EagleEye); } } } attacker.Owner.SendScreen(suse, true); } break; #endregion #region Region Damage Skills case 11100: //kracken revenge { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= spell.Range) { for (int c = 0; c < attacker.Owner.Screen.Objects.Count(); c++) { //For a multi threaded application, while we go through the collection //the collection might change. We will make sure that we wont go off //the limits with a check. if (c >= attacker.Owner.Screen.Objects.Count()) break; Interfaces.IMapObject _obj = attacker.Owner.Screen.Objects[c]; if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player) { attacked = _obj as Entity; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Range) { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { uint damage = Game.Attacking.Calculate.Melee(attacker, attacked); if (spell.Power > 0) damage = Game.Attacking.Calculate.Magic(attacker, attacked, spell); if (spell.ID == 8030) damage = Game.Attacking.Calculate.Ranged(attacker, attacked); damage = ReceiveAttack(suse, attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID, damage); attacked.AddFlag(Update.Effects.KrackenRevenge); } } } else if (_obj.MapObjType == MapObjectType.SobNpc) { attackedsob = _obj as SobNpcSpawn; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= spell.Range) { if (CanAttack(attacker, attackedsob, spell)) { uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob); if (spell.Power > 0) damage = Game.Attacking.Calculate.Magic(attacker, attackedsob, spell); if (spell.ID == 8030) damage = Game.Attacking.Calculate.Ranged(attacker, attackedsob); ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID, damage); attacked.AddFlag(Update.Effects.KrackenRevenge); } } } } } else { attacker.AttackPacket = null; } attacker.Owner.SendScreen(suse, true); } break; } /*case 11040: // Scurvey Bomb { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= spell.Range) { for (int c = 0; c < attacker.Owner.Screen.Objects.Count(); c++) { //For a multi threaded application, while we go through the collection //the collection might change. We will make sure that we wont go off //the limits with a check. if (c >= attacker.Owner.Screen.Objects.Count()) break; Interfaces.IMapObject _obj = attacker.Owner.Screen.Objects[c]; if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player) { attacked = _obj as Entity; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Range) { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { uint damage = Game.Attacking.Calculate.Melee(attacker, attacked); if (spell.Power > 0) damage = Game.Attacking.Calculate.Magic(attacker, attacked, spell); if (spell.ID == 8030) damage = Game.Attacking.Calculate.Ranged(attacker, attacked); damage = ReceiveAttack(suse, attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID, damage); attacked.Update(_String.Effect, "pro_gre_assflo", true); } } } else if (_obj.MapObjType == MapObjectType.SobNpc) { attackedsob = _obj as SobNpcSpawn; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= spell.Range) { if (CanAttack(attacker, attackedsob, spell)) { uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob); if (spell.Power > 0) damage = Game.Attacking.Calculate.Magic(attacker, attackedsob, spell); if (spell.ID == 8030) damage = Game.Attacking.Calculate.Ranged(attacker, attackedsob); ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID, damage); //attacked.Update(_String.Effect, "pro_gre_assflo", true); } } } } } else { attacker.AttackPacket = null; } attacker.Owner.SendScreen(suse, true); } break; }*/ /* case 11070: // Gale Bomb { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= spell.Range) { for (int c = 0; c < attacker.Owner.Screen.Objects.Count(); c++) { //For a multi threaded application, while we go through the collection //the collection might change. We will make sure that we wont go off //the limits with a check. if (c >= attacker.Owner.Screen.Objects.Count()) break; Interfaces.IMapObject _obj = attacker.Owner.Screen.Objects[c]; if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player) { attacked = _obj as Entity; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Range) { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { uint damage = Game.Attacking.Calculate.Melee(attacker, attacked); if (spell.Power > 0) damage = Game.Attacking.Calculate.Magic(attacker, attacked, spell); if (spell.ID == 8030) damage = Game.Attacking.Calculate.Ranged(attacker, attacked); damage = ReceiveAttack(suse, attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID, damage); attacked.Update(_String.Effect, "pro_tir_assflo", true); } } } else if (_obj.MapObjType == MapObjectType.SobNpc) { attackedsob = _obj as SobNpcSpawn; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= spell.Range) { if (CanAttack(attacker, attackedsob, spell)) { uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob); if (spell.Power > 0) damage = Game.Attacking.Calculate.Magic(attacker, attackedsob, spell); if (spell.ID == 8030) damage = Game.Attacking.Calculate.Ranged(attacker, attackedsob); ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID, damage); attacked.Update(_String.Effect, "pro_tir_assflo", true); } } } } } else { attacker.AttackPacket = null; } attacker.Owner.SendScreen(suse, true); } break; }*/ #endregion #endregion #region Trasnformations case 1270: case 1280: case 1350: case 1360: case 3321: { if (CanUseSpell(spell, attacker.Owner)) { if (attacker.MapID == 1036) return; bool wasTransformated = attacker.Transformed; PrepareSpell(spell, attacker.Owner); #region Atributes switch (spell.ID) { case 1350: switch (spell.Level) { case 0: { attacker.TransformationMaxAttack = 182; attacker.TransformationMinAttack = 122; attacker.TransformationDefence = 1300; attacker.TransformationMagicDefence = 94; attacker.TransformationDodge = 35; attacker.TransformationTime = 39; attacker.TransformationID = 207; break; } case 1: { attacker.TransformationMaxAttack = 200; attacker.TransformationMinAttack = 134; attacker.TransformationDefence = 1400; attacker.TransformationMagicDefence = 96; attacker.TransformationDodge = 40; attacker.TransformationTime = 49; attacker.TransformationID = 207; break; } case 2: { attacker.TransformationMaxAttack = 240; attacker.TransformationMinAttack = 160; attacker.TransformationDefence = 1500; attacker.TransformationMagicDefence = 97; attacker.TransformationDodge = 45; attacker.TransformationTime = 59; attacker.TransformationID = 207; break; } case 3: { attacker.TransformationMaxAttack = 258; attacker.TransformationMinAttack = 172; attacker.TransformationDefence = 1600; attacker.TransformationMagicDefence = 98; attacker.TransformationDodge = 50; attacker.TransformationTime = 69; attacker.TransformationID = 267; break; } case 4: { attacker.TransformationMaxAttack = 300; attacker.TransformationMinAttack = 200; attacker.TransformationDefence = 1900; attacker.TransformationMagicDefence = 99; attacker.TransformationDodge = 55; attacker.TransformationTime = 79; attacker.TransformationID = 267; break; } } break; case 1270: switch (spell.Level) { case 0: { attacker.TransformationMaxAttack = 282; attacker.TransformationMinAttack = 179; attacker.TransformationDefence = 73; attacker.TransformationMagicDefence = 34; attacker.TransformationDodge = 9; attacker.TransformationTime = 34; attacker.TransformationID = 214; break; } case 1: { attacker.TransformationMaxAttack = 395; attacker.TransformationMinAttack = 245; attacker.TransformationDefence = 126; attacker.TransformationMagicDefence = 45; attacker.TransformationDodge = 12; attacker.TransformationTime = 39; attacker.TransformationID = 214; break; } case 2: { attacker.TransformationMaxAttack = 616; attacker.TransformationMinAttack = 367; attacker.TransformationDefence = 180; attacker.TransformationMagicDefence = 53; attacker.TransformationDodge = 15; attacker.TransformationTime = 44; attacker.TransformationID = 214; break; } case 3: { attacker.TransformationMaxAttack = 724; attacker.TransformationMinAttack = 429; attacker.TransformationDefence = 247; attacker.TransformationMagicDefence = 53; attacker.TransformationDodge = 15; attacker.TransformationTime = 49; attacker.TransformationID = 214; break; } case 4: { attacker.TransformationMaxAttack = 1231; attacker.TransformationMinAttack = 704; attacker.TransformationDefence = 499; attacker.TransformationMagicDefence = 50; attacker.TransformationDodge = 20; attacker.TransformationTime = 54; attacker.TransformationID = 274; break; } case 5: { attacker.TransformationMaxAttack = 1573; attacker.TransformationMinAttack = 941; attacker.TransformationDefence = 601; attacker.TransformationMagicDefence = 53; attacker.TransformationDodge = 25; attacker.TransformationTime = 59; attacker.TransformationID = 274; break; } case 6: { attacker.TransformationMaxAttack = 1991; attacker.TransformationMinAttack = 1107; attacker.TransformationDefence = 1029; attacker.TransformationMagicDefence = 55; attacker.TransformationDodge = 30; attacker.TransformationTime = 64; attacker.TransformationID = 274; break; } case 7: { attacker.TransformationMaxAttack = 2226; attacker.TransformationMinAttack = 1235; attacker.TransformationDefence = 1029; attacker.TransformationMagicDefence = 55; attacker.TransformationDodge = 35; attacker.TransformationTime = 69; attacker.TransformationID = 274; break; } } break; case 1360: switch (spell.Level) { case 0: { attacker.TransformationMaxAttack = 1215; attacker.TransformationMinAttack = 610; attacker.TransformationDefence = 100; attacker.TransformationMagicDefence = 96; attacker.TransformationDodge = 30; attacker.TransformationTime = 59; attacker.TransformationID = 217; break; } case 1: { attacker.TransformationMaxAttack = 1310; attacker.TransformationMinAttack = 650; attacker.TransformationDefence = 400; attacker.TransformationMagicDefence = 97; attacker.TransformationDodge = 30; attacker.TransformationTime = 79; attacker.TransformationID = 217; break; } case 2: { attacker.TransformationMaxAttack = 1420; attacker.TransformationMinAttack = 710; attacker.TransformationDefence = 650; attacker.TransformationMagicDefence = 98; attacker.TransformationDodge = 30; attacker.TransformationTime = 89; attacker.TransformationID = 217; break; } case 3: { attacker.TransformationMaxAttack = 1555; attacker.TransformationMinAttack = 780; attacker.TransformationDefence = 720; attacker.TransformationMagicDefence = 98; attacker.TransformationDodge = 30; attacker.TransformationTime = 99; attacker.TransformationID = 277; break; } case 4: { attacker.TransformationMaxAttack = 1660; attacker.TransformationMinAttack = 840; attacker.TransformationDefence = 1200; attacker.TransformationMagicDefence = 99; attacker.TransformationDodge = 30; attacker.TransformationTime = 109; attacker.TransformationID = 277; break; } } break; case 1280: switch (spell.Level) { case 0: { attacker.TransformationMaxAttack = 930; attacker.TransformationMinAttack = 656; attacker.TransformationDefence = 290; attacker.TransformationMagicDefence = 45; attacker.TransformationDodge = 40; attacker.TransformationTime = 29; attacker.TransformationID = 213; break; } case 1: { attacker.TransformationMaxAttack = 1062; attacker.TransformationMinAttack = 750; attacker.TransformationDefence = 320; attacker.TransformationMagicDefence = 46; attacker.TransformationDodge = 40; attacker.TransformationTime = 34; attacker.TransformationID = 213; break; } case 2: { attacker.TransformationMaxAttack = 1292; attacker.TransformationMinAttack = 910; attacker.TransformationDefence = 510; attacker.TransformationMagicDefence = 50; attacker.TransformationDodge = 40; attacker.TransformationTime = 39; attacker.TransformationID = 213; break; } case 3: { attacker.TransformationMaxAttack = 1428; attacker.TransformationMinAttack = 1000; attacker.TransformationDefence = 600; attacker.TransformationMagicDefence = 53; attacker.TransformationDodge = 40; attacker.TransformationTime = 44; attacker.TransformationID = 213; break; } case 4: { attacker.TransformationMaxAttack = 1570; attacker.TransformationMinAttack = 1100; attacker.TransformationDefence = 700; attacker.TransformationMagicDefence = 55; attacker.TransformationDodge = 40; attacker.TransformationTime = 49; attacker.TransformationID = 213; break; } case 5: { attacker.TransformationMaxAttack = 1700; attacker.TransformationMinAttack = 1200; attacker.TransformationDefence = 880; attacker.TransformationMagicDefence = 57; attacker.TransformationDodge = 40; attacker.TransformationTime = 54; attacker.TransformationID = 273; break; } case 6: { attacker.TransformationMaxAttack = 1900; attacker.TransformationMinAttack = 1300; attacker.TransformationDefence = 1540; attacker.TransformationMagicDefence = 59; attacker.TransformationDodge = 40; attacker.TransformationTime = 59; attacker.TransformationID = 273; break; } case 7: { attacker.TransformationMaxAttack = 2100; attacker.TransformationMinAttack = 1500; attacker.TransformationDefence = 1880; attacker.TransformationMagicDefence = 61; attacker.TransformationDodge = 40; attacker.TransformationTime = 59; attacker.TransformationID = 273; break; } case 8: { attacker.TransformationMaxAttack = 2300; attacker.TransformationMinAttack = 1600; attacker.TransformationDefence = 1970; attacker.TransformationMagicDefence = 63; attacker.TransformationDodge = 40; attacker.TransformationTime = 59; attacker.TransformationID = 273; break; } } break; case 3321: { attacker.TransformationMaxAttack = 2000000; attacker.TransformationMinAttack = 2000000; attacker.TransformationDefence = 65355; attacker.TransformationMagicDefence = 65355; attacker.TransformationDodge = 35; attacker.TransformationTime = 65355; attacker.TransformationID = 223; break; } } #endregion SpellUse spellUse = new SpellUse(true); spellUse.Attacker = attacker.UID; spellUse.SpellID = spell.ID; spellUse.SpellLevel = spell.Level; spellUse.X = X; spellUse.Y = Y; spellUse.Targets.Add(attacker.UID, (uint)0); attacker.Owner.SendScreen(spellUse, true); attacker.TransformationStamp = Time32.Now; attacker.TransformationMaxHP = 3000; if (spell.ID == 1270) attacker.TransformationMaxHP = 50000; attacker.TransformationAttackRange = 3; if (spell.ID == 1360) attacker.TransformationAttackRange = 10; if (!wasTransformated) { double maxHP = attacker.MaxHitpoints; double HP = attacker.Hitpoints; double point = HP / maxHP; attacker.Hitpoints = (uint)(attacker.TransformationMaxHP * point); } attacker.Update(Update.MaxHitpoints, attacker.TransformationMaxHP, false); } break; } #endregion #region Bless case 9876: { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); attacker.AddFlag(Update.Flags.CastPray); SpellUse spellUse = new SpellUse(true); spellUse.Attacker = attacker.UID; spellUse.SpellID = spell.ID; spellUse.SpellLevel = spell.Level; spellUse.X = X; spellUse.Y = Y; spellUse.Targets.Add(attacker.UID, 0); attacker.Owner.SendScreen(spellUse, true); } break; } #endregion #region Companions case 4000: case 4010: case 4020: case 4050: case 4060: case 4070: { if (CanUseSpell(spell, attacker.Owner)) { if (attacker.Owner.Companion != null) { if (attacker.Owner.Companion.MonsterInfo != null) { attacker.Owner.Map.RemoveEntity(attacker.Owner.Companion); Data data = new Data(true); data.UID = attacker.Owner.Companion.UID; data.ID = Data.RemoveEntity; attacker.Owner.Companion.MonsterInfo.SendScreen(data); attacker.Owner.Companion = null; } } PrepareSpell(spell, attacker.Owner); SpellUse spellUse = new SpellUse(true); spellUse.Attacker = attacker.UID; spellUse.SpellID = spell.ID; spellUse.SpellLevel = spell.Level; spellUse.X = X; spellUse.Y = Y; spellUse.Targets.Add(attacker.UID, 0); attacker.Owner.SendScreen(spellUse, true); attacker.Owner.Companion = new Entity(EntityFlag.Monster, true); attacker.Owner.Companion.MonsterInfo = new Conquer_Online_Server.Database.MonsterInformation(); Database.MonsterInformation mt = Database.MonsterInformation.MonsterInfos[spell.Power]; attacker.Owner.Companion.Owner = attacker.Owner; attacker.Owner.Companion.MapObjType = MapObjectType.Monster; attacker.Owner.Companion.MonsterInfo = mt.Copy(); attacker.Owner.Companion.MonsterInfo.Owner = attacker.Owner.Companion; attacker.Owner.Companion.Name = mt.Name; attacker.Owner.Companion.MinAttack = mt.MinAttack; attacker.Owner.Companion.MaxAttack = attacker.Owner.Companion.MagicAttack = mt.MaxAttack; attacker.Owner.Companion.Hitpoints = attacker.Owner.Companion.MaxHitpoints = mt.Hitpoints; attacker.Owner.Companion.Body = mt.Mesh; attacker.Owner.Companion.Level = mt.Level; attacker.Owner.Companion.UID = (uint)(attacker.UID - 200000); attacker.Owner.Companion.MapID = attacker.Owner.Map.ID; attacker.Owner.Companion.SendUpdates = true; attacker.Owner.Companion.X = attacker.X; attacker.Owner.Companion.Y = attacker.Y; attacker.Owner.Map.AddEntity(attacker.Owner.Companion); attacker.Owner.SendScreenSpawn(attacker.Owner.Companion, true); } break; } #endregion #region MonkSpells //TyrantAura case 10395: { if (CanUseSpell(spell, attacker.Owner)) { SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.SpellLevel = attacker.Owner.Spells[SpellID].Level; suse.X = X; suse.Y = Y; if (attacker.Owner.Team != null) { PrepareSpell(spell, attacker.Owner); foreach (Client.GameState teammate in attacker.Owner.Team.Teammates) { if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, teammate.Entity.X, teammate.Entity.Y) <= spell.Distance) PrepareSpell(spell, attacker.Owner); { if (teammate.Entity.ContainsFlag2(Update.Flags2.FendAura))//FendAura { teammate.Entity.RemoveFlag2(Update.Flags2.FendAura);//FendAura teammate.Entity.Statistics.Immunity -= 200; } if (teammate.Entity.ContainsFlag2(Update.Flags2.MetalAura))//MetalAura { teammate.Entity.RemoveFlag2(Update.Flags2.MetalAura);//MetalAura teammate.Entity.Statistics.MetalResistance -= 30; } if (teammate.Entity.ContainsFlag2(Update.Flags2.WoodAura))//WoodAura { teammate.Entity.RemoveFlag2(Update.Flags2.WoodAura);//WoodAura teammate.Entity.Statistics.WoodResistance -= 30; } if (teammate.Entity.ContainsFlag2(Update.Flags2.WaterAura))//WaterAura { teammate.Entity.RemoveFlag2(Update.Flags2.WaterAura);//WaterAura teammate.Entity.Statistics.WaterResistance -= 30; } if (teammate.Entity.ContainsFlag2(Update.Flags2.FireAura))//FireAura { teammate.Entity.RemoveFlag2(Update.Flags2.FireAura);//FireAura teammate.Entity.Statistics.FireResistance -= 30; } if (teammate.Entity.ContainsFlag2(Update.Flags2.EarthAura))//EarthAura { teammate.Entity.RemoveFlag2(Update.Flags2.EarthAura);//EarthAura teammate.Entity.Statistics.EarthResistance -= 30; } if (teammate.Entity.ContainsFlag2(Update.Flags2.TyrantAura))//TyrantAura { teammate.Entity.RemoveFlag2(Update.Flags2.TyrantAura);//TyrantAura teammate.Entity.Statistics.CriticalStrike -= 200; } teammate.Entity.AddFlag2(Update.Flags2.TyrantAura); teammate.Entity.Statistics.CriticalStrike += 200; suse.Targets.Add(teammate.Entity.UID, 1); teammate.Entity.TyrantAura = Time32.Now; teammate.Entity.TyrantAuras = (short)spell.Duration; } } if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.SendScreen(suse, true); else attacked.MonsterInfo.SendScreen(suse); } else { if (attacked == null) return; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Distance) { PrepareSpell(spell, attacker.Owner); if (attacker.ContainsFlag2(Update.Flags2.FendAura))//FendAura { attacker.RemoveFlag2(Update.Flags2.FendAura);//FendAura attacker.Statistics.Immunity -= 200; } if (attacker.ContainsFlag2(Update.Flags2.MetalAura))//MetalAura { attacker.RemoveFlag2(Update.Flags2.MetalAura);//MetalAura attacker.Statistics.MetalResistance -= 30; } if (attacker.ContainsFlag2(Update.Flags2.WoodAura))//WoodAura { attacker.Statistics.WoodResistance -= 30; attacker.RemoveFlag2(Update.Flags2.WoodAura);//WoodAura } if (attacker.ContainsFlag2(Update.Flags2.WaterAura))//WaterAura { attacker.Statistics.WaterResistance -= 30; attacker.RemoveFlag2(Update.Flags2.WaterAura);//WaterAura } if (attacker.ContainsFlag2(Update.Flags2.FireAura))//FireAura { attacker.Statistics.FireResistance -= 30; attacker.RemoveFlag2(Update.Flags2.FireAura);//FireAura } if (attacker.ContainsFlag2(Update.Flags2.EarthAura))//EarthAura { attacker.Statistics.EarthResistance -= 30; attacker.RemoveFlag2(Update.Flags2.EarthAura);//EarthAura } if (attacked.ContainsFlag2(Update.Flags2.TyrantAura))//TyrantAura { attacked.RemoveFlag2(Update.Flags2.TyrantAura);//TyrantAura attacked.Statistics.CriticalStrike -= 200; } attacker.AddFlag2(Update.Flags2.TyrantAura); attacker.Statistics.CriticalStrike += 200; attacker.TyrantAura = Time32.Now; attacker.TyrantAuras = (short)spell.Duration; suse.Targets.Add(attacked.UID, 1); if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.SendScreen(suse, true); else attacked.MonsterInfo.SendScreen(suse); } else { attacker.AttackPacket = null; } } } attacker.AttackPacket = null; break; } //FendAura case 10410: { if (CanUseSpell(spell, attacker.Owner)) { SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.SpellLevel = attacker.Owner.Spells[SpellID].Level; suse.X = X; suse.Y = Y; if (attacker.Owner.Team != null) { PrepareSpell(spell, attacker.Owner); foreach (Client.GameState teammate in attacker.Owner.Team.Teammates) { if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, teammate.Entity.X, teammate.Entity.Y) <= spell.Distance) PrepareSpell(spell, attacker.Owner); { if (teammate.Entity.ContainsFlag2(Update.Flags2.TyrantAura))//FendAura { teammate.Entity.RemoveFlag2(Update.Flags2.TyrantAura);//FendAura teammate.Entity.Statistics.CriticalStrike -= 200; } if (teammate.Entity.ContainsFlag2(Update.Flags2.MetalAura))//MetalAura { teammate.Entity.RemoveFlag2(Update.Flags2.MetalAura);//MetalAura teammate.Entity.Statistics.MetalResistance -= 30; } if (teammate.Entity.ContainsFlag2(Update.Flags2.WoodAura))//WoodAura { teammate.Entity.RemoveFlag2(Update.Flags2.WoodAura);//WoodAura teammate.Entity.Statistics.WoodResistance -= 30; } if (teammate.Entity.ContainsFlag2(Update.Flags2.WaterAura))//WaterAura { teammate.Entity.RemoveFlag2(Update.Flags2.WaterAura);//WaterAura teammate.Entity.Statistics.WaterResistance -= 30; } if (teammate.Entity.ContainsFlag2(Update.Flags2.FireAura))//FireAura { teammate.Entity.RemoveFlag2(Update.Flags2.FireAura);//FireAura teammate.Entity.Statistics.FireResistance -= 30; } if (teammate.Entity.ContainsFlag2(Update.Flags2.EarthAura))//EarthAura { teammate.Entity.RemoveFlag2(Update.Flags2.EarthAura);//EarthAura teammate.Entity.Statistics.EarthResistance -= 30; } if (teammate.Entity.ContainsFlag2(Update.Flags2.FendAura))//TyrantAura { teammate.Entity.RemoveFlag2(Update.Flags2.FendAura);//TyrantAura teammate.Entity.Statistics.Immunity -= 200; } teammate.Entity.AddFlag2(Update.Flags2.FendAura); teammate.Entity.Statistics.Immunity += 200; suse.Targets.Add(teammate.Entity.UID, 1); teammate.Entity.TyrantAura = Time32.Now; teammate.Entity.TyrantAuras = (short)spell.Duration; } } if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.SendScreen(suse, true); else attacked.MonsterInfo.SendScreen(suse); } else { if (attacked == null) return; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Distance) { PrepareSpell(spell, attacker.Owner); if (attacked.ContainsFlag2(Update.Flags2.TyrantAura))//FendAura { attacked.RemoveFlag2(Update.Flags2.TyrantAura);//FendAura attacked.Statistics.CriticalStrike -= 200; } if (attacker.ContainsFlag2(Update.Flags2.MetalAura))//MetalAura { attacker.RemoveFlag2(Update.Flags2.MetalAura);//MetalAura attacker.Statistics.MetalResistance -= 30; } if (attacker.ContainsFlag2(Update.Flags2.WoodAura))//WoodAura { attacker.Statistics.WoodResistance -= 30; attacker.RemoveFlag2(Update.Flags2.WoodAura);//WoodAura } if (attacker.ContainsFlag2(Update.Flags2.WaterAura))//WaterAura { attacker.Statistics.WaterResistance -= 30; attacker.RemoveFlag2(Update.Flags2.WaterAura);//WaterAura } if (attacker.ContainsFlag2(Update.Flags2.FireAura))//FireAura { attacker.Statistics.FireResistance -= 30; attacker.RemoveFlag2(Update.Flags2.FireAura);//FireAura } if (attacker.ContainsFlag2(Update.Flags2.EarthAura))//EarthAura { attacker.Statistics.EarthResistance -= 30; attacker.RemoveFlag2(Update.Flags2.EarthAura);//EarthAura } if (attacker.ContainsFlag2(Update.Flags2.FendAura))//TyrantAura { attacker.RemoveFlag2(Update.Flags2.FendAura);//TyrantAura attacker.Statistics.Immunity += 200; } attacker.AddFlag2(Update.Flags2.FendAura); attacker.Statistics.Immunity += 200; attacker.TyrantAura = Time32.Now; attacker.TyrantAuras = (short)spell.Duration; suse.Targets.Add(attacked.UID, 1); if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.SendScreen(suse, true); else attacked.MonsterInfo.SendScreen(suse); } else { attacker.AttackPacket = null; } } } attacker.AttackPacket = null; break; } //ElementalAuraMetal case 10420: { if (CanUseSpell(spell, attacker.Owner)) { SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.SpellLevel = attacker.Owner.Spells[SpellID].Level; suse.X = X; suse.Y = Y; if (attacker.Owner.Team != null) { PrepareSpell(spell, attacker.Owner); foreach (Client.GameState teammate in attacker.Owner.Team.Teammates) { if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, teammate.Entity.X, teammate.Entity.Y) <= spell.Distance) PrepareSpell(spell, attacker.Owner); { if (teammate.Entity.ContainsFlag2(Update.Flags2.TyrantAura))//FendAura { teammate.Entity.RemoveFlag2(Update.Flags2.TyrantAura);//FendAura teammate.Entity.Statistics.CriticalStrike -= 200; } if (teammate.Entity.ContainsFlag2(Update.Flags2.MetalAura))//MetalAura { teammate.Entity.RemoveFlag2(Update.Flags2.MetalAura);//MetalAura teammate.Entity.Statistics.MetalResistance -= 30; } if (teammate.Entity.ContainsFlag2(Update.Flags2.WoodAura))//WoodAura { teammate.Entity.RemoveFlag2(Update.Flags2.WoodAura);//WoodAura teammate.Entity.Statistics.WoodResistance -= 30; } if (teammate.Entity.ContainsFlag2(Update.Flags2.WaterAura))//WaterAura { teammate.Entity.RemoveFlag2(Update.Flags2.WaterAura);//WaterAura teammate.Entity.Statistics.WaterResistance -= 30; } if (teammate.Entity.ContainsFlag2(Update.Flags2.FireAura))//FireAura { teammate.Entity.RemoveFlag2(Update.Flags2.FireAura);//FireAura teammate.Entity.Statistics.FireResistance -= 30; } if (teammate.Entity.ContainsFlag2(Update.Flags2.EarthAura))//EarthAura { teammate.Entity.RemoveFlag2(Update.Flags2.EarthAura);//EarthAura teammate.Entity.Statistics.EarthResistance -= 30; } if (teammate.Entity.ContainsFlag2(Update.Flags2.FendAura))//TyrantAura { teammate.Entity.RemoveFlag2(Update.Flags2.FendAura);//TyrantAura teammate.Entity.Statistics.Immunity -= 200; } teammate.Entity.AddFlag2(Update.Flags2.MetalAura); teammate.Entity.Statistics.MetalResistance += 30; suse.Targets.Add(teammate.Entity.UID, 1); teammate.Entity.TyrantAura = Time32.Now; teammate.Entity.TyrantAuras = (short)spell.Duration; } } if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.SendScreen(suse, true); else attacked.MonsterInfo.SendScreen(suse); } else { if (attacked == null) return; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Distance) { PrepareSpell(spell, attacker.Owner); if (attacker.ContainsFlag2(Update.Flags2.TyrantAura))//FendAura { attacker.RemoveFlag2(Update.Flags2.TyrantAura);//FendAura attacker.Statistics.CriticalStrike -= 200; } if (attacked.ContainsFlag2(Update.Flags2.MetalAura))//MetalAura { attacked.RemoveFlag2(Update.Flags2.MetalAura);//MetalAura attacked.Statistics.MetalResistance -= 30; } if (attacker.ContainsFlag2(Update.Flags2.WoodAura))//WoodAura { attacker.Statistics.WoodResistance -= 30; attacker.RemoveFlag2(Update.Flags2.WoodAura);//WoodAura } if (attacker.ContainsFlag2(Update.Flags2.WaterAura))//WaterAura { attacker.Statistics.WaterResistance -= 30; attacker.RemoveFlag2(Update.Flags2.WaterAura);//WaterAura } if (attacker.ContainsFlag2(Update.Flags2.FireAura))//FireAura { attacker.Statistics.FireResistance -= 30; attacker.RemoveFlag2(Update.Flags2.FireAura);//FireAura } if (attacker.ContainsFlag2(Update.Flags2.EarthAura))//EarthAura { attacker.Statistics.EarthResistance -= 30; attacker.RemoveFlag2(Update.Flags2.EarthAura);//EarthAura } if (attacker.ContainsFlag2(Update.Flags2.FendAura))//TyrantAura { attacker.RemoveFlag2(Update.Flags2.FendAura);//TyrantAura attacker.Statistics.Immunity -= 200; } attacker.AddFlag2(Update.Flags2.MetalAura); attacker.Statistics.MetalResistance += 30; attacker.TyrantAura = Time32.Now; attacker.TyrantAuras = (short)spell.Duration; suse.Targets.Add(attacked.UID, 1); if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.SendScreen(suse, true); else attacked.MonsterInfo.SendScreen(suse); } else { attacker.AttackPacket = null; } } } attacker.AttackPacket = null; break; } //ElementalAuraWood case 10421: { if (CanUseSpell(spell, attacker.Owner)) { SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.SpellLevel = attacker.Owner.Spells[SpellID].Level; suse.X = X; suse.Y = Y; if (attacker.Owner.Team != null) { PrepareSpell(spell, attacker.Owner); foreach (Client.GameState teammate in attacker.Owner.Team.Teammates) { if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, teammate.Entity.X, teammate.Entity.Y) <= spell.Distance) PrepareSpell(spell, attacker.Owner); { if (teammate.Entity.ContainsFlag2(Update.Flags2.TyrantAura))//FendAura { teammate.Entity.RemoveFlag2(Update.Flags2.TyrantAura);//FendAura teammate.Entity.Statistics.CriticalStrike -= 200; } if (teammate.Entity.ContainsFlag2(Update.Flags2.MetalAura))//MetalAura { teammate.Entity.RemoveFlag2(Update.Flags2.MetalAura);//MetalAura teammate.Entity.Statistics.MetalResistance -= 30; } if (teammate.Entity.ContainsFlag2(Update.Flags2.WoodAura))//WoodAura { teammate.Entity.RemoveFlag2(Update.Flags2.WoodAura);//WoodAura teammate.Entity.Statistics.WoodResistance -= 30; } if (teammate.Entity.ContainsFlag2(Update.Flags2.WaterAura))//WaterAura { teammate.Entity.RemoveFlag2(Update.Flags2.WaterAura);//WaterAura teammate.Entity.Statistics.WaterResistance -= 30; } if (teammate.Entity.ContainsFlag2(Update.Flags2.FireAura))//FireAura { teammate.Entity.RemoveFlag2(Update.Flags2.FireAura);//FireAura teammate.Entity.Statistics.FireResistance -= 30; } if (teammate.Entity.ContainsFlag2(Update.Flags2.EarthAura))//EarthAura { teammate.Entity.RemoveFlag2(Update.Flags2.EarthAura);//EarthAura teammate.Entity.Statistics.EarthResistance -= 30; } if (teammate.Entity.ContainsFlag2(Update.Flags2.FendAura))//TyrantAura { teammate.Entity.RemoveFlag2(Update.Flags2.FendAura);//TyrantAura teammate.Entity.Statistics.Immunity -= 200; } teammate.Entity.AddFlag2(Update.Flags2.WoodAura); teammate.Entity.Statistics.WoodResistance += 30; suse.Targets.Add(teammate.Entity.UID, 1); teammate.Entity.TyrantAura = Time32.Now; teammate.Entity.TyrantAuras = (short)spell.Duration; } } if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.SendScreen(suse, true); else attacked.MonsterInfo.SendScreen(suse); } else { if (attacked == null) return; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Distance) { PrepareSpell(spell, attacker.Owner); if (attacker.ContainsFlag2(Update.Flags2.TyrantAura))//FendAura { attacker.RemoveFlag2(Update.Flags2.TyrantAura);//FendAura attacker.Statistics.CriticalStrike -= 200; } if (attacker.ContainsFlag2(Update.Flags2.MetalAura))//MetalAura { attacker.RemoveFlag2(Update.Flags2.MetalAura);//MetalAura attacker.Statistics.MetalResistance -= 30; } if (attacked.ContainsFlag2(Update.Flags2.WoodAura))//WoodAura { attacked.Statistics.WoodResistance -= 30; attacked.RemoveFlag2(Update.Flags2.WoodAura);//WoodAura } if (attacker.ContainsFlag2(Update.Flags2.WaterAura))//WaterAura { attacker.Statistics.WaterResistance -= 30; attacker.RemoveFlag2(Update.Flags2.WaterAura);//WaterAura } if (attacker.ContainsFlag2(Update.Flags2.FireAura))//FireAura { attacker.Statistics.FireResistance -= 30; attacker.RemoveFlag2(Update.Flags2.FireAura);//FireAura } if (attacker.ContainsFlag2(Update.Flags2.EarthAura))//EarthAura { attacker.Statistics.EarthResistance -= 30; attacker.RemoveFlag2(Update.Flags2.EarthAura);//EarthAura } if (attacker.ContainsFlag2(Update.Flags2.FendAura))//TyrantAura { attacker.RemoveFlag2(Update.Flags2.FendAura);//TyrantAura attacker.Statistics.Immunity -= 200; } attacker.AddFlag2(Update.Flags2.WoodAura); attacker.Statistics.WoodResistance += 30; attacker.TyrantAura = Time32.Now; attacker.TyrantAuras = (short)spell.Duration; suse.Targets.Add(attacked.UID, 1); if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.SendScreen(suse, true); else attacked.MonsterInfo.SendScreen(suse); } else { attacker.AttackPacket = null; } } } attacker.AttackPacket = null; break; } //ElementalAuraWater case 10422: { if (CanUseSpell(spell, attacker.Owner)) { SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.SpellLevel = attacker.Owner.Spells[SpellID].Level; suse.X = X; suse.Y = Y; if (attacker.Owner.Team != null) { PrepareSpell(spell, attacker.Owner); foreach (Client.GameState teammate in attacker.Owner.Team.Teammates) { if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, teammate.Entity.X, teammate.Entity.Y) <= spell.Distance) PrepareSpell(spell, attacker.Owner); { if (teammate.Entity.ContainsFlag2(Update.Flags2.TyrantAura))//FendAura { teammate.Entity.RemoveFlag2(Update.Flags2.TyrantAura);//FendAura teammate.Entity.Statistics.CriticalStrike -= 200; } if (teammate.Entity.ContainsFlag2(Update.Flags2.MetalAura))//MetalAura { teammate.Entity.RemoveFlag2(Update.Flags2.MetalAura);//MetalAura teammate.Entity.Statistics.MetalResistance -= 30; } if (teammate.Entity.ContainsFlag2(Update.Flags2.WoodAura))//WoodAura { teammate.Entity.RemoveFlag2(Update.Flags2.WoodAura);//WoodAura teammate.Entity.Statistics.WoodResistance -= 30; } if (teammate.Entity.ContainsFlag2(Update.Flags2.WaterAura))//WaterAura { teammate.Entity.RemoveFlag2(Update.Flags2.WaterAura);//WaterAura teammate.Entity.Statistics.WaterResistance -= 30; } if (teammate.Entity.ContainsFlag2(Update.Flags2.FireAura))//FireAura { teammate.Entity.RemoveFlag2(Update.Flags2.FireAura);//FireAura teammate.Entity.Statistics.FireResistance -= 30; } if (teammate.Entity.ContainsFlag2(Update.Flags2.EarthAura))//EarthAura { teammate.Entity.RemoveFlag2(Update.Flags2.EarthAura);//EarthAura teammate.Entity.Statistics.EarthResistance -= 30; } if (teammate.Entity.ContainsFlag2(Update.Flags2.FendAura))//TyrantAura { teammate.Entity.RemoveFlag2(Update.Flags2.FendAura);//TyrantAura teammate.Entity.Statistics.Immunity -= 200; } teammate.Entity.AddFlag2(Update.Flags2.WaterAura); teammate.Entity.Statistics.WaterResistance += 30; suse.Targets.Add(teammate.Entity.UID, 1); teammate.Entity.TyrantAura = Time32.Now; teammate.Entity.TyrantAuras = (short)spell.Duration; } } if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.SendScreen(suse, true); else attacked.MonsterInfo.SendScreen(suse); } else { if (attacked == null) return; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Distance) { PrepareSpell(spell, attacker.Owner); if (attacker.ContainsFlag2(Update.Flags2.TyrantAura))//FendAura { attacker.RemoveFlag2(Update.Flags2.TyrantAura);//FendAura attacker.Statistics.CriticalStrike -= 200; } if (attacker.ContainsFlag2(Update.Flags2.MetalAura))//MetalAura { attacker.RemoveFlag2(Update.Flags2.MetalAura);//MetalAura attacker.Statistics.MetalResistance -= 30; } if (attacker.ContainsFlag2(Update.Flags2.WoodAura))//WoodAura { attacker.Statistics.WoodResistance -= 30; attacker.RemoveFlag2(Update.Flags2.WoodAura);//WoodAura } if (attacked.ContainsFlag2(Update.Flags2.WaterAura))//WaterAura { attacked.Statistics.WaterResistance -= 30; attacked.RemoveFlag2(Update.Flags2.WaterAura);//WaterAura } if (attacker.ContainsFlag2(Update.Flags2.FireAura))//FireAura { attacker.Statistics.FireResistance -= 30; attacker.RemoveFlag2(Update.Flags2.FireAura);//FireAura } if (attacker.ContainsFlag2(Update.Flags2.EarthAura))//EarthAura { attacker.Statistics.EarthResistance -= 30; attacker.RemoveFlag2(Update.Flags2.EarthAura);//EarthAura } if (attacker.ContainsFlag2(Update.Flags2.FendAura))//TyrantAura { attacker.RemoveFlag2(Update.Flags2.FendAura);//TyrantAura attacker.Statistics.Immunity -= 200; } attacker.AddFlag2(Update.Flags2.WaterAura); attacker.Statistics.WaterResistance += 30; attacker.TyrantAura = Time32.Now; attacker.TyrantAuras = (short)spell.Duration; suse.Targets.Add(attacked.UID, 1); if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.SendScreen(suse, true); else attacked.MonsterInfo.SendScreen(suse); } else { attacker.AttackPacket = null; } } } attacker.AttackPacket = null; break; } //ElementalAuraFire case 10423: { if (CanUseSpell(spell, attacker.Owner)) { SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.SpellLevel = attacker.Owner.Spells[SpellID].Level; suse.X = X; suse.Y = Y; if (attacker.Owner.Team != null) { PrepareSpell(spell, attacker.Owner); foreach (Client.GameState teammate in attacker.Owner.Team.Teammates) { if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, teammate.Entity.X, teammate.Entity.Y) <= spell.Distance) PrepareSpell(spell, attacker.Owner); { if (teammate.Entity.ContainsFlag2(Update.Flags2.TyrantAura))//FendAura { teammate.Entity.RemoveFlag2(Update.Flags2.TyrantAura);//FendAura teammate.Entity.Statistics.CriticalStrike -= 200; } if (teammate.Entity.ContainsFlag2(Update.Flags2.MetalAura))//MetalAura { teammate.Entity.RemoveFlag2(Update.Flags2.MetalAura);//MetalAura teammate.Entity.Statistics.MetalResistance -= 30; } if (teammate.Entity.ContainsFlag2(Update.Flags2.WoodAura))//WoodAura { teammate.Entity.RemoveFlag2(Update.Flags2.WoodAura);//WoodAura teammate.Entity.Statistics.WoodResistance -= 30; } if (teammate.Entity.ContainsFlag2(Update.Flags2.WaterAura))//WaterAura { teammate.Entity.RemoveFlag2(Update.Flags2.WaterAura);//WaterAura teammate.Entity.Statistics.WaterResistance -= 30; } if (teammate.Entity.ContainsFlag2(Update.Flags2.FireAura))//FireAura { teammate.Entity.RemoveFlag2(Update.Flags2.FireAura);//FireAura teammate.Entity.Statistics.FireResistance -= 30; } if (teammate.Entity.ContainsFlag2(Update.Flags2.EarthAura))//EarthAura { teammate.Entity.RemoveFlag2(Update.Flags2.EarthAura);//EarthAura teammate.Entity.Statistics.EarthResistance -= 30; } if (teammate.Entity.ContainsFlag2(Update.Flags2.FendAura))//TyrantAura { teammate.Entity.RemoveFlag2(Update.Flags2.FendAura);//TyrantAura teammate.Entity.Statistics.Immunity -= 200; } teammate.Entity.AddFlag2(Update.Flags2.FireAura); teammate.Entity.Statistics.FireResistance += 30; suse.Targets.Add(teammate.Entity.UID, 1); teammate.Entity.TyrantAura = Time32.Now; teammate.Entity.TyrantAuras = (short)spell.Duration; } } if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.SendScreen(suse, true); else attacked.MonsterInfo.SendScreen(suse); } else { if (attacked == null) return; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Distance) { PrepareSpell(spell, attacker.Owner); if (attacker.ContainsFlag2(Update.Flags2.TyrantAura))//FendAura { attacker.RemoveFlag2(Update.Flags2.TyrantAura);//FendAura attacker.Statistics.CriticalStrike -= 200; } if (attacker.ContainsFlag2(Update.Flags2.MetalAura))//MetalAura { attacker.RemoveFlag2(Update.Flags2.MetalAura);//MetalAura attacker.Statistics.MetalResistance -= 30; } if (attacker.ContainsFlag2(Update.Flags2.WoodAura))//WoodAura { attacker.Statistics.WoodResistance -= 30; attacker.RemoveFlag2(Update.Flags2.WoodAura);//WoodAura } if (attacker.ContainsFlag2(Update.Flags2.WaterAura))//WaterAura { attacker.Statistics.WaterResistance -= 30; attacker.RemoveFlag2(Update.Flags2.WaterAura);//WaterAura } if (attacked.ContainsFlag2(Update.Flags2.FireAura))//FireAura { attacked.Statistics.FireResistance -= 30; attacked.RemoveFlag2(Update.Flags2.FireAura);//FireAura } if (attacker.ContainsFlag2(Update.Flags2.EarthAura))//EarthAura { attacker.Statistics.EarthResistance -= 30; attacker.RemoveFlag2(Update.Flags2.EarthAura);//EarthAura } if (attacker.ContainsFlag2(Update.Flags2.FendAura))//TyrantAura { attacker.RemoveFlag2(Update.Flags2.FendAura);//TyrantAura attacker.Statistics.Immunity -= 200; } attacker.AddFlag2(Update.Flags2.FireAura); attacker.Statistics.FireResistance += 30; attacker.TyrantAura = Time32.Now; attacker.TyrantAuras = (short)spell.Duration; suse.Targets.Add(attacked.UID, 1); if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.SendScreen(suse, true); else attacked.MonsterInfo.SendScreen(suse); } else { attacker.AttackPacket = null; } } } attacker.AttackPacket = null; break; } //ElementalEarthAura case 10424: { if (CanUseSpell(spell, attacker.Owner)) { SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.SpellLevel = attacker.Owner.Spells[SpellID].Level; suse.X = X; suse.Y = Y; if (attacker.Owner.Team != null) { PrepareSpell(spell, attacker.Owner); foreach (Client.GameState teammate in attacker.Owner.Team.Teammates) { if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, teammate.Entity.X, teammate.Entity.Y) <= spell.Distance) PrepareSpell(spell, attacker.Owner); { if (teammate.Entity.ContainsFlag2(Update.Flags2.TyrantAura))//FendAura { teammate.Entity.RemoveFlag2(Update.Flags2.TyrantAura);//FendAura teammate.Entity.Statistics.CriticalStrike -= 200; } if (teammate.Entity.ContainsFlag2(Update.Flags2.MetalAura))//MetalAura { teammate.Entity.RemoveFlag2(Update.Flags2.MetalAura);//MetalAura teammate.Entity.Statistics.MetalResistance -= 30; } if (teammate.Entity.ContainsFlag2(Update.Flags2.WoodAura))//WoodAura { teammate.Entity.RemoveFlag2(Update.Flags2.WoodAura);//WoodAura teammate.Entity.Statistics.WoodResistance -= 30; } if (teammate.Entity.ContainsFlag2(Update.Flags2.WaterAura))//WaterAura { teammate.Entity.RemoveFlag2(Update.Flags2.WaterAura);//WaterAura teammate.Entity.Statistics.WaterResistance -= 30; } if (teammate.Entity.ContainsFlag2(Update.Flags2.FireAura))//FireAura { teammate.Entity.RemoveFlag2(Update.Flags2.FireAura);//FireAura teammate.Entity.Statistics.FireResistance -= 30; } if (teammate.Entity.ContainsFlag2(Update.Flags2.EarthAura))//EarthAura { teammate.Entity.RemoveFlag2(Update.Flags2.EarthAura);//EarthAura teammate.Entity.Statistics.EarthResistance -= 30; } if (teammate.Entity.ContainsFlag2(Update.Flags2.FendAura))//TyrantAura { teammate.Entity.RemoveFlag2(Update.Flags2.FendAura);//TyrantAura teammate.Entity.Statistics.Immunity -= 200; } teammate.Entity.AddFlag2(Update.Flags2.EarthAura); teammate.Entity.Statistics.EarthResistance += 30; suse.Targets.Add(teammate.Entity.UID, 1); teammate.Entity.TyrantAura = Time32.Now; teammate.Entity.TyrantAuras = (short)spell.Duration; } } if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.SendScreen(suse, true); else attacked.MonsterInfo.SendScreen(suse); } else { if (attacked == null) return; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Distance) { PrepareSpell(spell, attacker.Owner); if (attacker.ContainsFlag2(Update.Flags2.TyrantAura))//FendAura { attacker.RemoveFlag2(Update.Flags2.TyrantAura);//FendAura attacker.Statistics.CriticalStrike -= 200; } if (attacker.ContainsFlag2(Update.Flags2.MetalAura))//MetalAura { attacker.RemoveFlag2(Update.Flags2.MetalAura);//MetalAura attacker.Statistics.MetalResistance -= 30; } if (attacker.ContainsFlag2(Update.Flags2.WoodAura))//WoodAura { attacker.Statistics.WoodResistance -= 30; attacker.RemoveFlag2(Update.Flags2.WoodAura);//WoodAura } if (attacker.ContainsFlag2(Update.Flags2.WaterAura))//WaterAura { attacker.Statistics.WaterResistance -= 30; attacker.RemoveFlag2(Update.Flags2.WaterAura);//WaterAura } if (attacker.ContainsFlag2(Update.Flags2.FireAura))//FireAura { attacker.Statistics.FireResistance -= 30; attacker.RemoveFlag2(Update.Flags2.FireAura);//FireAura } if (attacked.ContainsFlag2(Update.Flags2.EarthAura))//EarthAura { attacked.Statistics.EarthResistance -= 30; attacked.RemoveFlag2(Update.Flags2.EarthAura);//EarthAura } if (attacker.ContainsFlag2(Update.Flags2.FendAura))//TyrantAura { attacker.RemoveFlag2(Update.Flags2.FendAura);//TyrantAura attacker.Statistics.Immunity -= 200; } attacker.AddFlag2(Update.Flags2.EarthAura); attacker.Statistics.EarthResistance += 30; attacker.TyrantAura = Time32.Now; attacker.TyrantAuras = (short)spell.Duration; suse.Targets.Add(attacked.UID, 1); if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.SendScreen(suse, true); else attacked.MonsterInfo.SendScreen(suse); } else { attacker.AttackPacket = null; } } } attacker.AttackPacket = null; break; } //Compassion case 10430: { if (CanUseSpell(spell, attacker.Owner)) { SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (attacker.Owner.Team != null) { PrepareSpell(spell, attacker.Owner); foreach (Client.GameState teammate in attacker.Owner.Team.Teammates) { if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, teammate.Entity.X, teammate.Entity.Y) <= spell.Distance) { attacker.RemoveFlag(Update.Flags.Poisoned); suse.Targets.Add(teammate.Entity.UID, 1); } } if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.SendScreen(suse, true); else attacked.MonsterInfo.SendScreen(suse); } else { if (attacked == null) return; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Distance) { PrepareSpell(spell, attacker.Owner); attacker.RemoveFlag(Update.Flags.Poisoned); suse.Targets.Add(attacked.UID, 1); if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.SendScreen(suse, true); else attacked.MonsterInfo.SendScreen(suse); } else { attacker.AttackPacket = null; } } } attacker.AttackPacket = null; break; } //Serenity case 10400: { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); if (attacker == null) return; SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = SpellID; suse.SpellLevel = attacker.Owner.Spells[SpellID].Level; suse.X = X; suse.Y = Y; suse.Targets.Add(attacker.UID, 1); attacker.ToxicFogLeft = 0; //attacker.RemoveFlag(Update.Flags.SoulShackle); attacker.Owner.SendScreen(suse, true); } attacker.AttackPacket = null; break; } //Tranquility case 10425: { if (CanUseSpell(spell, attacker.Owner)) { SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (attacker.Owner.Team != null) { PrepareSpell(spell, attacker.Owner); foreach (Client.GameState teammate in attacker.Owner.Team.Teammates) { if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, teammate.Entity.X, teammate.Entity.Y) <= spell.Distance) { attacker.RemoveFlag(Update.Flags.SoulShackle); attacked.RemoveFlag(Update.Flags.SoulShackle); teammate.Entity.RemoveFlag(Update.Flags.SoulShackle); suse.Targets.Add(teammate.Entity.UID, 1); } } if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.SendScreen(suse, true); else attacked.MonsterInfo.SendScreen(suse); } else { if (attacked == null) return; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Distance) { PrepareSpell(spell, attacker.Owner); attacker.RemoveFlag(Update.Flags.SoulShackle); suse.Targets.Add(attacked.UID, 1); if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.SendScreen(suse, true); else attacked.MonsterInfo.SendScreen(suse); } else { attacker.AttackPacket = null; } } } attacker.AttackPacket = null; break; } //Radiant Palm case 10381: // case 10315: { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); Game.Attacking.InLineAlgorithm ila = new Conquer_Online_Server.Game.Attacking.InLineAlgorithm(attacker.X, X, attacker.Y, Y, (byte)spell.Range, InLineAlgorithm.Algorithm.DDA); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = SpellID; suse.SpellLevel = attacker.Owner.Spells[SpellID].Level; suse.X = X; suse.Y = Y; for (int c = 0; c < attacker.Owner.Screen.Objects.Length; c++) { //For a multi threaded application, while we go through the collection //the collection might change. We will make sure that we wont go off //the limits with a check. if (c >= attacker.Owner.Screen.Objects.Length) break; Interfaces.IMapObject _obj = attacker.Owner.Screen.Objects[c]; if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player) { attacked = _obj as Entity; if (ila.InLine(attacked.X, attacked.Y)) { if (!CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) continue; uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell); attack.Damage = damage; ReceiveAttack(attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID, damage); } } else if (_obj.MapObjType == MapObjectType.SobNpc) { attackedsob = _obj as SobNpcSpawn; if (ila.InLine(attackedsob.X, attackedsob.Y)) { if (!CanAttack(attacker, attackedsob, spell)) continue; uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob); damage = (uint)(damage * spell.PowerPercent); attack.Damage = damage; ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID, damage); } } } attacker.Owner.SendScreen(suse, true); } attacker.AttackPacket = null; break; } //WhirlwindKick case 10415: { if (Time32.Now < attacker.WhilrwindKick.AddMilliseconds(1500)) { attacker.AttackPacket = null; return; } attacker.WhilrwindKick = Time32.Now; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= 3) { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = 0; suse.X = (ushort)ServerBase.Kernel.Random.Next(3, 10); suse.Y = 0; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= 3) { for (int c = 0; c < attacker.Owner.Screen.Objects.Length; c++) { //For a multi threaded application, while we go through the collection //the collection might change. We will make sure that we wont go off //the limits with a check. if (c >= attacker.Owner.Screen.Objects.Length) break; Interfaces.IMapObject _obj = attacker.Owner.Screen.Objects[c]; if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player) { attacked = _obj as Entity; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Range) { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Ranged)) { uint damage = Game.Attacking.Calculate.Melee(attacker, attacked); ReceiveAttack(attacker, attacked, attack, damage, spell); attacked.Stunned = true; attacked.StunStamp = Time32.Now; suse.Targets.Add(attacked.UID, damage); } } } } attacker.AttackPacket = null; } else { attacker.AttackPacket = null; return; } attacker.Owner.SendScreen(suse, true); suse.Targets = new SafeDictionary<uint, SpellUse.DamageClass>(); attacker.AttackPacket = null; return; } attacker.AttackPacket = null; } attacker.AttackPacket = null; return; //break; } #endregion } attacker.Owner.IncreaseSpellExperience(Experience, spellID); if (attacker.MapID == 1039) { if (spell.ID == 7001 || spell.ID == 9876) { attacker.AttackPacket = null; return; } if (attacker.AttackPacket != null) { attack.Damage = spell.ID; attacker.AttackPacket = attack; if (Database.SpellTable.WeaponSpells.ContainsValue(spell.ID)) { if (attacker.AttackPacket == null) { attack.AttackType = Attack.Melee; attacker.AttackPacket = attack; } else { attacker.AttackPacket.AttackType = Attack.Melee; } } } } else { if (spell.NextSpellID != 0) { if (spell.NextSpellID >= 1000 && spell.NextSpellID <= 1002) if (Target >= 1000000) { attacker.AttackPacket = null; return; } attack.Damage = spell.NextSpellID; attacker.AttackPacket = attack; } else { if (!Database.SpellTable.WeaponSpells.ContainsValue(spell.ID) || spell.ID == 9876) attacker.AttackPacket = null; else { if (attacker.AttackPacket == null) { attack.AttackType = Attack.Melee; attacker.AttackPacket = attack; } else { attacker.AttackPacket.AttackType = Attack.Melee; } } } } } else { attacker.AttackPacket = null; } } #endregion } #endregion } }
static void StatusFlagChange_Execute() { Time32 Now = Time32.Now; foreach (Client.GameState client in Values) { if (client.Socket.Connected && client.Entity != null) { #region Bless if (client.Entity.ContainsFlag(Network.GamePackets.Update.Flags.CastPray)) { if (client.BlessTime <= 345000) client.BlessTime += 1500; else client.BlessTime = 360000; } else if (client.Entity.ContainsFlag(Network.GamePackets.Update.Flags.Praying)) { if (client.PrayLead != null) { if (client.PrayLead.Socket.Connected) { if (client.BlessTime <= 355000) client.BlessTime += 500; else client.BlessTime = 3600; } else client.Entity.RemoveFlag(Network.GamePackets.Update.Flags.Praying); } else client.Entity.RemoveFlag(Network.GamePackets.Update.Flags.Praying); } else { if (client.BlessTime > 0) { if (client.BlessTime >= 500) { client.BlessTime -= 500; client.Entity.Update(Network.GamePackets.Update.LuckyTimeTimer, client.BlessTime, false); } else { client.BlessTime = 0; client.Entity.Update(Network.GamePackets.Update.LuckyTimeTimer, client.BlessTime, false); } } } #endregion #region Flashing name if (client.Entity.ContainsFlag(Network.GamePackets.Update.Flags.FlashingName)) { if (Now > client.Entity.FlashingNameStamp.AddSeconds(client.Entity.FlashingNameTime)) { client.Entity.RemoveFlag(Network.GamePackets.Update.Flags.FlashingName); } } #endregion #region XPList if (!client.Entity.ContainsFlag(Network.GamePackets.Update.Flags.XPList)) { if (Now > client.XPCountStamp.AddSeconds(3)) { #region Arrows if (client.Equipment != null) { if (!client.Equipment.Free(5)) { if (Network.PacketHandler.IsArrow(client.Equipment.TryGetItem(5).ID)) { Database.ConquerItemTable.UpdateDurabilityItem(client.Equipment.TryGetItem(5)); } } } #endregion client.XPCountStamp = Now; client.XPCount++; if (client.XPCount >= 100) { client.Entity.AddFlag(Network.GamePackets.Update.Flags.XPList); client.XPCount = 0; client.XPListStamp = Now; } } } else { if (Now > client.XPListStamp.AddSeconds(20)) { client.Entity.RemoveFlag(Network.GamePackets.Update.Flags.XPList); } } #endregion #region KOSpell if (client.Entity.OnKOSpell()) { if (client.Entity.OnCyclone()) { int Seconds = Now.AllSeconds() - client.Entity.CycloneStamp.AddSeconds(client.Entity.CycloneTime).AllSeconds(); if (Seconds >= 1) { client.Entity.RemoveFlag(Network.GamePackets.Update.Flags.Cyclone); } } if (client.Entity.OnSuperman()) { int Seconds = Now.AllSeconds() - client.Entity.SupermanStamp.AddSeconds(client.Entity.SupermanTime).AllSeconds(); if (Seconds >= 1) { client.Entity.RemoveFlag(Network.GamePackets.Update.Flags.Superman); } } if (!client.Entity.OnKOSpell()) { //Record KO client.Entity.KOCount = 0; } } #endregion #region Buffers if (client.Entity.ContainsFlag(Network.GamePackets.Update.Flags.Stigma)) { if (Now >= client.Entity.StigmaStamp.AddSeconds(client.Entity.StigmaTime)) { client.Entity.StigmaTime = 0; client.Entity.StigmaIncrease = 0; client.Entity.RemoveFlag(Network.GamePackets.Update.Flags.Stigma); } } if (client.Entity.ContainsFlag(Network.GamePackets.Update.Flags.Dodge)) { if (Now >= client.Entity.DodgeStamp.AddSeconds(client.Entity.DodgeTime)) { client.Entity.DodgeTime = 0; client.Entity.DodgeIncrease = 0; client.Entity.RemoveFlag(Network.GamePackets.Update.Flags.Dodge); } } if (client.Entity.ContainsFlag(Network.GamePackets.Update.Flags.Invisibility)) { if (Now >= client.Entity.InvisibilityStamp.AddSeconds(client.Entity.InvisibilityTime)) { client.Entity.RemoveFlag(Network.GamePackets.Update.Flags.Invisibility); } } if (client.Entity.ContainsFlag(Network.GamePackets.Update.Flags.StarOfAccuracy)) { if (client.Entity.StarOfAccuracyTime != 0) { if (Now >= client.Entity.StarOfAccuracyStamp.AddSeconds(client.Entity.StarOfAccuracyTime)) { client.Entity.RemoveFlag(Network.GamePackets.Update.Flags.StarOfAccuracy); } } else { if (Now >= client.Entity.AccuracyStamp.AddSeconds(client.Entity.AccuracyTime)) { client.Entity.RemoveFlag(Network.GamePackets.Update.Flags.StarOfAccuracy); } } } if (client.Entity.ContainsFlag(Network.GamePackets.Update.Flags.MagicShield)) { if (client.Entity.MagicShieldTime != 0) { if (Now >= client.Entity.MagicShieldStamp.AddSeconds(client.Entity.MagicShieldTime)) { client.Entity.MagicShieldIncrease = 0; client.Entity.MagicShieldTime = 0; client.Entity.RemoveFlag(Network.GamePackets.Update.Flags.MagicShield); } } else { if (Now >= client.Entity.ShieldStamp.AddSeconds(client.Entity.ShieldTime)) { client.Entity.ShieldIncrease = 0; client.Entity.ShieldTime = 0; client.Entity.RemoveFlag(Network.GamePackets.Update.Flags.MagicShield); } } } #endregion #region Fly if (client.Entity.ContainsFlag(Network.GamePackets.Update.Flags.Fly)) { if (Now >= client.Entity.FlyStamp.AddSeconds(client.Entity.FlyTime)) { client.Entity.RemoveFlag(Network.GamePackets.Update.Flags.Fly); client.Entity.FlyTime = 0; } } #endregion #region PoisonStar if (client.Entity.NoDrugsTime > 0) { if (Now > client.Entity.NoDrugsStamp.AddSeconds(client.Entity.NoDrugsTime)) { client.Entity.NoDrugsTime = 0; } } #endregion #region ToxicFog if (client.Entity.ToxicFogLeft > 0) { if (Now >= client.Entity.ToxicFogStamp.AddSeconds(2)) { float Percent = client.Entity.ToxicFogPercent; //Remove this line if you want it normal Percent = Math.Min(0.1F, client.Entity.ToxicFogPercent); client.Entity.ToxicFogLeft--; client.Entity.ToxicFogStamp = Now; if (client.Entity.Hitpoints > 1) { uint damage = Game.Attacking.Calculate.Percent(client.Entity, Percent); client.Entity.Hitpoints -= damage; Network.GamePackets.SpellUse suse = new Conquer_Online_Server.Network.GamePackets.SpellUse(true); suse.Attacker = client.Entity.UID; suse.SpellID = 10010; suse.Targets.Add(client.Entity.UID, damage); client.SendScreen(suse, true); if (client.QualifierGroup != null) client.QualifierGroup.UpdateDamage(ServerBase.Kernel.GamePool[client.ArenaStatistic.PlayWith], damage); } } } #endregion #region FatalStrike if (client.Entity.OnFatalStrike()) { if (Now > client.Entity.FatalStrikeStamp.AddSeconds(client.Entity.FatalStrikeTime)) { client.Entity.RemoveFlag(Network.GamePackets.Update.Flags.CannonBarrage); } } #endregion if (client.Entity.OnOblivion()) { if (Now > client.Entity.OblivionStamp.AddSeconds(client.Entity.OblivionTime)) { client.Entity.RemoveFlag2(Network.GamePackets.Update.Flags2.Oblivion); } } #region ShurikenVortex if (client.Entity.ContainsFlag(Network.GamePackets.Update.Flags.ShurikenVortex)) { if (Now > client.Entity.ShurikenVortexStamp.AddSeconds(client.Entity.ShurikenVortexTime)) { client.Entity.RemoveFlag(Network.GamePackets.Update.Flags.ShurikenVortex); } } #endregion #region Transformations if (client.Entity.Transformed) { if (Now > client.Entity.TransformationStamp.AddSeconds(client.Entity.TransformationTime)) { client.Entity.Untransform(); } } #endregion } //else // client.Disconnect(); } }