示例#1
0
        static void HandlePacket(byte[] packet, Client.GameState client)
        {
            if (packet == null)
                return;
            if (client == null)
                return;
            ushort Length = BitConverter.ToUInt16(packet, 0);
            ushort ID = BitConverter.ToUInt16(packet, 2);
            ushort ID2 = BitConverter.ToUInt16(packet, 4);
            switch (ID)
            {
                #region market quest
                case 2400:
                    {
                        if (client.Entity.QQ1 == 0)
                        {
                            client.Entity.Teleport(1068, 053, 055);
                        }
                        else
                        {
                            client.Send(new Message("you can only make quest once in day", Color.AntiqueWhite, 2005));
                        }

                        break;
                    }
                #endregion
                #region ElitePk Tournament 2223 | 2219
                case 2223:
                    {
                        if (client.Entity.MapID == 6002)
                            break;

                        if (ServerBase.Kernel.Elite_PK_Tournament.Start)
                            break;

                        GamePackets.Elite_Pk pk = new Elite_Pk(client.Entity.UID);
                        pk.Send(client);
                        break;
                    }
                case 2219:
                    {
                        if (client.Entity.MapID == 6002)
                            break;
                        byte[] sed = new byte[36]
                        {
                        0x1C ,0x00 ,0xAB ,0x08 ,0x04 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x03 ,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(sed);
                        break;

                    }
                case 1063:
                    {
                        GamePackets.Guild_Pk pk = new Guild_Pk(client.Entity.UID);
                        pk.Send(client);
                        //byte[] sed = new byte[346];
                        ////{0x5a ,0x01 ,0x27 ,0x04 ,0x09 ,0x00 ,0x01 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x08 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x21 ,0x42 ,0x72 ,0x61 ,0x73 ,0x69 ,0x6c ,0x54 ,0x6f ,0x50 ,0x54 ,0x65 ,0x61 ,0x6d ,0x21 ,0x00 ,0x45 ,0x2a ,0x00 ,0x00 ,0x0e ,0x00 ,0x00 ,0x00 ,0x40 ,0xd2 ,0xdf ,0x03 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x7e ,0x5e ,0x21 ,0x54 ,0x68 ,0x65 ,0x5f ,0x42 ,0x65 ,0x73 ,0x74 ,0x21 ,0x5e ,0x7e ,0x00 ,0x00 ,0x2f ,0x20 ,0x00 ,0x00 ,0x09 ,0x00 ,0x00 ,0x00 ,0x00 ,0x0e ,0x27 ,0x07 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x46 ,0x69 ,0x72 ,0x65 ,0x45 ,0x6d ,0x62 ,0x6c ,0x65 ,0x6d ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x20 ,0x1c ,0x00 ,0x00 ,0x17 ,0x00 ,0x00 ,0x00 ,0x00 ,0xe1 ,0xf5 ,0x05 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x7e ,0x44 ,0x2e ,0x30 ,0x2e ,0x4a ,0x2e ,0x7e ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x3f ,0x0c ,0x00 ,0x00 ,0x0d ,0x00 ,0x00 ,0x00 ,0x40 ,0xf6 ,0xd3 ,0x04 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x2d ,0x4e ,0x7e ,0x4f ,0x7e ,0x59 ,0x7e ,0x50 ,0x7e ,0x49 ,0x2d ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x9e ,0x06 ,0x00 ,0x00 ,0x05 ,0x00 ,0x00 ,0x00 ,0x00 ,0x5a ,0x62 ,0x02 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x53 ,0x75 ,0x70 ,0x72 ,0x65 ,0x6d ,0x65 ,0x7e ,0x46 ,0x6f ,0x72 ,0x63 ,0x65 ,0x00 ,0x00 ,0x00 ,0x2f ,0x06 ,0x00 ,0x00 ,0x03 ,0x00 ,0x00 ,0x00 ,0x00 ,0x2d ,0x31 ,0x01 ,0x00 ,0x00 ,0x00 ,0x00 ,0xc8 ,0x00 ,0x00 ,0x00 ,0x53 ,0x69 ,0x6c ,0x65 ,0x6e ,0x54 ,0x5f ,0x48 ,0x65 ,0x41 ,0x6c ,0x4c ,0x23 ,0x30 ,0x31 ,0x00 ,0x40 ,0x03 ,0x00 ,0x00 ,0x04 ,0x00 ,0x00 ,0x00 ,0x80 ,0xf0 ,0xfa ,0x02 ,0x00 ,0x00 ,0x00 ,0x00 ,0xf4 ,0x01 ,0x00 ,0x00 ,0x21 ,0x4e ,0x6f ,0x86 ,0x4d ,0x65 ,0x72 ,0x63 ,0x59 ,0x21 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0xe8 ,0x01 ,0x00 ,0x00 ,0x04 ,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 ,0x00 ,0x00

                        ////};
                        //client.Send(sed);
                        break;

                    }
                case 2224:
                    {

                        client.Send(packet);
                        break;

                    }
                case 2232:
                    {

                        //                        byte[] sed = new byte[36]
                        //                        {
                        //                        0x1C ,0x00 ,0xAB ,0x08 ,0x04 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x03 ,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(packet);
                        break;

                    }
                case 2233:
                    {

                        GamePackets.Team_Pk pk = new Team_Pk(client.Entity.UID);
                        pk.Send(client);
                        break;

                    }
                case 2252:
                    {

                        // byte[] sed = new byte[60];
                        // ;rver };
                        client.Send(packet);
                        break;

                    }
                case 1130:
                    {
                        if (client.Entity.TitlePacket != null)
                        {
                            if (packet[9] == 4)
                            {
                                if (client.Entity.TitlePacket.dwParam2 != 0)
                                    client.Entity.TitlePacket.Send(client);
                            }
                            if (packet[9] == 3)
                            {
                                client.Entity.TitleActivated = packet[8];
                                client.Send(packet);
                                client.SendScreen(client.Entity.SpawnPacket, false);
                            }
                        }
                        break;
                    }
                #endregion
                #region TopGuilds
                case 1058:
                    {
                        if (client.Guild != null && client.AsMember != null)
                        {
                            if (client.AsMember != null)
                            {
                                Writer.WriteUInt32((uint)client.AsMember.SilverDonation, 8, packet);
                                if (client.Entity.GuildRank != (ushort)Conquer_Online_Server.Game.Enums.GuildMemberRank.DeputyLeader)
                                    if (client.Entity.GuildRank != (ushort)Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader)
                                        if (client.AsMember.SilverDonation > client.Guild.money_donation)
                                        {
                                            client.Guild.money_donation = (uint)client.AsMember.SilverDonation;
                                            client.Entity.GuildRank = (ushort)Conquer_Online_Server.Game.Enums.GuildMemberRank.OSupervisor;
                                            client.AsMember.Rank = (Conquer_Online_Server.Game.Enums.GuildMemberRank)client.Entity.GuildRank;
                                        }

                                Writer.WriteUInt32((uint)client.AsMember.ConquerPointDonation, 20, packet);
                                if (client.Entity.GuildRank != (ushort)Conquer_Online_Server.Game.Enums.GuildMemberRank.DeputyLeader)
                                    if (client.Entity.GuildRank != (ushort)Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader)
                                        if (client.AsMember.ConquerPointDonation > client.Guild.cp_donaion)
                                        {
                                            client.Guild.cp_donaion = (uint)client.AsMember.ConquerPointDonation;
                                            client.Entity.GuildRank = (ushort)Conquer_Online_Server.Game.Enums.GuildMemberRank.CPSupervisor;
                                            client.AsMember.Rank = (Conquer_Online_Server.Game.Enums.GuildMemberRank)client.Entity.GuildRank;
                                        }

                            }
                            Writer.WriteUInt32(client.Entity.PKPoints, 12, packet);
                            if (client.Entity.GuildRank != (ushort)Conquer_Online_Server.Game.Enums.GuildMemberRank.DeputyLeader)
                                if (client.Entity.GuildRank != (ushort)Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader)
                                    if (client.Entity.PKPoints > client.Guild.pkp_donation)
                                    {
                                        client.Guild.pkp_donation = (uint)client.Entity.PKPoints;
                                        client.Entity.GuildRank = (ushort)Conquer_Online_Server.Game.Enums.GuildMemberRank.PKSupervisor;
                                        client.AsMember.Rank = (Conquer_Online_Server.Game.Enums.GuildMemberRank)client.Entity.GuildRank;
                                    }

                            if (client.ArenaStatistic != null)
                            {
                                Writer.WriteUInt32(client.ArenaStatistic.CurrentHonor, 24, packet);
                                if (client.Entity.GuildRank != (ushort)Conquer_Online_Server.Game.Enums.GuildMemberRank.DeputyLeader)
                                    if (client.Entity.GuildRank != (ushort)Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader)
                                        if (client.ArenaStatistic.CurrentHonor > client.Guild.honor_donation)
                                        {
                                            client.Guild.honor_donation = (uint)client.ArenaStatistic.CurrentHonor;
                                            client.Entity.GuildRank = (ushort)Conquer_Online_Server.Game.Enums.GuildMemberRank.HonoraryManager;
                                            client.AsMember.Rank = (Conquer_Online_Server.Game.Enums.GuildMemberRank)client.Entity.GuildRank;
                                        }
                            }
                            Writer.WriteUInt32(0, 16, packet);
                            if (client.Entity != null)
                                if (client.Entity.MyFlowers != null)
                                {
                                    Writer.WriteUInt32((uint)client.Entity.MyFlowers.RedRoses, 28, packet);
                                    if (client.Entity.GuildRank != (ushort)Conquer_Online_Server.Game.Enums.GuildMemberRank.DeputyLeader)
                                        if (client.Entity.GuildRank != (ushort)Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader)
                                            if (client.Entity.MyFlowers.RedRoses > client.Guild.rose_donation)
                                            {
                                                client.Guild.rose_donation = (uint)client.Entity.MyFlowers.RedRoses;
                                                client.Entity.GuildRank = (ushort)Conquer_Online_Server.Game.Enums.GuildMemberRank.RoseSupervisor;
                                                client.AsMember.Rank = (Conquer_Online_Server.Game.Enums.GuildMemberRank)client.Entity.GuildRank;
                                            }

                                    Writer.WriteUInt32((uint)client.Entity.MyFlowers.Tulips, 32, packet);
                                    if (client.Entity.GuildRank != (ushort)Conquer_Online_Server.Game.Enums.GuildMemberRank.DeputyLeader)
                                        if (client.Entity.GuildRank != (ushort)Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader)
                                            if (client.Entity.MyFlowers.Tulips > client.Guild.tuil_donation)
                                            {
                                                client.Guild.tuil_donation = (uint)client.Entity.MyFlowers.Tulips;
                                                client.Entity.GuildRank = (ushort)Conquer_Online_Server.Game.Enums.GuildMemberRank.TulipFollower;
                                                client.AsMember.Rank = (Conquer_Online_Server.Game.Enums.GuildMemberRank)client.Entity.GuildRank;
                                            }

                                    Writer.WriteUInt32((uint)client.Entity.MyFlowers.Lilies, 36, packet);
                                    if (client.Entity.GuildRank != (ushort)Conquer_Online_Server.Game.Enums.GuildMemberRank.DeputyLeader)
                                        if (client.Entity.GuildRank != (ushort)Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader)
                                            if (client.Entity.MyFlowers.Lilies > client.Guild.lilies_donation)
                                            {
                                                client.Guild.lilies_donation = (uint)client.Entity.MyFlowers.Lilies;
                                                client.Entity.GuildRank = (ushort)Conquer_Online_Server.Game.Enums.GuildMemberRank.LilySupervisor;
                                                client.AsMember.Rank = (Conquer_Online_Server.Game.Enums.GuildMemberRank)client.Entity.GuildRank;
                                            }

                                    Writer.WriteUInt32((uint)client.Entity.MyFlowers.Orchads, 40, packet);
                                    if (client.Entity.GuildRank != (ushort)Conquer_Online_Server.Game.Enums.GuildMemberRank.DeputyLeader)
                                        if (client.Entity.GuildRank != (ushort)Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader)
                                            if (client.Entity.MyFlowers.Orchads > client.Guild.orchid_donation)
                                            {
                                                client.Guild.orchid_donation = (uint)client.Entity.MyFlowers.Orchads;
                                                client.Entity.GuildRank = (ushort)Conquer_Online_Server.Game.Enums.GuildMemberRank.OrchidFollower;
                                                client.AsMember.Rank = (Conquer_Online_Server.Game.Enums.GuildMemberRank)client.Entity.GuildRank;
                                            }
                                    Writer.WriteUInt32((uint)(client.Entity.MyFlowers.Orchads
                                        + (uint)client.Entity.MyFlowers.RedRoses
                                        + (uint)client.Entity.MyFlowers.Tulips
                                        + (uint)client.Entity.MyFlowers.Lilies), 44, packet);
                                }
                            if (client.Entity.GuildRank != (ushort)Conquer_Online_Server.Game.Enums.GuildMemberRank.DeputyLeader)
                                if (client.Entity.GuildRank != (ushort)Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader)
                                {
                                    if (client.Entity.Name == client.Guild.LeaderName)
                                    {
                                        client.Entity.GuildRank = (ushort)Conquer_Online_Server.Game.Enums.GuildMemberRank.LeaderSpouse;
                                        client.AsMember.Rank = (Conquer_Online_Server.Game.Enums.GuildMemberRank)client.Entity.GuildRank;
                                    }
                                }
                            if (client.Guild != null)
                                client.Guild.SendGuild(client);
                            client.Send(packet);
                        }
                        break;
                    }
                #endregion
                #region Guild members (2102)
                case 2102:
                    {
                        ushort Page = BitConverter.ToUInt16(packet, 8);
                        if (client.Guild != null)
                        {
                            client.Guild.SendMembers(client, Page);
                        }
                        break;
                    }
                #endregion
                #region EnitityCreate (1001)
                case 1001:
                    {
                        if (client.Action == 1)
                        {
                            EnitityCreate EC = new EnitityCreate();
                            EC.Deserialize(packet);
                            string Message = "";
                            Boolean Created = Database.EntityTable.CreateEntity(EC, client, ref Message);
                            client.Send(new Message(Message, "ALLUSERS", System.Drawing.Color.Orange, GamePackets.Message.PopUP));
                            if (Created)
                                Console.WriteLine(client.Account.Username + " Sucesfully Created a new Character " + EC.Name);
                            client.JustCreated = true;
                        }
                        break;
                    }
                #endregion
                #region Chat/Message (1004)
                case 1004:
                    {
                        if (client.Action != 2)
                            return;
                        Message message = new Message();
                        message.Deserialize(packet);
                        if (message.__Message.Split(new string[] { "\\n" }, StringSplitOptions.RemoveEmptyEntries).Length > 0)
                            message.__Message = message.__Message.Split(new string[] { "\\n" }, StringSplitOptions.RemoveEmptyEntries)[0];
                        Chat(message, client);
                        break;
                    }
                #endregion
                #region Item/Ping (1009)
                case 1009:
                    {
                        if (client.Action != 2)
                            return;
                        ItemUsage usage = new ItemUsage(false);
                        usage.Deserialize(packet);
                        if (!client.Entity.Dead || usage.ID == ItemUsage.Ping)
                        {
                            switch (usage.ID)
                            {

                                case 52:
                                    {
                                        var item = Database.ConquerItemTable.LoadItem(usage.UID);
                                        item.Mode = Conquer_Online_Server.Game.Enums.ItemMode.ChatItem;
                                        item.Send(client);
                                        break;
                                    }
                                case 41:
                                    {
                                        var item = Database.ConquerItemTable.LoadItem(usage.UID);
                                        usage.dwParam = 5;
                                        client.Send(usage);
                                        break;
                                    }
                                case ItemUsage.ArrowReload:
                                    {
                                        ReloadArrows(client.Equipment.TryGetItem(ConquerItem.LeftWeapon), client);

                                        break;
                                    }
                                case ItemUsage.ShowBoothItems:
                                    {
                                        ShowBoothItems(usage, client);
                                        break;
                                    }
                                case ItemUsage.AddItemOnBoothForSilvers:
                                case ItemUsage.AddItemOnBoothForConquerPoints:
                                    {
                                        AddItemOnBooth(usage, client);
                                        break;
                                    }
                                case ItemUsage.BuyFromBooth:
                                    {
                                        BuyFromBooth(usage, client);
                                        break;
                                    }
                                case ItemUsage.RemoveItemFromBooth:
                                    {
                                        RemoveItemFromBooth(usage, client);
                                        break;
                                    }
                                case ItemUsage.EquipItem:
                                    {
                                        EquipItem(usage, client);
                                        break;
                                    }
                                case ItemUsage.UnequipItem:
                                    {
                                        UnequipItem(usage, client);
                                        break;
                                    }
                                case ItemUsage.BuyFromNPC:
                                    {
                                        HandleBuyFromNPC(usage, client);
                                        break;
                                    }
                                case ItemUsage.SellToNPC:
                                    {
                                        HandleSellToNPC(usage, client);
                                        break;
                                    }
                                case ItemUsage.Repair:
                                    {
                                        HandleRepair(usage, client);
                                        break;
                                    }
                                case ItemUsage.MeteorUpgrade:
                                case ItemUsage.DragonBallUpgrade:
                                    {
                                        UpgradeItem(usage, client);
                                        break;
                                    }
                                case ItemUsage.Ping:
                                    {
                                        if (Time32.Now < client.LastPing.AddSeconds(2))
                                        {
                                            client.PingCount++;
                                            if (client.PingCount == 40)
                                            {
                                                client.Send(new Message("Speed hack detected!", System.Drawing.Color.BlanchedAlmond, Message.TopLeft));
                                                client.Disconnect();
                                                return;
                                            }
                                        }

                                        if (client.Entity != null)
                                        {
                                            if (client.Entity.UID != 0)
                                            {
                                                if (!ServerBase.Kernel.GamePool.ContainsKey(client.Entity.UID))
                                                {
                                                    ServerBase.Kernel.GamePool.Add(client.Entity.UID, client);
                                                }
                                            }
                                        }

                                        client.LastPingT = client.LastPing;
                                        client.LastPing = Time32.Now;

                                        if (client.LastPing > client.LastPingT.AddSeconds(2))
                                            client.PingCount = 0;
                                        usage.TimeStamp += 120;
                                        // client.Send(ReturnFinal(packet));
                                        //Network.PacketHandler.HandleBuffer(packet, client);
                                        client.Send(usage);
                                        if (!ServerBase.Kernel.GamePool.ContainsKey(client.Entity.UID))
                                            if (client.Socket.Connected)
                                            {
                                                ServerBase.Kernel.GamePool.Add(client.Entity.UID, client);
                                                client.Screen.FullWipe();
                                                client.Screen.Reload(null);
                                            }
                                        break;
                                    }
                                case ItemUsage.ViewWarehouse:
                                    {
                                        usage.dwParam = client.MoneySave;
                                        client.Send(usage);
                                        break;
                                    }
                                case ItemUsage.WarehouseDeposit:
                                    {
                                        if (client.Entity.Money >= usage.dwParam)
                                        {
                                            client.Entity.Money -= usage.dwParam;
                                            client.MoneySave += usage.dwParam;
                                        }
                                        break;
                                    }
                                case ItemUsage.WarehouseWithdraw:
                                    {
                                        if (client.MoneySave >= usage.dwParam)
                                        {
                                            client.Entity.Money += usage.dwParam;
                                            client.MoneySave -= usage.dwParam;
                                        }
                                        break;
                                    }
                                case ItemUsage.DropItem:
                                    {
                                        DropItem(usage, client);
                                        break;
                                    }
                                case ItemUsage.DropMoney:
                                    {
                                        DropMoney(usage, client);
                                        break;
                                    }
                                case ItemUsage.Enchant:
                                    {
                                        EnchantItem(usage, client);
                                        break;
                                    }
                                case ItemUsage.SocketTalismanWithItem:
                                    {
                                        SocketTalismanWithItem(usage, client);
                                        break;
                                    }
                                case ItemUsage.SocketTalismanWithCPs:
                                    {
                                        SocketTalismanWithCPs(usage, client);
                                        break;
                                    }
                                case 40:
                                    {
                                        uint ItemAdd = (uint)((packet[4] & 0xFF) | ((packet[5] & 0xFF) << 8) | ((packet[6] & 0xFF) << 16) | ((packet[7] & 0xFF) << 24));

                                        //PrintPacket(packet);
                                        Interfaces.IConquerItem item_new = null;
                                        if (client.Inventory.TryGetItem(ItemAdd, out item_new))
                                        {
                                            if (item_new.Bless == 7)
                                                return;

                                            Queue<uint> amount = new Queue<uint>(packet[20]);

                                            for (ushort i = 84; i < 84 + 4 * packet[20]; i += 4)
                                            {
                                                if (client.Inventory.ContainsUID((uint)((packet[i] & 0xFF) | ((packet[(byte)(i + 1)] & 0xFF) << 8) | ((packet[(byte)(i + 2)] & 0xFF) << 16) | ((packet[(byte)(i + 3)] & 0xFF) << 24))))
                                                    amount.Enqueue((uint)((packet[i] & 0xFF) | ((packet[(byte)(i + 1)] & 0xFF) << 8) | ((packet[(byte)(i + 2)] & 0xFF) << 16) | ((packet[(byte)(i + 3)] & 0xFF) << 24)));
                                                else
                                                    return;
                                            }

                                            byte oldbless = item_new.Bless;
                                            if (item_new.Bless == 0 && amount.Count == 5)
                                                item_new.Bless = 1;
                                            else if (item_new.Bless == 1 && amount.Count == 1)
                                                item_new.Bless = 3;
                                            else if (item_new.Bless == 3 && amount.Count == 3)
                                                item_new.Bless = 5;
                                            else if (item_new.Bless == 5 && amount.Count == 5)
                                                item_new.Bless = 7;
                                            if (oldbless == item_new.Bless)
                                                return;

                                            while (amount.Count != 0)
                                                client.Inventory.Remove(amount.Dequeue(), Conquer_Online_Server.Game.Enums.ItemUse.Remove, true);

                                            item_new.Mode = Conquer_Online_Server.Game.Enums.ItemMode.Update;
                                            item_new.Send(client);
                                            Database.ConquerItemTable.UpdateItem(item_new, client);
                                        }
                                        //client.Send(packet);
                                        break;
                                    }
                                case 53:
                                    {
                                        uint ItemAdd = BitConverter.ToUInt32(packet, 8);

                                        //Interfaces.IConquerItem item_new = null;
                                        //if (client.Inventory.TryGetItem(ItemAdd, out item_new))
                                        {
                                            uint obtined_points = 0;
                                            Database.ConquerItemInformation iteminfo = new Conquer_Online_Server.Database.ConquerItemInformation(ItemAdd, 0);
                                            Dictionary<uint, uint> amount = new Dictionary<uint, uint>();//packet[20]);
                                            for (ushort i = 80; i < 84 + 4 * packet[20]; i += 4)
                                            {
                                                uint item_swap = BitConverter.ToUInt32(packet, i);
                                                if (client.Inventory.ContainsUID(item_swap))
                                                {
                                                    Interfaces.IConquerItem item = null;
                                                    if (client.Inventory.TryGetItem(item_swap, out item))
                                                    {
                                                        amount.Add(item_swap, i);
                                                    }
                                                    switch (item.ID)
                                                    {
                                                        case 191505:
                                                        case 191605:
                                                        case 191705:
                                                        case 191805:
                                                        case 191905:
                                                        case 191405:
                                                        case 183325:
                                                        case 183315:
                                                        case 183375:
                                                        case 183305:
                                                            {
                                                                obtined_points += 300;
                                                                break;
                                                            }
                                                        default:
                                                            obtined_points += 50;
                                                            break;
                                                    }
                                                }
                                            }
                                            if (iteminfo.BaseInformation.ConquerPointsWorth > obtined_points)
                                            {
                                                uint add_cps = 0;
                                                add_cps = (uint)(iteminfo.BaseInformation.ConquerPointsWorth - obtined_points);
                                                if (add_cps < client.Entity.ConquerPoints)
                                                {
                                                    client.Entity.ConquerPoints -= add_cps;
                                                    foreach (uint key in amount.Keys)
                                                    {
                                                        if (client.Inventory.ContainsUID(key))
                                                            client.Inventory.Remove(key, Conquer_Online_Server.Game.Enums.ItemUse.Remove, true);
                                                    }
                                                    client.Inventory.Add(ItemAdd, 0, 1);

                                                }
                                            }
                                            else
                                            {
                                                foreach (uint key in amount.Keys)
                                                {
                                                    if (client.Inventory.ContainsUID(key))
                                                        client.Inventory.Remove(key, Conquer_Online_Server.Game.Enums.ItemUse.Remove, true);
                                                }
                                                client.Inventory.Add(ItemAdd, 0, 1);

                                            }
                                        }
                                        break;
                                    }
                                case ItemUsage.SocketerMan:
                                    {
                                        #region Socketing
                                        UInt32 Count = usage.dwExtraInfo, ItemUID = usage.UID;
                                        Byte Type = 0;
                                        Interfaces.IConquerItem Item = null;
                                        if (client.Inventory.TryGetItem(ItemUID, out Item))
                                        {
                                            #region Removing Used Items
                                            for (int i = 1; i <= Count; i++)
                                            {
                                                uint It = BitConverter.ToUInt32(packet, (int)(80 + (4 * i)));
                                                Interfaces.IConquerItem Rem = null;
                                                if (client.Inventory.TryGetItem(It, out Rem))
                                                {
                                                    if (Rem.ID == 1088000 && Count == 12)
                                                        Type = 1;
                                                    if (Rem.ID == 1088000 && Count == 1)
                                                        Type = 2;
                                                    if (Rem.ID == 1088000 && Count == 5)
                                                        Type = 3;
                                                    if (Rem.ID == 1200005 && Count == 1)
                                                        Type = 4;
                                                    if (Rem.ID == 1200006 && Count == 7)
                                                        Type = 5;
                                                    client.Inventory.Remove(Rem, Game.Enums.ItemUse.Remove);
                                                }
                                            }
                                            #endregion
                                            #region Type Switch
                                            switch (Type)
                                            {
                                                #region Open First Socket
                                                case 1:
                                                case 2:
                                                    {
                                                        usage.dwParam = 1;
                                                        Item.Mode = Game.Enums.ItemMode.Update;
                                                        Item.SocketOne = (Game.Enums.Gem)255;
                                                        Item.Send(client);
                                                        Item.Mode = Game.Enums.ItemMode.Default;
                                                        Conquer_Online_Server.Database.ConquerItemTable.UpdateSockets(Item, client);
                                                        break;
                                                    }
                                                #endregion
                                                #region Open Second Socket
                                                case 3:
                                                case 5:
                                                    {
                                                        usage.dwParam = 1;
                                                        Item.Mode = Game.Enums.ItemMode.Update;
                                                        Kernel.SendWorldMessage(new Message("Congratulations! " + client.Entity.Name + " has oppened the second socket into his/her item!", System.Drawing.Color.Yellow, 2011), Kernel.GamePool.Values, client.Entity.UID);
                                                        Item.SocketTwo = (Game.Enums.Gem)255;
                                                        Item.Send(client);
                                                        Item.Mode = Game.Enums.ItemMode.Default;
                                                        Conquer_Online_Server.Database.ConquerItemTable.UpdateSockets(Item, client);
                                                        break;
                                                    }
                                                #endregion
                                                #region Using Tough Drill
                                                case 4:
                                                    {
                                                        if (ServerBase.Kernel.Rate(10))
                                                        {
                                                            usage.dwParam = 1;
                                                            Item.Mode = Game.Enums.ItemMode.Update;
                                                            Kernel.SendWorldMessage(new Message("Congratulations! " + client.Entity.Name + " has oppened the second socket into his/her item!", System.Drawing.Color.Yellow, 2011), Kernel.GamePool.Values, client.Entity.UID);
                                                            Item.SocketTwo = (Game.Enums.Gem)255;
                                                            Item.Send(client);
                                                            Item.Mode = Game.Enums.ItemMode.Default;
                                                            Conquer_Online_Server.Database.ConquerItemTable.UpdateSockets(Item, client);
                                                        }
                                                        else
                                                        {
                                                            usage.dwParam = 0;
                                                            client.Send(new Message("The ToughDrill has failed. Try your lucky next time!", System.Drawing.Color.Red, Message.TopLeft));
                                                            client.Inventory.Add(1200006, 0, 1);
                                                        }
                                                        break;
                                                    }
                                                #endregion
                                            }
                                            #endregion
                                        }
                                        //dWParam Values, = 0 = Failed, 1 = Suceed, 2 = Nothing
                                        client.Send(usage);
                                        #endregion
                                        break;
                                    }
                                case ItemUsage.RedeemGear:
                                    {
                                        var item = client.DeatinedItem[usage.UID];
                                        if (item != null)
                                        {
                                            if (DateTime.Now > item.Date.AddDays(7))
                                            {
                                                client.Send(new Message("This item is expired!", System.Drawing.Color.Red, Message.TopLeft));

                                                return;
                                            }
                                            if (client.Entity.ConquerPoints >= item.ConquerPointsCost)
                                            {
                                                client.Entity.ConquerPoints -= item.ConquerPointsCost;

                                                usage.dwParam = client.Entity.UID;
                                                usage.dwExtraInfo3 = item.ConquerPointsCost;
                                                client.Send(usage);

                                                client.Inventory.Add(item.Item, Conquer_Online_Server.Game.Enums.ItemUse.Add);

                                                Database.DetainedItemTable.Redeem(item, client);
                                                client.DeatinedItem.Remove(item.UID);

                                                if (ServerBase.Kernel.GamePool.ContainsKey(item.GainerUID))
                                                {
                                                    var pClient = ServerBase.Kernel.GamePool[item.GainerUID];
                                                    pClient.ClaimableItem[item.UID].OwnerUID = 500;
                                                    pClient.ClaimableItem[item.UID].MakeItReadyToClaim();
                                                    usage.dwParam = pClient.Entity.UID;
                                                    usage.ID = ItemUsage.ClaimGear;
                                                    pClient.Send(usage);
                                                    pClient.ClaimableItem[item.UID].Send(pClient);
                                                }

                                                Message message = new Message("Thank you for arresting " + item.OwnerName + ", " + item.GainerName + ". The arrested one has redeemed his items and you have received a great deal of ConquerPoints as reward. Congratulations!", System.Drawing.Color.Wheat, Message.Talk);
                                                ServerBase.Kernel.SendWorldMessage(message, ServerBase.Kernel.GamePool.Values);
                                            }
                                        }
                                        else
                                        {
                                            client.Send(new Message("The item you want to redeem has already been redeemed.", System.Drawing.Color.Red, Message.TopLeft));
                                        }
                                        break;
                                    }
                                case ItemUsage.ClaimGear:
                                    {
                                        var item = client.ClaimableItem[usage.UID];
                                        if (item != null)
                                        {
                                            if (item.Bound)
                                            {
                                                client.Send(new Message("Unnclaimable item!", System.Drawing.Color.Red, Message.TopLeft));
                                                return;
                                            }
                                            if (DateTime.Now < item.Date.AddDays(7) && item.OwnerUID != 500)
                                            {
                                                client.Send(new Message("This item is not expired. You cannot claim it yet!", System.Drawing.Color.Red, Message.TopLeft));
                                                return;
                                            }
                                            if (item.OwnerUID == 500)
                                                client.Entity.ConquerPoints += item.ConquerPointsCost;
                                            else
                                            {
                                                client.Inventory.Add(item.Item, Conquer_Online_Server.Game.Enums.ItemUse.Move);
                                                Message message = new Message("Thank you for arresting " + item.OwnerName + ", " + item.GainerName + ". The arrested one has redeemed his items and you have received a great deal of ConquerPoints as reward. Congratulations!", System.Drawing.Color.Wheat, Message.Talk);
                                                ServerBase.Kernel.SendWorldMessage(message, ServerBase.Kernel.GamePool.Values);
                                            }
                                            Database.DetainedItemTable.Claim(item, client);
                                            client.ClaimableItem.Remove(item.UID);

                                            usage.dwParam = client.Entity.UID;
                                            usage.dwExtraInfo3 = item.ConquerPointsCost;
                                            client.Send(usage);
                                        }
                                        else
                                        {
                                            client.Send(new Message("The item you want to claim has already been claimed.", System.Drawing.Color.Red, Message.TopLeft));
                                        }
                                        break;
                                    }
                                case 34:
                                    {
                                        break;
                                    }
                                case 45:
                                    {
                                        client.Entity.Teleport(1002, 429, 378);
                                        break;
                                    }
                                default:
                                    {
                                        Console.WriteLine("Unhandled item usage type : " + usage.ID);
                                        break;
                                    }
                            }
                        }
                        break;
                    }
                #endregion
                #region String (1015)
                case 1015:
                    {
                        if (client.Action != 2)
                            return;
                        _String stringpacket = new _String(false);
                        stringpacket.Deserialize(packet);
                        switch (stringpacket.Type)
                        {
                            case _String.WhisperDetails:
                                {
                                    if (stringpacket.Texts.Count > 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 pClient = (varr.Current as Client.GameState);

                                            if (pClient.Entity.Name == stringpacket.Texts[0])
                                            {
                                                string otherstring = "";
                                                otherstring += pClient.Entity.UID + " ";
                                                otherstring += pClient.Entity.Level + " ";
                                                otherstring += pClient.Entity.BattlePower + " #";
                                                if (pClient.Entity.GuildID != 0)
                                                    otherstring += pClient.Guild.Name + " fNone# ";
                                                else
                                                    otherstring += "None fNone# ";
                                                otherstring += pClient.Entity.Spouse + " ";
                                                otherstring += (byte)(pClient.Entity.NobilityRank) + " ";
                                                if (pClient.Entity.Body % 10 < 3)
                                                    otherstring += "1";
                                                else
                                                    otherstring += "0";
                                                stringpacket.Texts.Add(otherstring);
                                                client.Send(stringpacket);
                                            }

                                            varr.MoveNext();

                                        }
                                    }
                                    break;
                                }
                        }
                        break;
                    }
                #endregion
                #region KnownPersons (1019)
                case 1019:
                    {
                        KnownPersons knownP = new KnownPersons(false);
                        knownP.Deserialize(packet);
                        switch (knownP.Type)
                        {
                            case KnownPersons.RequestFriendship:
                                {
                                    AddFriend(knownP, client);
                                    break;
                                }
                            case KnownPersons.RemovePerson:
                                {
                                    RemoveFriend(knownP, client);
                                    break;
                                }
                            case KnownPersons.RemoveEnemy:
                                {
                                    RemoveEnemy(knownP, client);
                                    break;
                                }
                        }
                        break;
                    }
                #endregion
                #region Attack (1022)
                case 1022:
                    {
                        if (client.Action != 2)
                            return;
                        uint dmg = BitConverter.ToUInt32(packet, 24);
                        uint AttackType = BitConverter.ToUInt32(packet, 20);
                        switch (AttackType)
                        {
                            case 39:
                                {
                                    if (!Kernel.VotePool.ContainsKey(client.Account.IP))
                                    {
                                        if (!Kernel.VotePoolUid.ContainsKey(client.Entity.UID))
                                        {
                                            client.Entity.ConquerPoints += 1000;
                                            Conquer_Online_Server.Game.ConquerStructures.PlayersVot Vot = new Conquer_Online_Server.Game.ConquerStructures.PlayersVot();
                                            Vot.AdressIp = client.Account.IP;
                                            Vot.Uid = client.Entity.UID;
                                            Kernel.VotePool.Add(Vot.AdressIp, Vot);
                                            Kernel.VotePoolUid.Add(Vot.Uid, Vot);
                                            Database.EntityTable.SavePlayersVot(Vot);
                                            client.Send(new Conquer_Online_Server.Network.GamePackets.Message("http://5.41.141.216/index.php", 2105));
                                            client.Send(new Message("You Have clamied your Prize 1k Cps Server ", Color.Brown, 1000000));
                                        }
                                        else
                                        {
                                            client.Send(new Conquer_Online_Server.Network.GamePackets.Message("http://5.41.141.216/index.php", 2105));
                                            client.Send(new Message("you can only take prize once in day", Color.Brown, 10000000));
                                        }
                                    }
                                    else
                                    {
                                        client.Send(new Conquer_Online_Server.Network.GamePackets.Message("http://5.41.141.216/index.php", 2105));
                                        client.Send(new Message("you can only take prize once in day", Color.Brown, 10000000));
                                    }

                                    break;
                                }
                            default:
                                {
                                    GamePackets.Attack attack = new Attack(false);
                                    attack.Deserialize(packet);
                                    if (client.Entity.ContainsFlag(Update.Flags.Ride) && !client.Entity.Owner.Equipment.Free(18))
                                    {
                                        Attack(attack, client);
                                        return;
                                    }
                                    else
                                    {
                                        client.Entity.RemoveFlag(Update.Flags.Ride);
                                    }
                                    Attack(attack, client);
                                    break;
                                }
                        }
                        break;
                    }
                #endregion
                #region Teams (1023)
                case 1023:
                    {
                        if (client.Action != 2)
                            return;
                        Team teamPacket = new Team();
                        teamPacket.Deserialize(packet);
                        switch (teamPacket.Type)
                        {
                            case Team.Create: CreateTeam(teamPacket, client); break;
                            case Team.AcceptJoinRequest: AcceptRequestToJoinTeam(teamPacket, client); break;
                            case Team.AcceptInvitation: AcceptInviteToJoinTeam(teamPacket, client); break;
                            case Team.InviteRequest: SendInviteToJoinTeam(teamPacket, client); break;
                            case Team.JoinRequest: SendRequestJoinToTeam(teamPacket, client); break;
                            case Team.ExitTeam: LeaveTeam(teamPacket, client); break;
                            case Team.Dismiss: DismissTeam(teamPacket, client); break;
                            case Team.Kick: KickFromTeam(teamPacket, client); break;
                            case Team.ForbidJoining:
                                {
                                    if (client.Team != null && client.Team.Teammates != null) foreach (Client.GameState Teammate in client.Team.Teammates)
                                            if (Teammate != null)
                                            {
                                                Teammate.Team.ForbidJoin = true;
                                                Teammate.Send(teamPacket);
                                            }

                                    break;
                                }
                            case Team.UnforbidJoining:
                                {
                                    if (client.Team != null && client.Team.Teammates != null) foreach (Client.GameState Teammate in client.Team.Teammates)
                                            if (Teammate != null)
                                            {
                                                Teammate.Team.ForbidJoin = false;
                                                Teammate.Send(teamPacket);
                                            }

                                    break;
                                }
                            case Team.LootMoneyOff:
                                {
                                    if (client.Team != null && client.Team.Teammates != null) foreach (Client.GameState Teammate in client.Team.Teammates)
                                            if (Teammate != null)
                                            {
                                                Teammate.Team.PickupMoney = true;
                                                Teammate.Send(teamPacket);
                                            }
                                    break;
                                }
                            case Team.LootMoneyOn:
                                {
                                    if (client.Team != null && client.Team.Teammates != null) foreach (Client.GameState Teammate in client.Team.Teammates)
                                            if (Teammate != null)
                                            {
                                                Teammate.Team.PickupMoney = false;
                                                Teammate.Send(teamPacket);
                                            }
                                    break;
                                }
                            case Team.LootItemsOn:
                                {
                                    if (client.Team != null && client.Team.Teammates != null) foreach (Client.GameState Teammate in client.Team.Teammates)
                                            if (Teammate != null)
                                            {
                                                Teammate.Team.PickupItems = true;
                                                Teammate.Send(teamPacket);
                                            }
                                    break;
                                }
                            case Team.LootItemsOff:
                                {
                                    if (client.Team != null && client.Team.Teammates != null) foreach (Client.GameState Teammate in client.Team.Teammates)
                                            if (Teammate != null)
                                            {
                                                Teammate.Team.PickupItems = false;
                                                Teammate.Send(teamPacket);
                                            }
                                    break;
                                }
                        }
                        break;
                    }
                #endregion
                #region Atributes Set (1024)
                case 1024:
                    {
                        if (client.Action != 2)
                            return;
                        ushort AddStr = BitConverter.ToUInt16(packet, 8);
                        ushort AddAgi = BitConverter.ToUInt16(packet, 12);
                        ushort AddVit = BitConverter.ToUInt16(packet, 16);
                        ushort AddSpi = BitConverter.ToUInt16(packet, 20);
                        if (AddStr > 0)
                        {
                            if (client.Entity.Atributes >= AddStr)
                            {
                                client.Entity.Atributes -= AddStr;
                                client.Entity.Strength += AddStr;
                            }
                        }
                        if (AddAgi > 0)
                        {
                            if (client.Entity.Atributes >= AddAgi)
                            {
                                client.Entity.Atributes -= AddAgi;
                                client.Entity.Agility += AddAgi;
                            }
                        }
                        if (AddVit > 0)
                        {
                            if (client.Entity.Atributes >= AddVit)
                            {
                                client.Entity.Atributes -= AddVit;
                                client.Entity.Vitality += AddVit;
                            }
                        }
                        if (AddSpi > 0)
                        {
                            if (client.Entity.Atributes >= AddSpi)
                            {
                                client.Entity.Atributes -= AddSpi;
                                client.Entity.Spirit += AddSpi;
                            }
                        }
                        //Conquer_Online_Server.Game.Attacking.Calculate.Vitals(client.Entity, true);
                        client.CalculateStatBonus();
                        client.CalculateHPBonus();
                        client.GemAlgorithm();
                        client.SendStatMessage();
                        break;
                    }
                #endregion
                #region Socketing (1027)
                case 1027:
                    {
                        EmbedSocket socket = new EmbedSocket(false);
                        socket.Deserialize(packet);
                        SocketItem(socket, client);
                        break;
                    }
                #endregion
                #region ItemAdding Stabilization
                case 1038:
                    {
                        ItemAddingStabilization stabilization = new ItemAddingStabilization(false);
                        stabilization.Deserialize(packet);
                        StabilazeArtifact(stabilization, client);
                        break;
                    }
                #endregion
                #region LoginPacket (1052)
                case 1052:
                    {
                        if (client.Action == 1)
                        {
                            Connect connect = new Connect();
                            connect.Deserialize(packet);
                            AppendConnect(connect, client);
                        }
                        else
                            client.Disconnect();
                        break;
                    }
                #endregion
                #region Trade (1056)
                case 1056:
                    {
                        if (client.Action != 2)
                            return;
                        Trade trade = new Trade(false);
                        trade.Deserialize(packet);
                        switch (trade.Type)
                        {
                            case Trade.Request:
                                RequestTrade(trade, client);
                                break;
                            case Trade.Close:
                                CloseTrade(trade, client);
                                break;
                            case Trade.AddItem:
                                AddTradeItem(trade, client);
                                break;
                            case Trade.SetMoney:
                                SetTradeMoney(trade, client);
                                break;
                            case Trade.SetConquerPoints:
                                SetTradeConquerPoints(trade, client);
                                break;
                            case Trade.Accept:
                                AcceptTrade(trade, client);
                                break;
                        }
                        break;
                    }
                #endregion
                #region Floor items (1101)
                case 1101:
                    {
                        if (client.Action != 2)
                            return;
                        FloorItem floorItem = new FloorItem(false);
                        floorItem.Deserialize(packet);
                        PickupItem(floorItem, client);
                        break;
                    }
                #endregion
                #region Warehouses (1102)
                case 1102:
                    {
                        if (client.Action != 2)
                            return;
                        Warehouse warehousepacket = new Warehouse(false);
                        warehousepacket.Deserialize(packet);
                        switch (warehousepacket.Type)
                        {
                            case Warehouse.Entire:
                                {
                                    Game.ConquerStructures.Warehouse wh = client.Warehouses[(Conquer_Online_Server.Game.ConquerStructures.Warehouse.WarehouseID)warehousepacket.NpcID];
                                    if (wh == null) return;
                                    byte count = 0;
                                    warehousepacket.Count = 1;
                                    warehousepacket.Type = Warehouse.AddItem;
                                    for (; count < wh.Count; count++)
                                    {
                                        warehousepacket.Append(wh.Objects[count]);
                                        client.Send(warehousepacket);
                                    }
                                    break;
                                }
                            case Warehouse.AddItem:
                                {
                                    Game.ConquerStructures.Warehouse wh = client.Warehouses[(Conquer_Online_Server.Game.ConquerStructures.Warehouse.WarehouseID)warehousepacket.NpcID];
                                    if (wh == null) return;
                                    Interfaces.IConquerItem item = null;
                                    if (client.Inventory.TryGetItem(warehousepacket.UID, out item))
                                    {
                                        if (wh.Add(item))
                                        {
                                            warehousepacket.UID = 0;
                                            warehousepacket.Count = 1;
                                            warehousepacket.Append(item);
                                            client.Send(warehousepacket);
                                            return;
                                        }
                                    }
                                    break;
                                }
                            case Warehouse.RemoveItem:
                                {
                                    Game.ConquerStructures.Warehouse wh = client.Warehouses[(Conquer_Online_Server.Game.ConquerStructures.Warehouse.WarehouseID)warehousepacket.NpcID];
                                    if (wh == null) return;
                                    if (wh.ContainsUID(warehousepacket.UID))
                                    {
                                        if (wh.Remove(warehousepacket.UID))
                                        {
                                            client.Send(warehousepacket);
                                            return;
                                        }
                                    }
                                    break;
                                }
                            default:
                                {
                                    Console.WriteLine("Unknown type: " + warehousepacket.Type);
                                    break;
                                }
                        }
                        break;
                    }
                #endregion
                #region Guild command (1107)
                case 1107:
                    {
                        GuildCommand command = new GuildCommand(false);
                        command.Deserialize(packet);
                        switch (command.Type)
                        {
                            case GuildCommand.Neutral1:
                            case GuildCommand.Neutral2:
                                {
                                    string name = System.Text.ASCIIEncoding.ASCII.GetString(packet, 26, packet[25]);
                                    if (client.Guild != null)
                                    {
                                        if (client.AsMember.Rank == Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader)
                                        {
                                            client.Guild.RemoveAlly(name);
                                            foreach (var guild in ServerBase.Kernel.Guilds.Values)
                                            {
                                                if (guild.Name == name && client.Guild.Name != name)
                                                {
                                                    guild.RemoveAlly(client.Guild.Name);
                                                }
                                            }
                                            client.Guild.RemoveEnemy(name);
                                        }
                                    }
                                    break;
                                }
                            case GuildCommand.Allied:
                                {
                                    string name = System.Text.ASCIIEncoding.ASCII.GetString(packet, 26, packet[25]);
                                    if (client.Guild != null)
                                    {
                                        if (client.AsMember.Rank == Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader)
                                        {
                                            AllyGuilds(name, client);
                                        }
                                    }
                                    break;
                                }
                            case GuildCommand.Enemied:
                                {
                                    string name = System.Text.ASCIIEncoding.ASCII.GetString(packet, 26, packet[25]);
                                    if (client.Guild != null)
                                    {
                                        if (client.AsMember.Rank == Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader)
                                        {
                                            client.Guild.AddEnemy(name);
                                        }
                                    }
                                    break;
                                }
                            default:
                                {
                                    client.Send(packet);
                                    break;
                                }
                            case GuildCommand.Bulletin:
                                {
                                    string message = System.Text.ASCIIEncoding.ASCII.GetString(packet, 26, packet[25]);
                                    if (client.Guild != null)
                                    {
                                        if (client.AsMember.Rank == Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader)
                                        {
                                            client.Guild.Bulletin = message;
                                            client.Guild.SendGuild(client);
                                            Database.GuildTable.UpdateBulletin(client.Guild, client.Guild.Bulletin);
                                        }
                                    }
                                    break;
                                }
                            case GuildCommand.DonateSilvers:
                                {
                                    if (client.Guild != null)
                                    {
                                        if (client.Entity.Money >= command.dwParam)
                                        {
                                            client.Guild.SilverFund += command.dwParam;
                                            Database.GuildTable.SaveFunds(client.Guild);
                                            client.AsMember.SilverDonation += command.dwParam;
                                            client.Entity.Money -= command.dwParam;
                                            client.Guild.SendGuild(client);
                                        }
                                    }
                                    break;
                                }
                            case GuildCommand.DonateConquerPoints:
                                {
                                    if (client.Guild != null)
                                    {
                                        if (client.Entity.ConquerPoints >= command.dwParam)
                                        {
                                            client.Guild.ConquerPointFund += command.dwParam;
                                            Database.GuildTable.SaveFunds(client.Guild);
                                            client.AsMember.ConquerPointDonation += command.dwParam;
                                            client.Entity.ConquerPoints -= command.dwParam;
                                            client.Guild.SendGuild(client);
                                        }
                                    }
                                    break;
                                }
                            case GuildCommand.Refresh:
                                {
                                    if (client.AsMember != null)
                                    {
                                        if (client.Guild != null)
                                            client.Guild.SendGuild(client);
                                    }
                                    break;
                                }
                            case GuildCommand.Discharge:
                                {
                                    string name = System.Text.ASCIIEncoding.ASCII.GetString(packet, 26, packet[25]);
                                    if (client.Guild != null)
                                    {
                                        if (client.AsMember.Rank == Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader)
                                        {
                                            var member = client.Guild.GetMemberByName(name);
                                            if (member.ID != client.Entity.UID)
                                            {
                                                if (member.Rank == Conquer_Online_Server.Game.Enums.GuildMemberRank.DeputyLeader)
                                                {
                                                    client.Guild.DeputyLeaderCount--;
                                                    member.Rank = Conquer_Online_Server.Game.Enums.GuildMemberRank.Member;
                                                    if (member.IsOnline)
                                                    {
                                                        client.Guild.SendGuild(member.Client);
                                                        member.Client.Entity.GuildRank = (ushort)member.Rank;
                                                        member.Client.Screen.FullWipe();
                                                        member.Client.Screen.Reload(null);
                                                    }
                                                }
                                            }
                                        }
                                    }
                                    break;
                                }
                            case GuildCommand.Promote:
                                {
                                    if (client.Guild != null)
                                    {
                                        if (client.AsMember.Rank == Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader)
                                        {
                                            if (client.Guild.Members.ContainsKey(command.dwParam))
                                            {
                                                var member = client.Guild.Members[command.dwParam];
                                                if (member.Rank == Conquer_Online_Server.Game.Enums.GuildMemberRank.Member)
                                                {
                                                    member.Rank = Conquer_Online_Server.Game.Enums.GuildMemberRank.DeputyLeader;
                                                    if (member.IsOnline)
                                                    {
                                                        client.Guild.SendGuild(member.Client);
                                                        member.Client.Entity.GuildRank = (ushort)member.Rank;
                                                        member.Client.Screen.FullWipe();
                                                        member.Client.Screen.Reload(null);
                                                    }
                                                }
                                                else if (member.Rank == Conquer_Online_Server.Game.Enums.GuildMemberRank.DeputyLeader)
                                                {
                                                    member.Rank = Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader;
                                                    if (member.IsOnline)
                                                    {
                                                        client.Guild.SendGuild(member.Client);
                                                        member.Client.Entity.GuildRank = (ushort)member.Rank;
                                                        member.Client.Screen.FullWipe();
                                                        member.Client.Screen.Reload(null);
                                                    }
                                                    client.AsMember.Rank = Conquer_Online_Server.Game.Enums.GuildMemberRank.DeputyLeader;
                                                    client.Guild.SendGuild(client);
                                                    client.Entity.GuildRank = (ushort)client.AsMember.Rank;
                                                    client.Screen.FullWipe();
                                                    client.Screen.Reload(null);
                                                }
                                            }
                                        }
                                    }
                                    break;
                                }
                            case GuildCommand.JoinRequest:
                                {
                                    if (ServerBase.Kernel.GamePool.ContainsKey(command.dwParam))
                                    {
                                        var Client = ServerBase.Kernel.GamePool[command.dwParam];
                                        if (Client.OnHoldGuildJoin == client.OnHoldGuildJoin && Client.OnHoldGuildJoin != 0)
                                        {
                                            if (Client.Guild != null)
                                            {
                                                if (Client.AsMember.Rank != Conquer_Online_Server.Game.Enums.GuildMemberRank.Member)
                                                {
                                                    Client.Guild.AddMember(client);
                                                    Client.OnHoldGuildJoin = 0;
                                                    client.OnHoldGuildJoin = 0;
                                                }
                                            }
                                            else
                                            {
                                                if (client.AsMember.Rank != Conquer_Online_Server.Game.Enums.GuildMemberRank.Member)
                                                {
                                                    client.Guild.AddMember(Client);
                                                    Client.OnHoldGuildJoin = 0;
                                                    client.OnHoldGuildJoin = 0;
                                                }
                                            }
                                            return;
                                        }
                                        if (client.Guild == null)
                                        {
                                            command.dwParam = client.Entity.UID;
                                            Client.Send(command);
                                            Client.OnHoldGuildJoin = (uint)new Random().Next();
                                            client.OnHoldGuildJoin = Client.OnHoldGuildJoin;
                                        }
                                    }
                                    break;
                                }
                            case GuildCommand.InviteRequest:
                                {
                                    if (ServerBase.Kernel.GamePool.ContainsKey(command.dwParam))
                                    {
                                        var Client = ServerBase.Kernel.GamePool[command.dwParam];
                                        if (Client.OnHoldGuildJoin == client.OnHoldGuildJoin && Client.OnHoldGuildJoin != 0)
                                        {
                                            if (Client.Guild != null)
                                            {
                                                if (Client.AsMember.Rank != Conquer_Online_Server.Game.Enums.GuildMemberRank.Member)
                                                {
                                                    Client.Guild.AddMember(client);
                                                    Client.OnHoldGuildJoin = 0;
                                                    client.OnHoldGuildJoin = 0;
                                                }
                                            }
                                            else
                                            {
                                                if (client.AsMember.Rank != Conquer_Online_Server.Game.Enums.GuildMemberRank.Member)
                                                {
                                                    client.Guild.AddMember(Client);
                                                    Client.OnHoldGuildJoin = 0;
                                                    client.OnHoldGuildJoin = 0;
                                                }
                                            }
                                            return;
                                        }
                                        if (client.Guild != null)
                                        {
                                            command.dwParam = client.Entity.UID;
                                            Client.Send(command);
                                            Client.OnHoldGuildJoin = (uint)new Random().Next();
                                            client.OnHoldGuildJoin = Client.OnHoldGuildJoin;
                                        }
                                    }
                                    break;
                                }
                            case GuildCommand.Quit:
                                {
                                    if (client.Guild != null)
                                    {
                                        if (client.AsMember.Rank != Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader)
                                        {
                                            client.Guild.ExpelMember(client.Entity.Name, true);
                                        }
                                    }
                                    break;
                                }
                        }
                        break;
                    }
                #endregion
                #region Enlight (1127)
                case 1127:
                    {
                        Enlight enlight = new Enlight(false);
                        enlight.Deserialize(packet);
                        if (ServerBase.Kernel.GamePool.ContainsKey(enlight.Enlighted))
                        {
                            var Client = ServerBase.Kernel.GamePool[enlight.Enlighted];

                            if (enlight.Enlighter == client.Entity.UID && enlight.Enlighted != enlight.Enlighter)
                            {
                                if (Client.Entity.ReceivedEnlightenPoints < 5)
                                {
                                    if (client.Entity.EnlightenPoints >= 100)
                                    {
                                        if (Client.Entity.EnlightmentTime <= 80)
                                        {
                                            client.Entity.EnlightenPoints -= 100;
                                            Client.Entity.EnlightmentStamp = Time32.Now;
                                            Client.IncreaseExperience(Game.Attacking.Calculate.Percent((int)Client.ExpBall, .10F), false);
                                            Client.SendScreen(packet, true);
                                            Client.Entity.ReceivedEnlightenPoints++;
                                            Client.Entity.EnlightmentTime += 20;
                                            if (client.Entity.EnlightmentTime > 80)
                                                client.Entity.EnlightmentTime = 100;
                                            else if (client.Entity.EnlightmentTime > 60)
                                                client.Entity.EnlightmentTime = 80;
                                            else if (client.Entity.EnlightmentTime > 40)
                                                client.Entity.EnlightmentTime = 60;
                                            else if (client.Entity.EnlightmentTime > 20)
                                                client.Entity.EnlightmentTime = 40;
                                            else if (client.Entity.EnlightmentTime > 0)
                                                client.Entity.EnlightmentTime = 20;
                                        }
                                        else client.Send(new Message("You can't enlighten " + Client.Entity.Name + " yet because he has to wait a few minutes until he can be enlightened again.", System.Drawing.Color.Blue, Message.TopLeft));
                                    }
                                    else client.Send(new Message("You can't enlighten " + Client.Entity.Name + " because you don't have enough enlighten points!", System.Drawing.Color.Blue, Message.TopLeft));
                                }
                                else client.Send(new Message("You can't enlighten " + Client.Entity.Name + " because he/she was enlightened today five times already!", System.Drawing.Color.Blue, Message.TopLeft));
                            }
                        }
                        break;
                    }
                #endregion
                #region NPC Dialog (2031 + 2032)
                case 2031:
                case 2032:
                    {
                        if (client.Action != 2)
                            return;
                        NpcRequest req = new NpcRequest();
                        req.Deserialize(packet);
                        if (client.Map.BaseID != 6001 && !client.Entity.Dead && req.OptionID == 202)//HoursPK War
                        {
                            if (client.Entity.Owner.Equipment.TryGetItem((byte)12).Plus > 7)
                            {
                                client.Entity.AddFlag(Update.Flags.Ride);
                                Random R = new Random();
                                int Nr = R.Next(1, 10);
                                if (Nr == 1) client.Entity.Teleport(2525, 114, 078);
                                if (Nr == 2) client.Entity.Teleport(2525, 96, 87);
                                if (Nr == 3) client.Entity.Teleport(2525, 142, 88);
                                if (Nr == 4) client.Entity.Teleport(2525, 115, 115);
                                if (Nr == 5) client.Entity.Teleport(2525, 98, 130);
                                if (Nr == 6) client.Entity.Teleport(2525, 96, 153);
                                if (Nr == 7) client.Entity.Teleport(2525, 112, 162);
                                if (Nr == 8) client.Entity.Teleport(2525, 130, 166);
                                if (Nr == 9) client.Entity.Teleport(2525, 139, 114);
                                if (Nr == 10) client.Entity.Teleport(2525, 156, 119);
                            }
                        }
                        if (client.Map.BaseID != 6001 && !client.Entity.Dead && req.OptionID == 167)//Donation War
                        {
                            if (client.Entity.NobilityRank == Game.ConquerStructures.NobilityRank.King)
                            {
                                client.Entity.Teleport(1166, 50, 50);//Kings Map
                            }
                            if (client.Entity.NobilityRank == Game.ConquerStructures.NobilityRank.Prince)
                            {
                                client.Entity.Teleport(1167, 50, 50);//Princes Map
                            }
                            if (client.Entity.NobilityRank == Game.ConquerStructures.NobilityRank.Duke)
                            {
                                client.Entity.Teleport(1168, 50, 50);//Duke Map
                            }
                        }
                        if (client.Map.BaseID != 6001 && !client.Entity.Dead && req.OptionID == 133)//5th Elements
                        {
                            client.Entity.Teleport(1233, 36, 34);
                        }
                        if (client.Map.BaseID != 6001 && !client.Entity.Dead && req.OptionID == 159)//DeathTeam
                        {
                            client.Entity.Teleport(1595, 125, 130);
                        }
                        if (client.Map.BaseID != 6001 && !client.Entity.Dead && req.OptionID == 115)//GuildWar
                        {
                            Random R = new Random();
                            int Nr = R.Next(1, 10);
                            if (Nr == 1)
                            {
                                client.Entity.Teleport(1038, 351, 341);
                            }
                            if (Nr == 2)
                            {
                                client.Entity.Teleport(1038, 335, 345);
                            }
                            if (Nr == 3)
                            {
                                client.Entity.Teleport(1038, 309, 369);
                            }
                            if (Nr == 4)
                            {
                                client.Entity.Teleport(1038, 283, 340);
                            }
                            if (Nr == 5)
                            {
                                client.Entity.Teleport(1038, 310, 327);
                            }
                            if (Nr == 6)
                            {
                                client.Entity.Teleport(1038, 318, 297);
                            }
                            if (Nr == 7)
                            {
                                client.Entity.Teleport(1038, 347, 309);
                            }
                            if (Nr == 8)
                            {
                                client.Entity.Teleport(1038, 337, 320);
                            }
                            if (Nr == 9)
                            {
                                client.Entity.Teleport(1038, 309, 293);
                            }
                            if (Nr == 10)
                            {
                                client.Entity.Teleport(1038, 371, 300);
                            }
                        }
                        if (client.Map.BaseID != 6001 && !client.Entity.Dead && req.OptionID == 202)//HoursPK War
                        {
                            if (client.Entity.Owner.Equipment.TryGetItem((byte)12).Plus > 7)
                            {
                                client.Entity.AddFlag(Update.Flags.Ride);
                                Random R = new Random();
                                int Nr = R.Next(1, 10);
                                if (Nr == 1) client.Entity.Teleport(2525, 114, 078);
                                if (Nr == 2) client.Entity.Teleport(2525, 96, 87);
                                if (Nr == 3) client.Entity.Teleport(2525, 142, 88);
                                if (Nr == 4) client.Entity.Teleport(2525, 115, 115);
                                if (Nr == 5) client.Entity.Teleport(2525, 98, 130);
                                if (Nr == 6) client.Entity.Teleport(2525, 96, 153);
                                if (Nr == 7) client.Entity.Teleport(2525, 112, 162);
                                if (Nr == 8) client.Entity.Teleport(2525, 130, 166);
                                if (Nr == 9) client.Entity.Teleport(2525, 139, 114);
                                if (Nr == 10) client.Entity.Teleport(2525, 156, 119);
                            }
                        }
                        if (req.InteractType == NpcReply.MessageBox)
                        {
                            if (req.OptionID == 255)
                            {
                                if (client.OnMessageBoxOK != null)
                                {
                                    client.OnMessageBoxOK.Invoke();
                                    client.OnMessageBoxOK = null;
                                }
                            }
                            else
                            {
                                if (client.OnMessageBoxCANCEL != null)
                                {
                                    client.OnMessageBoxCANCEL.Invoke();
                                    client.OnMessageBoxCANCEL = null;
                                }
                            }
                        }
                        if (client.Map.BaseID != 6001 && !client.Entity.Dead && req.OptionID == 249)
                        {
                            Conquer_Online_Server.ServerBase.Kernel.Elite_PK_Tournament.AddMap(client);
                        }
                        if (client.Map.BaseID != 6001 && !client.Entity.Dead && req.OptionID == 248)
                        {
                            if (ServerBase.Kernel.PK == false)
                            {
                                client.Send(new Network.GamePackets.NpcReply(6, "The Tournoment has finished time of join."));

                            }
                            else
                            {
                                client.InPKT = true;
                                PKTournament.PKTHash.Add(client.Entity.UID, client);
                                //Conquer_Online_Server.ServerBase.Kernel.Elite_PK_Tournament.AddMap(client);
                                client.Entity.Teleport(1507, 100, 100);
                            }
                        }
                        if (client.Map.BaseID != 6001 && !client.Entity.Dead && req.OptionID == 247)
                        {

                            client.Entity.Teleport(1858, 70, 70);

                        }

                        if (client.Map.BaseID != 6001 && !client.Entity.Dead && req.OptionID == 246)
                        {

                            if (ServerBase.Kernel.PK == false)
                            {
                                client.Send(new Network.GamePackets.NpcReply(6, "The Tournoment has finished time of join."));

                            }
                            else
                            {
                                client.InPKT = true;
                                PKTournament.PKTHash.Add(client.Entity.UID, client);
                                //Conquer_Online_Server.ServerBase.Kernel.Elite_PK_Tournament.AddMap(client);
                                client.Entity.Teleport(1787, 50, 50);
                            }
                        }

                        if (client.Map.BaseID != 6001 && !client.Entity.Dead && req.OptionID == 245)
                        {
                            if (ServerBase.Kernel.PK == false)
                            {
                                client.Send(new Network.GamePackets.NpcReply(6, "The Tournoment has finished time of join."));

                            }
                            else
                            {
                                client.InPKT = true;
                                PKTournament.PKTHash.Add(client.Entity.UID, client);
                                //Conquer_Online_Server.ServerBase.Kernel.Elite_PK_Tournament.AddMap(client);
                                client.Entity.Teleport(1787, 50, 50);
                            }
                        }

                        if (client.Map.BaseID != 6001 && !client.Entity.Dead && req.OptionID == 244)
                        {
                            if (ServerBase.Kernel.PK == false)
                            {
                                client.Send(new Network.GamePackets.NpcReply(6, "The Tournoment has finished time of join."));

                            }
                            else
                            {
                                client.InPKT = true;
                                PKTournament.PKTHash.Add(client.Entity.UID, client);
                                //Conquer_Online_Server.ServerBase.Kernel.Elite_PK_Tournament.AddMap(client);
                                client.Entity.Teleport(1787, 50, 50);
                            }

                        }
                        if (client.Map.BaseID != 6001 && !client.Entity.Dead && req.OptionID == 243)
                        {
                            if (ServerBase.Kernel.PK == false)
                            {
                                client.Send(new Network.GamePackets.NpcReply(6, "The Tournoment has finished time of join."));

                            }
                            else
                            {
                                client.InPKT = true;
                                PKTournament.PKTHash.Add(client.Entity.UID, client);
                                //Conquer_Online_Server.ServerBase.Kernel.Elite_PK_Tournament.AddMap(client);
                                client.Entity.Teleport(1787, 50, 50);
                            }

                        }
                        if (client.Map.BaseID != 6001 && !client.Entity.Dead && req.OptionID == 242)
                        {
                            if (ServerBase.Kernel.PK == false)
                            {
                                client.Send(new Network.GamePackets.NpcReply(6, "The Tournoment has finished time of join."));

                            }
                            else
                            {
                                client.InPKT = true;
                                PKTournament.PKTHash.Add(client.Entity.UID, client);
                                //Conquer_Online_Server.ServerBase.Kernel.Elite_PK_Tournament.AddMap(client);
                                client.Entity.Teleport(1787, 50, 50);

                            }
                        }
                        if (client.Map.BaseID != 6001 && !client.Entity.Dead && req.OptionID == 241)
                        {
                            if (ServerBase.Kernel.PK == false)
                            {
                                client.Send(new Network.GamePackets.NpcReply(6, "The Tournoment has finished time of join."));

                            }
                            else
                            {
                                client.InPKT = true;
                                PKTournament.PKTHash.Add(client.Entity.UID, client);
                                //Conquer_Online_Server.ServerBase.Kernel.Elite_PK_Tournament.AddMap(client);
                                client.Entity.Teleport(1787, 50, 50);
                            }

                        }
                        if (client.Map.BaseID != 6001 && !client.Entity.Dead && req.OptionID == 240)
                        {
                            if (ServerBase.Kernel.PK == false)
                            {
                                client.Send(new Network.GamePackets.NpcReply(6, "The Tournoment has finished time of join."));

                            }
                            else
                            {
                                client.InPKT = true;
                                PKTournament.PKTHash.Add(client.Entity.UID, client);
                                //Conquer_Online_Server.ServerBase.Kernel.Elite_PK_Tournament.AddMap(client);
                                client.Entity.Teleport(1787, 50, 50);
                            }

                        }
                        if (client.Map.BaseID != 6001 && !client.Entity.Dead && req.OptionID == 238)
                        {

                            client.Entity.Teleport(2555, 50, 50);

                        }
                        if (client.Map.BaseID != 6001 && !client.Entity.Dead && req.OptionID == 239)
                        {
                            if (Program.Steed == false)
                            {
                                client.Send(new Network.GamePackets.NpcReply(6, "The SteedRace has finished time of join."));

                            }
                            else
                            {
                                Conquer_Online_Server.Interfaces.IConquerItem I = client.Equipment.TryGetItem(12);
                                if (I != null && I.ID != 0)
                                {
                                    client.Entity.srjoin = 1;
                                    client.Entity.Teleport(1950, 077, 157);
                                    client.Entity.AddFlag(Update.Flags.Ride);
                                }
                                else
                                {
                                    client.Send(new Network.GamePackets.NpcReply(6, "You Dont have a Steed ."));
                                }
                            }

                        }
                        else
                        {
                            if (ID == 2031)
                                client.ActiveNpc = req.NpcID;
                            if (req.NpcID == 12)
                            {
                                if (client.Entity.VIPLevel > 0)
                                {
                                    Data data = new Data(true);
                                    data.ID = Data.OpenWindow;
                                    data.UID = client.Entity.UID;
                                    data.TimeStamp = Time32.Now;
                                    data.dwParam = Data.WindowCommands.VIPWarehouse;
                                    data.wParam1 = client.Entity.X;
                                    data.wParam2 = client.Entity.Y;
                                    client.WarehouseOpen = true;
                                    client.Send(data);
                                    break;
                                }
                            }
                            Interfaces.INpc npc = null;
                            if (req.InteractType == 102)
                            {
                                if (client.Guild != null)
                                {
                                    if (client.AsMember.Rank == Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader)
                                    {
                                        client.Guild.ExpelMember(req.Input, false);
                                    }
                                }
                                return;
                            }
                            if (client.Map.Npcs.TryGetValue(client.ActiveNpc, out npc))
                            {
                                if (ServerBase.Kernel.GetDistance(client.Entity.X, client.Entity.Y, npc.X, npc.Y) > 17)
                                    return;
                                if (req.OptionID == 255 || (req.OptionID == 0 && ID == 2032))
                                    return;
                                req.NpcID = client.ActiveNpc;
                                //NpcDialogs.Dialogs.GetDialog(req, client);
                                Dialogs.GetDialog(req, client);
                            }
                        }
                        break;
                    }
                #endregion
                #region Compose (2036)
                case 2036:
                    {
                        Compose compose = new Compose(false);
                        compose.Deserialize(packet);
                        ComposePlus(compose, client);
                        break;
                    }
                #endregion
                #region Offline TG (2044)
                case 2044:
                    {
                        OfflineTGRequest otgr = new OfflineTGRequest(false);
                        otgr.Deserialize(packet);
                        switch (otgr.ID)
                        {
                            case OfflineTGRequest.OnTrainingTimeRequested:
                                {
                                    otgr.Minutes = 900;
                                    client.Send(otgr);
                                    break;
                                }
                            case OfflineTGRequest.OnConfirmation:
                                {
                                    client.Entity.PreviousMapID = client.Entity.MapID;
                                    client.Entity.PrevX = client.Entity.X;
                                    client.Entity.PrevY = client.Entity.Y;
                                    client.Entity.MapID = 601;
                                    client.Entity.X = 64;
                                    client.Entity.Y = 56;
                                    client.OfflineTGEnterTime = DateTime.Now;

                                    client.Disconnect();
                                    break;
                                }
                            case OfflineTGRequest.ClaimExperience:
                                {
                                    var T1 = new TimeSpan(DateTime.Now.Ticks);
                                    var T2 = new TimeSpan(client.OfflineTGEnterTime.Ticks);
                                    ushort minutes = (ushort)(T1.TotalMinutes - T2.TotalMinutes);
                                    minutes = (ushort)Math.Min((ushort)900, minutes);
                                    double expballGain = (double)300 * (double)minutes / (double)900;
                                    while (expballGain >= 100)
                                    {
                                        expballGain -= 100;
                                        client.IncreaseExperience(client.ExpBall, false);
                                    }
                                    if (expballGain != 0)
                                        client.IncreaseExperience((uint)(client.ExpBall * (expballGain / 100)), false);

                                    client.Entity.SetLocation(client.Entity.PreviousMapID, client.Entity.PrevX, client.Entity.PrevY);
                                    if (client.Map.ID == 1036 || client.Map.ID == 1039)
                                        client.Entity.Teleport(1002, 430, 378);
                                    else
                                    {
                                        switch (client.Map.ID)
                                        {
                                            default:
                                                {
                                                    client.Entity.Teleport(1002, 429, 378);
                                                    break;
                                                }
                                            case 1000:
                                                {
                                                    client.Entity.Teleport(1000, 500, 650);
                                                    break;
                                                }
                                            case 1020:
                                                {
                                                    client.Entity.Teleport(1020, 565, 562);
                                                    break;
                                                }
                                            case 1011:
                                                {
                                                    client.Entity.Teleport(1011, 188, 264);
                                                    break;
                                                }
                                            case 6001:
                                                {
                                                    client.Entity.Teleport(6001, 030, 075);
                                                    break;
                                                }

                                            case 1015:
                                                {
                                                    client.Entity.Teleport(1015, 717, 571);
                                                    break;
                                                }
                                        }
                                    }
                                    client.OfflineTGEnterTime = DateTime.Now;
                                    break;
                                }
                            default:
                                client.Send(otgr);
                                break;
                        }
                        break;
                    }
                #endregion
                #region Trade partner (2046)
                case 2046:
                    {
                        TradePartner partner = new TradePartner(false);
                        partner.Deserialize(packet);
                        switch (partner.Type)
                        {
                            case TradePartner.RequestPartnership:
                                RequestTradePartnership(partner, client);
                                break;
                            case TradePartner.RejectRequest:
                                RejectPartnership(partner, client);
                                break;
                            case TradePartner.BreakPartnership:
                                BreakPartnership(partner, client);
                                break;
                        }
                        break;
                    }
                #endregion
                #region ItemLock (2048)
                case 2048:
                    {
                        if (client.Action != 2)
                            return;
                        ItemLock itemlock = new ItemLock(false);
                        itemlock.Deserialize(packet);
                        switch (itemlock.ID)
                        {
                            case ItemLock.RequestLock:
                                LockItem(itemlock, client);
                                break;
                            case ItemLock.RequestUnlock:
                                UnlockItem(itemlock, client);
                                break;
                        }
                        break;
                    }
                #endregion
                #region Broadcast (2050)
                case 2050:
                    {
                        Broadcast cast = new Broadcast(false);
                        cast.Deserialize(packet);
                        switch (cast.Type)
                        {
                            case Broadcast.ReleaseSoonMessages:
                                {
                                    BroadcastInfoAwaiting(cast, client);
                                    break;
                                }
                            case Broadcast.MyMessages:
                                {
                                    BroadcastClientMessages(cast, client);
                                    break;
                                }
                            case Broadcast.BroadcastMessage:
                                {
                                    if (Game.ConquerStructures.Broadcast.Broadcasts.Count == ServerBase.Constants.MaxBroadcasts)
                                    {
                                        client.Send(new Message("You cannot send any broadcasts for now. The limit has been reached. Wait until a broadcast is chopped down.", System.Drawing.Color.Red, Message.TopLeft));
                                        break;
                                    }
                                    if (client.Entity.ConquerPoints >= 5)
                                    {
                                        client.Entity.ConquerPoints = (uint)Math.Max(0, (int)((int)client.Entity.ConquerPoints - (int)5));
                                        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;
                                        if (cast.List[0].Length > 80)
                                            cast.List[0] = cast.List[0].Remove(80);
                                        broadcast.Message = cast.List[0];
                                        if (Game.ConquerStructures.Broadcast.Broadcasts.Count == 0)
                                        {
                                            if (Game.ConquerStructures.Broadcast.CurrentBroadcast.EntityID == 1)
                                            {
                                                Game.ConquerStructures.Broadcast.CurrentBroadcast = broadcast;
                                                Game.ConquerStructures.Broadcast.LastBroadcast = DateTime.Now;
                                                ServerBase.Kernel.SendWorldMessage(new Message(cast.List[0], "ALLUSERS", client.Entity.Name, System.Drawing.Color.Red, Message.BroadcastMessage), ServerBase.Kernel.GamePool.Values);
                                                client.Send(cast);
                                                break;
                                            }
                                        }
                                        Game.ConquerStructures.Broadcast.Broadcasts.Add(broadcast);
                                        cast.dwParam = (uint)Game.ConquerStructures.Broadcast.Broadcasts.Count;
                                        client.Send(cast);
                                        break;
                                    }
                                    break;
                                }
                            case Broadcast.Urgen5CPs:
                                {
                                    for (int c = 0; c < Game.ConquerStructures.Broadcast.Broadcasts.Count; c++)
                                    {
                                        var broadcast = Game.ConquerStructures.Broadcast.Broadcasts[c];
                                        if (broadcast.ID == cast.dwParam)
                                        {
                                            if (c != 0)
                                            {
                                                if (client.Entity.ConquerPoints >= 5)
                                                {
                                                    broadcast.SpentCPs += 5;
                                                    client.Entity.ConquerPoints = (uint)Math.Max(0, (int)((int)client.Entity.ConquerPoints - (int)5));
                                                    if (Game.ConquerStructures.Broadcast.Broadcasts[c - 1].SpentCPs <= broadcast.SpentCPs)
                                                    {
                                                        Game.ConquerStructures.Broadcast.Broadcasts[c] = Game.ConquerStructures.Broadcast.Broadcasts[c - 1];
                                                        Game.ConquerStructures.Broadcast.Broadcasts[c - 1] = broadcast;
                                                    }
                                                    else
                                                    {
                                                        Game.ConquerStructures.Broadcast.Broadcasts[c] = broadcast;
                                                    }
                                                }
                                            }
                                        }
                                    }
                                    break;
                                }
                            case Broadcast.Urgen15CPs:
                                {
                                    for (int c = 0; c < Game.ConquerStructures.Broadcast.Broadcasts.Count; c++)
                                    {
                                        var broadcast = Game.ConquerStructures.Broadcast.Broadcasts[c];
                                        if (broadcast.ID == cast.dwParam)
                                        {
                                            if (c != 0)
                                            {
                                                if (client.Entity.ConquerPoints >= 15)
                                                {
                                                    broadcast.SpentCPs += 15;
                                                    client.Entity.ConquerPoints = (uint)Math.Max(0, (int)((int)client.Entity.ConquerPoints - (int)15));
                                                    for (int b = c - 1; b > 0; b--)
                                                        Game.ConquerStructures.Broadcast.Broadcasts[b] = Game.ConquerStructures.Broadcast.Broadcasts[b - 1];

                                                    Game.ConquerStructures.Broadcast.Broadcasts[0] = broadcast;
                                                }
                                            }
                                        }
                                    }
                                    break;
                                }
                        }
                        break;
                    }
                #endregion
                #region Nobility (2064)
                case 2064:
                    {
                        NobilityInfo nobility = new NobilityInfo(false);
                        nobility.Deserialize(packet);
                        Game.ConquerStructures.Nobility.Handle(nobility, client);
                        break;
                    }
                #endregion
                #region Mentor prize (2067)
                #region MentorPremio
                case 1036:
                    {
                        switch (packet[4])
                        {
                            #region Send
                            case 0:
                                // Writer.WriteUInt32(client.Entity.Contribution_Experience.Training_Exp, 8, packet);
                                //Writer.WriteUInt32(client.Entity.Contribution_Experience.Blessing_Exp, 12, packet);
                                client.Send(packet);
                                break;
                            #endregion
                            #region Claim Training Exp
                            case 1:
                                {
                                    if (client.Entity.Contribution_Experience.Blessing_Exp > 0)
                                    {
                                        ulong Increase = (ulong)(client.ExpBall * (client.Entity.Contribution_Experience.Training_Exp / 6000000));
                                        client.Entity.Contribution_Experience.Training_Exp = 0;
                                        client.IncreaseExperience(Increase, true);
                                        client.Send(packet);
                                    }
                                    break;
                                }
                            #endregion
                            #region Claim Blessing Exp
                            case 2:
                                {
                                    if (client.Entity.Contribution_Experience.Blessing_Exp > 0)
                                    {
                                        ulong Increase = (ulong)(client.ExpBall * (client.Entity.Contribution_Experience.Blessing_Exp / 6000000));
                                        client.Entity.Contribution_Experience.Blessing_Exp = 0;
                                        client.IncreaseExperience(Increase, true);
                                        client.Send(packet);
                                    }
                                    break;
                                }
                            #endregion
                            default: Console.WriteLine("Unknown 1036 claim type " + packet[4]); break;
                        }
                        break;
                    }
                #endregion
                case 2067:
                    {
                        MentorPrize prize = new MentorPrize(false);
                        prize.Deserialize(packet);
                        switch (prize.Prize_Type)
                        {
                            case MentorPrize.ClaimExperience:
                                {
                                    // client.IncreaseExperience((ulong)(((double)client.PrizeExperience / 606) * client.ExpBall), false);
                                    client.PrizeExperience = 0;
                                    foreach (var appr in client.Apprentices.Values)
                                    {
                                        appr.Actual_Experience = 0;
                                        Database.KnownPersons.SaveApprenticeInfo(appr);
                                    }
                                    prize.Mentor_ID = client.Entity.UID;
                                    prize.Prize_Type = MentorPrize.Show;
                                    prize.Prize_Experience = client.PrizeExperience;
                                    prize.Prize_HeavensBlessing = client.PrizeHeavenBlessing;
                                    prize.Prize_PlusStone = client.PrizePlusStone;
                                    client.Send(prize);
                                    break;
                                }
                            case MentorPrize.ClaimHeavenBlessing:
                                {
                                    client.AddBless(client.PrizeHeavenBlessing);
                                    client.PrizeHeavenBlessing = 0;
                                    foreach (var appr in client.Apprentices.Values)
                                    {
                                        appr.Actual_HeavenBlessing = 0;
                                        Database.KnownPersons.SaveApprenticeInfo(appr);
                                    }
                                    prize.Mentor_ID = client.Entity.UID;
                                    prize.Prize_Type = MentorPrize.Show;
                                    prize.Prize_Experience = client.PrizeExperience;
                                    prize.Prize_HeavensBlessing = client.PrizeHeavenBlessing;
                                    prize.Prize_PlusStone = client.PrizePlusStone;
                                    client.Send(prize);
                                    break;
                                }
                            case MentorPrize.ClaimPlus:
                                {
                                    int stones = client.PrizePlusStone / 100;
                                    int totake = stones;
                                    if (stones > 0)
                                    {
                                        for (; stones > 0; stones--)
                                        {
                                            client.PrizePlusStone -= 100;
                                            if (!client.Inventory.Add(730001, 1, 1))
                                                break;
                                        }
                                    }
                                    foreach (var appr in client.Apprentices.Values)
                                    {
                                        if (appr.Actual_Plus >= totake)
                                        {
                                            appr.Actual_Plus -= (ushort)totake;
                                            totake = 0;
                                        }
                                        else
                                        {
                                            totake -= appr.Actual_Plus;
                                            appr.Actual_Plus = 0;
                                        }
                                        Database.KnownPersons.SaveApprenticeInfo(appr);
                                    }
                                    prize.Mentor_ID = client.Entity.UID;
                                    prize.Prize_Type = MentorPrize.Show;
                                    prize.Prize_Experience = client.PrizeExperience;
                                    prize.Prize_HeavensBlessing = client.PrizeHeavenBlessing;
                                    prize.Prize_PlusStone = client.PrizePlusStone;
                                    client.Send(prize);
                                    break;
                                }
                            case MentorPrize.Show:
                                {
                                    prize.Mentor_ID = client.Entity.UID;
                                    prize.Prize_Type = MentorPrize.Show;
                                    prize.Prize_Experience = client.PrizeExperience;
                                    prize.Prize_HeavensBlessing = client.PrizeHeavenBlessing;
                                    prize.Prize_PlusStone = client.PrizePlusStone;
                                    client.Send(prize);
                                    break;
                                }
                        }
                        break;
                    }
                #endregion
                #region MentorApprentice (2065)
                case 2065:
                    {
                        MentorApprentice ma = new MentorApprentice(false);
                        ma.Deserialize(packet);
                        switch (ma.Type)
                        {
                            case MentorApprentice.LeaveMentor:
                                {
                                    LeaveMentor(ma, client);
                                    break;
                                }
                            case MentorApprentice.ExpellApprentice:
                                {
                                    ExpelApprentice(ma, client);
                                    break;
                                }
                            case MentorApprentice.RequestApprentice:
                                {
                                    AddApprentice(ma, client);
                                    break;
                                }
                            case MentorApprentice.RequestMentor:
                                {
                                    AddMentor(ma, client);
                                    break;
                                }
                            case MentorApprentice.AcceptRequestApprentice:
                                {
                                    AcceptRequestApprentice(ma, client);
                                    break;
                                }
                            case MentorApprentice.AcceptRequestMentor:
                                {
                                    AcceptRequestMentor(ma, client);
                                    break;
                                }
                        }
                        break;
                    }
                case 2066:
                    {
                        MentorInformation info = new MentorInformation(false);
                        info.Deserialize(packet);
                        if (info.Mentor_Type == 1)
                        {
                            client.ReviewMentor();
                        }
                        break;
                    }
                #endregion
                #region PurifyItem (2076)
                case 2076:
                    {
                        Purification ps = new Purification(false);
                        ps.Deserialize(packet);
                        switch (ps.Mode)
                        {
                            case Purification.Purify:
                                PurifyItem(ps, client); break;
                            case Purification.Purify1:
                                new Game.Features.Refinery.Handle(packet, client);
                                break;
                        }
                        break;
                    }
                #endregion

                #region Arsenal Guild
                case 2202:
                    {

                        ArsenalInscribitionList list = new ArsenalInscribitionList();
                        client.Send(list.Build(packet, client.Guild));
                        break;
                    }
                case 2203:
                    {
                        client.Guild.Arsenal.Update(client.Guild);
                        client.Send(client.Guild.A_Packet);
                        Database.ArsenalsTable.Load(client.Guild);
                        #region Handle
                        byte pType = packet[4];
                        byte i_type = packet[8];
                        uint i_Uid = BitConverter.ToUInt32(packet, 12);
                        switch (pType)
                        {
                            case 0://Unlock
                                {
                                    uint value = 5000000;
                                    if (client.Guild.SilverFund >= value)
                                    {

                                        if (i_type == 2 || i_type == 3)
                                        { value = 10000000; }
                                        if (i_type >= 3 && i_type <= 5)
                                        { value = 15000000; }
                                        if (i_type == 6 || i_type == 7)
                                        { value = 20000000; }
                                        if (client.Guild.SilverFund >= value)
                                        {
                                            client.Guild.SilverFund -= value;
                                            Database.ArsenalsTable.CreateArsenal((ushort)client.Guild.ID, (Game.ConquerStructures.Society.ArsenalType)i_type);
                                        }
                                        else
                                            client.Send(new Network.GamePackets.Message("sorry, you need " + value + " guild Found", System.Drawing.Color.Red, Message.TopLeft).ToArray());
                                    }
                                    else
                                        client.Send(new Network.GamePackets.Message("sorry, you need " + value + " guild Found", System.Drawing.Color.Red, Message.TopLeft).ToArray());
                                    break;
                                }
                            case 1://Inscribe
                                {
                                    Interfaces.IConquerItem Item = null;
                                    if (client.Inventory.TryGetItem(i_Uid, out Item))
                                    {
                                        client.Guild.Arsenal.Inscribe((Game.ConquerStructures.Society.ArsenalType)i_type, Item, client);
                                        client.Guild.Arsenal.Update((Game.ConquerStructures.Society.ArsenalType)i_type, client.Guild);
                                    }
                                    break;
                                }
                            case 2://Uninscribe
                                {
                                    Game.ConquerStructures.Society.ArsenalSingle AS = null;
                                    if (client.Guild.Arsenal.Inscribed[(Game.ConquerStructures.Society.ArsenalType)i_type].TryGetValue(i_Uid, out AS))
                                    {
                                        client.Guild.Arsenal.Uninscribe((Game.ConquerStructures.Society.ArsenalType)i_type, AS, client);
                                        client.Guild.Arsenal.Update((Game.ConquerStructures.Society.ArsenalType)i_type, client.Guild);
                                    }
                                    break;
                                }
                            case 3://Enhance
                                {
                                    //client.Entity.Mentors.Share();
                                    client.Guild.A_Packet.SetTotals2();
                                    client.Send(client.Guild.A_Packet);
                                    break;
                                }
                            case 4://Show Main Info
                                {
                                    client.Guild.A_Packet.SetTotals();
                                    client.Send(client.Guild.A_Packet);
                                    break;
                                }
                        }
                        client.Send(packet);
                        #endregion
                        break;
                    }
                #endregion
                #region Arena (2207<->2211)
                case 2207://Request Arena ranking List
                    {
                        //Code snippet that belongs to Ultimation
                        ushort PageIndex = BitConverter.ToUInt16(packet, 6);
                        Game.ConquerStructures.Arena.Statistics.ShowRankingPage(packet[4], PageIndex, client);
                        break;
                    }
                case 2206:
                    {
                        //Code snippet that belongs to Ultimation
                        ushort PageIndex = BitConverter.ToUInt16(packet, 4);
                        Game.ConquerStructures.Arena.QualifyEngine.RequestGroupList(client, PageIndex);
                        break;
                    }
                case 2205://Arena Signup!
                    {
                        //Code snippet that belongs to Ultimation
                        uint DialogID = BitConverter.ToUInt32(packet, 4);
                        uint ButtonID = BitConverter.ToUInt32(packet, 8);
                        switch (DialogID)
                        {
                            case 4:
                                {
                                    switch (ButtonID)
                                    {
                                        case 0:
                                            {
                                                Game.ConquerStructures.Arena.QualifyEngine.DoQuit(client);
                                                break;
                                            }
                                    }
                                    break;
                                }
                            case 0: Game.ConquerStructures.Arena.QualifyEngine.DoSignup(client); client.Send(packet); break;
                            case 1: Game.ConquerStructures.Arena.QualifyEngine.DoQuit(client); client.Send(packet); break;
                            case 3:
                                {
                                    switch (ButtonID)
                                    {
                                        case 2: Game.ConquerStructures.Arena.QualifyEngine.DoGiveUp(client); break;
                                        case 1: Game.ConquerStructures.Arena.QualifyEngine.DoAccept(client); break;
                                    }
                                    break;
                                }
                            case 5:
                                {
                                    if (client.ArenaStatistic.ArenaPoints <= 1500)
                                        if (client.Entity.Money >= 9000000)
                                        {
                                            client.Entity.Money -= 9000000;
                                            client.ArenaStatistic.ArenaPoints += 1500;
                                            client.Send(client.ArenaStatistic);
                                        }
                                    break;
                                }
                            case 11://Win/Lose Dialog
                                {
                                    switch (ButtonID)
                                    {
                                        case 0: Game.ConquerStructures.Arena.QualifyEngine.DoSignup(client); break;
                                    }
                                    break;
                                }

                        }
                        break;
                    }
                case 2208://Request Arena Winner List
                    {
                        //Code snippet that belongs to Ultimation
                        Game.ConquerStructures.Arena.Statistics.ShowWiners(client);
                        break;
                    }
                case 2209:
                    {
                        client.ArenaStatistic.Send(client);
                        break;
                    }
                case 2211:
                    {
                        ushort Type = BitConverter.ToUInt16(packet, 4);
                        uint Fighter = BitConverter.ToUInt32(packet, 10);
                        if (Type == 0)
                        {
                            if (ServerBase.Kernel.GamePool.ContainsKey(Fighter))
                            {
                                Client.GameState Client = ServerBase.Kernel.GamePool[Fighter];
                                if (Client.QualifierGroup != null)
                                {
                                    if (Client.QualifierGroup.Inside)
                                    {
                                        if (!Client.QualifierGroup.Done)
                                        {
                                            Client.QualifierGroup.BeginWatching(client);
                                        }
                                    }
                                }
                            }
                        }
                        else if (Type == 1)
                        {
                            Game.ConquerStructures.Arena.QualifyEngine.DoLeave(client);
                        }
                        else if (Type == 4)
                        {
                            string name = "";
                            for (int c = 22; c < packet.Length; c++)
                            {
                                if (packet[c] != 0)
                                    name += (char)packet[c];
                                else
                                    break;
                            }
                            Game.ConquerStructures.Arena.QualifyEngine.DoCheer(client, name);
                        }
                        break;
                    }
                #endregion
                #region Movement/Walk (10005)
                case 10005:
                    {
                        if (client.Action != 2)
                            return;
                        GroundMovement groundMovement = new GroundMovement(false);
                        groundMovement.Deserialize(packet);
                        PlayerGroundMovment(groundMovement, client);
                        break;
                    }
                #endregion
                #region Data (10010)
                case 10010:
                    {
                        if (client.Action != 2)
                            return;
                        Data gData = new Data(false);
                        gData.Deserialize(packet);
                        switch (gData.ID)
                        {
                            case Data.SwingPickaxe:
                                client.Mining = true;
                                break;
                            case Data.Revive:

                                Revive(gData, client);
                                // Revive(gData, client);
                                break;
                            case Data.UsePortal:
                                if (client.Entity.MapID == 601)
                                {
                                    client.Entity.Teleport(601, 063, 055);
                                }
                                else
                                    UsePortal(gData, client);
                                break;

                            case Data.ChangePKMode:
                                ChangePKMode(gData, client);
                                break;
                            case Data.ChangeAction:
                                ChangeAction(gData, client);
                                break;
                            case Data.ChangeDirection:
                                ChangeDirection(gData, client);
                                break;
                            case Data.Hotkeys:
                                client.Send(packet);
                                break;
                            case 408://steed soul remoeve
                                {

                                    break;
                                }
                            case Data.ConfirmSpells:
                                if (client.Spells != null)
                                    foreach (Interfaces.ISkill spell in client.Spells.Values)
                                        if (spell.ID != 3060)
                                            spell.Send(client);
                                client.Send(packet);
                                break;
                            case Data.ConfirmProficiencies:
                                if (client.Proficiencies != null)
                                    foreach (Interfaces.ISkill proficiency in client.Proficiencies.Values)
                                        proficiency.Send(client);
                                client.Send(packet);
                                break;
                            case Data.ConfirmGuild:
                                client.Send(packet);
                                break;
                            case Data.ConfirmFriends:
                                #region Friends/Enemy/TradePartners/Apprentices
                                Message msg2 = new Message("Your friend, " + client.Entity.Name + ", has logged on.", System.Drawing.Color.Red, Message.TopLeft);

                                foreach (Game.ConquerStructures.Society.Friend friend in client.Friends.Values)
                                {
                                    if (friend.IsOnline)
                                    {
                                        var pckt = new KnownPersons(true)
                                        {
                                            UID = client.Entity.UID,
                                            Type = KnownPersons.RemovePerson,
                                            Name = client.Entity.Name,
                                            Online = true
                                        };
                                        friend.Client.Send(pckt);
                                        pckt.Type = KnownPersons.AddFriend;
                                        friend.Client.Send(pckt);
                                        friend.Client.Send(msg2);
                                    }
                                    client.Send(new KnownPersons(true)
                                    {
                                        UID = friend.ID,
                                        Type = KnownPersons.AddFriend,
                                        Name = friend.Name,
                                        Online = friend.IsOnline
                                    });
                                    if (friend.Message != "")
                                    {
                                        client.Send(new Message(friend.Message, client.Entity.Name, friend.Name, System.Drawing.Color.Red, Message.Whisper));
                                        Database.KnownPersons.UpdateMessageOnFriend(friend.ID, client.Entity.UID, "");
                                    }
                                }

                                foreach (Game.ConquerStructures.Society.Enemy enemy in client.Enemy.Values)
                                {
                                    client.Send(new KnownPersons(true)
                                    {
                                        UID = enemy.ID,
                                        Type = KnownPersons.AddEnemy,
                                        Name = enemy.Name,
                                        Online = enemy.IsOnline
                                    });
                                }
                                Message msg3 = new Message("Your partner, " + client.Entity.Name + ", has logged in.", System.Drawing.Color.Red, Message.TopLeft);

                                foreach (Game.ConquerStructures.Society.TradePartner partner in client.Partners.Values)
                                {
                                    if (partner.IsOnline)
                                    {
                                        var packet3 = new TradePartner(true)
                                        {
                                            UID = client.Entity.UID,
                                            Type = TradePartner.BreakPartnership,
                                            Name = client.Entity.Name,
                                            HoursLeft = (int)(new TimeSpan(partner.ProbationStartedOn.AddDays(3).Ticks).TotalHours - new TimeSpan(DateTime.Now.Ticks).TotalHours),
                                            Online = true
                                        };
                                        partner.Client.Send(packet3);
                                        packet3.Type = TradePartner.AddPartner;
                                        partner.Client.Send(packet3);
                                        partner.Client.Send(msg3);
                                    }
                                    var packet4 = new TradePartner(true)
                                    {
                                        UID = partner.ID,
                                        Type = TradePartner.AddPartner,
                                        Name = partner.Name,
                                        HoursLeft = (int)(new TimeSpan(partner.ProbationStartedOn.AddDays(3).Ticks).TotalHours - new TimeSpan(DateTime.Now.Ticks).TotalHours),
                                        Online = partner.IsOnline
                                    };
                                    client.Send(packet4);
                                }

                                foreach (Game.ConquerStructures.Society.Apprentice appr in client.Apprentices.Values)
                                {
                                    if (appr.IsOnline)
                                    {
                                        ApprenticeInformation AppInfo = new ApprenticeInformation();
                                        AppInfo.Apprentice_ID = appr.ID;
                                        AppInfo.Apprentice_Level = appr.Client.Entity.Level;
                                        AppInfo.Apprentice_Class = appr.Client.Entity.Class;
                                        AppInfo.Apprentice_PkPoints = appr.Client.Entity.PKPoints;
                                        AppInfo.Apprentice_Experience = appr.Actual_Experience;
                                        AppInfo.Apprentice_Composing = appr.Actual_Plus;
                                        AppInfo.Apprentice_Blessing = appr.Actual_HeavenBlessing;
                                        AppInfo.Apprentice_Name = appr.Name;
                                        AppInfo.Apprentice_Online = true;
                                        AppInfo.Apprentice_Spouse_Name = appr.Client.Entity.Spouse;
                                        AppInfo.Enrole_date = appr.EnroleDate;
                                        AppInfo.Mentor_ID = client.Entity.UID;
                                        AppInfo.Mentor_Mesh = client.Entity.Mesh;
                                        AppInfo.Mentor_Name = client.Entity.Name;
                                        AppInfo.Type = 2;
                                        client.Send(AppInfo);

                                        MentorInformation Information = new MentorInformation(true);
                                        Information.Mentor_Type = 1;
                                        Information.Mentor_ID = client.Entity.UID;
                                        Information.Apprentice_ID = appr.ID;
                                        Information.Enrole_Date = appr.EnroleDate;
                                        Information.Mentor_Level = client.Entity.Level;
                                        Information.Mentor_Class = client.Entity.Class;
                                        Information.Mentor_PkPoints = client.Entity.PKPoints;
                                        Information.Mentor_Mesh = client.Entity.Mesh;
                                        Information.Mentor_Online = true;
                                        Information.Shared_Battle_Power = (uint)(((client.Entity.BattlePower - client.Entity.ExtraBattlePower) - (appr.Client.Entity.BattlePower - appr.Client.Entity.ExtraBattlePower)) / 3.3F);
                                        Information.String_Count = 3;
                                        Information.Mentor_Name = client.Entity.Name;
                                        Information.Apprentice_Name = appr.Name;
                                        Information.Mentor_Spouse_Name = client.Entity.Spouse;
                                        appr.Client.ReviewMentor();
                                        appr.Client.Send(Information);
                                    }
                                    else
                                    {
                                        ApprenticeInformation AppInfo = new ApprenticeInformation();
                                        AppInfo.Apprentice_ID = appr.ID;
                                        AppInfo.Apprentice_Name = appr.Name;
                                        AppInfo.Apprentice_Online = false;
                                        AppInfo.Enrole_date = appr.EnroleDate;
                                        AppInfo.Mentor_ID = client.Entity.UID;
                                        AppInfo.Mentor_Mesh = client.Entity.Mesh;
                                        AppInfo.Mentor_Name = client.Entity.Name;
                                        AppInfo.Type = 2;
                                        client.Send(AppInfo);
                                    }
                                }
                                #endregion
                                client.Send(packet);
                                break;
                            case Data.EndTeleport:
                                break;
                            case Data.GetSurroundings:
                                if (client.Booth != null)
                                {
                                    client.Entity.TransformationID = 0;
                                    client.Booth.Remove();
                                    client.Booth = null;
                                }
                                GetSurroundings(client);
                                client.Send(new MapStatus() { BaseID = client.Map.BaseID, ID = client.Map.ID, Status = Database.MapsTable.MapInformations[client.Map.ID].Status });
                                Game.Weather.CurrentWeatherBase.Send(client);
                                client.Send(gData);
                                break;
                            case Data.SetLocation:
                                SetLocation(gData, client);
                                break;
                            case Data.Jump:
                                PlayerJump(gData, client);
                                break;
                            case Data.UnknownEntity:
                                {
                                    #region UnknownEntity
                                    Client.GameState pClient = null;
                                    if (ServerBase.Kernel.GamePool.TryGetValue(gData.dwParam, out pClient))
                                    {
                                        if (ServerBase.Kernel.GetDistance(pClient.Entity.X, pClient.Entity.Y, client.Entity.X, client.Entity.Y) <= ServerBase.Constants.pScreenDistance && client.Map.ID == pClient.Map.ID)
                                        {
                                            if (pClient.Guild != null)
                                                pClient.Guild.SendName(client);
                                            if (client.Guild != null)
                                                client.Guild.SendName(pClient);
                                            if (pClient.Entity.UID != client.Entity.UID)
                                            {
                                                if (pClient.Map.ID == client.Map.ID)
                                                {
                                                    if (pClient.Map.BaseID == 700)
                                                    {
                                                        if (client.QualifierGroup != null)
                                                        {
                                                            if (pClient.QualifierGroup != null)
                                                            {
                                                                client.Entity.SendSpawn(pClient, false);
                                                                pClient.Entity.SendSpawn(client, false);
                                                            }
                                                            else
                                                            {
                                                                client.Entity.SendSpawn(pClient, false);
                                                                client.Screen.Add(pClient.Entity);
                                                            }
                                                        }
                                                        else
                                                        {
                                                            if (pClient.QualifierGroup != null)
                                                            {
                                                                pClient.Entity.SendSpawn(client, false);
                                                                pClient.Screen.Add(client.Entity);
                                                            }
                                                            else
                                                            {
                                                                client.Entity.SendSpawn(pClient, false);
                                                                pClient.Entity.SendSpawn(client, false);
                                                            }
                                                        }
                                                    }
                                                    else
                                                    {
                                                        client.Entity.SendSpawn(pClient, false);
                                                        pClient.Entity.SendSpawn(client, false);
                                                    }
                                                }
                                            }
                                        }
                                    }
                                    else
                                    {
                                        Game.Entity monster = null;
                                        if (client.Map.Entities.TryGetValue(gData.dwParam, out monster))
                                        {
                                            if (ServerBase.Kernel.GetDistance(monster.X, monster.Y, client.Entity.X, client.Entity.Y) <= ServerBase.Constants.pScreenDistance)
                                            {
                                                monster.SendSpawn(client, false);
                                            }
                                        }
                                        if (client.Map.Companions.TryGetValue(gData.dwParam, out monster))
                                        {
                                            if (ServerBase.Kernel.GetDistance(monster.X, monster.Y, client.Entity.X, client.Entity.Y) <= ServerBase.Constants.pScreenDistance)
                                            {
                                                monster.SendSpawn(client, false);
                                            }
                                        }
                                    }
                                    #endregion
                                    break;
                                }
                            case Data.CompleteLogin:
                                LoginMessages(client);

                                EntityEquipment equips = new EntityEquipment(true);
                                equips.ParseHero(client);
                                client.Send(equips);
                                break;
                            case Data.ChangeFace:
                                ChangeFace(gData, client);
                                break;
                            case Data.ObserveEquipment:
                            case Data.ObserveEquipment2:
                            case Data.ObserveKnownPerson:
                                ObserveEquipment(gData, client);
                                break;
                            case Data.ViewEnemyInfo:
                                {
                                    if (client.Enemy.ContainsKey(gData.dwParam))
                                    {
                                        if (client.Enemy[gData.dwParam].IsOnline)
                                        {
                                            KnownPersonInfo info = new KnownPersonInfo(true);
                                            info.Fill(client.Enemy[gData.dwParam], true, false);
                                            if (client.Enemy[gData.dwParam].Client.Guild != null)
                                                client.Enemy[gData.dwParam].Client.Guild.SendName(client);
                                            client.Send(info);
                                        }
                                    }
                                    break;
                                }
                            case Data.ViewFriendInfo:
                                {
                                    if (client.Friends.ContainsKey(gData.dwParam))
                                    {
                                        if (client.Friends[gData.dwParam].IsOnline)
                                        {
                                            KnownPersonInfo info = new KnownPersonInfo(true);
                                            info.Fill(client.Friends[gData.dwParam], false, false);
                                            if (client.Friends[gData.dwParam].Client.Guild != null)
                                                client.Friends[gData.dwParam].Client.Guild.SendName(client);
                                            client.Send(info);
                                        }
                                    }
                                    break;
                                }
                            case Data.ViewPartnerInfo:
                                {
                                    if (client.Partners.ContainsKey(gData.dwParam))
                                    {
                                        if (client.Partners[gData.dwParam].IsOnline)
                                        {
                                            TradePartnerInfo info = new TradePartnerInfo(true);
                                            info.Fill(client.Partners[gData.dwParam]);
                                            if (client.Partners[gData.dwParam].Client.Guild != null)
                                                client.Partners[gData.dwParam].Client.Guild.SendName(client);
                                            client.Send(info);
                                        }
                                    }
                                    break;
                                }
                            case Data.EndFly:
                                client.Entity.RemoveFlag(Update.Flags.Fly);
                                break;
                            case Data.EndTransformation:
                                client.Entity.Untransform();
                                break;
                            case Data.XPListEnd:
                            case Data.Die:
                                break;
                            case Data.OwnBooth:
                                {

                                    //client.Entity.TransformationTime = 3600;
                                    if (client.WarehouseOpen == true)
                                    {
                                        client.Send(new Message("you cant booth when you open warehose", Color.AntiqueWhite, 2005));

                                        return;
                                    }
                                    else
                                    {
                                        client.Booth = new Conquer_Online_Server.Game.ConquerStructures.Booth(client, gData);
                                        client.Send(new Data(true) { ID = Data.ChangeAction, UID = client.Entity.UID, dwParam = 0 });

                                    }
                                    break;
                                }
                            case Data.Away:
                                {
                                    if (client.Entity.Away == 0)
                                        client.Entity.Away = 1;
                                    else
                                        client.Entity.Away = 0;
                                    client.SendScreenSpawn(client.Entity, false);
                                    break;
                                }
                            case Data.DeleteCharacter:
                                {
                                    if ((client.WarehousePW == null || client.WarehousePW == "" || client.WarehousePW == "0" && gData.dwParam == 0) || (client.WarehousePW == gData.dwParam.ToString()))
                                    {
                                        client.Account.EntityID = 0;
                                        client.Account.Save();
                                        client.Disconnect();
                                    }
                                    break;
                                }
                            case Data.TeamSearchForMember:
                                {
                                    if (client.Team != null)
                                    {
                                        Client.GameState Client = null;
                                        if (!client.Team.IsTeammate(gData.UID))
                                            return;
                                        if (Kernel.GamePool.TryGetValue(gData.UID, out Client))
                                        {
                                            gData.wParam1 = Client.Entity.X;
                                            gData.wParam2 = Client.Entity.Y;
                                            gData.Send(client);
                                        }
                                    }
                                    break;
                                }
                            default:
                                if (client.Account.State == Conquer_Online_Server.Database.AccountTable.AccountState.ProjectManager)
                                    client.Send(new Message("Unknown generaldata id: " + gData.ID, System.Drawing.Color.CadetBlue, Message.Talk));
                                break;
                        }
                        break;
                    }
                #endregion
                #region Status 1040
                case 1040:
                    {
                        Status ShowStatistics2 = new Status(client);
                        ShowStatistics2.Deserialize(packet);
                        ShowStatistics2.Send(client);
                        //uint UID = BitConverter.ToUInt32(packet, 4);
                        //Client.GameState Client;
                        //if (ServerBase.Kernel.GamePool.TryGetValue(UID, out Client))
                        //{
                        //    client.Send(WindowStats(Client));
                        //}
                        break;
                    }
                #endregion
                #region Flowers
                case 1150:
                    {
                        SendFlowers(client, packet);

                        break;
                    }
                case 1151:
                    {
                        AddFlowers(client, packet);

                        break;
                    }

                #endregion
                #region Clans
                case 1312:
                    {
                        switch (packet[4])
                        {
                            case 21://transfer
                                {
                                    if (client.Entity.Myclan != null)
                                    {
                                        PrintPacket(packet);
                                        uint lider = 0;
                                        string name_receive = System.Text.Encoding.ASCII.GetString(packet, 18, packet[17]);

                                        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 clien = (varr.Current as Client.GameState);

                                            if (clien.Entity.Name == name_receive)
                                                lider = clien.Entity.UID;

                                            varr.MoveNext();

                                        }

                                        if (lider == client.Entity.UID) return;
                                        Client.GameState aClient = null;
                                        if (Conquer_Online_Server.ServerBase.Kernel.GamePool.TryGetValue(lider, out aClient))
                                        {

                                            if (Conquer_Online_Server.ServerBase.Kernel.ServerClans.ContainsKey(client.Entity.Myclan.ClanId))
                                            {
                                                if (Conquer_Online_Server.ServerBase.Kernel.ServerClans[client.Entity.Myclan.ClanId].Members.ContainsKey(aClient.Entity.UID))
                                                {
                                                    Conquer_Online_Server.ServerBase.Kernel.ServerClans[client.Entity.Myclan.ClanId].ClanLider = aClient.Entity.Name;
                                                    aClient.Entity.ClanRank = 100;
                                                    aClient.Entity.Myclan.Members[aClient.Entity.UID].Rank = 100;
                                                    if (aClient.Entity.Myclan.Members.ContainsKey(client.Entity.UID))
                                                        aClient.Entity.Myclan.Members[client.Entity.UID].Rank = 0;
                                                    client.Entity.ClanRank = 0;
                                                    Database.Clans.SaveClan(aClient.Entity.Myclan);
                                                    Database.Clans.JoinClan(client);
                                                }
                                            }

                                        }
                                        else
                                        {
                                            Conquer_Online_Server.ServerBase.Kernel.ServerClans[client.Entity.Myclan.ClanId].ClanLider = name_receive;
                                            client.Entity.ClanRank = 0;
                                            Database.Clans.JoinClan(client);
                                            Database.Clans.SaveClan(client.Entity.Myclan);
                                            Database.Clans.TransferClan(name_receive);
                                        }
                                    }
                                    break;
                                }
                            /* case 14://add enemy
                                 {
                                     break;
                                 }*/
                            case 9://recruit member
                                {
                                    break;
                                }
                            case 23://client exit
                                {
                                    if (client.Entity.Myclan != null)
                                    {
                                        if (Conquer_Online_Server.ServerBase.Kernel.ServerClans.ContainsKey(client.Entity.Myclan.ClanId))
                                        {
                                            if (Conquer_Online_Server.ServerBase.Kernel.ServerClans[client.Entity.Myclan.ClanId].Members.ContainsKey(client.Entity.UID))
                                            {
                                                Conquer_Online_Server.ServerBase.Kernel.ServerClans[client.Entity.Myclan.ClanId].Members.Remove(client.Entity.UID);
                                            }
                                        }
                                        client.Entity.ClanId = 0;
                                        client.Entity.ClanName = "";
                                        client.Entity.Myclan = null;

                                        Database.Clans.KickClan(client.Entity.Name);
                                        client.Send(packet);
                                    }
                                    break;
                                }
                            case 25://buleitn
                                {
                                    if (client.Entity.Myclan == null) return;
                                    string buletin = System.Text.Encoding.ASCII.GetString(packet, 18, packet[17]);
                                    if (Conquer_Online_Server.ServerBase.Kernel.ServerClans.ContainsKey(client.Entity.Myclan.ClanId))
                                        Conquer_Online_Server.ServerBase.Kernel.ServerClans[client.Entity.Myclan.ClanId].ClanBuletion = buletin;
                                    Database.Clans.SaveClan(Conquer_Online_Server.ServerBase.Kernel.ServerClans[client.Entity.Myclan.ClanId]);
                                    client.Send(packet);
                                    break;
                                }
                            case 22://give kick
                                {
                                    if (client.Entity.Myclan != null)
                                    {
                                        if (client.Entity.ClanRank == 100)
                                        {
                                            string name = System.Text.Encoding.ASCII.GetString(packet, 18, packet[17]);
                                            uint Key = 0;

                                            foreach (Game.ClanMembers mem in client.Entity.Myclan.Members.Values)
                                            {
                                                if (mem.Name == name)
                                                    Key = mem.UID;
                                            }
                                            if (Key != 0)
                                            {

                                                if (Conquer_Online_Server.ServerBase.Kernel.GamePool.ContainsKey(Key))
                                                {

                                                    if (Conquer_Online_Server.ServerBase.Kernel.ServerClans.ContainsKey(client.Entity.Myclan.ClanId))
                                                    {
                                                        if (Conquer_Online_Server.ServerBase.Kernel.ServerClans[client.Entity.Myclan.ClanId].Members.ContainsKey(Key))
                                                        {
                                                            Conquer_Online_Server.ServerBase.Kernel.ServerClans[client.Entity.Myclan.ClanId].Members.Remove(Key);
                                                            Network.GamePackets.ClanMembers clan = new Network.GamePackets.ClanMembers(client);
                                                            client.Send(clan.ToArray());
                                                            Network.GamePackets.Clan cl = new Conquer_Online_Server.Network.GamePackets.Clan(client, 22);
                                                            ServerBase.Kernel.GamePool[Key].Send(cl.ToArray());
                                                            ServerBase.Kernel.GamePool[Key].Entity.ClanName = "";
                                                            ServerBase.Kernel.GamePool[Key].Entity.ClanId = 0;
                                                            ServerBase.Kernel.GamePool[Key].Entity.Myclan = null;
                                                            ServerBase.Kernel.GamePool[Key].Screen.FullWipe();
                                                            ServerBase.Kernel.GamePool[Key].Screen.Reload(null);
                                                        }
                                                    }
                                                }
                                            }
                                            Database.Clans.KickClan(name);
                                        }
                                    }

                                    break;
                                }

                            case 26://donation
                                {
                                    uint money = BitConverter.ToUInt32(packet, 8);
                                    if (client.Entity.Money >= money && client.Entity.Myclan != null)
                                    {
                                        client.Entity.Myclan.Members[client.Entity.UID].Donation += money;
                                        client.Entity.Money -= money;
                                        if (Conquer_Online_Server.ServerBase.Kernel.ServerClans.ContainsKey(client.Entity.Myclan.ClanId))
                                            Conquer_Online_Server.ServerBase.Kernel.ServerClans[client.Entity.Myclan.ClanId].ClanDonation += money;
                                        Network.GamePackets.Clan cl = new Conquer_Online_Server.Network.GamePackets.Clan(client, 1);
                                        client.Send(cl.ToArray());
                                        Database.Clans.SaveClientDonation(client);
                                        Database.Clans.SaveClan(Conquer_Online_Server.ServerBase.Kernel.ServerClans[client.Entity.Myclan.ClanId]);
                                    }
                                    break;
                                }
                            case 11://add player
                                {

                                    uint lider = BitConverter.ToUInt32(packet, 8);
                                    if (Conquer_Online_Server.ServerBase.Kernel.GamePool.ContainsKey(lider))
                                    {
                                        packet[4] = 11;
                                        Network.Writer.WriteUInt32(client.Entity.UID, 8, packet);
                                        packet[16] = 1;
                                        packet[17] = (byte)client.Entity.Name.Length;
                                        for (int i = 0; i < client.Entity.Name.Length; i++)
                                        {
                                            try
                                            {
                                                packet[18 + i] = Convert.ToByte(client.Entity.Name[i]);

                                            }
                                            catch { }
                                        }
                                        if (Conquer_Online_Server.ServerBase.Kernel.GamePool[lider].Entity.Myclan != null)
                                            Conquer_Online_Server.ServerBase.Kernel.GamePool[lider].Send(packet);
                                    }
                                    break;
                                }
                            case 12:
                                {
                                    if (packet[16] == 1)
                                    {
                                        if (client.Entity.Myclan != null)
                                            if (client.Entity.Myclan.Members[client.Entity.UID].Rank == 100)
                                            {
                                                //if (client.Entity.Myclan != null)
                                                {
                                                    if (client.Entity.Myclan.Members.Count < 7)
                                                    {

                                                        uint memeber = BitConverter.ToUInt32(packet, 8);
                                                        if (ServerBase.Kernel.GamePool.ContainsKey(memeber))
                                                        {
                                                            Game.ClanMembers member = new Conquer_Online_Server.Game.ClanMembers();
                                                            member.UID = ServerBase.Kernel.GamePool[memeber].Entity.UID;
                                                            member.Donation = 0;
                                                            member.Rank = 10;
                                                            member.Class = ServerBase.Kernel.GamePool[memeber].Entity.Class;
                                                            member.Level = ServerBase.Kernel.GamePool[memeber].Entity.Level;
                                                            member.Name = ServerBase.Kernel.GamePool[memeber].Entity.Name;
                                                            if (!client.Entity.Myclan.Members.ContainsKey(memeber))
                                                                client.Entity.Myclan.Members.Add(member.UID, member);

                                                            ServerBase.Kernel.GamePool[memeber].Entity.ClanRank = 0;
                                                            ServerBase.Kernel.GamePool[memeber].Entity.ClanId = client.Entity.ClanId;
                                                            ServerBase.Kernel.GamePool[memeber].Entity.Myclan = client.Entity.Myclan;
                                                            ServerBase.Kernel.GamePool[memeber].Entity.ClanName = client.Entity.ClanName;
                                                            Database.Clans.JoinClan(ServerBase.Kernel.GamePool[memeber]);
                                                            ServerBase.Kernel.GamePool[memeber].Screen.FullWipe();
                                                            ServerBase.Kernel.GamePool[memeber].Screen.Reload(null);
                                                        }
                                                    }
                                                }
                                            }
                                    }
                                    break;
                                }
                            case 4://memebers
                                {
                                    ClanMembers clan = new ClanMembers(client);
                                    client.Send(clan.ToArray());
                                    break;
                                }
                            case 0x1d:
                                {
                                    if (client.Entity.Myclan != null)
                                    {
                                        Network.Writer.WriteUInt32(client.Entity.Myclan.ClanId, 8, packet);
                                        Network.Writer.WriteByte(1, 16, packet);
                                        Network.Writer.WriteByte(0x0d, 17, packet);
                                        Network.Writer.WriteString("0 0 0 0 0 0 0", 18, packet);
                                        client.Send(packet);
                                        Network.GamePackets.Clan cl = new Conquer_Online_Server.Network.GamePackets.Clan(client, 1);
                                        client.Send(cl.ToArray());
                                        client.Send(packet);

                                        if (client.Entity.Myclan.ClanBuletion != "")
                                            client.Send(cl.UpgradeBuletin(client.Entity.Myclan.ClanBuletion));
                                    }
                                    else
                                    {
                                        client.Send(packet);
                                        packet[4] = 23;
                                    }

                                    break;
                                }
                            case 0x18:
                                {
                                    client.Send(packet);
                                    break;
                                }
                            case (byte)Game.Clan_Typ.AddAlly:
                                {
                                    Game.Clans clan = client.Entity.Myclan;
                                    if (clan != null)
                                    {
                                        Client.GameState target;
                                        UInt32 Identifier = BitConverter.ToUInt32(packet, 8);

                                        if (client.Entity.ClanRank == 100)
                                        {
                                            if (clan.Allies.Count >= 5)
                                            { client.Send(new Message("The Ammount of Allies You can Have has exceeded", System.Drawing.Color.Red, Message.TopLeft)); break; }

                                            if (ServerBase.Kernel.GamePool.TryGetValue(Identifier, out target))
                                            {
                                                Game.Clans tclan = target.Entity.Myclan;
                                                if (tclan != null)
                                                {
                                                    if (target.Entity.ClanRank == 100)
                                                    {
                                                        if (tclan.Allies.Count >= 5)
                                                        { client.Send(new Message("The Ammount of Allies the Target Clan can Have has exceeded", System.Drawing.Color.Red, Message.TopLeft)); break; }

                                                        if (!clan.Allies.ContainsKey(tclan.ClanId))
                                                        {
                                                            if (!clan.Enemies.ContainsKey(tclan.ClanId))
                                                            {
                                                                String clanName = client.Entity.ClanName;

                                                                Clan2 clanp = new Clan2();

                                                                clanp.Deserialize(packet);

                                                                clanp.Offset16 = 2;
                                                                clanp.Identifier = client.Entity.UID;

                                                                Writer.WriteByte((Byte)clanName.Length, 17, clanp.ToArray());
                                                                Writer.WriteString(clanName, 18, clanp.ToArray());

                                                                tclan.AllyRequest = clan.ClanId;

                                                                target.Send(clanp);
                                                            }
                                                            else client.Send(new Message("That clan is Your Enemy.", System.Drawing.Color.Red, Message.TopLeft));
                                                        }
                                                    }
                                                    else client.Send(new Message("This target is not the clan leader.", System.Drawing.Color.Red, Message.TopLeft));
                                                }
                                            }
                                            else client.Send(new Message("Can not find target.", System.Drawing.Color.Red, Message.TopLeft));
                                        }
                                        else client.Send(new Message("You are not the clan leader.", System.Drawing.Color.Red, Message.TopLeft));
                                    }
                                    break;
                                }
                            case (byte)Game.Clan_Typ.AcceptAlliance:
                                {
                                    Game.Clans clan = client.Entity.Myclan;
                                    if (clan != null)
                                    {
                                        if (client.Entity.ClanRank == 100)
                                        {
                                            Game.Clans tclan;
                                            if (ServerBase.Kernel.ServerClans.TryGetValue(clan.AllyRequest, out tclan))
                                            {
                                                if (tclan != null)
                                                {
                                                    if (!tclan.Enemies.ContainsKey(clan.ClanId))
                                                    {
                                                        if (!clan.Enemies.ContainsKey(tclan.ClanId))
                                                        {
                                                            if (!clan.Allies.ContainsKey(tclan.ClanId))
                                                                clan.Allies.Add(tclan.ClanId, tclan);

                                                            tclan.Allies.Add(clan.ClanId, clan);

                                                            clan.SendMessage(new ClanRelations(clan, ClanRelations.RelationTypes.Allies));
                                                            tclan.SendMessage(new ClanRelations(tclan, ClanRelations.RelationTypes.Allies));

                                                            clan.SendMessage(new Message(String.Format("Our Clan has Allianced with {0}", tclan.ClanName), System.Drawing.Color.Red, Message.Clan));
                                                            tclan.SendMessage(new Message(String.Format("Our Clan has Allianced with {0}", clan.ClanName), System.Drawing.Color.Red, Message.Clan));

                                                            clan.AddRelation(tclan.ClanId, ClanRelations.RelationTypes.Allies);
                                                            tclan.AddRelation(clan.ClanId, ClanRelations.RelationTypes.Allies);

                                                            clan.AllyRequest = tclan.AllyRequest = 0;
                                                        }
                                                        else client.Send(new Message("This Clan is Your Enemy.", System.Drawing.Color.Red, Message.TopLeft));
                                                    }
                                                    client.Send(new Message("This Clan Has Enemied You!.", System.Drawing.Color.Red, Message.TopLeft));
                                                }
                                            }
                                            else client.Send(new Message("Can not find target", System.Drawing.Color.Red, Message.TopLeft));
                                        }
                                        else client.Send(new Message("You are not the clan leader.", System.Drawing.Color.Red, Message.TopLeft));
                                    }
                                    break;
                                }
                            case (byte)Game.Clan_Typ.DeleteEnemy:
                                {
                                    Game.Clans clan = client.Entity.Myclan;
                                    if (clan != null)
                                    {
                                        if (client.Entity.ClanRank == 100)
                                        {
                                            Clan2 clanp = new Clan2();
                                            clanp.Deserialize(packet);

                                            String EnemyTarget = clanp.Offset18String;
                                            UInt32 ClanId = clanp.GetClanId(EnemyTarget);

                                            Game.Clans tclan;
                                            if (ServerBase.Kernel.ServerClans.TryGetValue(ClanId, out tclan))
                                            {
                                                clan.Enemies.Remove(ClanId);

                                                clan.DeleteRelation(ClanId, ClanRelations.RelationTypes.Enemies);

                                                clan.SendMessage(new ClanRelations(clan, ClanRelations.RelationTypes.Enemies));

                                                clan.SendMessage(new Message(String.Format("We are no longer Enemies With {0}", clan.ClanId), System.Drawing.Color.Red, Message.Clan));

                                                client.Send(clanp);
                                            }
                                        }
                                        else client.Send(new Message("You are not authorized to continue with this action", System.Drawing.Color.Red, Message.TopLeft));
                                    }
                                    break;
                                }
                            case (byte)Game.Clan_Typ.DeleteAlly:
                                {
                                    Game.Clans clan = client.Entity.Myclan;
                                    if (clan != null)
                                    {
                                        if (client.Entity.ClanRank == 100)
                                        {
                                            Clan2 clanp = new Clan2();
                                            clanp.Deserialize(packet);

                                            String AlliedTarget = clanp.Offset18String;
                                            UInt32 ClanId = clanp.GetClanId(AlliedTarget);

                                            Game.Clans tclan;
                                            if (clan.Allies.TryGetValue(ClanId, out tclan))
                                            {
                                                clan.Allies.Remove(ClanId);
                                                tclan.Allies.Remove(clan.ClanId);

                                                clan.DeleteRelation(ClanId, ClanRelations.RelationTypes.Allies);
                                                tclan.DeleteRelation(clan.ClanId, ClanRelations.RelationTypes.Allies);

                                                clan.SendMessage(new ClanRelations(clan, ClanRelations.RelationTypes.Allies));
                                                tclan.SendMessage(new ClanRelations(tclan, ClanRelations.RelationTypes.Allies));

                                                clan.SendMessage(new Message(String.Format("We are no longer allied with {0}", tclan.ClanName), System.Drawing.Color.Red, Message.Clan));
                                                tclan.SendMessage(new Message(String.Format("We are no longer allied with {0}", clan.ClanName), System.Drawing.Color.Red, Message.Clan));

                                                client.Send(clanp);
                                            }
                                        }
                                        else client.Send(new Message("You are not authorized to continue with this action", System.Drawing.Color.Red, Message.TopLeft));
                                    }
                                    break;
                                }
                            case (byte)Game.Clan_Typ.AddEnemy:
                                {
                                    Game.Clans clan = client.Entity.Myclan;
                                    if (clan != null)
                                    {
                                        if (client.Entity.ClanRank == 100)
                                        {
                                            String Enemy = System.Text.Encoding.ASCII.GetString(packet, 18, packet[17]).Trim(new Char[] { '\0' });
                                            UInt32 ClanId = 0;
                                            var AllCland = ServerBase.Kernel.ServerClans.Values.ToArray();
                                            foreach (Game.Clans c_clan in AllCland)
                                            {
                                                if (Enemy == c_clan.ClanName)
                                                {
                                                    ClanId = c_clan.ClanId;
                                                    break;
                                                }
                                            }
                                            if (ClanId == 0) break;
                                            if (!clan.Enemies.ContainsKey(ClanId))
                                            {
                                                if (!clan.Allies.ContainsKey(ClanId))
                                                {
                                                    if (clan.Enemies.Count >= 5)
                                                    { client.Send(new Message("The Ammount of Enemies You can Have has exceeded", System.Drawing.Color.Red, Message.TopLeft)); break; }

                                                    Game.Clans tclan;
                                                    if (ServerBase.Kernel.ServerClans.TryGetValue(ClanId, out tclan))
                                                    {
                                                        if (!clan.Enemies.ContainsKey(tclan.ClanId))
                                                            clan.Enemies.Add(tclan.ClanId, tclan);

                                                        clan.AddRelation(ClanId, ClanRelations.RelationTypes.Enemies);

                                                        clan.SendMessage(new ClanRelations(clan, ClanRelations.RelationTypes.Enemies));

                                                        clan.SendMessage(new Message(String.Format("We Have Enemied the clan {0}", tclan.ClanName), System.Drawing.Color.Red, Message.Clan));
                                                        tclan.SendMessage(new Message(String.Format("The Clan {0} Has Made us their Enemy!", clan.ClanName), System.Drawing.Color.Red, Message.Clan));
                                                    }
                                                }
                                                else client.Send(new Message("This clan is one of your alliance, What has gone wrong?", System.Drawing.Color.Red, Message.TopLeft));
                                            }
                                            else client.Send(new Message("This clan is Already One of Your Enemies", System.Drawing.Color.Red, Message.TopLeft));
                                        }
                                    }
                                    break;
                                }
                            default:
                                Console.WriteLine("Clan Type " + packet[4]);
                                break;

                        }
                        break;
                        /* switch (packet[4])
                         {
                             case 23://client exit
                                 {
                                     if (client.Entity.Myclan != null)
                                     {
                                         foreach (var clien in Conquer_Online_Server.ServerBase.Kernel.GamePool.Values)
                                         {
                                             if (clien.Entity.Myclan != null)
                                             {
                                                 if (clien.Entity.Myclan.ClanId == client.Entity.Myclan.ClanId)
                                                 {
                                                     if (clien.Entity.Myclan.Members.ContainsKey(client.Entity.UID))
                                                         clien.Entity.Myclan.Members.Remove(client.Entity.UID);
                                                 }
                                             }
                                         }
                                         client.Entity.ClanName = "";
                                         client.Entity.Myclan = null;
                                         Database.Clans.KickClan(client.Entity.Name);
                                         client.Send(packet);
                                     }
                                     break;
                                 }
                             case 14://enemy
                                 {
                                     string Enemy = System.Text.Encoding.ASCII.GetString(packet, 18, packet[17]);
                                     client.Send(packet);

                                     Network.GamePackets.Clan cl = new Conquer_Online_Server.Network.GamePackets.Clan(client, 14);
                                     client.Send(cl.SendAlies(Enemy, "Lider"));
                                     break;
                                 }
                             case 25://buleitn
                                 {
                                     if (client.Entity.Myclan == null) return;
                                     string buletin = System.Text.Encoding.ASCII.GetString(packet, 18, packet[17]);
                                     foreach (var clan in Conquer_Online_Server.ServerBase.Kernel.ServerClans.Values)
                                     {
                                         if (clan.ClanId == client.Entity.Myclan.ClanId)
                                             clan.ClanBuletion = buletin;
                                     }
                                     foreach (var member in Conquer_Online_Server.ServerBase.Kernel.GamePool.Values)
                                     {
                                         if (member.Entity.Myclan != null)
                                         {
                                             if (member.Entity.UID != client.Entity.UID)
                                                 if (member.Entity.Myclan.ClanId == client.Entity.Myclan.ClanId)
                                                 {
                                                     member.Entity.Myclan.ClanBuletion = buletin;
                                                 }
                                         }
                                     }
                                     Database.Clans.SaveClan(Conquer_Online_Server.ServerBase.Kernel.ServerClans[client.Entity.Myclan.ClanId]);
                                     client.Send(packet);
                                     client.Entity.Myclan.ClanBuletion = buletin;
                                     break;
                                 }
                             case 22://give kick
                                 {
                                     if (client.Entity.Myclan != null)
                                     {
                                         if (client.Entity.ClanRank == 100)
                                         {
                                             string name = System.Text.Encoding.ASCII.GetString(packet, 18, packet[17]);
                                             uint Key = 0;

                                             foreach (Game.ClanMembers mem in client.Entity.Myclan.Members.Values)
                                             {
                                                 if (mem.Name == name)
                                                     Key = mem.UID;
                                             }
                                             if (Key != 0)
                                             {

                                                 if (Conquer_Online_Server.ServerBase.Kernel.GamePool.ContainsKey(Key))
                                                 {
                                                     foreach (var clien in Conquer_Online_Server.ServerBase.Kernel.GamePool.Values)
                                                     {
                                                         if (clien.Entity.UID == client.Entity.UID) continue;
                                                         if (clien.Entity.Myclan != null)
                                                         {
                                                             if (clien.Entity.Myclan.ClanId == client.Entity.Myclan.ClanId)
                                                             {
                                                                 if (clien.Entity.Myclan.Members.ContainsKey(Key))
                                                                 {
                                                                     clien.Entity.Myclan.Members.Remove(Key);
                                                                     Network.GamePackets.ClanMembers clan = new Network.GamePackets.ClanMembers(client);
                                                                     client.Send(clan.ToArray());

                                                                     clien.Entity.ClanName = "";
                                                                     clien.Entity.Myclan = null;
                                                                 }
                                                             }
                                                         }
                                                     }
                                                 }
                                             }
                                             Database.Clans.KickClan(name);
                                         }
                                     }
                                     break;
                                 }
                             case 26:
                                 {
                                     uint money = BitConverter.ToUInt32(packet, 8);
                                     if (client.Entity.Money >= money && client.Entity.Myclan != null)
                                     {
                                         client.Entity.Myclan.Members[client.Entity.UID].Donation += money;
                                         client.Entity.Money -= money;
                                         Conquer_Online_Server.ServerBase.Kernel.ServerClans[client.Entity.Myclan.ClanId].ClanDonation += money;
                                         foreach (var clien in Conquer_Online_Server.ServerBase.Kernel.GamePool.Values)
                                         {
                                             if (clien.Entity.Myclan != null)
                                             {
                                                 if (clien.Entity.UID != client.Entity.UID)
                                                 {
                                                     if (clien.Entity.Myclan.ClanId == client.Entity.Myclan.ClanId)
                                                     {

                                                         clien.Entity.Myclan.ClanDonation = Conquer_Online_Server.ServerBase.Kernel.ServerClans[clien.Entity.Myclan.ClanId].ClanDonation;
                                                     }
                                                 }
                                             }
                                         }
                                         client.Entity.Myclan.ClanDonation = Conquer_Online_Server.ServerBase.Kernel.ServerClans[client.Entity.Myclan.ClanId].ClanDonation;
                                         Network.GamePackets.Clan cl = new Conquer_Online_Server.Network.GamePackets.Clan(client, 1);
                                         client.Send(cl.ToArray());
                                         Database.Clans.SaveClientDonation(client);
                                         Database.Clans.SaveClan(Conquer_Online_Server.ServerBase.Kernel.ServerClans[client.Entity.Myclan.ClanId]);
                                     }
                                     break;
                                 }
                             case 11://add player
                                 {

                                     uint lider = BitConverter.ToUInt32(packet, 8);
                                     if (Conquer_Online_Server.ServerBase.Kernel.GamePool.ContainsKey(lider))
                                     {
                                         packet[4] = 11;
                                         Network.Writer.WriteUInt32(client.Entity.UID, 8, packet);

                                         packet[16] = 1;
                                         packet[17] = (byte)client.Entity.Name.Length;
                                         for (int i = 0; i < client.Entity.Name.Length; i++)
                                         {
                                             try
                                             {
                                                 packet[18 + i] = Convert.ToByte(client.Entity.Name[i]);

                                             }
                                             catch { }
                                         }
                                         Conquer_Online_Server.ServerBase.Kernel.GamePool[lider].Send(packet);
                                     }
                                     break;
                                 }
                             case 12:
                                 {
                                     if (packet[16] == 1)
                                     {
                                         if (client.Entity.Myclan.Members[client.Entity.UID].Rank == 100)
                                         {
                                             if (client.Entity.Myclan != null)
                                             {
                                                 if (client.Entity.Myclan.Members.Count < 7)
                                                 {

                                                     uint memeber = BitConverter.ToUInt32(packet, 8);
                                                     if (ServerBase.Kernel.GamePool.ContainsKey(memeber))
                                                     {
                                                         Game.ClanMembers member = new Conquer_Online_Server.Game.ClanMembers();
                                                         member.UID = ServerBase.Kernel.GamePool[memeber].Entity.UID;
                                                         member.Donation = 0;
                                                         member.Rank = 10;
                                                         member.Class = ServerBase.Kernel.GamePool[memeber].Entity.Class;
                                                         member.Level = ServerBase.Kernel.GamePool[memeber].Entity.Level;
                                                         member.Name = ServerBase.Kernel.GamePool[memeber].Entity.Name;
                                                         if (!client.Entity.Myclan.Members.ContainsKey(memeber))
                                                             client.Entity.Myclan.Members.Add(member.UID, member);

                                                         foreach (var clien in Conquer_Online_Server.ServerBase.Kernel.GamePool.Values)
                                                         {
                                                             if (clien.Entity.Myclan != null)
                                                             {
                                                                 if (clien.Entity.Myclan.ClanId == client.Entity.Myclan.ClanId)
                                                                 {
                                                                     if (!clien.Entity.Myclan.Members.ContainsKey(memeber))
                                                                         clien.Entity.Myclan.Members.Add(member.UID, member);
                                                                 }
                                                             }
                                                         }
                                                       ServerBase.Kernel.GamePool[memeber].Entity.ClanRank = 0;
                                                         ServerBase.Kernel.GamePool[memeber].Entity.Myclan = client.Entity.Myclan;
                                                         ServerBase.Kernel.GamePool[memeber].Entity.ClanName = client.Entity.ClanName;
                                                         Database.Clans.JoinClan(ServerBase.Kernel.GamePool[memeber]);
                                                        ServerBase.Kernel.GamePool[memeber].Entity.Teleport(ServerBase.Kernel.GamePool[memeber].Entity.MapID
                                                             , ServerBase.Kernel.GamePool[memeber].Entity.X
                                                             , ServerBase.Kernel.GamePool[memeber].Entity.Y);
                                                     }
                                                 }
                                             }
                                      }
                                     }
                                     break;
                                 }
                             case 4://memebers
                                 {
                                     ClanMembers clan = new ClanMembers(client);
                                     client.Send(clan.ToArray());
                                     break;
                                 }
                             case 0x1d:
                                 {
                                     if (client.Entity.Myclan != null)
                                     {
                                         Network.Writer.WriteUInt32(client.Entity.Myclan.ClanId, 8, packet);
                                         Network.Writer.WriteByte(1, 16, packet);
                                         Network.Writer.WriteByte(0x0d, 17, packet);
                                         Network.Writer.WriteString("0 0 0 0 0 0 0", 18, packet);
                                         client.Send(packet);
                                         Network.GamePackets.Clan cl = new Conquer_Online_Server.Network.GamePackets.Clan(client, 1);
                                         client.Send(cl.ToArray());
                                         client.Send(packet);

                                         if (client.Entity.Myclan.ClanBuletion != "")
                                             client.Send(cl.UpgradeBuletin(client.Entity.Myclan.ClanBuletion));
                                     }
                                     else
                                     {
                                         client.Send(packet);
                                         packet[4] = 23;
                                     }

                                     break;
                                 }
                             case 0x18:
                                 {
                                     client.Send(packet);
                                     break;
                                 }
                             default:
                                 Console.WriteLine("Clan Type " + packet[4]);
                                 break;
                         }
                         break;*/
                    }
                #endregion
                #region Reincarnation (1066)
                case 1066:
                    {
                        if (client.Entity.Reborn != 2) return;
                        byte NewClass = packet[4];
                        ushort NewBody = packet[8];
                        if (client.Entity.Body.ToString().EndsWith("1") || client.Entity.Body.ToString().EndsWith("2"))
                            NewBody += 2000;
                        else NewBody += 1000;

                        if (client.Inventory.Contains(711083, 1))
                        {
                            client.Entity.Body = NewBody;
                            new PacketHandler.Reincarnation(client, NewClass);
                            //new Game.Features.Reincarnation.Reincarnate(client.Entity, NewClass);
                            client.Inventory.Remove(711083, 1);
                        }
                        break;
                    }
                #endregion
                #region SubClass (2320)
                case 2320:
                    {
                        byte[] Packet = null;
                        switch (packet[4])
                        {
                            #region [Restore/Switch]
                            case 0:
                                byte To = packet[6];
                                Packet = new byte[0];
                                client.Send(packet);

                                if (To > 0)//Switch
                                {
                                    #region [Effects-Addition]
                                    switch ((Conquer_Online_Server.Game.ClassID)To)
                                    {
                                        case Conquer_Online_Server.Game.ClassID.Apothecary:
                                            {
                                                //

                                                client.Entity.Statistics.Detoxication = (ushort)(client.Entity.SubClasses.Classes[(byte)Conquer_Online_Server.Game.ClassID.Apothecary].Phase * 8);
                                                //client.Entity.Statistics.Detoxication += (client.Entity.SubClasses.Classes[To].Level);
                                                break;
                                            }
                                    }

                                    #endregion
                                    /*switch ((Game.ClassID)To)
                                    {
                                        case Game.ClassID.Wrangler:
                                            {
                                                switch (client.Entity.SubClasses.Classes[To].Level)
                                                {
                                                    case 9:
                                                        {
                                                            //client.Entity.Hitpoints += 1200;
                                                            //client.Entity.MaxHitpoints += 1200;
                                                            break;
                                                        }
                                                }
                                                break;
                                            }
                                    }*/
                                    Packet = new byte[0];
                                    Packet = new SubClassShowFull(true) { ID = 1, Class = To, Level = client.Entity.SubClasses.Classes[To].Phase }.ToArray();//client.Entity.SubClasses.Classes[To].Phase
                                    client.Send(Packet);
                                    //Packet = new SubClass(client.Entity).ToArray();
                                    //client.Send(Packet);
                                    client.Entity.SubClass = To;
                                    client.Entity.SubClassLevel = client.Entity.SubClasses.Classes[To].Level;
                                    client.Entity.SubClasses.Active = To;
                                }
                                else//Restore
                                {
                                    client.Entity.SubClass = 0;
                                    client.Entity.SubClassLevel = 0;
                                    client.Entity.SubClasses.Active = 0;
                                    Packet = new SubClassShowFull(true) { ID = 1 }.ToArray();
                                    client.Send(Packet);
                                }
                                client.SendScreen(client.Entity.SpawnPacket, false);
                                break;
                            #endregion
                            #region [Upgrade]
                            case 2:
                                {
                                    byte Class = packet[6];
                                    ushort Required = 0;
                                    Game.SubClass Sc = client.Entity.SubClasses.Classes[Class];
                                    #region [Set Required]
                                    switch ((Game.ClassID)Sc.ID)
                                    {
                                        case Game.ClassID.MartialArtist:
                                            switch (Sc.Level)
                                            {
                                                case 1: Required = 300; break;
                                                case 2: Required = 900; break;
                                                case 3: Required = 1800; break;
                                                case 4: Required = 2700; break;
                                                case 5: Required = 3600; break;
                                                case 6: Required = 5100; break;
                                                case 7: Required = 6900; break;
                                                case 8: Required = 8700; break;
                                                case 9: Required = ushort.MaxValue; break;
                                            }
                                            break;
                                        case Game.ClassID.Warlock:
                                            switch (Sc.Level)
                                            {
                                                case 1: Required = 300; break;
                                                case 2: Required = 900; break;
                                                case 3: Required = 1800; break;
                                                case 4: Required = 2700; break;
                                                case 5: Required = 3600; break;
                                                case 6: Required = 5100; break;
                                                case 7: Required = 6900; break;
                                                case 8: Required = 8700; break;
                                                case 9: Required = ushort.MaxValue; break;
                                            }
                                            break;
                                        case Game.ClassID.ChiMaster:
                                            switch (Sc.Level)
                                            {
                                                case 1: Required = 600; break;
                                                case 2: Required = 1800; break;
                                                case 3: Required = 3600; break;
                                                case 4: Required = 5400; break;
                                                case 5: Required = 7200; break;
                                                case 6: Required = 10200; break;
                                                case 7: Required = 13800; break;
                                                case 8: Required = 17400; break;
                                                case 9: Required = ushort.MaxValue; break;
                                            }
                                            break;
                                        case Game.ClassID.Sage:
                                            switch (Sc.Level)
                                            {
                                                case 1: Required = 400; break;
                                                case 2: Required = 1200; break;
                                                case 3: Required = 2400; break;
                                                case 4: Required = 3600; break;
                                                case 5: Required = 4800; break;
                                                case 6: Required = 6800; break;
                                                case 7: Required = 9200; break;
                                                case 8: Required = 11600; break;
                                                case 9: Required = ushort.MaxValue; break;
                                            }
                                            break;
                                        case Game.ClassID.Apothecary:
                                            switch (Sc.Level)
                                            {
                                                case 1: Required = 100; break;
                                                case 2: Required = 200; break;
                                                case 3: Required = 300; break;
                                                case 4: Required = 400; break;
                                                case 5: Required = 500; break;
                                                case 6: Required = 1000; break;
                                                case 7: Required = 4000; break;
                                                case 8: Required = 9000; break;
                                                case 9: Required = ushort.MaxValue; break;
                                            }
                                            break;
                                        case Game.ClassID.Wrangler:
                                        case Game.ClassID.Performer:
                                            switch (Sc.Level)
                                            {
                                                case 1: Required = 400; break;
                                                case 2: Required = 1200; break;
                                                case 3: Required = 2400; break;
                                                case 4: Required = 3600; break;
                                                case 5: Required = 4800; break;
                                                case 6: Required = 6800; break;
                                                case 7: Required = 9200; break;
                                                case 8: Required = 11600; break;
                                                case 9: Required = ushort.MaxValue; break;
                                            }
                                            break;
                                    }
                                    #endregion
                                    if (client.Entity.SubClasses.StudyPoints >= Required)
                                    {
                                        client.Entity.SubClasses.StudyPoints -= Required;
                                        client.Entity.SubClasses.Classes[Class].Level++;
                                        Packet = new byte[0];
                                        Packet = new SubClassShowFull(true) { ID = 1, Class = Class, Level = client.Entity.SubClasses.Classes[Class].Level }.ToArray();
                                        client.Send(Packet);
                                        Packet = new SubClass(client.Entity).ToArray();
                                        client.Send(Packet);
                                        Database.SubClassTable.Update(client.Entity, client.Entity.SubClasses.Classes[Class]);
                                        Database.SubClassTable.Update(client.Entity);
                                    }
                                    break;
                                }
                            #endregion
                            #region [Info]
                            case 6:
                                Game.Entity Owner = client.Entity;
                                if (Owner.SubClasses.Classes.Count > 0)
                                {
                                    Game.SubClass[] Classes = new Game.SubClass[Owner.SubClasses.Classes.Count];
                                    Owner.SubClasses.Classes.Values.CopyTo(Classes, 0);
                                    foreach (Game.SubClass Class in Classes)
                                    {
                                        if (Class.ID == 9)
                                        {
                                            for (byte i = 0; i < Class.Phase; i++)
                                            {
                                                Packet = new byte[0];
                                                Packet = new SubClassShowFull(true) { ID = 4, Class = Class.ID, Level = Class.Level }.ToArray();
                                                client.Send(Packet);
                                            }
                                            continue;
                                        }
                                        Packet = new byte[0];
                                        Packet = new SubClassShowFull(true) { ID = 4, Class = Class.ID, Level = Class.Level }.ToArray();
                                        client.Send(Packet);
                                    }
                                }
                                Packet = new SubClass(client.Entity).ToArray();
                                client.Send(Packet);
                                break;
                            #endregion
                            default:
                                Console.WriteLine("Unknown 2320 packet type " + packet[4]);
                                break;
                        }
                        break;
                    }
                #endregion
                #region MemoryAgate
                case 2110:
                    {
                        uint ItemUID = BitConverter.ToUInt32(packet, 8);
                        switch (packet[4])
                        {
                            case 1://record
                                {
                                    if (client.Map.IsDynamic()) return;
                                    Interfaces.IConquerItem Item = null;
                                    if (client.Inventory.TryGetItem(ItemUID, out Item))
                                    {
                                        if (Item.Agate_map.ContainsKey(packet[12]))
                                        {
                                            Item.Agate_map[(uint)packet[12]] = client.Entity.MapID
                                               + "~" + client.Entity.X
                                               + "~" + client.Entity.Y;
                                            Database.ConquerItemTable.UpdateItem(Item, client);
                                            Item.SendAgate(client);
                                            break;
                                        }
                                        if (packet[12] > Item.Agate_map.Count)
                                        {
                                            Item.Agate_map.Add((byte)(Item.Agate_map.Count), client.Entity.MapID
                                               + "~" + client.Entity.X
                                               + "~" + client.Entity.Y);
                                            Database.ConquerItemTable.UpdateItem(Item, client);
                                            Item.SendAgate(client);
                                            break;
                                        }
                                        else
                                        {
                                            if (!Item.Agate_map.ContainsKey(packet[12]))
                                            {

                                                Item.Agate_map.Add(packet[12], client.Entity.MapID
                                                    + "~" + client.Entity.X

                                                   + "~" + client.Entity.Y);
                                                Database.ConquerItemTable.UpdateItem(Item, client);
                                                Item.SendAgate(client);
                                            }
                                            break;
                                        }
                                    }
                                    break;
                                }
                            case 3://recal
                                {
                                    if (client.Map.IsDynamic()) return;
                                    Interfaces.IConquerItem Item = null;
                                    if (client.Inventory.TryGetItem(ItemUID, out Item))
                                    {

                                        if (Item.Agate_map.ContainsKey(packet[12]))
                                        {
                                            if (ushort.Parse(Item.Agate_map[packet[12]].Split('~')[0].ToString()) == 1038)
                                                return;
                                            if (ushort.Parse(Item.Agate_map[packet[12]].Split('~')[0].ToString()) == 6001)
                                                return;
                                            client.Entity.Teleport(ushort.Parse(Item.Agate_map[packet[12]].Split('~')[0].ToString())
                                                , ushort.Parse(Item.Agate_map[packet[12]].Split('~')[1].ToString())
                                                , ushort.Parse(Item.Agate_map[packet[12]].Split('~')[2].ToString()));
                                            Item.Durability--;
                                            Item.SendAgate(client);
                                            Database.ConquerItemTable.UpdateItem(Item, client);
                                        }
                                    }
                                    break;
                                }
                            case 4://repair
                                {
                                    Interfaces.IConquerItem Item = null;
                                    if (client.Inventory.TryGetItem(ItemUID, out Item))
                                    {
                                        uint cost = (uint)(Item.MaximDurability - Item.Durability) / 2;
                                        if (cost == 0)
                                            cost = 1;
                                        if (client.Entity.ConquerPoints > cost)
                                        {
                                            client.Entity.ConquerPoints -= cost;
                                            Item.Durability = Item.MaximDurability;
                                            Item.SendAgate(client);
                                            Database.ConquerItemTable.UpdateItem(Item, client);
                                        }
                                    }
                                    break;
                                }
                        }
                        break;
                    }
                #endregion
                case 1128:
                    {
                        p1128 vp = new p1128(false);
                        vp.Deserialize(packet);
                        switch (vp.UID)
                        {
                            case 0://player city teleport
                                {
                                    switch (vp.UID2)
                                    {
                                        ////////////////////////////////////////////////////////////////////////////////////////////////////
                                        case 1://tc
                                            client.Entity.Teleport(1002, 429, 378);
                                            break;
                                        case 2://pc
                                            client.Entity.Teleport(1011, 188, 264);
                                            break;
                                        case 3://ac
                                            client.Entity.Teleport(1020, 565, 562);
                                            break;
                                        case 4://dc
                                            client.Entity.Teleport(1000, 500, 650);
                                            break;
                                        case 5://bc
                                            client.Entity.Teleport(1015, 717, 571);
                                            break;
                                            ////////////////////////////////////////////////////////////////////////////////////////
                                            {

                                            }
                                        default: Console.WriteLine("Unknown 1128 portal subtype 1 : " + vp.UID2); break;
                                    }
                                    break;
                                }
                            case 1://Team city teleport
                                {
                                    switch (vp.UID2)
                                    {
                                        ////////////////////////////////////////////////////////////////////////////////////////////////////
                                        case 1://tc
                                            foreach (Client.GameState teammate in client.Entity.Owner.Team.Teammates)
                                            {
                                                if (ServerBase.Kernel.GetDistance(client.Entity.X, client.Entity.Y, teammate.Entity.X, teammate.Entity.Y) <= 18)
                                                {
                                                    teammate.Entity.Teleport(1002, 429, 378);
                                                }
                                            }
                                            client.Entity.Teleport(1002, 429, 378);
                                            break;
                                        case 2://pc
                                            foreach (Client.GameState teammate in client.Entity.Owner.Team.Teammates)
                                            {
                                                if (ServerBase.Kernel.GetDistance(client.Entity.X, client.Entity.Y, teammate.Entity.X, teammate.Entity.Y) <= 18)
                                                {
                                                    teammate.Entity.Teleport(1011, 188, 264);
                                                }
                                            }
                                            client.Entity.Teleport(1011, 188, 264);
                                            break;
                                        case 3://ac
                                            foreach (Client.GameState teammate in client.Entity.Owner.Team.Teammates)
                                            {
                                                if (ServerBase.Kernel.GetDistance(client.Entity.X, client.Entity.Y, teammate.Entity.X, teammate.Entity.Y) <= 18)
                                                {
                                                    teammate.Entity.Teleport(1020, 565, 562);
                                                }
                                            }
                                            client.Entity.Teleport(1020, 565, 562);
                                            break;
                                        case 4://dc
                                            foreach (Client.GameState teammate in client.Entity.Owner.Team.Teammates)
                                            {
                                                if (ServerBase.Kernel.GetDistance(client.Entity.X, client.Entity.Y, teammate.Entity.X, teammate.Entity.Y) <= 18)
                                                {
                                                    teammate.Entity.Teleport(1000, 500, 650);
                                                }
                                            }
                                            client.Entity.Teleport(1000, 500, 650);
                                            break;
                                        case 5://bc
                                            foreach (Client.GameState teammate in client.Entity.Owner.Team.Teammates)
                                            {
                                                if (ServerBase.Kernel.GetDistance(client.Entity.X, client.Entity.Y, teammate.Entity.X, teammate.Entity.Y) <= 18)
                                                {
                                                    teammate.Entity.Teleport(1015, 717, 571);
                                                }
                                            }
                                            client.Entity.Teleport(1015, 717, 571);
                                            break;
                                            ////////////////////////////////////////////////////////////////////////////////////////
                                            {

                                            }
                                        default: Console.WriteLine("Unknown 1128 portal subtype 2 : " + vp.UID2); break;
                                    }
                                    break;
                                }

                            default:
                                Console.WriteLine("Unknown 1128 subtype: " + vp.UID); break;
                        }
                        break;
                    }
                default:
                    {
                        if (client.Account.State == Conquer_Online_Server.Database.AccountTable.AccountState.ProjectManager)
                            client.Send(new Message("Unknown type: " + ID + " with length " + packet.Length + "Unknown type: " + ID2, System.Drawing.Color.CadetBlue, Message.Talk));
                        if (ID == 1040)
                            client.Send(packet);
                        break;
                    }
            }
        }
示例#2
0
        public static void GetDialog(NpcRequest npcRequest, GameState client)
        {
            if (AvatarLinker == null)
                AvatarLinker = new IniFile("\\database\\npc.ini");
            //Console.WriteLine("[" + client.Entity.Name + "][NPC] " + npcRequest.NpcID + " : " + npcRequest.OptionID);
            if (!client.Map.Npcs.ContainsKey(client.ActiveNpc) || npcRequest == null || client == null || client.Entity == null || (npcRequest.NpcID == 0 && npcRequest.OptionID == 255))
                return;
            if (client.Trade != null)
                if (client.Trade.InTrade)
                    return;
            Dialogs dialog = new Dialogs();
            dialog.Client = client;
            dialog.Replies = new List<NpcReply>();
            INpc npcs = null;
            if (client.Map.Npcs.TryGetValue(client.ActiveNpc, out npcs))
            {
                ushort avatar = (ushort)AvatarLinker.ReadInt16("NpcType" + (npcs.Mesh / 10), "SimpleObjID", 1);

                dialog.Avatar(avatar);
            }

            switch (client.Entity.MapID)
            {
                #region Twin City
                case 1002:
                    {
                        switch (client.ActiveNpc)
                        {
                            #region Enter Guild Arena
                            case 380:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("Would you like to enter the guild war arena?");
                                                dialog.Option("Yes.", 1);
                                                dialog.Option("No.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                client.Entity.Teleport(1038, 348, 339);
                                                break;
                                            }
                                    } break;
                                }
                            #endregion

                            #region Twin City
                            case 10080:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                if (client.Entity.PKPoints < 29)
                                                {
                                                    dialog.Text("Hey there " + client.Entity.Name + "! I'm the craziest conductress!\nI also know how to send you to all the main cities.\nAnyways... Where are you headed? I may be able to teleport you there for 5,000 gold.");
                                                    dialog.Option("Phoenix Castle.", 1);
                                                    dialog.Option("Ape City.", 2);
                                                    dialog.Option("Desert City.", 3);
                                                    dialog.Option("Bird Island.", 4);
                                                    dialog.Option("Mine Cave.", 5);
                                                    dialog.Option("Market.", 6);
                                                    dialog.Option("I don't care.", 255);
                                                    dialog.Send();
                                                    break;
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not help MURDERS!");
                                                    dialog.Option("Ouch..", 255);
                                                    dialog.Option("Then you are of no use to me!\nI'll kill you too!", 100);
                                                    dialog.Send();
                                                    break;
                                                }
                                            }
                                        case 1:
                                        case 2:
                                        case 3:
                                        case 4:
                                        case 5:
                                        case 6:
                                            {
                                                ushort Map = 1002, X, Y;
                                                if (npcRequest.OptionID == 1)
                                                {
                                                    X = 958;
                                                    Y = 555;
                                                }
                                                else if (npcRequest.OptionID == 2)
                                                {
                                                    X = 555;
                                                    Y = 957;
                                                }
                                                else if (npcRequest.OptionID == 3)
                                                {
                                                    X = 69;
                                                    Y = 473;
                                                }
                                                else if (npcRequest.OptionID == 4)
                                                {
                                                    X = 232;
                                                    Y = 190;
                                                }
                                                else if (npcRequest.OptionID == 5)
                                                {
                                                    X = 53;
                                                    Y = 399;
                                                }
                                                else
                                                {
                                                    X = 211;
                                                    Y = 196;
                                                    Map = 1036;
                                                }
                                                if (client.Entity.Money >= 5000)
                                                {
                                                    client.Entity.Money -= 5000;
                                                    client.Entity.Teleport(Map, X, Y);
                                                }
                                                else
                                                {
                                                    dialog.Text("Hey! You don't have 5,000 gold do you?\nDon't you dare try to cheat me or I'll call the guards!");
                                                    dialog.Option("Crazy!", 255);
                                                    dialog.Send();
                                                }
                                                break;

                                            }
                                        case 100:
                                            {
                                                client.Entity.AddFlag(Update.Flags.FlashingName);
                                                client.Entity.FlashingNameStamp = Time32.Now;
                                                client.Entity.FlashingNameTime = 30;
                                                client.Send(Conquer_Online_Server.ServerBase.Constants.Warrent);
                                                dialog.Text("Guards! HELP! " + client.Entity.Name + " is trying to kill me!!");
                                                dialog.Option("I'll get you!", 255);
                                                dialog.Send();
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region Celestine
                            case 20005:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("Did you see those plants while comming over here? Do you see that pond right over there? You see I need clean water badly. If the clean water is united with 7 of 9 unique gems(except tortoise, thunder, glory) it can heal plants and clean ponds. In exchange of those 8 items, I will give you back a celestial stone, which is needed for first reborn.");
                                                dialog.Option("How do I get gems?", 1);
                                                dialog.Option("How do I get clean water?", 2);
                                                dialog.Option("I got the items.", 3);
                                                dialog.Option("Boring...", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                dialog.Text("You can get gems simply by minning or killing monsters, as they drop gems sometime.");
                                                dialog.Option("How do I get clean water?", 2);
                                                dialog.Option("I got the items.", 3);
                                                dialog.Option("Boring...", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 2:
                                            {
                                                dialog.Text("In the first Island Map in Adventure Zone(GC1), you might find the WaterLord(517,732). You may kill it and it may give a CleanWater, with a 50% percent of success. Once killed you may wait 15 minutes, before it will respawn again.");
                                                dialog.Option("How do I get gems?", 1);
                                                dialog.Option("I got the items.", 3);
                                                dialog.Option("Boring...", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 3:
                                            {
                                                bool hasfornow = true;
                                                uint baseid = 700001;
                                                for (int c = 0; c < 70; c += 10)
                                                    if (!client.Inventory.Contains((uint)(baseid + c), 1))
                                                    {
                                                        hasfornow = false;
                                                        break;
                                                    }
                                                if (!hasfornow)
                                                {
                                                    dialog.Text("You don't meet the requierments!");
                                                    dialog.Send();
                                                    break;
                                                }
                                                if (client.Inventory.Contains(721258, 1))
                                                {
                                                    for (int c = 0; c < 70; c += 10)
                                                        client.Inventory.Remove((uint)(baseid + c), 1);
                                                    client.Inventory.Remove(721258, 1);
                                                    client.Inventory.Add(721259, 0, 1);
                                                }
                                                else
                                                {
                                                    dialog.Text("You don't meet the requierments!");
                                                    dialog.Send();
                                                    break;
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region GuildDirector
                            case 10003:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("Hello there. Do you want to create a new guild? You need level 90 and 500000 silver and you have to not belong to any guild. If you are a guild leader, then you can name 5 deputy leaders.");
                                                dialog.Option("Create guild.", 1);
                                                dialog.Option("Name deputy leader.", 3);
                                                dialog.Option("Move leadership.", 6);
                                                dialog.Option("Disband guild.", 9);
                                                dialog.Option("I don't have that.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 9:
                                            {
                                                if (client.Guild != null && client.AsMember.Rank == Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader)
                                                {
                                                    dialog.Text("Are you sure you want to disband your guild?");
                                                    dialog.Option("Yes.", 10);
                                                    dialog.Option("Ah, nevermind.", 255);
                                                    dialog.Send();
                                                }
                                                else
                                                {
                                                    dialog.Text("You don't meet the requierments.");
                                                    dialog.Option("Ahh.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 10:
                                            {
                                                if (client.Guild != null && client.AsMember.Rank == Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader)
                                                {
                                                    client.Guild.Disband();
                                                }
                                                break;
                                            }
                                        case 6:
                                            {
                                                if (client.Guild != null && client.AsMember.Rank == Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader)
                                                {
                                                    dialog.Text("Input here the member name you want to promote as guild leader.");
                                                    dialog.Input("Here:", 7, 16);
                                                    dialog.Option("Ah, nevermind.", 255);
                                                    dialog.Send();
                                                }
                                                else
                                                {
                                                    dialog.Text("You don't meet the requierments.");
                                                    dialog.Option("Ahh.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 7:
                                            {
                                                if (client.Guild != null && client.AsMember.Rank == Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader)
                                                {
                                                    if (npcRequest.Input != "")
                                                    {
                                                        var member = client.Guild.GetMemberByName(npcRequest.Input);
                                                        if (member == null)
                                                        {
                                                            dialog.Text("There is no such member in your guild.");
                                                            dialog.Option("Ah, nevermind.", 255);
                                                            dialog.Send();
                                                            return;
                                                        }
                                                        else
                                                        {
                                                            if (member.Rank == Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader)
                                                            {
                                                                dialog.Text("You cannot promote this member anymore.");
                                                                dialog.Option("Ah, nevermind.", 255);
                                                                dialog.Send();
                                                                return;
                                                            }
                                                            else
                                                            {
                                                                if (member.Rank == Conquer_Online_Server.Game.Enums.GuildMemberRank.DeputyLeader)
                                                                    client.Guild.DeputyLeaderCount--;
                                                                member.Rank = Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader;
                                                                if (member.IsOnline)
                                                                {
                                                                    client.Guild.SendGuild(member.Client);
                                                                    member.Client.Entity.GuildRank = (ushort)member.Rank;
                                                                    member.Client.Screen.FullWipe();
                                                                    member.Client.Screen.Reload(null);
                                                                }
                                                                client.AsMember.Rank = Conquer_Online_Server.Game.Enums.GuildMemberRank.DeputyLeader;
                                                                if (client.AsMember.IsOnline)
                                                                {
                                                                    client.Guild.SendGuild(client);
                                                                    client.Entity.GuildRank = (ushort)member.Rank;
                                                                    client.Screen.FullWipe();
                                                                    client.Screen.Reload(null);
                                                                }
                                                                client.Guild.DeputyLeaderCount++;
                                                            }
                                                        }
                                                    }
                                                }
                                                break;
                                            }
                                        case 3:
                                            {
                                                if (client.Guild != null && client.AsMember.Rank == Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader)
                                                {
                                                    dialog.Text("You have now " + client.Guild.DeputyLeaderCount + " named deupty leaders.");
                                                    if (client.Guild.DeputyLeaderCount == 5)
                                                    {
                                                        dialog.Text("You cannot name any other deupty leader.");
                                                        dialog.Option("Ah, nevermind.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("Input here the member name you want to promote as deputy leader.");
                                                        dialog.Input("Here:", 4, 16);
                                                        dialog.Option("Ah, nevermind.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You don't meet the requierments.");
                                                    dialog.Option("Ahh.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 4:
                                            {
                                                if (client.Guild != null && client.AsMember.Rank == Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader)
                                                {
                                                    if (npcRequest.Input != "")
                                                    {
                                                        var member = client.Guild.GetMemberByName(npcRequest.Input);
                                                        if (member == null)
                                                        {
                                                            dialog.Text("There is no such member in your guild.");
                                                            dialog.Option("Ah, nevermind.", 255);
                                                            dialog.Send();
                                                            return;
                                                        }
                                                        else
                                                        {
                                                            if (member.Rank != Conquer_Online_Server.Game.Enums.GuildMemberRank.Member)
                                                            {
                                                                dialog.Text("You cannot promote this member anymore.");
                                                                dialog.Option("Ah, nevermind.", 255);
                                                                dialog.Send();
                                                                return;
                                                            }
                                                            else
                                                            {
                                                                member.Rank = Conquer_Online_Server.Game.Enums.GuildMemberRank.DeputyLeader;
                                                                if (member.IsOnline)
                                                                {
                                                                    client.Guild.SendGuild(member.Client);
                                                                    member.Client.Entity.GuildRank = (ushort)member.Rank;
                                                                    member.Client.Screen.FullWipe();
                                                                    member.Client.Screen.Reload(null);
                                                                }
                                                                client.Guild.DeputyLeaderCount++;
                                                            }
                                                        }
                                                    }
                                                }
                                                break;
                                            }
                                        case 1:
                                            {
                                                if (client.Guild == null && client.Entity.Level >= 90 && client.Entity.Money >= 500000)
                                                {
                                                    dialog.Text("Name your guild. The name must have less than 16 characters of any type.");
                                                    dialog.Input("Here:", 2, 16);
                                                    dialog.Option("Ah, nevermind.", 255);
                                                    dialog.Send();
                                                }
                                                else
                                                {
                                                    dialog.Text("You don't meet the requierments.");
                                                    dialog.Option("Ahh.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 2:
                                            {
                                                if (client.Guild == null && client.Entity.Level >= 90 && client.Entity.Money >= 500000)
                                                {
                                                    if (npcRequest.Input != "")
                                                    {
                                                        client.Entity.Money -= 500000;
                                                        Guild guild = new Guild(client.Entity.Name);
                                                        guild.ID = Guild.GuildCounter.Next;
                                                        guild.SilverFund = 500000;
                                                        client.AsMember = new Conquer_Online_Server.Game.ConquerStructures.Society.Guild.Member(guild.ID)
                                                        {
                                                            SilverDonation = 500000,
                                                            ID = client.Entity.UID,
                                                            Level = client.Entity.Level,
                                                            Name = client.Entity.Name,
                                                            Rank = Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader,
                                                        };
                                                        if (client.NobilityInformation != null)
                                                        {
                                                            client.AsMember.Gender = client.NobilityInformation.Gender;
                                                            client.AsMember.NobilityRank = client.NobilityInformation.Rank;
                                                        }

                                                        client.Entity.GuildID = (ushort)guild.ID;
                                                        client.Entity.GuildRank = (ushort)Conquer_Online_Server.Game.Enums.GuildMemberRank.GuildLeader;
                                                        guild.Leader = client.AsMember;
                                                        client.Guild = guild;
                                                        guild.Create(npcRequest.Input);
                                                        guild.MemberCount++;
                                                        guild.SendGuild(client);
                                                        guild.SendName(client);
                                                        client.Screen.FullWipe();
                                                        client.Screen.Reload(null);
                                                    }
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region Barber
                            case 10002:
                                {
                                    dialog.Avatar(241);
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("What kind of hair style would you like?");
                                                dialog.Option("New Styles", 1);
                                                dialog.Option("Nostalgic Styles", 2);
                                                dialog.Option("Special Styles", 3);
                                                dialog.Option("Nevermind", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        #region New Hair Styles
                                        #region Options
                                        case 1:
                                            {

                                                dialog.Text("Which new style do you want?");
                                                dialog.Option("New Hairstyle 1", 10);
                                                dialog.Option("New Hairstyle 2", 11);
                                                dialog.Option("New Hairstyle 3", 12);
                                                dialog.Option("New Hairstyle 4", 13);
                                                dialog.Option("New Hairstyle 5", 14);
                                                dialog.Option("New Hairstyle 6", 15);
                                                dialog.Option("New Hairstyle 7", 16);
                                                dialog.Option("More styles.", 102);
                                                dialog.Send();
                                                break;

                                            }
                                        case 102:
                                            {

                                                dialog.Text("Which new style do you want?");
                                                dialog.Option("New Hairstyle 8", 17);
                                                dialog.Option("New Hairstyle 9", 18);
                                                dialog.Option("New Hairstyle 10", 19);
                                                dialog.Option("New Hairstyle 11", 20);
                                                dialog.Option("New Hairstyle 12", 21);
                                                dialog.Option("Back.", 1);
                                                dialog.Option("Nevermind", 255);
                                                dialog.Send();
                                                break;

                                            }
                                        #endregion
                                        #region ...
                                        case 10:
                                        case 11:
                                        case 12:
                                        case 13:
                                        case 14:
                                        case 15:
                                        case 16:
                                        case 17:
                                        case 18:
                                        case 19:
                                        case 20:
                                        case 21:
                                            {
                                                client.Entity.HairStyle = ushort.Parse(Convert.ToString(client.Entity.HairStyle)[0] + (20 + npcRequest.OptionID).ToString());
                                                dialog.Text("Done!");
                                                dialog.Option("Thanks.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        #endregion
                                        #endregion
                                        #region Nostalgic Hair Styles
                                        #region Options
                                        case 2:
                                            {

                                                dialog.Text("Which new style do you want?");
                                                dialog.Option("Nostalgic Hairstyle 1", 30);
                                                dialog.Option("Nostalgic Hairstyle 2", 31);
                                                dialog.Option("Nostalgic Hairstyle 3", 32);
                                                dialog.Option("Nostalgic Hairstyle 4", 33);
                                                dialog.Option("Nostalgic Hairstyle 5", 34);
                                                dialog.Option("Nostalgic Hairstyle 6", 35);
                                                dialog.Option("Nostalgic Hairstyle 7", 36);
                                                dialog.Option("Nevermind.", 255);
                                                dialog.Send();
                                                break;

                                            }
                                        #endregion
                                        #region ...
                                        case 30:
                                        case 31:
                                        case 32:
                                        case 33:
                                        case 34:
                                        case 35:
                                        case 36:
                                            {
                                                client.Entity.HairStyle = ushort.Parse(Convert.ToString(client.Entity.HairStyle)[0] + (npcRequest.OptionID - 20).ToString());
                                                dialog.Text("Done!");
                                                dialog.Option("Thanks.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        #endregion
                                        #endregion
                                        #region Special Hair Styles
                                        #region Options
                                        case 3:
                                            {

                                                dialog.Text("Which new style do you want?");
                                                dialog.Option("New Hairstyle 1", 40);
                                                dialog.Option("New Hairstyle 2", 41);
                                                dialog.Option("New Hairstyle 3", 42);
                                                dialog.Option("New Hairstyle 4", 43);
                                                dialog.Option("New Hairstyle 5", 44);
                                                dialog.Option("Nevermind.", 255);
                                                dialog.Send();
                                                break;

                                            }
                                        #endregion
                                        #region ...
                                        case 40:
                                        case 41:
                                        case 42:
                                        case 43:
                                        case 44:
                                            {
                                                client.Entity.HairStyle = ushort.Parse(Convert.ToString(client.Entity.HairStyle)[0] + (npcRequest.OptionID - 19).ToString());
                                                dialog.Text("Done!");
                                                dialog.Option("Thanks.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        #endregion
                                        #endregion

                                    }
                                    break;
                                }
                            #endregion

                            #region Assistant
                            case 4293:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("Do you want to visit the mine?");
                                                dialog.Option("Yes.", 1);
                                                dialog.Option("No.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                client.Entity.Teleport(1028, 155, 95);
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region General Peace
                            case 10054:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("Stop!\nThe path ahead of you is dangerous.\nI don't recommend you continue on this path.\n");
                                                if (client.Entity.Level <= 70)
                                                {
                                                    dialog.Text("If you are looking from stronger monsters you should look in the Canyon first.\n");
                                                    dialog.Text("You can find your way there in the south-west part of the wind plain.\n");
                                                }
                                                dialog.Option("Leave me alone General.", 1);
                                                dialog.Option("Okay, thanks for the warning.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                client.Entity.Teleport(1000, 973, 668);
                                                break;
                                            }
                                    }
                                    break;
                                }

                            #endregion

                            #region WarehouseGuardian
                            case 1061: //WarehouseGuardian
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("Hello. I'm the one that was choosen to set/change/remove the password of the warehouse. I must say without a password you could lose a lot yet, which you probably already knew. My advice for you is that you should have a password, because it could save you of many problems. If you have a password yet, you can remove or change it.");
                                                if (client.WarehousePW == "")
                                                {
                                                    dialog.Option("Okay, let me set the password.", 1);
                                                }
                                                else
                                                {
                                                    dialog.Option("I want to change the password.", 2);
                                                    dialog.Option("I want to remove the password.", 3);
                                                }
                                                dialog.Option("Forget it.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        #region Set password
                                        case 1:
                                            {
                                                if (client.WarehousePW == "")
                                                {
                                                    dialog.Text("Please insert a password that's built only with numbers and whose length is less or equal to 8. An example can be 74352.");
                                                    dialog.Input("Here:", 4, 8);
                                                    dialog.Option("Forget it.", 255);
                                                }
                                                else
                                                {
                                                    dialog.Text("You have a password already set.");
                                                    dialog.Option("Alright.", 255);
                                                }
                                                dialog.Send();
                                                break;
                                            }
                                        case 4:
                                            {
                                                if (client.WarehousePW == "")
                                                {
                                                    if (CheckNumberPassword(npcRequest.Input) && npcRequest.Input.Length <= 8)
                                                    {
                                                        client.TempPassword = npcRequest.Input;
                                                        dialog.Text("Please insert the password again.");
                                                        dialog.Input("Here:", 5, 8);
                                                        dialog.Option("Forget it.", 255);
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("Invalid password, please try again.");
                                                        dialog.Input("Here:", 4, 8);
                                                        dialog.Option("Alright.", 255);
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You have a password already set.");
                                                    dialog.Option("Alright.", 255);
                                                }
                                                dialog.Send();
                                                break;
                                            }
                                        case 5:
                                            {
                                                if (client.WarehousePW == "")
                                                {
                                                    if (CheckNumberPassword(npcRequest.Input) && npcRequest.Input.Length <= 8)
                                                    {
                                                        if (client.TempPassword == npcRequest.Input)
                                                        {
                                                            client.TempPassword = "";
                                                            client.WarehousePW = npcRequest.Input;
                                                            dialog.Text("Password set!");
                                                            dialog.Option("Thank you.", 255);
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("The password doesn't match. Insert again?");
                                                            dialog.Input("Here:", 5, 8);
                                                            dialog.Option("Forget it.", 255);
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("Invalid password, please try again.");
                                                        dialog.Input("Here:", 5, 8);
                                                        dialog.Option("Alright.", 255);
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You have a password already set.");
                                                    dialog.Option("Alright.", 255);
                                                }
                                                dialog.Send();
                                                break;
                                            }
                                        #endregion
                                        #region Change password
                                        case 2:
                                            {
                                                if (client.WarehousePW != "")
                                                {
                                                    dialog.Text("Please insert the password you have now.");
                                                    dialog.Input("Here:", 6, 8);
                                                    dialog.Option("Forget it.", 255);
                                                }
                                                else
                                                {
                                                    dialog.Text("You don't have a password set.");
                                                    dialog.Option("Alright.", 255);
                                                }
                                                dialog.Send();
                                                break;
                                            }
                                        case 6:
                                            {
                                                if (client.WarehousePW != "")
                                                {
                                                    if (CheckNumberPassword(npcRequest.Input) && npcRequest.Input.Length <= 8)
                                                    {
                                                        if (client.WarehousePW == npcRequest.Input)
                                                        {
                                                            dialog.Text("Please insert the password again.");
                                                            dialog.Input("Here:", 7, 8);
                                                            dialog.Option("Forget it.", 255);
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("Wrong password. Try again?");
                                                            dialog.Input("Here:", 6, 8);
                                                            dialog.Option("Alright.", 255);
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("Invalid password, please try again.");
                                                        dialog.Input("Here:", 6, 8);
                                                        dialog.Option("Alright.", 255);
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You don't have a password set.");
                                                    dialog.Option("Alright.", 255);
                                                }
                                                dialog.Send();
                                                break;
                                            }
                                        case 7:
                                            {
                                                if (client.WarehousePW != "")
                                                {
                                                    if (CheckNumberPassword(npcRequest.Input) && npcRequest.Input.Length <= 8)
                                                    {
                                                        client.TempPassword = npcRequest.Input;
                                                        dialog.Text("Please insert the password again.");
                                                        dialog.Input("Here:", 8, 8);
                                                        dialog.Option("Forget it.", 255);
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("Invalid password, please try again.");
                                                        dialog.Input("Here:", 7, 8);
                                                        dialog.Option("Alright.", 255);
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You don't have a password set.");
                                                    dialog.Option("Alright.", 255);
                                                }
                                                dialog.Send();
                                                break;
                                            }
                                        case 8:
                                            {
                                                if (client.WarehousePW != "")
                                                {
                                                    if (CheckNumberPassword(npcRequest.Input) && npcRequest.Input.Length <= 8)
                                                    {
                                                        if (client.TempPassword == npcRequest.Input)
                                                        {
                                                            client.TempPassword = "";
                                                            client.WarehousePW = npcRequest.Input;
                                                            dialog.Text("Password changed!");
                                                            dialog.Option("Thank you.", 255);
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("Wrong password.");
                                                            dialog.Input("Here:", 8, 8);
                                                            dialog.Option("Alright.", 255);
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("Invalid password, please try again.");
                                                        dialog.Input("Here:", 8, 8);
                                                        dialog.Option("Alright.", 255);
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You don't have a password set.");
                                                    dialog.Option("Alright.", 255);
                                                }
                                                dialog.Send();
                                                break;
                                            }
                                        #endregion
                                        #region Remove password
                                        case 3:
                                            {
                                                if (client.WarehousePW != "")
                                                {
                                                    dialog.Text("Please insert the password you have now.");
                                                    dialog.Input("Here:", 9, 8);
                                                    dialog.Option("Forget it.", 255);
                                                }
                                                else
                                                {
                                                    dialog.Text("You don't have a password set.");
                                                    dialog.Option("Alright.", 255);
                                                }
                                                dialog.Send();
                                                break;
                                            }
                                        case 9:
                                            {
                                                if (client.WarehousePW != "")
                                                {
                                                    if (CheckNumberPassword(npcRequest.Input) && npcRequest.Input.Length <= 8)
                                                    {
                                                        if (client.WarehousePW == npcRequest.Input)
                                                        {
                                                            dialog.Text("Please insert the password again.");
                                                            dialog.Input("Here:", 10, 8);
                                                            dialog.Option("Forget it.", 255);
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("Wrong password. Try again?");
                                                            dialog.Input("Here:", 9, 8);
                                                            dialog.Option("Alright.", 255);
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("Invalid password, please try again.");
                                                        dialog.Input("Here:", 9, 8);
                                                        dialog.Option("Alright.", 255);
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You don't have a password set.");
                                                    dialog.Option("Alright.", 255);
                                                }
                                                dialog.Send();
                                                break;
                                            }
                                        case 10:
                                            {
                                                if (client.WarehousePW != "")
                                                {
                                                    if (CheckNumberPassword(npcRequest.Input) && npcRequest.Input.Length <= 8)
                                                    {
                                                        if (client.WarehousePW == npcRequest.Input)
                                                        {
                                                            client.WarehousePW = "";
                                                            client.WarehouseOpen = true;
                                                            dialog.Text("Password removed.");
                                                            dialog.Option("Thank you.", 255);
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("Invalid password, please try again.");
                                                        dialog.Input("Here:", 10, 8);
                                                        dialog.Option("Alright.", 255);
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You don't have a password set.");
                                                    dialog.Option("Alright.", 255);
                                                }
                                                dialog.Send();
                                                break;
                                            }
                                        #endregion
                                    }
                                    break;
                                }
                            #endregion

                            #region Jail npc
                            case 10081: //Jail npc
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("Hello there. I can teleport you in jail for the amount of 1000 silvers. Do you want to proceed?");
                                                dialog.Option("Sure.", 1);
                                                dialog.Option("I'm standing by.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                if (client.Entity.Money >= 1000)
                                                {
                                                    client.Entity.Money -= 1000;
                                                    client.Entity.Teleport(6000, 32, 72);
                                                }
                                                else
                                                {
                                                    dialog.Text("You need 1000 silvers to be able to enter the jail.");
                                                    dialog.Option("Alright.", 255);
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region Arena npc
                            case 10021: //Arena npc
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("Hello there. I can teleport you in jail for the amount of 50 silvers. Do you want to proceed?");
                                                dialog.Option("Sure.", 1);
                                                dialog.Option("I'm standing by.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                if (client.Entity.Money >= 50)
                                                {
                                                    client.Entity.Money -= 50;
                                                    client.Entity.Teleport(1005, 51, 71);
                                                }
                                                else
                                                {
                                                    dialog.Text("You need 50 silvers to be able to enter the jail.");
                                                    dialog.Option("Alright.", 255);
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region ShopBoy
                            case 10063: //ShopBoy
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("Hello there. I can teleport you in our shop, but I can also dye your armor black for the price of one DragonBall. What do you say?");
                                                dialog.Option("Teleport me in the shop.", 1);
                                                dialog.Option("Dye my armor black.", 2);
                                                dialog.Option("I'm standing by.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                client.Entity.Teleport(1008, 22, 26);
                                                break;
                                            }
                                        case 2:
                                            {
                                                if (client.Inventory.Contains(1088000, 1))
                                                {
                                                    IConquerItem armor = client.Equipment.TryGetItem(3);
                                                    if (armor != null && armor.ID != 0)
                                                    {
                                                        client.Inventory.Remove(1088000, 1);
                                                        armor.Color = Conquer_Online_Server.Game.Enums.Color.Black;
                                                        Conquer_Online_Server.Database.ConquerItemTable.UpdateColor(armor, client);
                                                        armor.Mode = Conquer_Online_Server.Game.Enums.ItemMode.Update;
                                                        armor.Send(client);
                                                        client.Equipment.UpdateEntityPacket();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't wear an armor right now so I can't do anything.");
                                                        dialog.Option("Ah alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("Hmm...You don't have one DragonBall so I can't dye your armor.");
                                                    dialog.Option("Ah alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region Kungfu Boy
                            case 100229:
                                {
                                    // If inv contains jade glyph
                                    // npcRequest.OptionID = 5
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                //#warning (Kungfu Boy) Check for begenniers quest, check for the note. Echo this text.
                                                dialog.Text("I started learning Kungfu when I was very young.\nNow I have learn to master my Chi very well! Wanna have a try?");
                                                dialog.Option("Yeah!", 1);
                                                dialog.Option("I don't care...", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                dialog.Text("Oh, a message from the Village Gateman? I see.\nHe wants me to teach you how to master your Chi.");
                                                dialog.Option("I'm listening.", 2);
                                                dialog.Send();
                                                break;
                                            }
                                        case 2:
                                            {
                                                dialog.Text("Press the Ctrl button, move the mouse arrow to the place you want to jump to and left click.");
                                                dialog.Text("You should know, you can't jump to a place you can't just normally walk to sometimes.");
                                                dialog.Option("Gotcha.", 3);
                                                dialog.Send();
                                                break;
                                            }
                                        case 3:
                                            {
                                                dialog.Text("Good! It seems that you have mastered this skill. One more thing!\n");
                                                dialog.Text("My sister, Kungfu Girl, has stolen my Jade Glyph and taken it up onto the roof behind me. Can you go get it for me?");
                                                dialog.Option("No problem.", 4);
                                                dialog.Send();
                                                break;
                                            }
                                        case 4:
                                            {
                                                //#warning (Kungfu boy) Add quest progress
                                                client.Send(new Message("Jump to the roof behind Kungfu Boy and catch his mischievous sister!", System.Drawing.Color.Green, Message.PopUP));
                                                break;
                                            }
                                        case 5:
                                            {
                                                dialog.Text("Hey you got it! Thank you. I see you've mastered your Chi.");
                                                dialog.Option("I have.", 6);
                                                dialog.Send();
                                                break;
                                            }
                                        case 6:
                                            {
                                                dialog.Text("Well, thats good. I storngly recommend you go visit the Armorer in Twin City.");
                                                dialog.Text(" You need to pick out some armor. It will save your life!");
                                                dialog.Option("I'll think about it.", 255);
                                                dialog.Send();
                                                break;
                                            }

                                    }
                                    break;
                                }

                            #endregion

                            #region Kungfu Girl
                            case 127271:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("Haha! I wanted to play a trick on my brother! Don't tell him.");
                                                dialog.Option("He knows already.", 2);
                                                dialog.Option("You are very naughty.", 1);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                dialog.Text("Teehee!");
                                                dialog.Option("He knows about this, you know.", 2);
                                                dialog.Send();
                                                break;
                                            }
                                        case 2:
                                            {
                                                dialog.Text("Oh, well you got me.... Alright. Here's his Jade Glyph. Take it.");
                                                dialog.Option("Good!", 3);
                                                dialog.Send();
                                                break;
                                            }
                                        case 3:
                                            {
                                                //#warning (Kungfu boy) Add quest progress
                                                client.Send(new Message("You got Kungfu Boy's Jade Glyph back from Kungfu Girl! Take it back to Kungfu Boy.", System.Drawing.Color.Green, Message.PopUP));
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region Simon
                            case 1152:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("Hmm, a few years ago, me and some friends of mine, started exploring the mountains. It was an usual day, cloudy with a very happy sun. We all went on the mountain to explore and level up a bit. Somehow we was all tricked into seeing a fantasy land and we went that way. We found a big rock that looked like a door, we broke it and went in. Since then, my friends are in the place we found and which we called the labirinth as it was full of powerful creatures that were leading each of the four levels of the labirith. Each friend of mine chose a floor and they await great conquerors at the end of each floor. ");
                                                dialog.Option("Tell me more about it.", 1);
                                                dialog.Option("Blah, boring.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                dialog.Text("In each floor there are three kinds of monsters, floor one has Slingers, GoldGhosts and the powerful Gibbon. The second floor has the AgileRats, Bladelings and the snake Naga. The third floor has BlueBirds, FiendBats and the mighty Talon. The last floor, the fourth, has MinotaurL120 and the Syren. Each of them drops some items, and you'll need some to get to the next floor, or some others to claim a reward from me.");
                                                dialog.Option("What rewards?", 2);
                                                dialog.Option("Blah, boring.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 2:
                                            {
                                                dialog.Text("In exchange of 17 SunDiamonds(dropped by Slingers) I will give you two meteors, for 17 MoonDiamonds(dropped by Bladelings), I will give you 4 meteors, for 17 StarDiamonds(dropped by BlueBirds), I will give you 4 meteor tears, and lastly for 17 CloudDiamonds, I will give you one DragonBall. More over, to get to the second floor from first one you need a SkyToken(dropped by GoldGhost), from second to third a EarthToken(dropped by AgileRat) and from third to fourth a SoulToken(dropped by FiendBat).");
                                                dialog.Option("Enough talking.", 3);
                                                dialog.Option("Claim my reward.", 4);
                                                dialog.Option("Blah, boring.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 3:
                                            {
                                                dialog.Text("Right. In exchange of 2000 VirtuePoints, I will be more than glad to teleport you in the first floor of the Labirith.");
                                                dialog.Option("Here, take them.", 5);
                                                dialog.Option("Blah, boring.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 4:
                                            {
                                                dialog.Text("What do you want to claim?");
                                                dialog.Option("Two Meteors.", 6);
                                                dialog.Option("Four Meteors.", 7);
                                                dialog.Option("Four Meteor tears.", 8);
                                                dialog.Option("One DragonBall.", 9);
                                                dialog.Option("Blah, boring.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 5:
                                            {
                                                if (client.VirtuePoints >= 2000)
                                                {
                                                    client.VirtuePoints -= 2000;
                                                    client.Entity.Teleport(1351, 018, 127);
                                                }
                                                else
                                                {
                                                    dialog.Text("You don't meet the requierments.");
                                                    dialog.Option("Ahh, sorry.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 6:
                                            {
                                                if (client.Inventory.Contains(721533, 17))
                                                {
                                                    client.Inventory.Remove(721533, 17);
                                                    client.Inventory.Add(1088001, 0, 2);
                                                }
                                                else
                                                {
                                                    dialog.Text("You don't meet the requierments.");
                                                    dialog.Option("Ahh, sorry.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 7:
                                            {
                                                if (client.Inventory.Contains(721534, 17))
                                                {
                                                    client.Inventory.Remove(721534, 17);
                                                    client.Inventory.Add(1088001, 0, 4);
                                                }
                                                else
                                                {
                                                    dialog.Text("You don't meet the requierments.");
                                                    dialog.Option("Ahh, sorry.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 8:
                                            {
                                                if (client.Inventory.Contains(721535, 17))
                                                {
                                                    client.Inventory.Remove(721535, 17);
                                                    client.Inventory.Add(1088002, 0, 4);
                                                }
                                                else
                                                {
                                                    dialog.Text("You don't meet the requierments.");
                                                    dialog.Option("Ahh, sorry.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 9:
                                            {
                                                if (client.Inventory.Contains(721536, 17))
                                                {
                                                    client.Inventory.Remove(721536, 17);
                                                    client.Inventory.Add(1088000, 0, 1);
                                                }
                                                else
                                                {
                                                    dialog.Text("You don't meet the requierments.");
                                                    dialog.Option("Ahh, sorry.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region MoonBoxQuest
                            #region FortuneTeller
                            case 600050:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("Hello " + client.Entity.Name + ", Have you heard of the palace method?");
                                                dialog.Option("Palace method?..", 1);
                                                dialog.Option("Don't care!", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                dialog.Text("I discovered a mystical tactic, but I was not able to solve it.\nI almost died! It's very dangerous.");
                                                dialog.Option("Sounds like my kind of fun.", 2);
                                                dialog.Option("Too dangerous", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 2:
                                            {

                                                dialog.Text("I'm serious! You don't understand it's very dangerous...");
                                                dialog.Option("Yea yea. Just take my there.", 3);
                                                dialog.Option("Nevermind... o.o", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 3:
                                            {
                                                client.Entity.Teleport(1042, 028, 033);
                                                dialog.Text("I warned you....");
                                                dialog.Option("I think you're full of it.\nThere's nothing here.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion
                            #endregion

                            #region FrozenGrottoGeneral
                            case 27837:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("There is a dangeous frozen cavern south of nowhere! It's too dangerous for you to enter! Even Leroy Jenkins died there!");
                                                dialog.Option("I want to enter the grotto.", 3);
                                                dialog.Option("Blah, boring.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 3:
                                            {
                                                dialog.Text("Well, ok. But I'll only let you go in there if you've voted for the establishment!\nOtherwise you will need a substantial bribe...!");
                                                dialog.Option("Let me in!", 4);
                                                if (client.Entity.ConquerPoints >= 1200)
                                                    dialog.Option("Here's 1,200 CPs.", 5);
                                                else
                                                    dialog.Option("I'm too poor.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 5:
                                        case 4:
                                            {
                                                if (npcRequest.OptionID == 5)
                                                {
                                                    client.Entity.ConquerPoints -= 1200;
                                                    dialog.Text("A fine bribe! Although, you really should consider supporting the establishment!\n");
                                                }
                                                dialog.Text("Ok, well.. Which floor of the Grotto do you want to enter?\n");
                                                dialog.Option("Floor 1 [Lv127]", 1);
                                                dialog.Option("Floor 2 [Lv132]", 2);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                client.Entity.Teleport(1762, 61, 257);
                                                break;
                                            }
                                        case 2:
                                            {
                                                client.Entity.Teleport(7007, 61, 257);
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                        }
                        break;
                    }
                #endregion
                #region MoonboxQuest
                case 1040:
                case 1041:
                case 1042:
                case 1043:
                case 1044:
                case 1045:
                case 1046:
                case 1047:
                case 1048:
                case 1049:
                case 1050:
                case 1051:
                    {
                        switch (client.ActiveNpc)
                        {
                            #region MoonBoxQuest
                            #region Maggie
                            case 600003:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("What are you here for!?\nPlease do not go ahead, or you will enter the very dangerous tactics.");
                                                dialog.Option("....You too?", 1);
                                                dialog.Option("Send me to the tatics.", 4);
                                                dialog.Option("I had better leave here!", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                dialog.Text("The tactic is so changeful, I once thought highly of my self\nand died from the damned tactics.");
                                                dialog.Option("How can I solve the tatics?", 2);
                                                dialog.Option("I do not believe in this!", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 2:
                                            {
                                                dialog.Text("I have studied it for so may years, but fail to work it out.\nPerhaps you can... Would you like to give it a try?");
                                                dialog.Option("Yes. I like a good challenge.", 3);
                                                dialog.Option("I changed my mind..", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 3:
                                            {
                                                dialog.Text("You will be entrapped in the tatic if you enter.\nYou won't be able to leave until you've found a special token.");
                                                dialog.Option("I'm ready to do this.", 5);
                                                dialog.Option("No. This is too risky.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 4:
                                            {
                                                dialog.Text("Alright, I'll take you there.\nYou must be sure to pick up the token!");
                                                dialog.Option("Okay.", 5);
                                                dialog.Send();
                                                break;
                                            }
                                        case 5:
                                            {
                                                ushort map = 1042;
                                                map += (ushort)Conquer_Online_Server.ServerBase.Kernel.Random.Next(1, 8);
                                                client.Entity.Teleport(map, 210, 164);
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion
                            #region GuardianGod
                            case 600004:
                            case 600006:
                            case 600008:
                            case 600010:
                            case 600012:
                            case 600014:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                string[] Tactics = { "Peace", "Chaos", "Deserted", "Disturbed", "Prosperous", "Calmed" };
                                                uint almostid = client.ActiveNpc / 2;
                                                uint baseId = 721010;
                                                uint tactic = almostid - 300002;
                                                baseId += tactic;
                                                if (client.Inventory.Contains(baseId, 1))
                                                {
                                                    dialog.Text("Congratulations, you have a token for this tactic. This tactic is " + Tactics[tactic] + ".");
                                                    dialog.Option("Ok, thanks!", 255);
                                                    dialog.Send();
                                                    break;
                                                }
                                                else
                                                {
                                                    dialog.Text("You don't have a token for this tactic, I'm afraid I cannot tell you which tactic is it.");
                                                    dialog.Option("Ahh, thanks anyway!", 255);
                                                    dialog.Send();
                                                    break;
                                                }
                                            }
                                    }
                                    break;
                                }
                            case 600016:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("You are in DeathTactic, you either die or proceed if you have 6 tokens that are not the same.");
                                                dialog.Option("Ok, thanks!", 255);
                                                dialog.Send();
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion
                            #region Ghost
                            case 600005:
                            case 600007:
                            case 600009:
                            case 600011:
                            case 600013:
                            case 600015:
                                {
                                    uint almostId = (client.ActiveNpc - 1) / 2;
                                    uint baseId = 721010;
                                    uint tactic = almostId - 300002;
                                    baseId += tactic;
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {

                                                if (client.Inventory.Contains(baseId, 1))
                                                {
                                                    dialog.Text("Nice you have the token!\nAre you ready to leave?");
                                                    dialog.Option("Yes.", 1);
                                                    dialog.Option("No.", 255);
                                                    dialog.Send();
                                                }
                                                else
                                                {
                                                    dialog.Text("How dare you bother me without the token!\nYou will not leave this place until the token has been found!");
                                                    dialog.Option("Sorry I'll go find it!", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 1:
                                            {
                                                if (client.Inventory.Contains(baseId, 1))
                                                {
                                                    client.Entity.Teleport(1042, 028, 033);
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            case 600017:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("I've been trapped here forever.\nI didn't have all the token before coming here.");
                                                dialog.Option("What about me?", 1);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                dialog.Text("If you have all the tokens you may leave this place with a moonbox.\nIf you don't.... You must die.");
                                                dialog.Option("I have them! Please don't kill me!", 2);
                                                dialog.Option("Oh no...", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 2:
                                            {
                                                if (client.Inventory.Contains(721010, 1) &&
                                                         client.Inventory.Contains(721011, 1) &&
                                                         client.Inventory.Contains(721012, 1) &&
                                                         client.Inventory.Contains(721013, 1) &&
                                                         client.Inventory.Contains(721014, 1) &&
                                                         client.Inventory.Contains(721015, 1))
                                                {
                                                    client.Inventory.Remove(721010, 1);
                                                    client.Inventory.Remove(721011, 1);
                                                    client.Inventory.Remove(721012, 1);
                                                    client.Inventory.Remove(721013, 1);
                                                    client.Inventory.Remove(721014, 1);
                                                    client.Inventory.Remove(721015, 1);

                                                    client.Inventory.Add(721072, 0, 1);
                                                    client.Entity.Teleport(1050, 210, 164);
                                                }
                                                else
                                                {
                                                    dialog.Text("You're wrong. Enjoy your death.");
                                                    dialog.Option("No!", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion
                            #region VagrantGhost
                            case 600018:
                            case 600019:
                            case 600020:
                            case 600021:
                            case 600022:
                            case 600023:
                            case 600024:
                            case 600025:
                            case 600026:
                            case 600027:
                            case 600028:
                            case 600029:
                            case 600030:
                            case 600031:
                            case 600032:
                            case 600033:
                            case 600034:
                            case 600035:
                            case 600036:
                            case 600037:
                            case 600038:
                            case 600039:
                            case 600040:
                            case 600041:
                            case 600042:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("Help me... Please");
                                                dialog.Option("Who are you?", 1);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                dialog.Text("I am a warrior trapped in these tactics please help me to revive!");
                                                dialog.Option("I have the SoulJade.", 2);
                                                dialog.Option("No.", 3);
                                                dialog.Send();
                                                break;
                                            }
                                        case 2:
                                            {
                                                if (client.Inventory.Contains(721072, 1))
                                                {
                                                    dialog.Text("Thank you! Will you recive my gift of a Moonbox?");
                                                    dialog.Option("Yes.", 3);
                                                    dialog.Option("Not needed.", 4);
                                                    dialog.Send();
                                                }
                                                else
                                                {
                                                    dialog.Text("You do not...even so, I shall help you leave this cursed map.");
                                                    dialog.Option("Please get me out of here.", 5);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 3:
                                            {
                                                if (client.Inventory.Contains(721072, 1))
                                                {
                                                    client.Inventory.Remove(721072, 1);
                                                    client.Inventory.Add(721080, 0, 1);
                                                    client.Entity.Teleport(1042, 028, 033);
                                                }
                                                break;
                                            }
                                        case 4:
                                            {
                                                client.Inventory.Remove(721072, 1);
                                                client.Entity.Teleport(1042, 028, 033);
                                                break;
                                            }
                                        case 5:
                                            {
                                                client.Entity.Teleport(1042, 028, 033);
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion
                            #endregion
                        }
                        break;
                    }
                #endregion
                #region Ape Canyon
                case 1020:
                    {
                        switch (client.ActiveNpc)
                        {
                            #region Ape City
                            case 10053:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("Hello " + client.Entity.Name + ", I can send you on your way for just 100 silvers.");
                                                dialog.Text("\nWhere would you like to go?");
                                                dialog.Option("Twin City", 1);
                                                dialog.Option("Market", 2);
                                                dialog.Option("Nevermind", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                if (client.Entity.Money >= 100)
                                                {
                                                    client.Entity.Money -= 100;
                                                    client.Entity.Teleport(1020, 378, 13);
                                                }
                                                else
                                                {
                                                    dialog.Text("You do not have 100 silvers.");
                                                    dialog.Option("Aww!", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 2:
                                            {
                                                if (client.Entity.Money >= 100)
                                                {
                                                    client.Entity.Money -= 100;
                                                    client.Entity.Teleport(1036, 211, 196);
                                                }
                                                else
                                                {
                                                    dialog.Text("You do not have 100 silvers.");
                                                    dialog.Option("Aww!", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion
                            #region Ape Canyon

                            #region Alex
                            case 3600:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("You don't worry, it's not gonna hurt you a bit when getting the third life. You just need an exemption token and it's all going to be fine.");
                                                dialog.Option("Here is the ExemptionToken.", 1);
                                                dialog.Option("I'll just leave", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                if (client.Entity.Reborn == 1)
                                                {
                                                    if (client.Entity.Class % 10 == 5 && client.Entity.Level >= (client.Entity.Class == 135 ? 110 : 120))
                                                    {
                                                        dialog.Text("Select the class you want to reborn in.");
                                                        dialog.Option("Trojan.", 11);
                                                        dialog.Option("Warrior.", 21);
                                                        dialog.Option("Archer.", 41);
                                                        dialog.Option("WaterTaoist.", 132);
                                                        dialog.Option("FireTaoist.", 142);
                                                        dialog.Option("Ninja.", 51);
                                                        dialog.Option("Monk.", 61);
                                                        dialog.Option("Nothing thank you.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("If you are a water saint you need level 110+, else you need 120+.");
                                                        dialog.Option("I'll just leave", 255);
                                                        dialog.Send();
                                                        break;
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You need to be in the second life to be able to get the third life.");
                                                    dialog.Option("I'll just leave", 255);
                                                    dialog.Send();
                                                    break;
                                                }
                                                break;
                                            }
                                        default:
                                            {
                                                if (npcRequest.OptionID == 255)
                                                    return;
                                                if (client.Entity.Reborn == 1)
                                                {
                                                    if (client.Entity.Class % 10 == 5 && client.Entity.Level >= (client.Entity.Class == 135 ? 110 : 120))
                                                    {
                                                        if (client.Inventory.Contains(723701, 1))
                                                        {
                                                            if (client.Reborn(npcRequest.OptionID))
                                                            {
                                                                client.Inventory.Remove(723701, 1);
                                                            }
                                                            else
                                                            {
                                                                dialog.Text("You need two free slots in your inventory.");
                                                                dialog.Option("I'll just leave", 255);
                                                                dialog.Send();
                                                                break;
                                                            }
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("If you are a water saint you need level 110+, else you need 120+.");
                                                        dialog.Option("I'll just leave", 255);
                                                        dialog.Send();
                                                        break;
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You need to be in the second life to be able to get the third life.");
                                                    dialog.Option("I'll just leave", 255);
                                                    dialog.Send();
                                                    break;
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region Assistant
                            case 126:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("Do you want to visit the mine?");
                                                dialog.Option("Yes.", 1);
                                                dialog.Option("No.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                client.Entity.Teleport(1026, 142, 105);
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #endregion
                        }
                        break;
                    }
                #endregion
                #region PhoenixCastle
                case 1011:
                    {
                        switch (client.ActiveNpc)
                        {
                            #region Phoenix Castle
                            case 10052:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("Hello " + client.Entity.Name + ", I can send you on your way for just 100 silvers.");
                                                dialog.Text("\nWhere would you like to go?");
                                                dialog.Option("Market", 1);
                                                dialog.Option("Twin City", 2);
                                                dialog.Option("Nevermind", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                if (client.Entity.Money >= 100)
                                                {
                                                    client.Entity.Money -= 100;
                                                    client.Entity.Teleport(1036, 211, 196);
                                                }
                                                else
                                                {
                                                    dialog.Text("You do not have 100 silvers.");
                                                    dialog.Option("Aww!", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 2:
                                            {
                                                if (client.Entity.Money >= 100)
                                                {
                                                    client.Entity.Money -= 100;
                                                    client.Entity.Teleport(10, 377);
                                                }
                                                else
                                                {
                                                    dialog.Text("You do not have 100 silvers.");
                                                    dialog.Option("Aww!", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion
                            #region PhoenixCity

                            #region Assistant
                            case 125:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("Do you want to visit the mine?");
                                                dialog.Option("Yes.", 1);
                                                dialog.Option("No.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                client.Entity.Teleport(1025, 30, 71);
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #endregion
                        }
                        break;
                    }
                #endregion
                #region DesertCity
                case 1000:
                    {
                        switch (client.ActiveNpc)
                        {
                            #region Desert city
                            case 10051:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("Hello " + client.Entity.Name + ", I can set you on your way for just 100 silver.\n");
                                                dialog.Text("Where would you like to go?");
                                                dialog.Option("Twin City", 1);
                                                dialog.Option("Market", 3);
                                                dialog.Option("Mystic Castle", 2);
                                                dialog.Option("Nevermind.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                if (client.Entity.Money >= 100)
                                                {
                                                    client.Entity.Teleport(1000, 973, 668);
                                                    client.Entity.Money -= 100;
                                                }
                                                else
                                                {
                                                    dialog.Text("You do not have 100 silvers.");
                                                    dialog.Option("Aww!", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 2:
                                            {
                                                if (client.Entity.Money >= 100)
                                                {
                                                    client.Entity.Teleport(1000, 80, 320);
                                                    client.Entity.Money -= 100;
                                                }
                                                else
                                                {
                                                    dialog.Text("You do not have 100 silvers.");
                                                    dialog.Option("Aww!", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 3:
                                            {
                                                if (client.Entity.Money >= 100)
                                                {
                                                    client.Entity.Teleport(1036, 211, 196);
                                                    client.Entity.Money -= 100;
                                                }
                                                else
                                                {
                                                    dialog.Text("You do not have 100 silvers.");
                                                    dialog.Option("Aww!", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion
                            #region DesertCity
                            #region Assistant
                            case 127:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("Do you want to visit the mine?");
                                                dialog.Option("Yes.", 1);
                                                dialog.Option("No.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                client.Entity.Teleport(1027, 142, 105);
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion
                            #endregion
                        }
                        break;
                    }
                #endregion
                #region Bird Village
                case 1015:
                    {
                        switch (client.ActiveNpc)
                        {
                            #region Bird Island
                            case 10056:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("Hello " + client.Entity.Name + ", I can send you on your way for just 100 silvers.");
                                                dialog.Text("\nWhere would you like to go?");
                                                dialog.Option("Twin City", 1);
                                                dialog.Option("Market", 2);
                                                dialog.Option("Nevermind", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                if (client.Entity.Money >= 100)
                                                {
                                                    client.Entity.Money -= 100;
                                                    client.Entity.Teleport(1015, 1015, 710);
                                                }
                                                else
                                                {
                                                    dialog.Text("You do not have 100 silvers.");
                                                    dialog.Option("Aww!", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 2:
                                            {
                                                if (client.Entity.Money >= 100)
                                                {
                                                    client.Entity.Money -= 100;
                                                    client.Entity.Teleport(1036, 211, 196);
                                                }
                                                else
                                                {
                                                    dialog.Text("You do not have 100 silvers.");
                                                    dialog.Option("Aww!", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion
                            #region Bird Village

                            #region ArtisanOu
                            case 41:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("Hello there my friend. I am here to make your socket your weapon. With a socketed weapon you can add gems inside of the sockets and the gems will give you some extra stats. For the first socket I demand 1 DragonBall and for the second one I demand 5 dragonballs.");
                                                dialog.Option("Alright let's go on.", 1);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                if (!client.Equipment.Free(4))
                                                {
                                                    Conquer_Online_Server.Interfaces.IConquerItem Item = null;
                                                    Item = client.Equipment.TryGetItem(4);
                                                    if (Item.SocketOne == Conquer_Online_Server.Game.Enums.Gem.NoSocket)
                                                    {
                                                        dialog.Text("My friend I need one DragonBall to socket your weapon. Are you sure you want to do this?");
                                                        dialog.Option("Yea sure.", 2);
                                                        dialog.Send();
                                                    }
                                                    else if (Item.SocketTwo == Conquer_Online_Server.Game.Enums.Gem.NoSocket)
                                                    {
                                                        dialog.Text("My friend I need five dragonballs to socket your weapon. Are you sure you want to do this?");
                                                        dialog.Option("Yea sure.", 2);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("I can't socket this weapon once more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You need to wear the weapon first.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 2:
                                            {
                                                if (!client.Equipment.Free(4))
                                                {
                                                    Conquer_Online_Server.Interfaces.IConquerItem Item = null;
                                                    Item = client.Equipment.TryGetItem(4);
                                                    if (Item.SocketOne == Conquer_Online_Server.Game.Enums.Gem.NoSocket)
                                                    {
                                                        if (client.Inventory.Contains(1088000, 1))
                                                        {
                                                            client.Inventory.Remove(1088000, 1);
                                                            Item.SocketOne = Conquer_Online_Server.Game.Enums.Gem.EmptySocket;
                                                            Item.Mode = Conquer_Online_Server.Game.Enums.ItemMode.Update;
                                                            Item.Send(client);
                                                            Conquer_Online_Server.Database.ConquerItemTable.UpdateSockets(Item, client);
                                                            dialog.Text("Done!");
                                                            dialog.Option("Thank you.", 255);
                                                            dialog.Send();
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You don't have one DragonBall!");
                                                            dialog.Option("Ah...", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else if (Item.SocketTwo == Conquer_Online_Server.Game.Enums.Gem.NoSocket)
                                                    {
                                                        if (client.Inventory.Contains(1088000, 5))
                                                        {
                                                            client.Inventory.Remove(1088000, 5);
                                                            Item.SocketTwo = Conquer_Online_Server.Game.Enums.Gem.EmptySocket;
                                                            Item.Mode = Conquer_Online_Server.Game.Enums.ItemMode.Update;
                                                            Item.Send(client);
                                                            Conquer_Online_Server.Database.ConquerItemTable.UpdateSockets(Item, client);
                                                            dialog.Text("Done!");
                                                            dialog.Option("Thank you.", 255);
                                                            dialog.Send();
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You don't have one DragonBall!");
                                                            dialog.Option("Ah...", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You need to wear the weapon first.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #endregion
                        }
                        break;
                    }
                #endregion
                #region Market
                case 1036:
                    {
                        switch (client.ActiveNpc)
                        {
                            #region Market

                            #region Shelby
                            case 300000:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("I have here the list with the virtue of all the people in this world. You have so far " + client.VirtuePoints + " virtue points.");
                                                dialog.Option("Thank you.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region LadyLuck
                            case 923:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                if (client.InLottery)
                                                {
                                                    dialog.Text("My friend, did something happen to you?\nYou may still want to try your luck since you already paid me the fee.");
                                                    dialog.Option("Alright, take me in.", 2);
                                                    dialog.Option("Later...", 255);
                                                    dialog.Send();
                                                }
                                                else
                                                {
                                                    dialog.Text("Hello my friend. Have you ever heard of the lottery?\nWell, my friend, to join the lottery you need 27 ConquerPoints. By entering the lottery you'll gain a big chance to win wonderful items, wonderful and very expensive.\n\nWhat do you say, would you like to join?\n");
                                                    dialog.Option("Alright, take me in.", 1);
                                                    dialog.Option("Later...", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 1:
                                            {
                                                if (client.Entity.Level >= 70)
                                                {
                                                    if (client.LotteryEntries < 10)
                                                    {
                                                        if (client.Entity.ConquerPoints >= 27)
                                                        {
                                                            client.Entity.ConquerPoints -= 27;
                                                            client.InLottery = true;
                                                            client.LotteryEntries++;
                                                            client.Entity.Teleport(700, 42, 50);
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You may not join the lottery today. You have already tried it 10 times today.");
                                                        dialog.Option("Ahh sorry.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You may not join the lottery , you need level 70 first.");
                                                    dialog.Option("Ahh sorry.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 2:
                                            {
                                                if (client.InLottery)
                                                {
                                                    client.Entity.Teleport(700, 42, 50);
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region Realloter
                            case 350050:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("Hello there brave conqueror, if you have reborn, and you misplaced your atribute points or you want to set them another way, I'll reset your atribute points for one DragonBall. Do you accept?");
                                                dialog.Option("Here is the DragonBall.", 1);
                                                dialog.Option("I'll just leave", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                if (client.Entity.Reborn > 0)
                                                {
                                                    if (client.Inventory.Contains(1088000, 1))
                                                    {
                                                        client.Inventory.Remove(1088000, 1);
                                                        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));
                                                            }
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need a DragonBall.");
                                                        dialog.Option("I'll just leave", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You have to have atleast one rebirth atleast.");
                                                    dialog.Option("I'll just leave", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region Magic Artisan
                            case 10062:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("Have you ever seen my brother Artisan Wind? If so, you might know that he upgrades and downgrades the item level and item quality.");
                                                dialog.Text("Well, he doesn't always succeed, but that's why I am here. I can upgrade/downgrade being sucessfully with a fixed amount of meteors (tears)/dragonballs. ");
                                                dialog.Text("What would you like me to do?");
                                                dialog.Option("Upgrade level.", 1);
                                                dialog.Option("Downgrade level.", 2);
                                                dialog.Option("Upgrade quality.", 3);
                                                dialog.Option("I'll just leave", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                        case 2:
                                        case 3:
                                            {
                                                int aut = npcRequest.OptionID * 10;
                                                dialog.Text("Select which item's details you want to change?");
                                                dialog.Option("Headgear.", (byte)(aut + 1));
                                                dialog.Option("Necklace.", (byte)(aut + 2));
                                                dialog.Option("Armor.", (byte)(aut + 3));
                                                dialog.Option("Main Weapon.", (byte)(aut + 4));
                                                dialog.Option("Left Weapon/Shield.", (byte)(aut + 5));
                                                dialog.Option("Ring.", (byte)(aut + 6));
                                                dialog.Option("Boots.", (byte)(aut + 8));
                                                dialog.Option("I'll just leave", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 100:
                                            {
                                                if (client.SelectedItem == 0)
                                                    return;
                                                var item = client.Equipment.TryGetItem(client.SelectedItem);
                                                var itemdetail = Conquer_Online_Server.Database.ConquerItemInformation.BaseInformations[item.ID];
                                                Conquer_Online_Server.Database.ConquerItemInformation infos = new Conquer_Online_Server.Database.ConquerItemInformation(item.ID, item.Plus);
                                                switch (client.UpdateType)
                                                {
                                                    case 1:
                                                    case 2:
                                                        {
                                                            //Cost: 36
                                                            //Metscrolls: 4
                                                            byte cost = (byte)(itemdetail.Level / 5);
                                                            byte scrolls = 0;
                                                            bool useScrolls = false;
                                                            byte extraScroll = 0;
                                                            int addMets = 0;
                                                            cost += (byte)((item.ID % 10) / 3);
                                                            cost += (byte)(itemdetail.Level / 10);
                                                            uint id = 1088001;
                                                            if (client.UpdateType == 2)
                                                                id++;
                                                            foreach (IConquerItem scroll in client.Inventory.Objects)
                                                                if (scroll.ID == 720027)
                                                                    scrolls++;
                                                            if (cost % 10 != 0)
                                                            {
                                                                addMets = 10 - (cost % 10);
                                                                extraScroll = 1;
                                                            }
                                                            if (scrolls >= (cost / 10) + extraScroll)
                                                                useScrolls = true;

                                                            if (client.Inventory.Contains(id, cost) || useScrolls)
                                                            {
                                                                if (useScrolls)
                                                                {
                                                                    client.Inventory.Remove(720027, Convert.ToByte((cost / 10) + extraScroll));
                                                                    client.Inventory.Add(1088001,0,(byte)addMets);
                                                                }
                                                                else
                                                                    client.Inventory.Remove(id, cost);
                                                                client.UnloadItemStats(item, false);
                                                                if (client.UpdateType == 1)
                                                                {
                                                                    Conquer_Online_Server.Database.ConquerItemInformation infos2 = new Conquer_Online_Server.Database.ConquerItemInformation(infos.CalculateUplevel(), item.Plus);
                                                                    if (infos2.BaseInformation.ID == infos.BaseInformation.ID)
                                                                        return;
                                                                    if (client.Entity.Level < infos2.BaseInformation.Level)
                                                                    {
                                                                        dialog.Text("You need level " + infos2.BaseInformation.Level + " first.");
                                                                        dialog.Option("Ahh sorry.", 255);
                                                                        dialog.Send();
                                                                        client.SelectedItem = 0;
                                                                        client.UpdateType = 0;
                                                                        return;
                                                                    }
                                                                    item.ID = infos.CalculateUplevel();
                                                                }
                                                                else
                                                                    item.ID = infos.CalculateDownlevel();

                                                                Conquer_Online_Server.Database.ConquerItemTable.UpdateItemID(item, client);
                                                                item.Mode = Conquer_Online_Server.Game.Enums.ItemMode.Update;
                                                                item.Send(client);
                                                                client.LoadItemStats(item);
                                                                client.Equipment.UpdateEntityPacket();
                                                            }
                                                            break;
                                                        }
                                                    case 3:
                                                        {
                                                            byte cost = (byte)(itemdetail.Level / 30);
                                                            cost += (byte)((item.ID % 10) / 2);
                                                            uint id = 1088000;

                                                            if (client.Inventory.Contains(id, cost))
                                                            {
                                                                client.Inventory.Remove(id, cost);
                                                                client.UnloadItemStats(item, false);
                                                                if (item.ID % 10 < 5)
                                                                    item.ID += 5 - item.ID % 10;
                                                                item.ID++;
                                                                Conquer_Online_Server.Database.ConquerItemTable.UpdateItemID(item, client);
                                                                item.Mode = Conquer_Online_Server.Game.Enums.ItemMode.Update;
                                                                item.Send(client);
                                                                client.LoadItemStats(item);
                                                                client.Equipment.UpdateEntityPacket();
                                                            }
                                                            break;
                                                        }
                                                }
                                                break;
                                            }
                                        default:
                                            {
                                                if (npcRequest.OptionID == 255)
                                                    break;
                                                client.SelectedItem = (byte)(npcRequest.OptionID % 10);
                                                client.UpdateType = (byte)(npcRequest.OptionID / 10);
                                                if (client.Equipment.Free(client.SelectedItem))
                                                {
                                                    dialog.Text("You have to be wearing the selected item.");
                                                    dialog.Option("I'll just leave", 255);
                                                    dialog.Send();
                                                    return;
                                                }
                                                var item = client.Equipment.TryGetItem(client.SelectedItem);
                                                var itemdetail = Conquer_Online_Server.Database.ConquerItemInformation.BaseInformations[item.ID];
                                                if (itemdetail == null)
                                                {
                                                    dialog.Text("An error occured. Please relogin and try again.");
                                                    dialog.Option("Ok.", 255);
                                                    dialog.Send();
                                                    return;
                                                }
                                                switch (client.UpdateType)
                                                {
                                                    case 1:
                                                    case 2:
                                                        {
                                                            if (itemdetail.Level == Conquer_Online_Server.Network.PacketHandler.ItemMaxLevel(client.SelectedItem) && client.UpdateType == 1)
                                                            {
                                                                dialog.Text("This item's level cannot be upgraded anymore.");
                                                                dialog.Option("Ahh sorry.", 255);
                                                                dialog.Send();
                                                                client.SelectedItem = 0;
                                                                client.UpdateType = 0;
                                                                return;
                                                            }
                                                            if (itemdetail.Level == Conquer_Online_Server.Network.PacketHandler.ItemMinLevel(client.SelectedItem) && client.UpdateType == 2)
                                                            {
                                                                dialog.Text("This item's level cannot be downgraded anymore.");
                                                                dialog.Option("Ahh sorry.", 255);
                                                                dialog.Send();
                                                                client.SelectedItem = 0;
                                                                client.UpdateType = 0;
                                                                return;
                                                            }
                                                            byte cost = (byte)(itemdetail.Level / 5);
                                                            cost += (byte)((item.ID % 10) / 3);
                                                            cost += (byte)(itemdetail.Level / 10);
                                                            dialog.Text("It will cost you " + cost + " meteor" + (client.UpdateType == 2 ? " tears" : "s") + ". Do you accept?");
                                                            dialog.Option("Yes.", 100);
                                                            dialog.Option("No thank you.", 255);
                                                            dialog.Send();
                                                            break;
                                                        }
                                                    case 3:
                                                        {
                                                            if (item.ID % 10 == 9)
                                                            {
                                                                dialog.Text("This item's quality cannot be upgraded anymore.");
                                                                dialog.Option("Ahh sorry.", 255);
                                                                dialog.Send();
                                                                client.SelectedItem = 0;
                                                                client.UpdateType = 0;
                                                                return;
                                                            }
                                                            byte cost = (byte)(itemdetail.Level / 30);
                                                            cost += (byte)((item.ID % 10) / 2);
                                                            dialog.Text("It will cost you " + cost + " dragonballs. Do you accept?");
                                                            dialog.Option("Yes.", 100);
                                                            dialog.Option("No thank you.", 255);
                                                            dialog.Send();
                                                            break;
                                                        }
                                                }

                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region Weapon Master
                            case 7050:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("My brothers, Magic Artisan and Artisan Wind, both need meteors to upgrade, but I need only dragonballs.");
                                                dialog.Text("I upgrade item's level only and I want  only one dragonball for my service.");
                                                dialog.Option("Upgrade level.", 1);
                                                dialog.Option("I'll just leave", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                int aut = npcRequest.OptionID * 10;
                                                dialog.Text("Select which item's details you want to change?");
                                                dialog.Option("Headgear.", (byte)(aut + 1));
                                                dialog.Option("Necklace.", (byte)(aut + 2));
                                                dialog.Option("Armor.", (byte)(aut + 3));
                                                dialog.Option("Main Weapon.", (byte)(aut + 4));
                                                dialog.Option("Left Weapon/Shield.", (byte)(aut + 5));
                                                dialog.Option("Ring.", (byte)(aut + 6));
                                                dialog.Option("Boots.", (byte)(aut + 8));
                                                dialog.Option("I'll just leave", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 100:
                                            {
                                                if (client.SelectedItem == 0)
                                                    return;
                                                var item = client.Equipment.TryGetItem(client.SelectedItem);
                                                var itemdetail = Conquer_Online_Server.Database.ConquerItemInformation.BaseInformations[item.ID];
                                                Conquer_Online_Server.Database.ConquerItemInformation infos = new Conquer_Online_Server.Database.ConquerItemInformation(item.ID, item.Plus);
                                                switch (client.UpdateType)
                                                {
                                                    case 1:
                                                    case 2:
                                                        {

                                                            byte cost = (byte)(itemdetail.Level / 6);
                                                            cost += (byte)((item.ID % 10) / 3);
                                                            uint id = 1088001;
                                                            if (client.UpdateType == 2)
                                                                id++;
                                                            if (client.Inventory.Contains(id, cost))
                                                            {
                                                                client.Inventory.Remove(id, cost);
                                                                client.UnloadItemStats(item, false);
                                                                if (client.UpdateType == 1)
                                                                    item.ID = infos.CalculateUplevel();
                                                                else
                                                                    item.ID = infos.CalculateDownlevel();
                                                                if (infos.BaseInformation.ID == item.ID)
                                                                    return;
                                                                Conquer_Online_Server.Database.ConquerItemTable.UpdateItemID(item, client);
                                                                item.Mode = Conquer_Online_Server.Game.Enums.ItemMode.Update;
                                                                item.Send(client);
                                                                client.LoadItemStats(item);
                                                                client.Equipment.UpdateEntityPacket();
                                                            }
                                                            break;
                                                        }
                                                    case 3:
                                                        {
                                                            byte cost = (byte)(itemdetail.Level / 30);
                                                            cost += (byte)((item.ID % 10) / 2);
                                                            uint id = 1088000;

                                                            if (client.Inventory.Contains(id, cost))
                                                            {
                                                                client.Inventory.Remove(id, cost);
                                                                client.UnloadItemStats(item, false);
                                                                item.ID++;
                                                                Conquer_Online_Server.Database.ConquerItemTable.UpdateItemID(item, client);
                                                                item.Mode = Conquer_Online_Server.Game.Enums.ItemMode.Update;
                                                                item.Send(client);
                                                                client.LoadItemStats(item);
                                                                client.Equipment.UpdateEntityPacket();
                                                            }
                                                            break;
                                                        }
                                                }
                                                break;
                                            }
                                        default:
                                            {
                                                if (npcRequest.OptionID == 255)
                                                    break;
                                                byte SelectedItem = (byte)(npcRequest.OptionID % 10);
                                                byte NowType = (byte)(npcRequest.OptionID / 10);
                                                if (client.Equipment.Free(SelectedItem))
                                                {
                                                    dialog.Text("You have to be wearing the selected item.");
                                                    dialog.Option("I'll just leave", 255);
                                                    dialog.Send();
                                                    return;
                                                }
                                                var item = client.Equipment.TryGetItem(SelectedItem);
                                                var itemdetail = Conquer_Online_Server.Database.ConquerItemInformation.BaseInformations[item.ID];

                                                if (itemdetail.Level == Conquer_Online_Server.Network.PacketHandler.ItemMaxLevel(client.SelectedItem) && client.UpdateType == 1)
                                                {
                                                    dialog.Text("This item's level cannot be upgraded anymore.");
                                                    dialog.Option("Ahh sorry.", 255);
                                                    dialog.Send();
                                                    client.SelectedItem = 0;
                                                    client.UpdateType = 0;
                                                    return;
                                                }
                                                if (NowType == 1)
                                                {
                                                    dialog.Text("It will cost you one dragonball. Do you accept?");
                                                    dialog.Option("Yes.", (byte)(20 + SelectedItem));
                                                    dialog.Option("No thank you.", 255);
                                                    dialog.Send();
                                                }
                                                else
                                                {
                                                    Conquer_Online_Server.Database.ConquerItemInformation infos = new Conquer_Online_Server.Database.ConquerItemInformation(item.ID, item.Plus);
                                                    Conquer_Online_Server.Database.ConquerItemInformation infos2 = new Conquer_Online_Server.Database.ConquerItemInformation(infos.CalculateUplevel(), item.Plus);
                                                    if (client.Entity.Level < infos2.BaseInformation.Level)
                                                    {
                                                        dialog.Text("You need level " + infos2.BaseInformation.Level + " first.");
                                                        dialog.Option("Ahh sorry.", 255);
                                                        dialog.Send();
                                                        client.SelectedItem = 0;
                                                        client.UpdateType = 0;
                                                        return;
                                                    }
                                                    if (client.Inventory.Contains(1088000, 1))
                                                    {
                                                        client.Inventory.Remove(1088000, 1);
                                                        client.UnloadItemStats(item, false);
                                                        item.ID = infos.CalculateUplevel();
                                                        Conquer_Online_Server.Database.ConquerItemTable.UpdateItemID(item, client);
                                                        item.Mode = Conquer_Online_Server.Game.Enums.ItemMode.Update;
                                                        item.Send(client);
                                                        client.LoadItemStats(item);
                                                        client.Equipment.UpdateEntityPacket();
                                                    }
                                                }
                                            }
                                            break;
                                    }
                                    break;
                                }
                            #endregion

                            #region Proficiency God
                            case 941:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("Hello my friend. If you believe that, leveling your proficiency is too hard and takes too much time, I can help you. In exchange of a fixed amount of exp balls, I will agree to level up your proficiency.");
                                                dialog.Text("Now, tell me what proficiency you want to level up.");
                                                dialog.Option("One handed.", 1);
                                                dialog.Option("Two handed.", 3);
                                                dialog.Option("Other.", 5);
                                                dialog.Option("I'll just leave", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                dialog.Text("Which one handed proficiency?");
                                                dialog.Option("Blade.", 41);
                                                dialog.Option("Sword.", 42);
                                                dialog.Option("Hook.", 43);
                                                dialog.Option("Whip.", 44);
                                                dialog.Option("Axe.", 45);
                                                dialog.Option("Next page.", 2);
                                                dialog.Option("Nothing, sorry.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 2:
                                            {
                                                dialog.Text("Which one handed proficiency?");
                                                dialog.Option("PrayerBead.", 61);
                                                dialog.Option("Hammer.", 46);
                                                dialog.Option("Club.", 48);
                                                dialog.Option("Scepter.", 184);
                                                dialog.Option("Katana.", 60);
                                                dialog.Option("Axe.", 45);
                                                dialog.Option("Back.", 1);
                                                dialog.Option("Nothing, sorry.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 3:
                                            {
                                                dialog.Text("Which two handed proficiency?");
                                                dialog.Option("Backsword.", 124);
                                                dialog.Option("Glaive.", 51);
                                                dialog.Option("Poleaxe.", 53);
                                                dialog.Option("LongHammer.", 54);
                                                dialog.Option("Spear.", 56);
                                                dialog.Option("Next page.", 4);
                                                dialog.Option("Nothing, sorry.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 4:
                                            {
                                                dialog.Text("Which one handed proficiency?");
                                                dialog.Option("Pickaxe.", 142);
                                                dialog.Option("Halberd.", 58);
                                                dialog.Option("Wand.", 165);
                                                dialog.Option("Bow.", 50);
                                                dialog.Option("Back.", 3);
                                                dialog.Option("Nothing, sorry.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 5:
                                            {
                                                dialog.Text("Which one handed proficiency?");
                                                dialog.Option("Boxing.", 254);
                                                dialog.Option("Shield.", 90);
                                                dialog.Option("Nothing, sorry.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 100:
                                            {
                                                if (client.Proficiencies.ContainsKey(client.UplevelProficiency))
                                                {
                                                    var prof = client.Proficiencies[client.UplevelProficiency];
                                                    if (prof.Level >= 12)
                                                    {
                                                        dialog.Text("This proficiency cannot be leveled up anymore.");
                                                        dialog.Option("Oh.", 255);
                                                        dialog.Send();
                                                        break;
                                                    }
                                                    client.UplevelProficiency = 0;
                                                    if (client.Inventory.Contains(723700, prof.Level))
                                                    {
                                                        client.Inventory.Remove(723700, prof.Level);
                                                        prof.Level++;
                                                        prof.Experience = 0;
                                                        prof.Send(client);
                                                        break;
                                                    }
                                                    dialog.Text("You don't have the requiered exp balls, I'm sorry I cannot help you.");
                                                    dialog.Option("It's alright.", 255);
                                                    dialog.Send();
                                                    break;
                                                }
                                                else
                                                {
                                                    dialog.Text("You don't know this proficiency.");
                                                    dialog.Option("Ahh, sorry.", 255);
                                                    dialog.Send();
                                                    break;
                                                }
                                            }
                                        default:
                                            {
                                                if (npcRequest.OptionID == 255)
                                                    return;
                                                ushort proficiency = 0;
                                                if (npcRequest.OptionID < 100)
                                                    proficiency = (ushort)(npcRequest.OptionID * 10);
                                                else
                                                {
                                                    if (npcRequest.OptionID != 254)
                                                    {
                                                        string off = npcRequest.OptionID.ToString();
                                                        string reverse = off[2].ToString() + off[1].ToString() + off[0].ToString();
                                                        proficiency = ushort.Parse(reverse);
                                                    }
                                                }
                                                if (proficiency == 600) proficiency++;
                                                if (client.Proficiencies.ContainsKey(proficiency))
                                                {
                                                    var prof = client.Proficiencies[proficiency];
                                                    if (prof.Level >= 12)
                                                    {
                                                        dialog.Text("This proficiency cannot be leveled up anymore.");
                                                        dialog.Option("Oh.", 255);
                                                        dialog.Send();
                                                        break;
                                                    }
                                                    client.UplevelProficiency = proficiency;
                                                    dialog.Text("I need " + prof.Level + " exp balls to be able to level up this proficiency.");
                                                    dialog.Option("Let's do it then.", 100);
                                                    dialog.Option("No, sorry.", 255);
                                                    dialog.Send();
                                                    break;
                                                }
                                                else
                                                {
                                                    dialog.Text("You don't know this proficiency.");
                                                    dialog.Option("Ahh, sorry.", 255);
                                                    dialog.Send();
                                                    break;
                                                }
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region CPAdmin
                            case 111816:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("Greetings, here you can exchange either a Dragonball or a DragonScroll for cps. ");
                                                dialog.Text("One Dragonball will get you 215 cps and a DragonScroll will get you 2150. ");
                                                dialog.Text("What would you like to trade? Or would you rather not?");
                                                dialog.Option("Dragonball", 1);
                                                dialog.Option("DragonballScroll", 2);
                                                dialog.Option("I'll just leave", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                if (client.Inventory.Contains(1088000, 1))
                                                {
                                                    client.Inventory.Remove(1088000, 1);
                                                    client.Entity.ConquerPoints += 215;
                                                }
                                                else
                                                {
                                                    dialog.Text("You do not have a Dragonball");
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 2:
                                            {
                                                if (client.Inventory.Contains(721511, 1))
                                                {
                                                    client.Inventory.Remove(721511, 1);
                                                    client.Entity.ConquerPoints += 2150;
                                                }
                                                else
                                                {
                                                    dialog.Text("You do not have a DragonballScroll");
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region SurgeonMiracle
                            case 3381:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("Do you want to have your size changed so that you can become much more");
                                                dialog.Text(" adorable? Now here is a precious chance for you.");
                                                dialog.Option("I want to change my size.", 1);
                                                //dialog.Option("I want to change my gender.", 2);
                                                dialog.Option("I don't want to change.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                dialog.Text("If you pay me one DragonBall, I can have your size changed. You will become");
                                                dialog.Text("more attractive and start a fresh life. By the way, to avoid some unexpected");
                                                dialog.Text("things, make sure you are not in any disguise form.");
                                                dialog.Option("Here is a DragonBall.", 3);
                                                dialog.Option("I have no DragonBall.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 2:
                                            {
                                                dialog.Text("If you pay me one DragonBall, I can have your gender changed. You will become");
                                                dialog.Text("more attractive and start a fresh life. By the way, to avoid some unexpected");
                                                dialog.Text("things, make sure you are not in any disguise form.");
                                                dialog.Option("Here is a DragonBall.", 4);
                                                dialog.Option("I have no DragonBall.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 3:
                                            {
                                                if (client.Inventory.Contains(1088000, 1))
                                                {
                                                    int Model = (int)client.Entity.Body % 10;
                                                    switch (Model)
                                                    {
                                                        case 2:
                                                        case 4:
                                                            client.Entity.Body--;
                                                            break;
                                                        case 1:
                                                        case 3:
                                                            client.Entity.Body++;
                                                            break;
                                                    }

                                                    client.Inventory.Remove(1088000, 1);
                                                    break;
                                                }
                                                else
                                                {
                                                    dialog.Text("Sorry, there is no DragonBall in your inventory. I can't have your size changed.");
                                                    dialog.Option("Ok, Sorry.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 4:
                                            {
                                                if (client.Inventory.Contains(1088000, 1))
                                                {
                                                    int Model = (int)client.Entity.Body % 10;
                                                    switch (Model)
                                                    {
                                                        case 3:
                                                        case 4:
                                                            client.Entity.Body -= 2;
                                                            break;
                                                        case 1:
                                                        case 2:
                                                            client.Entity.Body += 2;
                                                            break;
                                                    }
                                                    client.Send(new Message("Your gender has been changed.", System.Drawing.Color.BurlyWood, Message.TopLeft));
                                                    client.Inventory.Remove(1088000, 1);
                                                    break;
                                                }
                                                else
                                                {
                                                    dialog.Text("Sorry, there is no DragonBall in your inventory. I can't have your size changed.");
                                                    dialog.Option("Ok, Sorry.", 255);
                                                    dialog.Send();
                                                }
                                            }
                                            break;
                                    }
                                    break;
                                }
                            #endregion

                            #region Mark. Controler
                            case 45: //Mark. Controler
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("If you want to leave just tell me when you are ready. It's free.\nYou will be teleported to the city you were in before coming here.");
                                                dialog.Option("I'm ready.", 1);
                                                dialog.Option("Wait a minute.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                int PrevMap = client.Entity.PreviousMapID;
                                                switch (PrevMap)
                                                {
                                                    default:
                                                        {
                                                            client.Entity.Teleport(1002, 429, 378);
                                                            break;
                                                        }
                                                    case 1000:
                                                        {
                                                            client.Entity.Teleport(1000, 500, 650);
                                                            break;
                                                        }
                                                    case 1020:
                                                        {
                                                            client.Entity.Teleport(1020, 565, 562);
                                                            break;
                                                        }
                                                    case 1011:
                                                        {
                                                            client.Entity.Teleport(1011, 188, 264);
                                                            break;
                                                        }
                                                    case 1015:
                                                        {
                                                            client.Entity.Teleport(1015, 717, 571);
                                                            break;
                                                        }
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region Enchanter and composer
                            case 35016:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("I can improve the enchant of an item and I can also improve the plus of an item. Please let me know how can I help you.");
                                                dialog.Option("Compose.", 1);
                                                dialog.Option("Enchant.", 2);
                                                dialog.Option("Nothing.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                Data data = new Data(true);
                                                data.ID = Data.OpenWindow;
                                                data.UID = client.Entity.UID;
                                                data.TimeStamp = Time32.Now;
                                                data.dwParam = Data.WindowCommands.Compose;
                                                data.wParam1 = client.Entity.X;
                                                data.wParam2 = client.Entity.Y;
                                                client.Send(data);
                                                break;
                                            }
                                        case 2:
                                            {
                                                Data data = new Data(true);
                                                data.ID = Data.OpenCustom;
                                                data.UID = client.Entity.UID;
                                                data.TimeStamp = Time32.Now;
                                                data.dwParam = Data.CustomCommands.Enchant;
                                                data.wParam1 = client.Entity.X;
                                                data.wParam2 = client.Entity.Y;
                                                client.Send(data);
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region Bless
                            case 35015:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("Hello there mate. I am here to add to your item a very precious element that will make your item more powerful and also more expensive. Each bless point ( - ) gives you 1% less damage. For -1 you need five Super tortoise gems(STG) or you can gain in through first reborn. For -3 you need one STGs, for -5 you need three STGs and for -7 you five STGs. Do you want to go on?");
                                                dialog.Option("Okay let's roll.", 100);
                                                dialog.Option("It's too expensive.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 100:
                                            {
                                                dialog.Text("Select the item. You must wear it.");
                                                dialog.Option("Headgear.", 1);
                                                dialog.Option("Necklace.", 2);
                                                dialog.Option("Armor.", 3);
                                                dialog.Option("Weapon", 4);
                                                dialog.Option("Shield", 5);
                                                dialog.Option("Ring", 6);
                                                dialog.Option("Boots.", 8);
                                                dialog.Option("Nevermind.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                        case 2:
                                        case 3:
                                        case 4:
                                        case 5:
                                        case 6:
                                        case 8:
                                            {
                                                byte stgs = 5;
                                                Conquer_Online_Server.Interfaces.IConquerItem Item = null;
                                                Item = client.Equipment.TryGetItem((byte)npcRequest.OptionID);
                                                if (Item != null)
                                                {
                                                    if (Item.Bless == 1)
                                                        stgs = 1;
                                                    else if (Item.Bless == 3)
                                                        stgs = 3;
                                                    else if (Item.Bless == 5)
                                                        stgs = 5;
                                                    if (Item.Bless == 7)
                                                    {
                                                        dialog.Text("An item can't have more than -7 bless points.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                        break;
                                                    }
                                                    if (client.Inventory.Contains(700073, stgs))
                                                    {
                                                        client.Inventory.Remove(700073, stgs);
                                                        if (Item.Bless == 0)
                                                            Item.Bless = 1;
                                                        else
                                                            Item.Bless += 2;
                                                        Item.Mode = Conquer_Online_Server.Game.Enums.ItemMode.Update;
                                                        Item.Send(client);
                                                        Conquer_Online_Server.Database.ConquerItemTable.UpdateBless(Item, client);
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have " + stgs + " STGs.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                        break;
                                                    }
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region BlacksmithLee
                            case 1550:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            client.Send(new Data(true) { UID = client.Entity.UID, ID = Data.OpenWindow, dwParam = Data.WindowCommands.OpenSockets, wParam1 = client.Entity.X, wParam2 = client.Entity.Y });
                                            break;
                                    }
                                    break;
                                }
                            #endregion

                            #region UnknownMan
                            case 3825:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("Hello stranger. My mother tough me not to talk with strangers but I feel like I can talk with you. There is something special to you. Since I feel like I can trust you I can make you a service. If your level is below 110, I will give you a lot of exp in exchange of one DragonBall, but if your level is above or equal to 110 I will demand two DragonBalls. If your level is higher than 135, well then, I can't help you. If you are interested in my proposition and if you have DragonBalls, please let me know.");
                                                dialog.Option("Yes I do.", 1);
                                                dialog.Option("No, not really.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                if (client.Entity.Level >= 135)
                                                {
                                                    dialog.Text("I am sorry, your level is too high. I simply can't help you.");
                                                    dialog.Option("Sorry.", 255);
                                                    dialog.Send();
                                                    break;
                                                }
                                                if (DateTime.Now.DayOfYear != client.LastDragonBallUse.DayOfYear)
                                                {
                                                    byte needTimes = 1;
                                                    ulong exp_reward = 13901336;//default for level 50 or lower
                                                    #region exp reward switch
                                                    byte level = client.Entity.Level;
                                                    if (level > 50 && level < 63)
                                                        exp_reward = 27152909;
                                                    if (level >= 63 && level < 69)
                                                        exp_reward = 28860143;
                                                    if (level >= 69 && level < 74)
                                                        exp_reward = 36822370;
                                                    if (level >= 74 && level < 79)
                                                        exp_reward = 57533091;
                                                    if (level >= 79 && level < 87)
                                                        exp_reward = 70404048;
                                                    if (level >= 87 && level < 90)
                                                        exp_reward = 84097242;
                                                    if (level >= 90 && level < 93)
                                                        exp_reward = 102959118;
                                                    if (level >= 93 && level < 96)
                                                        exp_reward = 134266326;
                                                    if (level >= 96 && level < 98)
                                                        exp_reward = 100801220;
                                                    if (level >= 98 && level <= 100)
                                                        exp_reward = 214351925;

                                                    if (level > 100)
                                                    {
                                                        switch (level)
                                                        {
                                                            case 101: exp_reward = 242910783; break;
                                                            case 102: exp_reward = 286050512; break;
                                                            case 103: exp_reward = 259627544; break;
                                                            case 104: exp_reward = 232767237; break;
                                                            case 105: exp_reward = 241888762; break;
                                                            case 106: exp_reward = 249478280; break;
                                                            case 107: exp_reward = 265126887; break;
                                                            case 108: exp_reward = 187446887; break;
                                                            case 109: exp_reward = 193715970; break;
                                                            case 110: exp_reward = 204416075; break;
                                                            case 111: exp_reward = 227337342; break;
                                                            case 112: exp_reward = 230562942; break;
                                                            case 113: exp_reward = 234594942; break;
                                                            case 114: exp_reward = 238626942; break;
                                                            case 115: exp_reward = 240239742; break;
                                                            case 116: exp_reward = 242658942; break;
                                                            case 117: exp_reward = 246690942; break;
                                                            case 118: exp_reward = 290290023; break;
                                                            case 119: exp_reward = 358712493; break;
                                                            case 120: exp_reward = 282274058; break;
                                                            case 121: exp_reward = 338728870; break;
                                                            case 122: exp_reward = 243884786; break;
                                                            case 123: exp_reward = 292661743; break;
                                                            case 124: exp_reward = 322122547; break;
                                                            case 125: exp_reward = 292661744; break;
                                                            case 126: exp_reward = 351194092; break;
                                                            case 127: exp_reward = 337146328; break;
                                                            case 128: exp_reward = 303431696; break;
                                                            case 129: exp_reward = 322122547; break;
                                                        }
                                                    }
                                                    #endregion
                                                    if (client.Entity.Level >= 110) { needTimes = 2; }
                                                    if (client.Entity.Level >= 130) { needTimes += 8; }
                                                    if (client.Entity.Level >= 135)
                                                    {
                                                        dialog.Text("I can't help you anymore, you're too high leveled!");
                                                        dialog.Option("I see, Thanks!", 255);
                                                        break;
                                                    }
                                                    if (client.Inventory.Contains(1088000, needTimes))
                                                    {
                                                        client.Inventory.Remove(1088000, needTimes);
                                                        client.IncreaseExperience(exp_reward, false);
                                                        client.LastDragonBallUse = DateTime.Now;
                                                        dialog.Text("Congratulations! You've received a lot of experience from me today, enjoy!");
                                                        dialog.Text("I'll see you only tomorrow now.");
                                                        dialog.Option("I see, Thanks!", 255);
                                                        break;
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("I am sorry, but obviously you want to scam me out because you don't have the amount of required DragonBalls.");
                                                        dialog.Option("Sorry.", 255);
                                                        dialog.Send();
                                                        break;
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I am sorry, but I remeber that I gave you this opportunity already today. I can't do it more than once per day so I'm afraid I have to tell you good bye until tomorrow.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                    break;
                                                }
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region LoveStone
                            case 390:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("Hello mate, how do you do? Listen, There are not many people that can make a marriage last, but I can sense that you are one of them, if you want to marry someone just let me know. Also, if you are heavenly blessed I can give you one hour of double exp each day.");
                                                dialog.Option("Yes, I want to marry someone.", 1);
                                                dialog.Option("I need double exp.", 2);
                                                dialog.Option("Nothing thank you.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                if (client.Entity.Spouse == "None")
                                                {
                                                    dialog.Text("Here, click on the player you want to be your spouse.");
                                                    dialog.Option("Thank you.", 255);
                                                    dialog.Send();
                                                    Data data = new Data(true);
                                                    data.UID = client.Entity.UID;
                                                    data.ID = Data.OpenCustom;
                                                    data.dwParam = Data.CustomCommands.FlowerPointer;
                                                    client.Send(data);
                                                }
                                                else
                                                {
                                                    dialog.Text("You are already married. If you want to broke the marriage, you have to go to StarLit. He'll handle your request.");
                                                    dialog.Option("Alright that's what I'll do.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 2:
                                            {
                                                if (client.Entity.HeavenBlessing > 0)
                                                {
                                                    if (!client.DoubleExpToday)
                                                    {
                                                        dialog.Text("Here. Come back tomorrow for more.");
                                                        dialog.Option("Alright that's what I'll do.", 255);
                                                        dialog.Send();

                                                        client.Entity.DoubleExperienceTime = 3600;
                                                        client.DoubleExpToday = true;
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You already took your double exp today. Come back tomorrow.");
                                                        dialog.Option("Alright that's what I'll do.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot take double exp because you are not heavenly blessed.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region Eternity
                            case 300500:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("Hello conqueror. You know, there are ancient stories about a second life and many people chose not to believe it. Even so, there are some people that believe in it, and that inspired me to learn about it. In my study, I found out how to reborn someone. But, in this quest, a CelestialStone may be needed. To get one, talk with Celestine(TwinCity 365, 92).");
                                                dialog.Option("Tell me more about it.", 1);
                                                dialog.Option("Reborm me.", 2);
                                                dialog.Option("Nothing thank you.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                dialog.Text("So you want to know more? When you reborn, you can chose what class you want to be the second life. Once you reborn you will start again the journey to conquer this world from level 15. Beware that you may gain some special skills depending on the class you chose to reborn, and you'll be able to get an own pet, that will follow and help you level or fight. The cost is a CelestialStone.");
                                                dialog.Option("Reborm me.", 2);
                                                dialog.Option("Nothing thank you.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 2:
                                            {
                                                if (client.Entity.Reborn == 0)
                                                {
                                                    if (client.Entity.Class % 10 == 5 && client.Entity.Level >= (client.Entity.Class == 135 ? 110 : 120))
                                                    {
                                                        dialog.Text("There are two kinds of reborns. One is the normal one and the second one is blessed. The normal reborn will give you the chance to get a Super Gem and the blessed reborn will set a -1 into one of your equipment that you wear during the reborn. What do you chose?");
                                                        dialog.Option("Normal reborn.", 5);
                                                        dialog.Option("Blessed reborn.", 3);
                                                        dialog.Option("Nothing thank you.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You cannot reborn if your level is not 110+ for water saints and 120+ for other masters.");
                                                        dialog.Option("Ahh.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot reborn again here. Alex, an elder who lives in Ape Canyon, will tell you about the third life.");
                                                    dialog.Option("Thank you.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 5:
                                            {
                                                if (client.Entity.Reborn == 0)
                                                {
                                                    if (client.Entity.Class % 10 == 5 && client.Entity.Level >= (client.Entity.Class == 135 ? 110 : 120))
                                                    {
                                                        dialog.Text("Select the super gem you desire.");
                                                        dialog.Option("SuperPhoenixGem.", 203);
                                                        dialog.Option("SuperDragonGem.", 213);
                                                        dialog.Option("SuperFuryGem.", 223);
                                                        dialog.Option("SuperRainbowGem.", 233);
                                                        dialog.Option("SuperVioletGem.", 253);
                                                        dialog.Option("SuperMoonGem.", 254);
                                                        dialog.Option("SuperKylinGem.", 243);
                                                        dialog.Option("Nothing thank you.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You cannot reborn if your level is not 110+ for water saints and 120+ for other masters.");
                                                        dialog.Option("Ahh.", 255);
                                                        dialog.Send();
                                                    }
                                                    break;
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot reborn again here. Alex, an elder who lives in Ape Canyon, will tell you about the third life.");
                                                    dialog.Option("Thank you.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 3:
                                            {
                                                if (client.Entity.Reborn == 0)
                                                {
                                                    if (client.Entity.Class % 10 == 5 && client.Entity.Level >= (client.Entity.Class == 135 ? 110 : 120))
                                                    {
                                                        dialog.Text("Select the class you want to reborn in.");
                                                        dialog.Option("Trojan.", (byte)(10 + npcRequest.OptionID));
                                                        dialog.Option("Warrior.", (byte)(20 + npcRequest.OptionID));
                                                        dialog.Option("Archer.", (byte)(40 + npcRequest.OptionID));
                                                        dialog.Option("WaterTaoist.", (byte)(132 + npcRequest.OptionID));
                                                        dialog.Option("FireTaoist.", (byte)(142 + npcRequest.OptionID));
                                                        dialog.Option("Ninja.", (byte)(50 + npcRequest.OptionID));
                                                        dialog.Option("Monk.", (byte)(60 + npcRequest.OptionID));
                                                        dialog.Option("Nothing thank you.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You cannot reborn if your level is not 110+ for water saints and 120+ for other masters.");
                                                        dialog.Option("Ahh.", 255);
                                                        dialog.Send();
                                                    }
                                                    break;
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot reborn again here. Alex, an elder who lives in Ape Canyon, will tell you about the third life.");
                                                    dialog.Option("Thank you.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        default:
                                            {
                                                if (client.Entity.Reborn == 0)
                                                {
                                                    if (client.Entity.Class % 10 == 5 && client.Entity.Level >= (client.Entity.Class == 135 ? 110 : 120))
                                                    {
                                                        if (npcRequest.OptionID == 255)
                                                            return;
                                                        if (npcRequest.OptionID >= 200 && npcRequest.OptionID <= 254)
                                                        {
                                                            client.SelectedGem = (byte)(npcRequest.OptionID % 100);
                                                            if (client.SelectedGem == 54)
                                                                client.SelectedGem = 63;
                                                            if (client.Entity.Reborn == 0)
                                                            {
                                                                byte id = 4;
                                                                dialog.Text("Select the class you want to reborn in.");
                                                                dialog.Option("Trojan.", (byte)(10 + id));
                                                                dialog.Option("Warrior.", (byte)(20 + id));
                                                                dialog.Option("Archer.", (byte)(40 + id));
                                                                dialog.Option("WaterTaoist.", (byte)(132 + id));
                                                                dialog.Option("FireTaoist.", (byte)(142 + id));
                                                                dialog.Option("Ninja.", (byte)(50 + id));
                                                                dialog.Option("Monk.", (byte)(60 + id));
                                                                dialog.Option("Nothing thank you.", 255);
                                                                dialog.Send();
                                                                break;
                                                            }
                                                            else
                                                            {
                                                                dialog.Text("You cannot reborn again here. Alex, an elder who lives in Ape Canyon, will tell you about the third life.");
                                                                dialog.Option("Thank you.", 255);
                                                                dialog.Send();
                                                            }
                                                        }
                                                        else
                                                        {
                                                            if (client.Inventory.Contains(721259, 1))
                                                            {
                                                                byte _class = (byte)(npcRequest.OptionID - npcRequest.OptionID % 10);
                                                                if (_class > 100)
                                                                    _class += 2;
                                                                byte type = (byte)(npcRequest.OptionID - _class);
                                                                if (_class < 100)
                                                                    _class++;
                                                                if (client.Reborn(_class))
                                                                {
                                                                    client.Inventory.Remove(721259, 1);
                                                                    if (type == 4)
                                                                    {
                                                                        if (client.SelectedGem != 0)
                                                                        {
                                                                            uint gemid = (uint)(client.SelectedGem + 700000);
                                                                            client.Inventory.Add(gemid, 0, 1);
                                                                        }
                                                                    }
                                                                    else
                                                                    {
                                                                        int availableshots = 0;
                                                                        for (byte count = 0; count < 12; count++)
                                                                            if (!client.Equipment.Free(count))
                                                                                if (client.Equipment.TryGetItem(count).Bless == 0)
                                                                                    availableshots++;
                                                                        if (availableshots != 0)
                                                                        {
                                                                            byte ex = (byte)Conquer_Online_Server.ServerBase.Kernel.Random.Next(12);
                                                                            if (!client.Equipment.Free(ex))
                                                                                if (client.Equipment.TryGetItem(ex).Bless == 0)
                                                                                {
                                                                                    var item = client.Equipment.TryGetItem(ex);
                                                                                    item.Bless = 1;
                                                                                    item.Mode = Conquer_Online_Server.Game.Enums.ItemMode.Update;
                                                                                    item.Send(client);
                                                                                    Conquer_Online_Server.Database.ConquerItemTable.UpdateBless(item, client);
                                                                                }
                                                                        }
                                                                    }
                                                                }
                                                                else
                                                                {
                                                                    dialog.Text("Sorry, but you need atleast 2 free spaces in your inventory.");
                                                                    dialog.Option("Ohh.", 255);
                                                                    dialog.Send();
                                                                }
                                                            }
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You cannot reborn if your level is not 110+ for water saints and 120+ for other masters.");
                                                        dialog.Option("Ahh.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot reborn again here. Alex, an elder who lives in Ape Canyon, will tell you about the third life.");
                                                    dialog.Option("Thank you.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region MillionaireLee
                            case 5004:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("Hey you! Yeah, it's you I am talking about. I've got a great deal that you cannot leave without taking it. I will give you one meteorscroll for ten meteors and one dragonballscroll for ten dragonballs. With those scrolls you can have more than fourty meteors or dragonballs in your inventory at once!");
                                                dialog.Option("Take my meteors.", 1);
                                                dialog.Option("Take my dragonballs.", 2);
                                                dialog.Option("I'm too poor.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                if (client.Inventory.Contains(1088001, 10))
                                                {
                                                    client.Inventory.Remove(1088001, 10);
                                                    client.Inventory.Add(720027, 0, 1);
                                                }
                                                else
                                                {
                                                    dialog.Text("You poor man! I can't help you.");
                                                    dialog.Option("Why!?", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 2:
                                            {
                                                if (client.Inventory.Contains(1088000, 10))
                                                {
                                                    client.Inventory.Remove(1088000, 10);
                                                    client.Inventory.Add(720028, 0, 1);
                                                }
                                                else
                                                {
                                                    dialog.Text("You poor man! I can't help you.");
                                                    dialog.Option("Why!?", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region Granny
                            case 699:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("These youngsters forget to increase the durabuility when they upgrade your items. ");
                                                dialog.Text("I can take your SuperKylinGems and try to increase your item's max durabuility. ");
                                                dialog.Text("It's possible that the item could be completely repaired too. How many will you try with?");
                                                dialog.Input("Enter:", 1, 2);
                                                dialog.Option("Not now.", 255);

                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                byte Kylins = 0;
                                                if (!Byte.TryParse(npcRequest.Input, out Kylins))
                                                {// Input doesn't contain numbers only.
                                                    dialog.Text("Tell me, how am I supposed to get your durability higher if you can't give me a number 1 through 40?");
                                                    dialog.Option("Oops!", 0);
                                                    dialog.Send();
                                                    break;
                                                }
                                                if (Kylins != 0 && Kylins <= 40)
                                                {
                                                    if (client.Inventory.Contains(700043, Kylins))
                                                    {
                                                        client.KylinUpgradeCount = Kylins;
                                                        dialog.Text("Which item do you want to upgrade?");
                                                        dialog.Option("Headgear.", 101);
                                                        dialog.Option("Necklace.", 102);
                                                        dialog.Option("Armor.", 103);
                                                        dialog.Option("Main Weapon.", 104);
                                                        dialog.Option("Left Weapon.", 105);
                                                        dialog.Option("Ring.", 106);
                                                        dialog.Option("Next Page.", 2);
                                                        dialog.Option("I'll just leave", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have that many SuperKylinGems...");
                                                        dialog.Option("Oops...", 255);
                                                        dialog.Send();
                                                        break;
                                                    }
                                                }
                                                break;
                                            }
                                        case 2:
                                            {
                                                if (client.Inventory.Contains(700043, client.KylinUpgradeCount))
                                                {
                                                    dialog.Text("Which item do you want to upgrade?");
                                                    dialog.Option("Boots.", 108);
                                                    dialog.Option("Fan.", 110);
                                                    dialog.Option("Tower.", 111);
                                                    dialog.Option("I'll just leave", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 101:
                                        case 102:
                                        case 103:
                                        case 104:
                                        case 105:
                                        case 106:
                                        case 108:
                                        case 110:
                                        case 111:
                                            {
                                                if (client.KylinUpgradeCount != 0 && client.KylinUpgradeCount <= 40)
                                                {
                                                    if (client.Inventory.Contains(700043, client.KylinUpgradeCount))
                                                    {
                                                        var item = client.Equipment.TryGetItem((byte)(npcRequest.OptionID - 100));
                                                        if (item != null)
                                                        {
                                                            #region old
                                                            /*if (item.Durability == item.MaximDurability)
                                                {
                                                    var itemdetail = Conquer_Online_Server.Database.ConquerItemInformation.BaseInformations[item.ID];
                                                    if (itemdetail.Durability != item.MaximDurability)
                                                    {

                                                        int diff = itemdetail.Durability - item.MaximDurability;

                                                        int need = Math.Max((diff / 100) / 6, 1);

                                                        need = Math.Min(need, client.KylinUpgradeCount);

                                                        for (int counter = 0; counter < need; counter++)
                                                        {
                                                            item.MaximDurability += 100;
                                                            client.Inventory.Remove(700043, 1);
                                                        }
                                                        if (item.MaximDurability > itemdetail.Durability)
                                                            item.MaximDurability = itemdetail.Durability;
                                                        item.Mode = Conquer_Online_Server.Game.Enums.ItemMode.Update;
                                                        item.Send(client);
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("Your item must be repaired first.");
                                                    dialog.Option("Oh, sorry.", 255);
                                                    dialog.Send();
                                                    break;
                                                }*/
                                                            #endregion
                                                            #region test
                                                            var itemdetail = Conquer_Online_Server.Database.ConquerItemInformation.BaseInformations[item.ID];
                                                            if (itemdetail.Durability != item.MaximDurability)
                                                            {
                                                                ushort oldDurability = item.MaximDurability;
                                                                bool Upgraded = false;
                                                                while (client.KylinUpgradeCount != 0)
                                                                {
                                                                    client.Inventory.Remove(700043, 1);
                                                                    client.KylinUpgradeCount -= 1;

                                                                    int rndDurability = (Conquer_Online_Server.ServerBase.Kernel.Random.Next(itemdetail.Durability));
                                                                    if (rndDurability >= item.MaximDurability)
                                                                    {
                                                                        //This looks ugly to me, not sure how else to do it.
                                                                        item.MaximDurability = ushort.Parse(rndDurability.ToString());
                                                                        rndDurability = 0;
                                                                        if (!Upgraded)
                                                                            Upgraded = true;
                                                                    }
                                                                }
                                                                if (Upgraded)
                                                                    dialog.Text("Your item's durabuility was increased from " + oldDurability + " to " + item.MaximDurability + ".\n");
                                                                else
                                                                    dialog.Text("I wasen't able to increase your item's durability..\n");
                                                                int Repair = (Conquer_Online_Server.ServerBase.Kernel.Random.Next(3));
                                                                if (Repair == 1)
                                                                {
                                                                    if (Upgraded)
                                                                        dialog.Text("I was also able to repair the item.");
                                                                    else
                                                                    {
                                                                        dialog.Text("But I was able to repair the item.");
                                                                        Upgraded = true;
                                                                    }
                                                                    item.Durability = item.MaximDurability;
                                                                }
                                                                item.Mode = Conquer_Online_Server.Game.Enums.ItemMode.Update;
                                                                item.Send(client);
                                                                if (Upgraded)
                                                                    dialog.Option("Thanks.", 255);
                                                                else
                                                                    dialog.Option("Darn..", 255);
                                                                dialog.Send();
                                                                break;
                                                            }
                                                            else
                                                            {
                                                                dialog.Text("This item is already at it's max durabuility!");
                                                                dialog.Option("Oh.", 255);
                                                                dialog.Send();
                                                                break;
                                                            }
                                                            #endregion
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("Wahh, What is this? I may be forgetful but I'm sure you told me you would give me " + client.KylinUpgradeCount.ToString() + " SuperKylinGems!\n\n I don't see that you have this many..");
                                                        dialog.Option("Lets try again.", 0);
                                                        dialog.Option("Nevermind.", 255);
                                                        dialog.Send();
                                                        break;
                                                    }
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }

                            #endregion

                            #region Confiscator
                            case 4450:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("Have you ever arrested anyone? Or ... don't tell me, you have been arrested by anyone? If so, there is a chance that some gear was detained.");
                                                dialog.Option("I want to check my detained gear.", 1);
                                                dialog.Option("I want to check my claimable gear.", 2);
                                                dialog.Option("Thank you.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                client.Send(new Data(true) { ID = Data.OpenWindow, dwParam = Data.WindowCommands.DetainRedeem, UID = client.Entity.UID });
                                                break;
                                            }
                                        case 2:
                                            {
                                                client.Send(new Data(true) { ID = Data.OpenWindow, dwParam = Data.WindowCommands.DetainClaim, UID = client.Entity.UID });
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region PurificationStabilizer
                            case 27279:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("Have you ever heard of the ruthless Terato Dragon? It cuts open every single conqueror that wants to take his prize. His prize are items that purify your items. His affiliates, sub-kings of monsters, also drop items like that. If you have such an item, I can purify your gear with it.");
                                                dialog.Text("Once purified, the item must be stabilized, otherwise the purity will dissapear after several days. If you want to stabilize your items, come to me I'll see what I can do.");
                                                dialog.Option("Purify my item.", 1);
                                                dialog.Option("Stabilize my item.", 2);
                                                dialog.Option("Nevermind.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                INpc npc = null;
                                                if (client.Map.Npcs.TryGetValue(client.ActiveNpc, out npc))
                                                {
                                                    Data data = new Data(true);
                                                    data.ID = Data.OpenWindow;
                                                    data.UID = client.Entity.UID;
                                                    data.TimeStamp = Time32.Now;
                                                    data.dwParam = 455;
                                                    data.wParam1 = npc.X;
                                                    data.wParam2 = npc.Y;
                                                    client.Send(data);
                                                }
                                                break;
                                            }
                                        case 2:
                                            {
                                                INpc npc = null;
                                                if (client.Map.Npcs.TryGetValue(client.ActiveNpc, out npc))
                                                {
                                                    Data data = new Data(true);
                                                    data.ID = Data.OpenWindow;
                                                    data.UID = client.Entity.UID;
                                                    data.TimeStamp = Time32.Now;//done
                                                    data.dwParam = 459;
                                                    data.wParam1 = npc.X;
                                                    data.wParam2 = npc.Y;
                                                    client.Send(data);
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #endregion
                        }
                        break;
                    }
                #endregion
                #region Guild war
                case 1038:
                    {
                        switch (client.ActiveNpc)
                        {
                            #region Pole
                            case 810:
                                {
                                    dialog.Text("Please, don't hurt me!.");
                                    dialog.Option("Sorry.", 255);
                                    dialog.Send();
                                    break;
                                }
                            #endregion

                            #region Gates
                            case 516074:
                                {
                                    if (client.Guild != null)
                                    {
                                        if (client.Guild.PoleKeeper)
                                        {
                                            switch (npcRequest.OptionID)
                                            {
                                                case 0:
                                                    dialog.Text("Select the option you want to pursue.");
                                                    if (client.AsMember.Rank != Conquer_Online_Server.Game.Enums.GuildMemberRank.Member)
                                                    {
                                                        dialog.Option("Open gate.", 1);
                                                        dialog.Option("Close gate.", 2);
                                                    }
                                                    dialog.Option("Get inside.", 3);
                                                    dialog.Option("Nothing.", 255);
                                                    dialog.Send();
                                                    break;
                                                case 1:
                                                    {
                                                        Conquer_Online_Server.Game.ConquerStructures.Society.GuildWar.LeftGate.Mesh = (ushort)(250 + Conquer_Online_Server.Game.ConquerStructures.Society.GuildWar.LeftGate.Mesh % 10);

                                                        Update upd = new Update(true);
                                                        upd.UID = Conquer_Online_Server.Game.ConquerStructures.Society.GuildWar.LeftGate.UID;
                                                        upd.Append(Update.Mesh, Conquer_Online_Server.Game.ConquerStructures.Society.GuildWar.LeftGate.Mesh);
                                                        client.SendScreen(upd, true);
                                                        break;
                                                    }
                                                case 2:
                                                    {
                                                        Conquer_Online_Server.Game.ConquerStructures.Society.GuildWar.LeftGate.Mesh = (ushort)(240 + Conquer_Online_Server.Game.ConquerStructures.Society.GuildWar.LeftGate.Mesh % 10);

                                                        Update upd = new Update(true);
                                                        upd.UID = Conquer_Online_Server.Game.ConquerStructures.Society.GuildWar.LeftGate.UID;
                                                        upd.Append(Update.Mesh, Conquer_Online_Server.Game.ConquerStructures.Society.GuildWar.LeftGate.Mesh);
                                                        client.SendScreen(upd, true);
                                                        break;
                                                    }
                                                case 3:
                                                    {
                                                        client.Entity.Teleport(1038, 162, 198);
                                                        break;
                                                    }
                                            }
                                        }
                                    }
                                    break;
                                }
                            case 516075:
                                {
                                    if (client.Guild != null)
                                    {
                                        if (client.Guild.PoleKeeper)
                                        {
                                            switch (npcRequest.OptionID)
                                            {
                                                case 0:
                                                    dialog.Text("Select the option you want to pursue.");
                                                    if (client.AsMember.Rank != Conquer_Online_Server.Game.Enums.GuildMemberRank.Member)
                                                    {
                                                        dialog.Option("Open gate.", 1);
                                                        dialog.Option("Close gate.", 2);
                                                    }
                                                    dialog.Option("Get inside.", 3);
                                                    dialog.Option("Nothing.", 255);
                                                    dialog.Send();
                                                    break;
                                                case 1:
                                                    {
                                                        Conquer_Online_Server.Game.ConquerStructures.Society.GuildWar.RightGate.Mesh = (ushort)(280 + Conquer_Online_Server.Game.ConquerStructures.Society.GuildWar.RightGate.Mesh % 10);

                                                        Update upd = new Update(true);
                                                        upd.UID = Conquer_Online_Server.Game.ConquerStructures.Society.GuildWar.RightGate.UID;
                                                        upd.Append(Update.Mesh, Conquer_Online_Server.Game.ConquerStructures.Society.GuildWar.RightGate.Mesh);
                                                        client.SendScreen(upd, true);
                                                        break;
                                                    }
                                                case 2:
                                                    {
                                                        Conquer_Online_Server.Game.ConquerStructures.Society.GuildWar.RightGate.Mesh = (ushort)(270 + Conquer_Online_Server.Game.ConquerStructures.Society.GuildWar.RightGate.Mesh % 10);

                                                        Update upd = new Update(true);
                                                        upd.UID = Conquer_Online_Server.Game.ConquerStructures.Society.GuildWar.RightGate.UID;
                                                        upd.Append(Update.Mesh, Conquer_Online_Server.Game.ConquerStructures.Society.GuildWar.RightGate.Mesh);
                                                        client.SendScreen(upd, true);
                                                        break;
                                                    }
                                                case 3:
                                                    {
                                                        client.Entity.Teleport(1038, 210, 177);
                                                        break;
                                                    }
                                            }
                                        }
                                    }
                                    break;
                                }
                            #endregion

                            #region Guild Conductresses

                            #region Exit Guild Arena
                            case 7000:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("Do you want to leave the guild arena?");
                                                dialog.Option("Yes.", 1);
                                                dialog.Option("No.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                client.Entity.Teleport(1002, 429, 378);
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #endregion

                            #region Guild Conductors
                            #region IN
                            case 9884:
                            case 9885:
                            case 9986:
                            case 9987:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("In exchange of a fee of 1000gold, I will teleport you to a special place. If you don't have money, don't bother me.");
                                                dialog.Option("Teleport me.", 1);
                                                dialog.Option("I'm too poor.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                if (client.Entity.Money >= 1000)
                                                {
                                                    client.Entity.Money -= 1000;
                                                    switch (client.ActiveNpc)
                                                    {
                                                        case 9884: client.Entity.Teleport(1216, 12, 481); break;
                                                        case 9885: client.Entity.Teleport(1213, 439, 261); break;
                                                        case 9986: client.Entity.Teleport(1217, 536, 558); break;
                                                        case 9987: client.Entity.Teleport(1001, 337, 325); break;
                                                    }
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion
                            #endregion
                        }
                        break;
                    }
                #endregion
                #region Promotion Center
                case 1004:
                    {
                        switch (client.ActiveNpc)
                        {
                            #region Promotion Center

                            #region HeadAbbot
                            case 4271:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                if (client.Entity.Class >= 60 && client.Entity.Class <= 65)
                                                {
                                                    dialog.Text("I am the monk trainer, master of balence in destruction and harmony.\nWhat do you seek, young monk?");
                                                    dialog.Option("Promote me.", 1);
                                                    dialog.Option("Learn skills.", 2);
                                                    dialog.Option("Claim bound items.", 49);
                                                    dialog.Option("Wait a minute.", 255);
                                                    dialog.Send();
                                                }
                                                else
                                                {
                                                    dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        #region BoundItems
                                        case 49:
                                            {
                                                dialog.Text("We just found some equipment, and I thought that we should give them to our pupils so they can be less defeatable.");
                                                if (!client.HeadgearClaim)
                                                    dialog.Option("Headgear (Lvl 15).", 50);
                                                if (!client.RingClaim)
                                                    dialog.Option("Ring (Lvl 40).", 51);
                                                if (!client.NecklaceClaim)
                                                    dialog.Option("Necklace (Lvl 50).", 52);
                                                if (!client.ArmorClaim)
                                                    dialog.Option("Armor (Lvl 70).", 53);
                                                dialog.Option("Next.", 48);
                                                dialog.Option("Nothing.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 48:
                                            {
                                                dialog.Text("We just found some equipment, and I thought that we should give them to our pupils so they can be less defeatable.");
                                                if (!client.BootsClaim)
                                                    dialog.Option("Boots (Lvl 80).", 54);
                                                if (!client.TowerClaim)
                                                    dialog.Option("Tower (Lvl 100).", 55);
                                                if (!client.FanClaim)
                                                    dialog.Option("Fan (Lvl 100).", 56);
                                                if (!client.WeaponClaim)
                                                    dialog.Option("Weapon (Lvl 110).", 57);
                                                dialog.Option("Back.", 49);
                                                dialog.Option("Nothing.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 50:
                                            {
                                                uint itemid = 143009;
                                                byte level = 15;
                                                if (!client.HeadgearClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);
                                                        item.ID = itemid;
                                                        item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Bound = true;
                                                        item.Plus = 1;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database.ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.HeadgearClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 51:
                                            {
                                                uint itemid = 150079;
                                                byte level = 40;
                                                if (!client.RingClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);
                                                        item.ID = itemid;
                                                        item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Bound = true;
                                                        item.Plus = 1;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database.ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.RingClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 52:
                                            {
                                                uint itemid = 120099;
                                                byte level = 50;
                                                if (!client.NecklaceClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);
                                                        item.ID = itemid;
                                                        item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Bound = true;
                                                        item.Plus = 1;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database.ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.NecklaceClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 53:
                                            {
                                                uint itemid = 136069;
                                                byte level = 70;
                                                if (!client.ArmorClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);
                                                        item.ID = itemid;
                                                        item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Bound = true;
                                                        item.Plus = 1;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database.ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.ArmorClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 54:
                                            {
                                                uint itemid = 160159;
                                                byte level = 80;
                                                if (!client.BootsClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);
                                                        item.ID = itemid;
                                                        item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Bound = true;
                                                        item.Plus = 1;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database.ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.BootsClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 55:
                                            {
                                                uint itemid = 202009;
                                                byte level = 100;
                                                if (!client.TowerClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);
                                                        item.ID = itemid;
                                                        item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Bound = true;
                                                        item.Plus = 1;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database.ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.TowerClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 56:
                                            {
                                                uint itemid = 201009;
                                                byte level = 100;
                                                if (!client.FanClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);
                                                        item.ID = itemid;
                                                        item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Bound = true;
                                                        item.Plus = 1;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database.ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.FanClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 57:
                                            {
                                                byte level = 100;
                                                if (!client.WeaponClaim)
                                                {
                                                    ISkill proff = null;
                                                    ushort maxlevel = 0;
                                                    foreach (var prof in client.Proficiencies.Values)
                                                    {
                                                        if (maxlevel < prof.Level && prof.ID != 0)
                                                        {
                                                            maxlevel = prof.Level;
                                                            proff = prof;
                                                        }
                                                    }
                                                    if (proff == null)
                                                        return;
                                                    uint itemid = 610199;
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database.ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        item.SocketOne = Conquer_Online_Server.Game.Enums.Gem.EmptySocket;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.WeaponClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        #endregion
                                        #region Promote
                                        case 1:
                                            {
                                                if (client.Entity.Class >= 60 && client.Entity.Class <= 65)
                                                {
                                                    if (client.Entity.Class == 65)
                                                    {
                                                        dialog.Text("You cannot be promoted anymore. You have mastered your class.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("To promote now you need" + client.PromoteItemNameNeed + " level " + client.PromoteLevelNeed + ".");
                                                        dialog.Option("Promote me sir.", 3);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 3:
                                            {
                                                if (client.Entity.Class >= 60 && client.Entity.Class <= 65)
                                                {
                                                    if (client.Entity.Class == 65)
                                                    {
                                                        dialog.Text("You cannot be promoted anymore. You have mastered your class.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {

                                                        if (client.PromoteItemNeed == 721020)
                                                        {
                                                            if (client.Inventory.Remove("moonbox"))
                                                            {
                                                                client.Inventory.Add(client.PromoteItemGain, 0, 1);
                                                                client.Entity.Class++;
                                                                dialog.Text("Congratulations! You have been promoted.");
                                                                dialog.Option("Thank you master.", 255);
                                                                dialog.Send();
                                                            }

                                                            else
                                                            {
                                                                dialog.Text("You don't meet the requierments.");
                                                                dialog.Option("Ahh.", 255);
                                                                dialog.Send();
                                                            }
                                                            return;
                                                        }
                                                        if (client.Inventory.Contains(client.PromoteItemNeed, client.PromoteItemCountNeed) && client.Entity.Level >= client.PromoteLevelNeed)
                                                        {
                                                            client.Inventory.Remove(client.PromoteItemNeed, client.PromoteItemCountNeed);
                                                            client.Inventory.Add(client.PromoteItemGain, 0, 1);
                                                            client.Entity.Class++;
                                                            dialog.Text("Congratulations! You have been promoted.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You don't meet the requierments.");
                                                            dialog.Option("Ahh.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        #endregion
                                        #region Skills
                                        case 2:
                                            {
                                                if (client.Entity.Class >= 60 && client.Entity.Class <= 65)
                                                {
                                                    dialog.Text("Let me know what you want to learn.");
                                                    dialog.Option("Triple Attack (Lvl 5).", 6);
                                                    dialog.Option("Oblivion (XP) (Lvl 15)", 7);
                                                    dialog.Option("Whirlwind Kick (Lvl 15)", 8);
                                                    dialog.Option("Radiant Palm (Lvl 40)", 9);
                                                    dialog.Option("Serenity (Lvl 40)", 10);
                                                    dialog.Option("Tranquility (Lvl 70)", 11);
                                                    dialog.Option("Compassion (Lvl 100)", 12);
                                                    dialog.Option("Auras (Lvl 20->100)", 5);
                                                    dialog.Send();
                                                }
                                                else
                                                {
                                                    dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 5:
                                            {
                                                if (client.Entity.Class >= 60 && client.Entity.Class <= 65)
                                                {
                                                    dialog.Text("Which aura do you want to learn?");
                                                    dialog.Option("Tyrant (Lvl 20).", 13);
                                                    dialog.Option("Fend (Lvl 20)", 14);
                                                    //dialog.Option("Metal (Lvl 100)", 15);
                                                    //dialog.Option("Wood (Lvl 100)", 16);
                                                    //dialog.Option("Water (Lvl 100)", 17);
                                                    //dialog.Option("Fire (Lvl 100)", 18);
                                                    //dialog.Option("Earth (Lvl 100)", 19);
                                                    dialog.Option("Back to skills.", 2);
                                                    dialog.Send();
                                                }
                                                else
                                                {
                                                    dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 6:
                                            {
                                                if (client.Entity.Class >= 60 && client.Entity.Class <= 65)
                                                {
                                                    if (client.Entity.Level >= 5)
                                                    {
                                                        dialog.Text("You have learned Triple Attack.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                        if (!client.AddSpell(LearnableSpell(10490)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 5 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 7:
                                            {
                                                if (client.Entity.Class >= 60 && client.Entity.Class <= 65)
                                                {
                                                    if (client.Entity.Level >= 15)
                                                    {
                                                        dialog.Text("You have learned the Oblivion XP skill.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                        if (!client.AddSpell(LearnableSpell(10390)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 15 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 8:
                                            {
                                                if (client.Entity.Class >= 60 && client.Entity.Class <= 65)
                                                {
                                                    if (client.Entity.Level >= 15)
                                                    {
                                                        dialog.Text("You have learned Whirlwind Kick.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                        if (!client.AddSpell(LearnableSpell(10415)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 15 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 9:
                                            {
                                                if (client.Entity.Class >= 60 && client.Entity.Class <= 65)
                                                {
                                                    if (client.Entity.Level >= 40)
                                                    {
                                                        dialog.Text("You have learned Radiant Palm.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                        if (!client.AddSpell(LearnableSpell(10381)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 40 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 10:
                                            {
                                                if (client.Entity.Class >= 60 && client.Entity.Class <= 65)
                                                {
                                                    if (client.Entity.Level >= 40)
                                                    {
                                                        dialog.Text("You have learned Serenity.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                        if (!client.AddSpell(LearnableSpell(10400)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 40 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 11:
                                            {
                                                if (client.Entity.Class >= 60 && client.Entity.Class <= 65)
                                                {
                                                    if (client.Entity.Level >= 70)
                                                    {
                                                        dialog.Text("You have learned Tranquility.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                        if (!client.AddSpell(LearnableSpell(10425)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 70 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 12:
                                            {
                                                if (client.Entity.Class >= 60 && client.Entity.Class <= 65)
                                                {
                                                    if (client.Entity.Level >= 100)
                                                    {
                                                        dialog.Text("You have learned Compassion.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                        if (!client.AddSpell(LearnableSpell(10430)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 100 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 13:
                                            {
                                                if (client.Entity.Class >= 60 && client.Entity.Class <= 65)
                                                {
                                                    if (client.Entity.Level >= 20)
                                                    {
                                                        dialog.Text("You have learned Tyrent Aura.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                        if (!client.AddSpell(LearnableSpell(10395)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 20 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 14:
                                            {
                                                if (client.Entity.Class >= 60 && client.Entity.Class <= 65)
                                                {
                                                    if (client.Entity.Level >= 20)
                                                    {
                                                        dialog.Text("You have learned Fend Aura.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                        if (!client.AddSpell(LearnableSpell(10410)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 20 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 15:
                                            {
                                                if (client.Entity.Class >= 60 && client.Entity.Class <= 65)
                                                {
                                                    if (client.Entity.Level >= 100)
                                                    {
                                                        dialog.Text("You have learned Metal Elemental Aura.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                        if (!client.AddSpell(LearnableSpell(10420)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 100 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 16:
                                            {
                                                if (client.Entity.Class >= 60 && client.Entity.Class <= 65)
                                                {
                                                    if (client.Entity.Level >= 100)
                                                    {
                                                        dialog.Text("You have learned Wood Elemental Aura.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                        if (!client.AddSpell(LearnableSpell(10421)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 100 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 17:
                                            {
                                                if (client.Entity.Class >= 60 && client.Entity.Class <= 65)
                                                {
                                                    if (client.Entity.Level >= 100)
                                                    {
                                                        dialog.Text("You have learned Water Elemental Aura.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                        if (!client.AddSpell(LearnableSpell(10422)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 100 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 18:
                                            {
                                                if (client.Entity.Class >= 60 && client.Entity.Class <= 65)
                                                {
                                                    if (client.Entity.Level >= 100)
                                                    {
                                                        dialog.Text("You have learned Fire Elemental Aura.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                        if (!client.AddSpell(LearnableSpell(10423)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 100 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 19:
                                            {
                                                if (client.Entity.Class >= 60 && client.Entity.Class <= 65)
                                                {
                                                    if (client.Entity.Level >= 100)
                                                    {
                                                        dialog.Text("You have learned Earth Elemental Aura.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                        if (!client.AddSpell(LearnableSpell(10424)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 100 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        #endregion
                                    }
                                    break;
                                }
                            #endregion

                            #region WarriorGod
                            case 10001:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                if (client.Entity.Class >= 20 && client.Entity.Class <= 25)
                                                {
                                                    dialog.Text("I am the shield and two hand weapons master. As I see, you started your way on conquering this world. I will try to help you teaching you warrir skills and promoting you.");
                                                    dialog.Option("Promote me.", 1);
                                                    dialog.Option("Learn skills.", 2);
                                                    dialog.Option("Claim bound items.", 49);
                                                    dialog.Option("Wait a minute.", 255);
                                                    dialog.Send();
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the warrior secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        #region BoundItems
                                        case 49:
                                            {
                                                dialog.Text("We just found some equipment, and I thought that we should give them to our pupils so they can be less defeatable.");
                                                if (!client.HeadgearClaim)
                                                    dialog.Option("Headgear (Lvl 15).", 50);
                                                if (!client.RingClaim)
                                                    dialog.Option("Ring (Lvl 40).", 51);
                                                if (!client.NecklaceClaim)
                                                    dialog.Option("Necklace (Lvl 50).", 52);
                                                if (!client.ArmorClaim)
                                                    dialog.Option("Armor (Lvl 70).", 53);
                                                dialog.Option("Next.", 48);
                                                dialog.Option("Nothing.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 48:
                                            {
                                                dialog.Text("We just found some equipment, and I thought that we should give them to our pupils so they can be less defeatable.");
                                                if (!client.BootsClaim)
                                                    dialog.Option("Boots (Lvl 80).", 54);
                                                if (!client.TowerClaim)
                                                    dialog.Option("Tower (Lvl 100).", 55);
                                                if (!client.FanClaim)
                                                    dialog.Option("Fan (Lvl 100).", 56);
                                                if (!client.WeaponClaim)
                                                    dialog.Option("Weapon (Lvl 110).", 57);
                                                dialog.Option("Back.", 49);
                                                dialog.Option("Nothing.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 50:
                                            {
                                                uint itemid = 111009;
                                                byte level = 15;
                                                if (!client.HeadgearClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.HeadgearClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 51:
                                            {
                                                uint itemid = 150079;
                                                byte level = 40;
                                                if (!client.RingClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.RingClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 52:
                                            {
                                                uint itemid = 120099;
                                                byte level = 50;
                                                if (!client.NecklaceClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.NecklaceClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 53:
                                            {
                                                uint itemid = 131069;
                                                byte level = 70;
                                                if (!client.ArmorClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.ArmorClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 54:
                                            {
                                                uint itemid = 160159;
                                                byte level = 80;
                                                if (!client.BootsClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.BootsClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 55:
                                            {
                                                uint itemid = 202009;
                                                byte level = 100;
                                                if (!client.TowerClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.TowerClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 56:
                                            {
                                                uint itemid = 201009;
                                                byte level = 100;
                                                if (!client.FanClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.FanClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 57:
                                            {
                                                byte level = 100;
                                                if (!client.WeaponClaim)
                                                {
                                                    ISkill proff = null;
                                                    ushort maxlevel = 0;
                                                    foreach (var prof in client.Proficiencies.Values)
                                                    {
                                                        if (maxlevel < prof.Level && prof.ID != 0)
                                                        {
                                                            maxlevel = prof.Level;
                                                            proff = prof;
                                                        }
                                                    }
                                                    if (proff == null)
                                                        return;
                                                    uint itemid = (uint)(proff.ID * 1000 + 219);
                                                    if (!Conquer_Online_Server.Database.ConquerItemInformation.BaseInformations.ContainsKey(itemid))
                                                    {
                                                        dialog.Text("You need more proficiency belonging to a weapon, and not a shield or your punch.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                        return;
                                                    }
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        item.SocketOne = Conquer_Online_Server.Game.Enums.Gem.EmptySocket;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.WeaponClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        #endregion
                                        case 1:
                                            {
                                                if (client.Entity.Class >= 20 && client.Entity.Class <= 25)
                                                {
                                                    if (client.Entity.Class == 25)
                                                    {
                                                        dialog.Text("You cannot be promoted anymore. You have mastered your class.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("To promote now you need" + client.PromoteItemNameNeed + " level " + client.PromoteLevelNeed + ".");
                                                        dialog.Option("Promote me sir.", 3);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the warrior secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 3:
                                            {
                                                if (client.Entity.Class >= 20 && client.Entity.Class <= 25)
                                                {
                                                    if (client.Entity.Class == 25)
                                                    {
                                                        dialog.Text("You cannot be promoted anymore. You have mastered your class.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {

                                                        if (client.PromoteItemNeed == 721020)
                                                        {
                                                            if (client.Inventory.Remove("moonbox"))
                                                            {
                                                                client.Inventory.Add(client.PromoteItemGain, 0, 1);
                                                                client.Entity.Class++;
                                                                dialog.Text("Congratulations! You have been promoted.");
                                                                dialog.Option("Thank you master.", 255);
                                                                dialog.Send();
                                                            }

                                                            else
                                                            {
                                                                dialog.Text("You don't meet the requierments.");
                                                                dialog.Option("Ahh.", 255);
                                                                dialog.Send();
                                                            }
                                                            return;
                                                        }
                                                        if (client.Inventory.Contains(client.PromoteItemNeed, client.PromoteItemCountNeed) && client.Entity.Level >= client.PromoteLevelNeed)
                                                        {
                                                            client.Inventory.Remove(client.PromoteItemNeed, client.PromoteItemCountNeed);
                                                            client.Inventory.Add(client.PromoteItemGain, 0, 1);
                                                            client.Entity.Class++;
                                                            dialog.Text("Congratulations! You have been promoted.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You don't meet the requierments.");
                                                            dialog.Option("Ahh.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the warrior secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 2:
                                            {
                                                if (client.Entity.Class >= 20 && client.Entity.Class <= 25)
                                                {
                                                    dialog.Text("Let me know what you want to learn.");
                                                    dialog.Option("XP Skills (Lvl 40).", 5);
                                                    dialog.Option("Dash (Lvl 61).", 6);
                                                    dialog.Send();
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the warrior secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 5:
                                            {
                                                if (client.Entity.Class >= 20 && client.Entity.Class <= 25)
                                                {
                                                    if (client.Entity.Level >= 40)
                                                    {
                                                        dialog.Text("You have learned the XP Skills of this class.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                        client.AddSpell(LearnableSpell(1025));
                                                        client.AddSpell(LearnableSpell(1020));
                                                        client.AddSpell(LearnableSpell(1015));
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 40 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the warrior secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 6:
                                            {
                                                if (client.Entity.Class >= 20 && client.Entity.Class <= 25)
                                                {
                                                    if (client.Entity.Level >= 61)
                                                    {
                                                        dialog.Text("You have learned the Dash Skill of this class.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                        if (!client.AddSpell(LearnableSpell(1051)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 61 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the warrior secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region Archer Master
                            case 400:
                                {
                                    byte mClass = 40;
                                    byte MClass = 45;
                                    string Class = "archer";
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    dialog.Text("I am the bow master. As I see, you started your way on conquering this world. I will try to help you teaching you warrir skills and promoting you.");
                                                    dialog.Option("Promote me.", 1);
                                                    dialog.Option("Learn skills.", 2);
                                                    dialog.Option("Claim bound items.", 49);
                                                    dialog.Option("Wait a minute.", 255);
                                                    dialog.Send();
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        #region BoundItems
                                        case 49:
                                            {
                                                dialog.Text("We just found some equipment, and I thought that we should give them to our pupils so they can be less defeatable.");
                                                if (!client.HeadgearClaim)
                                                    dialog.Option("Headgear (Lvl 15).", 50);
                                                if (!client.RingClaim)
                                                    dialog.Option("Ring (Lvl 40).", 51);
                                                if (!client.NecklaceClaim)
                                                    dialog.Option("Necklace (Lvl 50).", 52);
                                                if (!client.ArmorClaim)
                                                    dialog.Option("Armor (Lvl 70).", 53);
                                                dialog.Option("Next.", 48);
                                                dialog.Option("Nothing.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 48:
                                            {
                                                dialog.Text("We just found some equipment, and I thought that we should give them to our pupils so they can be less defeatable.");
                                                if (!client.BootsClaim)
                                                    dialog.Option("Boots (Lvl 80).", 54);
                                                if (!client.TowerClaim)
                                                    dialog.Option("Tower (Lvl 100).", 55);
                                                if (!client.FanClaim)
                                                    dialog.Option("Fan (Lvl 100).", 56);
                                                if (!client.WeaponClaim)
                                                    dialog.Option("Weapon (Lvl 110).", 57);
                                                dialog.Option("Back.", 49);
                                                dialog.Option("Nothing.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 50:
                                            {
                                                uint itemid = 113009;
                                                byte level = 15;
                                                if (!client.HeadgearClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.HeadgearClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 51:
                                            {
                                                uint itemid = 150079;
                                                byte level = 40;
                                                if (!client.RingClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.RingClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 52:
                                            {
                                                uint itemid = 120099;
                                                byte level = 50;
                                                if (!client.NecklaceClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.NecklaceClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 53:
                                            {
                                                uint itemid = 133049;
                                                byte level = 70;
                                                if (!client.ArmorClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.ArmorClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 54:
                                            {
                                                uint itemid = 160159;
                                                byte level = 80;
                                                if (!client.BootsClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.BootsClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 55:
                                            {
                                                uint itemid = 202009;
                                                byte level = 100;
                                                if (!client.TowerClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.TowerClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 56:
                                            {
                                                uint itemid = 201009;
                                                byte level = 100;
                                                if (!client.FanClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.FanClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 57:
                                            {
                                                byte level = 100;
                                                if (!client.WeaponClaim)
                                                {
                                                    ISkill proff = null;
                                                    ushort maxlevel = 0;
                                                    foreach (var prof in client.Proficiencies.Values)
                                                    {
                                                        if (maxlevel < prof.Level && prof.ID != 0)
                                                        {
                                                            maxlevel = prof.Level;
                                                            proff = prof;
                                                        }
                                                    }
                                                    if (proff == null)
                                                        return;
                                                    uint itemid = (uint)(proff.ID * 1000 + 219);
                                                    if (!Conquer_Online_Server.Database.ConquerItemInformation.BaseInformations.ContainsKey(itemid))
                                                    {
                                                        Console.WriteLine("invalid claim weapon " + itemid);
                                                        return;
                                                    }
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        item.SocketOne = Conquer_Online_Server.Game.Enums.Gem.EmptySocket;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.WeaponClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        #endregion
                                        case 1:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Class == MClass)
                                                    {
                                                        dialog.Text("You cannot be promoted anymore. You have mastered your class.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("To promote now you need" + client.PromoteItemNameNeed + " level " + client.PromoteLevelNeed + ".");
                                                        dialog.Option("Promote me sir.", 3);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 3:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Class == MClass)
                                                    {
                                                        dialog.Text("You cannot be promoted anymore. You have mastered your class.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        if (client.PromoteItemNeed == 721020)
                                                        {
                                                            if (client.Inventory.Remove("moonbox"))
                                                            {
                                                                client.Inventory.Add(client.PromoteItemGain, 0, 1);
                                                                client.Entity.Class++;
                                                                dialog.Text("Congratulations! You have been promoted.");
                                                                dialog.Option("Thank you master.", 255);
                                                                dialog.Send();
                                                            }

                                                            else
                                                            {
                                                                dialog.Text("You don't meet the requierments.");
                                                                dialog.Option("Ahh.", 255);
                                                                dialog.Send();
                                                            }
                                                            return;
                                                        }
                                                        if (client.Inventory.Contains(client.PromoteItemNeed, client.PromoteItemCountNeed) && client.Entity.Level >= client.PromoteLevelNeed)
                                                        {
                                                            client.Inventory.Remove(client.PromoteItemNeed, client.PromoteItemCountNeed);
                                                            client.Inventory.Add(client.PromoteItemGain, 0, 1);
                                                            client.Entity.Class++;
                                                            dialog.Text("Congratulations! You have been promoted.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You don't meet the requierments.");
                                                            dialog.Option("Ahh.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 2:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    dialog.Text("Let me know what you want to learn.");
                                                    dialog.Option("XPFly (Lvl 1).", 5);
                                                    dialog.Option("Scatter (Lvl 23).", 6);
                                                    dialog.Option("RapidFire (Lvl 40).", 7);
                                                    dialog.Option("Fly (Lvl 70).", 8);
                                                    dialog.Option("Intensify (Lvl 70).", 9);
                                                    dialog.Option("Arrow rain (Lvl 70).", 10);
                                                    dialog.Option("Advanced Fly (Lvl 100).", 11);
                                                    dialog.Option("Nothing.", 255);
                                                    dialog.Send();
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 5:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    dialog.Text("You have learned the XP Skill of this class.");
                                                    dialog.Option("Thank you master.", 255);
                                                    dialog.Send();
                                                    if (!client.AddSpell(LearnableSpell(8002)))
                                                    {
                                                        dialog.Text("You already know this skill.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 6:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Level >= 23)
                                                    {
                                                        dialog.Text("You have learned the scatter.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                        if (!client.AddSpell(LearnableSpell(8001)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 23 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 7:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Level >= 40)
                                                    {
                                                        if (!client.AddSpell(LearnableSpell(8000)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                            break;
                                                        }
                                                        dialog.Text("You have learned the rapid fire.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 40 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 8:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Level >= 70)
                                                    {

                                                        if (!client.AddSpell(LearnableSpell(8003)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                            break;
                                                        }
                                                        dialog.Text("You have learned the fly.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 70 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 9:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Level >= 70)
                                                    {
                                                        if (!client.AddSpell(LearnableSpell(9000)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                            break;
                                                        }
                                                        dialog.Text("You have learned the intensify.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 70 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 10:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Level >= 70)
                                                    {
                                                        if (!client.AddSpell(LearnableSpell(8030)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                            break;
                                                        }
                                                        dialog.Text("You have learned the arrow rain.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 70 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 11:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Level >= 100)
                                                    {
                                                        if (!client.AddSpell(LearnableSpell(8003, 1)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                            break;
                                                        }
                                                        dialog.Text("You have learned the advanced fly.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 100 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region WindSage
                            case 4720:
                                {
                                    byte mClass = 50;
                                    byte MClass = 55;
                                    string Class = "ninja";
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    dialog.Text("I am the master of the no sound attack and the master of the katanas. As I see, you started your way on conquering this world. I will try to help you teaching you warrir skills and promoting you.");
                                                    dialog.Option("Promote me.", 1);
                                                    dialog.Option("Learn skills.", 2);
                                                    dialog.Option("Claim bound items.", 49);
                                                    dialog.Option("Wait a minute.", 255);
                                                    dialog.Send();
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        #region BoundItems
                                        case 49:
                                            {
                                                dialog.Text("We just found some equipment, and I thought that we should give them to our pupils so they can be less defeatable.");
                                                if (!client.HeadgearClaim)
                                                    dialog.Option("Headgear (Lvl 15).", 50);
                                                if (!client.RingClaim)
                                                    dialog.Option("Ring (Lvl 40).", 51);
                                                if (!client.NecklaceClaim)
                                                    dialog.Option("Necklace (Lvl 50).", 52);
                                                if (!client.ArmorClaim)
                                                    dialog.Option("Armor (Lvl 70).", 53);
                                                dialog.Option("Next.", 48);
                                                dialog.Option("Nothing.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 48:
                                            {
                                                dialog.Text("We just found some equipment, and I thought that we should give them to our pupils so they can be less defeatable.");
                                                if (!client.BootsClaim)
                                                    dialog.Option("Boots (Lvl 80).", 54);
                                                if (!client.TowerClaim)
                                                    dialog.Option("Tower (Lvl 100).", 55);
                                                if (!client.FanClaim)
                                                    dialog.Option("Fan (Lvl 100).", 56);
                                                if (!client.WeaponClaim)
                                                    dialog.Option("Weapon (Lvl 110).", 57);
                                                dialog.Option("Back.", 49);
                                                dialog.Option("Nothing.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 50:
                                            {
                                                uint itemid = 123009;
                                                byte level = 15;
                                                if (!client.HeadgearClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.HeadgearClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 51:
                                            {
                                                uint itemid = 150079;
                                                byte level = 40;
                                                if (!client.RingClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.RingClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 52:
                                            {
                                                uint itemid = 120099;
                                                byte level = 50;
                                                if (!client.NecklaceClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.NecklaceClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 53:
                                            {
                                                uint itemid = 135069;
                                                byte level = 70;
                                                if (!client.ArmorClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.ArmorClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 54:
                                            {
                                                uint itemid = 160159;
                                                byte level = 80;
                                                if (!client.BootsClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.BootsClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 55:
                                            {
                                                uint itemid = 202009;
                                                byte level = 100;
                                                if (!client.TowerClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.TowerClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 56:
                                            {
                                                uint itemid = 201009;
                                                byte level = 100;
                                                if (!client.FanClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.FanClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 57:
                                            {
                                                byte level = 100;
                                                if (!client.WeaponClaim)
                                                {
                                                    ISkill proff = null;
                                                    ushort maxlevel = 0;
                                                    foreach (var prof in client.Proficiencies.Values)
                                                    {
                                                        if (maxlevel < prof.Level && prof.ID != 0)
                                                        {
                                                            maxlevel = prof.Level;
                                                            proff = prof;
                                                        }
                                                    }
                                                    if (proff == null)
                                                        return;
                                                    uint itemid = (uint)(proff.ID * 1000 + 219);
                                                    if (!Conquer_Online_Server.Database.ConquerItemInformation.BaseInformations.ContainsKey(itemid))
                                                    {
                                                        Console.WriteLine("invalid claim weapon " + itemid);
                                                        return;
                                                    }
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        item.SocketOne = Conquer_Online_Server.Game.Enums.Gem.EmptySocket;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.WeaponClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        #endregion
                                        case 1:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Class == MClass)
                                                    {
                                                        dialog.Text("You cannot be promoted anymore. You have mastered your class.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("To promote now you need" + client.PromoteItemNameNeed + " level " + client.PromoteLevelNeed + ".");
                                                        dialog.Option("Promote me sir.", 3);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 3:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Class == MClass)
                                                    {
                                                        dialog.Text("You cannot be promoted anymore. You have mastered your class.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        if (client.PromoteItemNeed == 721020)
                                                        {
                                                            if (client.Inventory.Remove("moonbox"))
                                                            {
                                                                client.Inventory.Add(client.PromoteItemGain, 0, 1);
                                                                client.Entity.Class++;
                                                                dialog.Text("Congratulations! You have been promoted.");
                                                                dialog.Option("Thank you master.", 255);
                                                                dialog.Send();
                                                            }
                                                            else
                                                            {
                                                                dialog.Text("You don't meet the requierments.");
                                                                dialog.Option("Ahh.", 255);
                                                                dialog.Send();
                                                            }
                                                            return;
                                                        }
                                                        if (client.Inventory.Contains(client.PromoteItemNeed, client.PromoteItemCountNeed) && client.Entity.Level >= client.PromoteLevelNeed)
                                                        {
                                                            client.Inventory.Remove(client.PromoteItemNeed, client.PromoteItemCountNeed);
                                                            client.Inventory.Add(client.PromoteItemGain, 0, 1);
                                                            client.Entity.Class++;
                                                            dialog.Text("Congratulations! You have been promoted.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You don't meet the requierments.");
                                                            dialog.Option("Ahh.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 2:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    dialog.Text("Let me know what you want to learn. '[...]' and '{...}' means ninja as second life and ninja as third life.");
                                                    dialog.Option("TwofoldBlades (Lvl 40).", 5);
                                                    dialog.Option("ToxicFog (Lvl 70).", 6);
                                                    dialog.Option("PoisonStar [Lvl 70].", 7);
                                                    //dialog.Option("CounterKill {Lvl 70}).", 8);
                                                    dialog.Option("ArcherBane (Lvl 110).", 9);
                                                    dialog.Option("ShurikenVortex (Lvl 70).", 10);
                                                    dialog.Option("Nothing.", 255);
                                                    dialog.Send();
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 5:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Level >= 40)
                                                    {
                                                        if (!client.AddSpell(LearnableSpell(6000)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                            break;
                                                        }
                                                        dialog.Text("You have learned the TwofoldBlades.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 23 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 6:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Level >= 70)
                                                    {
                                                        if (!client.AddSpell(LearnableSpell(6001)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                            break;
                                                        }
                                                        dialog.Text("You have learned the ToxicFog.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 70 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 7:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Level >= 70)
                                                    {
                                                        if ((client.Entity.Reborn == 1 && client.Entity.Class == 55) || (client.Entity.Reborn == 2 && client.Entity.SecondRebornClass == 55))
                                                        {
                                                            if (!client.AddSpell(LearnableSpell(6002)))
                                                            {
                                                                dialog.Text("You already know this skill.");
                                                                dialog.Option("Thank you master.", 255);
                                                                dialog.Send();
                                                                break;
                                                            }
                                                            dialog.Text("You have learned the PoisonStar.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need to be ninja in the second life.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 70 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 8:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Level >= 70)
                                                    {
                                                        if (client.Entity.Reborn == 2 && client.Entity.Class == 55)
                                                        {
                                                            if (!client.AddSpell(LearnableSpell(6003)))
                                                            {
                                                                dialog.Text("You already know this skill.");
                                                                dialog.Option("Thank you master.", 255);
                                                                dialog.Send();
                                                                break;
                                                            }
                                                            dialog.Text("You have learned the CounterKill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need to be ninja in the third life.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 70 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 9:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Level >= 110)
                                                    {
                                                        if (!client.AddSpell(LearnableSpell(6004)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                            break;
                                                        }
                                                        dialog.Text("You have learned the ArcherBane.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 70 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 10:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Level >= 70)
                                                    {
                                                        if (!client.AddSpell(LearnableSpell(6010)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                            break;
                                                        }
                                                        dialog.Text("You have learned the ShurikenVortex.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 70 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region TrojanMaster
                            case 10022:
                                {
                                    byte mClass = 10;
                                    byte MClass = 15;
                                    string Class = "trojan";
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    dialog.Text("I am the master of the one hand weapons. As I see, you started your way on conquering this world. I will try to help you teaching you warrir skills and promoting you.");
                                                    dialog.Option("Promote me.", 1);
                                                    dialog.Option("Learn skills.", 2);
                                                    dialog.Option("Claim bound items.", 49);
                                                    dialog.Option("Wait a minute.", 255);
                                                    dialog.Send();
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        #region BoundItems
                                        case 49:
                                            {
                                                dialog.Text("We just found some equipment, and I thought that we should give them to our pupils so they can be less defeatable.");
                                                if (!client.HeadgearClaim)
                                                    dialog.Option("Headgear (Lvl 15).", 50);
                                                if (!client.RingClaim)
                                                    dialog.Option("Ring (Lvl 40).", 51);
                                                if (!client.NecklaceClaim)
                                                    dialog.Option("Necklace (Lvl 50).", 52);
                                                if (!client.ArmorClaim)
                                                    dialog.Option("Armor (Lvl 70).", 53);
                                                dialog.Option("Next.", 48);
                                                dialog.Option("Nothing.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 48:
                                            {
                                                dialog.Text("We just found some equipment, and I thought that we should give them to our pupils so they can be less defeatable.");
                                                if (!client.BootsClaim)
                                                    dialog.Option("Boots (Lvl 80).", 54);
                                                if (!client.TowerClaim)
                                                    dialog.Option("Tower (Lvl 100).", 55);
                                                if (!client.FanClaim)
                                                    dialog.Option("Fan (Lvl 100).", 56);
                                                if (!client.WeaponClaim)
                                                    dialog.Option("Weapon (Lvl 110).", 57);
                                                dialog.Option("Back.", 49);
                                                dialog.Option("Nothing.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 50:
                                            {
                                                uint itemid = 118009;
                                                byte level = 15;
                                                if (!client.HeadgearClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.HeadgearClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 51:
                                            {
                                                uint itemid = 150079;
                                                byte level = 40;
                                                if (!client.RingClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.RingClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 52:
                                            {
                                                uint itemid = 120099;
                                                byte level = 50;
                                                if (!client.NecklaceClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.NecklaceClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 53:
                                            {
                                                uint itemid = 130069;
                                                byte level = 70;
                                                if (!client.ArmorClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.ArmorClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 54:
                                            {
                                                uint itemid = 160159;
                                                byte level = 80;
                                                if (!client.BootsClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.BootsClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 55:
                                            {
                                                uint itemid = 202009;
                                                byte level = 100;
                                                if (!client.TowerClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.TowerClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 56:
                                            {
                                                uint itemid = 201009;
                                                byte level = 100;
                                                if (!client.FanClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.FanClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 57:
                                            {
                                                byte level = 100;
                                                if (!client.WeaponClaim)
                                                {
                                                    ISkill proff = null;
                                                    ushort maxlevel = 0;
                                                    foreach (var prof in client.Proficiencies.Values)
                                                    {
                                                        if (maxlevel < prof.Level && prof.ID != 0)
                                                        {
                                                            maxlevel = prof.Level;
                                                            proff = prof;
                                                        }
                                                    }
                                                    if (proff == null)
                                                        return;
                                                    uint itemid = (uint)(proff.ID * 1000 + 219);
                                                    if (!Conquer_Online_Server.Database.ConquerItemInformation.BaseInformations.ContainsKey(itemid))
                                                    {
                                                        Console.WriteLine("invalid claim weapon " + itemid);
                                                        return;
                                                    }
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        item.SocketOne = Conquer_Online_Server.Game.Enums.Gem.EmptySocket;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.WeaponClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        #endregion
                                        case 1:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Class == MClass)
                                                    {
                                                        dialog.Text("You cannot be promoted anymore. You have mastered your class.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("To promote now you need" + client.PromoteItemNameNeed + " level " + client.PromoteLevelNeed + ".");
                                                        dialog.Option("Promote me sir.", 3);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 3:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Class == MClass)
                                                    {
                                                        dialog.Text("You cannot be promoted anymore. You have mastered your class.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        if (client.PromoteItemNeed == 721020)
                                                        {
                                                            if (client.Inventory.Remove("moonbox"))
                                                            {
                                                                client.Inventory.Add(client.PromoteItemGain, 0, 1);
                                                                client.Entity.Class++;
                                                                dialog.Text("Congratulations! You have been promoted.");
                                                                dialog.Option("Thank you master.", 255);
                                                                dialog.Send();
                                                            }

                                                            else
                                                            {
                                                                dialog.Text("You don't meet the requierments.");
                                                                dialog.Option("Ahh.", 255);
                                                                dialog.Send();
                                                            }
                                                            return;
                                                        }
                                                        if (client.Inventory.Contains(client.PromoteItemNeed, client.PromoteItemCountNeed) && client.Entity.Level >= client.PromoteLevelNeed)
                                                        {
                                                            client.Inventory.Remove(client.PromoteItemNeed, client.PromoteItemCountNeed);
                                                            client.Inventory.Add(client.PromoteItemGain, 0, 1);
                                                            client.Entity.Class++;
                                                            dialog.Text("Congratulations! You have been promoted.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You don't meet the requierments.");
                                                            dialog.Option("Ahh.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 2:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    dialog.Text("Let me know what you want to learn.");
                                                    dialog.Option("XPSkills (Lvl 40).", 5);
                                                    dialog.Option("Hercules (Lvl 40).", 6);
                                                    dialog.Option("Golem. (Lvl 40).", 7);
                                                    dialog.Option("Spritual Healing. (Lvl 40).", 8);
                                                    dialog.Option("Nothing.", 255);
                                                    dialog.Send();
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 5:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Level >= 40)
                                                    {
                                                        dialog.Text("You have learned the XP Skills.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                        client.AddSpell(LearnableSpell(1110));
                                                        client.AddSpell(LearnableSpell(1015));
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 40 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 6:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Level >= 40)
                                                    {
                                                        if (!client.AddSpell(LearnableSpell(1115)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                            break;
                                                        }
                                                        dialog.Text("You have learned the Hercules.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 40 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 7:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Level >= 40)
                                                    {
                                                        if (!client.AddSpell(LearnableSpell(1270)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                            break;
                                                        }
                                                        dialog.Text("You have learned the Golem.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 40 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 8:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Level >= 40)
                                                    {
                                                        if (!client.AddSpell(LearnableSpell(1190)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                            break;
                                                        }
                                                        dialog.Text("You have learned the Spritual Healing.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 40 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region Taoist Moon
                            case 10000:
                                {
                                    byte mClass = 142;
                                    byte MClass = 145;
                                    string Class = "fire taoist";
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                if (client.Entity.Class >= 100 && client.Entity.Class <= 101)
                                                {
                                                    dialog.Text("I am the master of the fire skills. As I see, you started your way on conquering this world. I will try to help you teaching you warrir skills and promoting you.");
                                                    dialog.Option("Promote me.", 100);
                                                    dialog.Option("Learn basic skills.", 200);
                                                    dialog.Option("Claim bound items.", 49);
                                                    dialog.Option("Wait a minute.", 255);
                                                    dialog.Send();
                                                }
                                                else
                                                {
                                                    if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                    {
                                                        dialog.Text("I am the master of the fire skills. As I see, you started your way on conquering this world. I will try to help you teaching you warrir skills and promoting you.");
                                                        dialog.Option("Promote me.", 1);
                                                        dialog.Option("Learn skills.", 2);
                                                        dialog.Option("Learn basic skills.", 200);
                                                        dialog.Option("Claim bound items.", 49);
                                                        dialog.Option("Wait a minute.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                break;
                                            }
                                        #region BoundItems
                                        case 49:
                                            {
                                                dialog.Text("We just found some equipment, and I thought that we should give them to our pupils so they can be less defeatable.");
                                                if (!client.HeadgearClaim)
                                                    dialog.Option("Headgear (Lvl 15).", 50);
                                                if (!client.RingClaim)
                                                    dialog.Option("Ring (Lvl 40).", 51);
                                                if (!client.NecklaceClaim)
                                                    dialog.Option("Necklace (Lvl 50).", 52);
                                                if (!client.ArmorClaim)
                                                    dialog.Option("Armor (Lvl 70).", 53);
                                                dialog.Option("Next.", 48);
                                                dialog.Option("Nothing.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 48:
                                            {
                                                dialog.Text("We just found some equipment, and I thought that we should give them to our pupils so they can be less defeatable.");
                                                if (!client.BootsClaim)
                                                    dialog.Option("Boots (Lvl 80).", 54);
                                                if (!client.TowerClaim)
                                                    dialog.Option("Tower (Lvl 100).", 55);
                                                if (!client.FanClaim)
                                                    dialog.Option("Fan (Lvl 100).", 56);
                                                if (!client.WeaponClaim)
                                                    dialog.Option("Weapon (Lvl 110).", 57);
                                                dialog.Option("Back.", 49);
                                                dialog.Option("Nothing.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 50:
                                            {
                                                uint itemid = 117009;
                                                byte level = 15;
                                                if (!client.HeadgearClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.HeadgearClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 51:
                                            {
                                                uint itemid = 152089;
                                                byte level = 40;
                                                if (!client.RingClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.RingClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 52:
                                            {
                                                uint itemid = 121099;
                                                byte level = 50;
                                                if (!client.NecklaceClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.NecklaceClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 53:
                                            {
                                                uint itemid = 134069;
                                                byte level = 70;
                                                if (!client.ArmorClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.ArmorClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 54:
                                            {
                                                uint itemid = 160159;
                                                byte level = 80;
                                                if (!client.BootsClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.BootsClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 55:
                                            {
                                                uint itemid = 202009;
                                                byte level = 100;
                                                if (!client.TowerClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.TowerClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 56:
                                            {
                                                uint itemid = 201009;
                                                byte level = 100;
                                                if (!client.FanClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.FanClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 57:
                                            {
                                                byte level = 100;
                                                if (!client.WeaponClaim)
                                                {
                                                    ISkill proff = null;
                                                    ushort maxlevel = 0;
                                                    foreach (var prof in client.Proficiencies.Values)
                                                    {
                                                        if (maxlevel < prof.Level && prof.ID != 0)
                                                        {
                                                            maxlevel = prof.Level;
                                                            proff = prof;
                                                        }
                                                    }
                                                    if (proff == null)
                                                        return;
                                                    uint itemid = (uint)(proff.ID * 1000 + 219);
                                                    if (!Conquer_Online_Server.Database.ConquerItemInformation.BaseInformations.ContainsKey(itemid))
                                                    {
                                                        Console.WriteLine("invalid claim weapon " + itemid);
                                                        return;
                                                    }
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        item.SocketOne = Conquer_Online_Server.Game.Enums.Gem.EmptySocket;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.WeaponClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        #endregion
                                        case 100:
                                            {
                                                if (client.Entity.Class >= 100 && client.Entity.Class <= 101)
                                                {
                                                    if (client.Entity.Class == 101)
                                                    {
                                                        dialog.Text("Do you want to become a fire taoist?");
                                                        dialog.Option("Yes sir.", 254);
                                                        dialog.Option("No thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("To promote now you need" + client.PromoteItemNameNeed + " level " + client.PromoteLevelNeed + ".");
                                                        dialog.Option("Promote me sir.", 254);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 254:
                                            {
                                                if (client.Entity.Class == 100)
                                                {
                                                    client.Entity.Class++;
                                                    dialog.Text("Congratulations! You have been promoted.");
                                                    dialog.Option("Thank you master.", 255);
                                                    dialog.Send();
                                                }
                                                else if (client.Entity.Class == 101)
                                                {
                                                    client.Entity.Class = 142;
                                                    dialog.Text("Congratulations! You have been promoted.");
                                                    dialog.Option("Thank you master.", 255);
                                                    dialog.Send();
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 200:
                                            {
                                                if (client.Entity.Class >= 100)
                                                {
                                                    dialog.Text("Let me know what you want to learn.");
                                                    dialog.Option("Thunder (Lvl 1).", 205);
                                                    dialog.Option("Cure (Lvl 1).", 206);
                                                    dialog.Option("Meditation. (Lvl 40).", 207);
                                                    dialog.Option("Nothing.", 255);
                                                    dialog.Send();
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 205:
                                            {
                                                if (client.Entity.Class >= 100)
                                                {
                                                    if (!client.AddSpell(LearnableSpell(1000)))
                                                    {
                                                        dialog.Text("You already know this skill.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                        break;
                                                    }
                                                    dialog.Text("You have learned thunder.");
                                                    dialog.Option("Thank you.", 255);
                                                    dialog.Send();
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 206:
                                            {
                                                if (client.Entity.Class >= 100)
                                                {
                                                    if (!client.AddSpell(LearnableSpell(1005)))
                                                    {
                                                        dialog.Text("You already know this skill.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                        break;
                                                    }
                                                    dialog.Text("You have learned cure.");
                                                    dialog.Option("Thank you.", 255);
                                                    dialog.Send();
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 207:
                                            {
                                                if (client.Entity.Class >= 100)
                                                {
                                                    if (client.Entity.Level >= 40)
                                                    {
                                                        if (!client.AddSpell(LearnableSpell(1195)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                            break;
                                                        }
                                                        dialog.Text("You have learned meditation.");
                                                        dialog.Option("Thank you.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 40 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 1:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Class == MClass)
                                                    {
                                                        dialog.Text("You cannot be promoted anymore. You have mastered your class.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("To promote now you need" + client.PromoteItemNameNeed + " level " + client.PromoteLevelNeed + ".");
                                                        dialog.Option("Promote me sir.", 3);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 3:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Class == MClass)
                                                    {
                                                        dialog.Text("You cannot be promoted anymore. You have mastered your class.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        if (client.PromoteItemNeed == 721020)
                                                        {
                                                            if (client.Inventory.Remove("moonbox"))
                                                            {
                                                                client.Inventory.Add(client.PromoteItemGain, 0, 1);
                                                                client.Entity.Class++;
                                                                dialog.Text("Congratulations! You have been promoted.");
                                                                dialog.Option("Thank you master.", 255);
                                                                dialog.Send();
                                                            }

                                                            else
                                                            {
                                                                dialog.Text("You don't meet the requierments.");
                                                                dialog.Option("Ahh.", 255);
                                                                dialog.Send();
                                                            }
                                                            return;
                                                        }
                                                        if (client.Inventory.Contains(client.PromoteItemNeed, client.PromoteItemCountNeed) && client.Entity.Level >= client.PromoteLevelNeed)
                                                        {
                                                            client.Inventory.Remove(client.PromoteItemNeed, client.PromoteItemCountNeed);
                                                            client.Inventory.Add(client.PromoteItemGain, 0, 1);
                                                            client.Entity.Class++;
                                                            dialog.Text("Congratulations! You have been promoted.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You don't meet the requierments.");
                                                            dialog.Option("Ahh.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 2:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    dialog.Text("Let me know what you want to learn.");
                                                    dialog.Option("Fire (Lvl 42 + Thunder lvl 4).", 5);
                                                    dialog.Option("Bomb. (Lvl 43).", 6);
                                                    dialog.Option("FireCircle. (Lvl 48).", 7);
                                                    dialog.Option("FireRing. (Lvl 52).", 8);
                                                    dialog.Option("FireMeteor. (Lvl 55).", 9);
                                                    dialog.Option("Tornado (Lvl 81 + Fire lvl 3).", 10);
                                                    dialog.Option("Nothing.", 255);
                                                    dialog.Send();
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 5:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Level >= 42)
                                                    {
                                                        if (client.Spells.ContainsKey(1000) && client.Spells[1000] != null && client.Spells[1000].Level == 4)
                                                        {
                                                            if (!client.AddSpell(LearnableSpell(1001)))
                                                            {
                                                                dialog.Text("You already know this skill.");
                                                                dialog.Option("Thank you master.", 255);
                                                                dialog.Send();
                                                                break;
                                                            }
                                                            dialog.Text("You have learned the fire.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need to know thunder very well to be able to learn the fire skill.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 42 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 10:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Level >= 81)
                                                    {
                                                        if (client.Spells.ContainsKey(1001) && client.Spells[1001] != null && client.Spells[1001].Level == 3)
                                                        {
                                                            if (!client.AddSpell(LearnableSpell(1002)))
                                                            {
                                                                dialog.Text("You already know this skill.");
                                                                dialog.Option("Thank you master.", 255);
                                                                dialog.Send();
                                                                break;
                                                            }
                                                            dialog.Text("You have learned the tornado.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need to know thunder very well to be able to learn the fire skill.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 81 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 6:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Level >= 43)
                                                    {
                                                        if (!client.AddSpell(LearnableSpell(1160)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                            break;
                                                        }
                                                        dialog.Text("You have learned the bomb skill.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 43 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 7:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Level >= 48)
                                                    {
                                                        if (!client.AddSpell(LearnableSpell(1120)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                            break;
                                                        }
                                                        dialog.Text("You have learned the fire circle skill.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 48 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 8:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Level >= 52)
                                                    {
                                                        if (!client.AddSpell(LearnableSpell(1150)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                            break;
                                                        }
                                                        dialog.Text("You have learned the fire ring skill.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 52 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 9:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Level >= 55)
                                                    {
                                                        if (!client.AddSpell(LearnableSpell(1180)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                            break;
                                                        }
                                                        dialog.Text("You have learned the fire meteor skill.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 55 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region Taoist Star
                            case 30:
                                {
                                    byte mClass = 132;
                                    byte MClass = 135;
                                    string Class = "water taoist";
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                if (client.Entity.Class >= 100 && client.Entity.Class <= 101)
                                                {
                                                    dialog.Text("I am the master of the fire skills. As I see, you started your way on conquering this world. I will try to help you teaching you warrir skills and promoting you.");
                                                    dialog.Option("Promote me.", 100);
                                                    dialog.Option("Learn basic skills.", 200);
                                                    dialog.Option("Claim bound items.", 49);
                                                    dialog.Option("Wait a minute.", 255);
                                                    dialog.Send();
                                                }
                                                else
                                                {
                                                    if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                    {
                                                        dialog.Text("I am the master of the water skills. The water skills, are not skills that would make wounds but heal them. As I see, you started your way on conquering this world. I will try to help you teaching you warrir skills and promoting you.");
                                                        dialog.Option("Promote me.", 1);
                                                        dialog.Option("Learn skills.", 2);
                                                        dialog.Option("Learn basic skills.", 200);
                                                        dialog.Option("Claim bound items.", 49);
                                                        dialog.Option("Wait a minute.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                break;
                                            }
                                        #region BoundItems
                                        case 49:
                                            {
                                                dialog.Text("We just found some equipment, and I thought that we should give them to our pupils so they can be less defeatable.");
                                                if (!client.HeadgearClaim)
                                                    dialog.Option("Headgear (Lvl 15).", 50);
                                                if (!client.RingClaim)
                                                    dialog.Option("Ring (Lvl 40).", 51);
                                                if (!client.NecklaceClaim)
                                                    dialog.Option("Necklace (Lvl 50).", 52);
                                                if (!client.ArmorClaim)
                                                    dialog.Option("Armor (Lvl 70).", 53);
                                                dialog.Option("Next.", 48);
                                                dialog.Option("Nothing.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 48:
                                            {
                                                dialog.Text("We just found some equipment, and I thought that we should give them to our pupils so they can be less defeatable.");
                                                if (!client.BootsClaim)
                                                    dialog.Option("Boots (Lvl 80).", 54);
                                                if (!client.TowerClaim)
                                                    dialog.Option("Tower (Lvl 100).", 55);
                                                if (!client.FanClaim)
                                                    dialog.Option("Fan (Lvl 100).", 56);
                                                if (!client.WeaponClaim)
                                                    dialog.Option("Weapon (Lvl 110).", 57);
                                                dialog.Option("Back.", 49);
                                                dialog.Option("Nothing.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 50:
                                            {
                                                uint itemid = 117009;
                                                byte level = 15;
                                                if (!client.HeadgearClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.HeadgearClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 51:
                                            {
                                                uint itemid = 152089;
                                                byte level = 40;
                                                if (!client.RingClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.RingClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 52:
                                            {
                                                uint itemid = 121099;
                                                byte level = 50;
                                                if (!client.NecklaceClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.NecklaceClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 53:
                                            {
                                                uint itemid = 134069;
                                                byte level = 70;
                                                if (!client.ArmorClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.ArmorClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 54:
                                            {
                                                uint itemid = 160159;
                                                byte level = 80;
                                                if (!client.BootsClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.BootsClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 55:
                                            {
                                                uint itemid = 202009;
                                                byte level = 100;
                                                if (!client.TowerClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.TowerClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 56:
                                            {
                                                uint itemid = 201009;
                                                byte level = 100;
                                                if (!client.FanClaim)
                                                {
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Bound = true;
                                                        item.Plus = 3;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.FanClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 57:
                                            {
                                                byte level = 100;
                                                if (!client.WeaponClaim)
                                                {
                                                    ISkill proff = null;
                                                    ushort maxlevel = 0;
                                                    foreach (var prof in client.Proficiencies.Values)
                                                    {
                                                        if (maxlevel < prof.Level && prof.ID != 0)
                                                        {
                                                            maxlevel = prof.Level;
                                                            proff = prof;
                                                        }
                                                    }
                                                    if (proff == null)
                                                        return;
                                                    uint itemid = (uint)(proff.ID * 1000 + 219);
                                                    if (!Conquer_Online_Server.Database.ConquerItemInformation.BaseInformations.ContainsKey(itemid))
                                                    {
                                                        Console.WriteLine("invalid claim weapon " + itemid);
                                                        return;
                                                    }
                                                    if (client.Entity.Level >= level)
                                                    {
                                                        ConquerItem item = new ConquerItem(true);

                                                        item.ID = itemid; item.Color = Conquer_Online_Server.Game.Enums.Color.White;
                                                        item.Bound = true;
                                                        item.Durability = item.MaximDurability = Conquer_Online_Server.Database
                                                            .ConquerItemInformation.BaseInformations[itemid].Durability;
                                                        item.Plus = 3;
                                                        item.SocketOne = Conquer_Online_Server.Game.Enums.Gem.EmptySocket;
                                                        if (client.Inventory.Add(item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd))
                                                        {
                                                            client.WeaponClaim = true;
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You need atleast one free slot in your inventory.");
                                                            dialog.Option("Alright.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You don't have atleast level " + level + ".");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot claim it twice.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        #endregion
                                        case 100:
                                            {
                                                if (client.Entity.Class >= 100 && client.Entity.Class <= 101)
                                                {
                                                    if (client.Entity.Class == 101)
                                                    {
                                                        dialog.Text("Do you want to become a water taoist?");
                                                        dialog.Option("Yes sir.", 254);
                                                        dialog.Option("No thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("To promote now you need" + client.PromoteItemNameNeed + " level " + client.PromoteLevelNeed + ".");
                                                        dialog.Option("Promote me sir.", 254);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 254:
                                            {
                                                if (client.Entity.Class == 100)
                                                {
                                                    client.Entity.Class++;
                                                    dialog.Text("Congratulations! You have been promoted.");
                                                    dialog.Option("Thank you master.", 255);
                                                    dialog.Send();
                                                }
                                                else if (client.Entity.Class == 101)
                                                {
                                                    client.Entity.Class = 132;
                                                    dialog.Text("Congratulations! You have been promoted.");
                                                    dialog.Option("Thank you master.", 255);
                                                    dialog.Send();
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 200:
                                            {
                                                if (client.Entity.Class >= 100)
                                                {
                                                    dialog.Text("Let me know what you want to learn.");
                                                    dialog.Option("Thunder (Lvl 1).", 205);
                                                    dialog.Option("Cure (Lvl 1).", 206);
                                                    dialog.Option("Meditation. (Lvl 40).", 207);
                                                    dialog.Option("Nothing.", 255);
                                                    dialog.Send();
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 205:
                                            {
                                                if (client.Entity.Class >= 100)
                                                {
                                                    if (!client.AddSpell(LearnableSpell(1000)))
                                                    {
                                                        dialog.Text("You already know this skill.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                        break;
                                                    }
                                                    dialog.Text("You have learned thunder.");
                                                    dialog.Option("Thank you.", 255);
                                                    dialog.Send();
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 206:
                                            {
                                                if (client.Entity.Class >= 100)
                                                {
                                                    if (!client.AddSpell(LearnableSpell(1005)))
                                                    {
                                                        dialog.Text("You already know this skill.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                        break;
                                                    }
                                                    dialog.Text("You have learned cure.");
                                                    dialog.Option("Thank you.", 255);
                                                    dialog.Send();
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 207:
                                            {
                                                if (client.Entity.Class >= 100)
                                                {
                                                    if (client.Entity.Level >= 40)
                                                    {
                                                        if (!client.AddSpell(LearnableSpell(1195)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                            break;
                                                        }
                                                        dialog.Text("You have learned meditation.");
                                                        dialog.Option("Thank you.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 40 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 1:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Class == MClass)
                                                    {
                                                        dialog.Text("You cannot be promoted anymore. You have mastered your class.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("To promote now you need" + client.PromoteItemNameNeed + " level " + client.PromoteLevelNeed + ".");
                                                        dialog.Option("Promote me sir.", 3);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 3:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Class == MClass)
                                                    {
                                                        dialog.Text("You cannot be promoted anymore. You have mastered your class.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        if (client.PromoteItemNeed == 721020)
                                                        {
                                                            if (client.Inventory.Remove("moonbox"))
                                                            {
                                                                client.Inventory.Add(client.PromoteItemGain, 0, 1);
                                                                client.Entity.Class++;
                                                                dialog.Text("Congratulations! You have been promoted.");
                                                                dialog.Option("Thank you master.", 255);
                                                                dialog.Send();
                                                            }

                                                            else
                                                            {
                                                                dialog.Text("You don't meet the requierments.");
                                                                dialog.Option("Ahh.", 255);
                                                                dialog.Send();
                                                            }
                                                            return;
                                                        }
                                                        if (client.Inventory.Contains(client.PromoteItemNeed, client.PromoteItemCountNeed) && client.Entity.Level >= client.PromoteLevelNeed)
                                                        {
                                                            client.Inventory.Remove(client.PromoteItemNeed, client.PromoteItemCountNeed);
                                                            client.Inventory.Add(client.PromoteItemGain, 0, 1);
                                                            client.Entity.Class++;
                                                            dialog.Text("Congratulations! You have been promoted.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You don't meet the requierments.");
                                                            dialog.Option("Ahh.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 2:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    dialog.Text("Let me know what you want to learn.");
                                                    dialog.Option("XP Revive (Lvl 1).", 5);
                                                    dialog.Option("Volcano (Lvl 1).", 6);
                                                    dialog.Option("Lightning (Lvl 1).", 7);
                                                    dialog.Option("HealingRain. (Lvl 40).", 8);
                                                    dialog.Option("StarOfAccuracy. (Lvl 40).", 9);
                                                    dialog.Option("MagicShield. (Lvl 40).", 10);
                                                    dialog.Option("Next.", 20);
                                                    dialog.Option("Nothing.", 255);
                                                    dialog.Send();
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 20:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    dialog.Text("Let me know what you want to learn.");
                                                    dialog.Option("WaterDevil. (Lvl 40).", 21);
                                                    dialog.Option("Stigma. (Lvl 40).", 11);
                                                    dialog.Option("Invisibility. (Lvl 70).", 12);
                                                    dialog.Option("Pray. (Lvl 70).", 13);
                                                    dialog.Option("SpeedLightning (Lvl 70).", 14);
                                                    dialog.Option("AdvancedCure. (Lvl 80).", 15);
                                                    dialog.Option("Nectar. (Lvl 90).", 16);
                                                    dialog.Option("Back.", 2);
                                                    dialog.Send();
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 5:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Level >= 1)
                                                    {
                                                        if (!client.AddSpell(LearnableSpell(1050)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                            break;
                                                        }
                                                        dialog.Text("You have learned xp revive skill.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 1 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 21:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Level >= 40)
                                                    {
                                                        if (!client.AddSpell(LearnableSpell(1280)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                        }
                                                        else
                                                        {
                                                            dialog.Text("You have learned water devil.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 40 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 6:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Level >= 1)
                                                    {
                                                        if (!client.AddSpell(LearnableSpell(1125)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                            break;
                                                        }
                                                        dialog.Text("You have learned the volcano xp skill.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 1 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 7:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Level >= 1)
                                                    {
                                                        if (!client.AddSpell(LearnableSpell(1010)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                            break;
                                                        }
                                                        dialog.Text("You have learned the lightning xp skill.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 1 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 8:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Level >= 40)
                                                    {
                                                        if (!client.AddSpell(LearnableSpell(1055)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                            break;
                                                        }
                                                        dialog.Text("You have learned the fire healing rain.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 40 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 9:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Level >= 40)
                                                    {
                                                        if (!client.AddSpell(LearnableSpell(1085)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                            break;
                                                        }
                                                        dialog.Text("You have learned the star of acurracy skill.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 40 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 10:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Level >= 40)
                                                    {
                                                        if (!client.AddSpell(LearnableSpell(1090)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                            break;
                                                        }
                                                        dialog.Text("You have learned the magic shield skill.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 40 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 11:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Level >= 40)
                                                    {
                                                        if (!client.AddSpell(LearnableSpell(1095)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                            break;
                                                        }
                                                        dialog.Text("You have learned the stigma skill.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 40 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 12:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Level >= 70)
                                                    {
                                                        if (!client.AddSpell(LearnableSpell(1075)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                            break;
                                                        }
                                                        dialog.Text("You have learned the invisibility skill.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 70 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 13:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Level >= 70)
                                                    {
                                                        if (!client.AddSpell(LearnableSpell(1100)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                            break;
                                                        }
                                                        dialog.Text("You have learned the pray skill.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 70 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 14:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Level >= 70)
                                                    {
                                                        if (!client.AddSpell(LearnableSpell(5001)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                            break;
                                                        }
                                                        dialog.Text("You have learned the speed lightning skill.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 70 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 15:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Level >= 80)
                                                    {
                                                        if (!client.AddSpell(LearnableSpell(1175)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                            break;
                                                        }
                                                        dialog.Text("You have learned the advanced cure skill.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 70 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 16:
                                            {
                                                if (client.Entity.Class >= mClass && client.Entity.Class <= MClass)
                                                {
                                                    if (client.Entity.Level >= 80)
                                                    {
                                                        if (!client.AddSpell(LearnableSpell(1170)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                            break;
                                                        }
                                                        dialog.Text("You have learned the nectar skill.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        dialog.Text("You need to be level 70 or more.");
                                                        dialog.Option("Alright.", 255);
                                                        dialog.Send();
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye.");
                                                    dialog.Option("Alright.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region MightyTao
                            case 35500:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("If you have reborn atleast one time, you can learn some great skills. With them you will be able to summon some misterious monsters. They will help you conquer this world much faster.");
                                                dialog.Option("Summon guard - 1 euxite ore.", 1);
                                                dialog.Option("Summon class monster - 1 gold ore rate5.", 2);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                if (client.Entity.Reborn > 0)
                                                {
                                                    if (client.Inventory.Contains(1072031, 1))
                                                    {
                                                        client.Inventory.Remove(1072031, 1);
                                                        if (!client.AddSpell(LearnableSpell(4000)))
                                                        {
                                                            dialog.Text("You already know this skill.");
                                                            dialog.Option("Thank you master.", 255);
                                                            dialog.Send();
                                                        }
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot learn those skills until you reborn atleast once.");
                                                    dialog.Option("Alright", 255);
                                                    dialog.Send();
                                                    break;
                                                }
                                                break;
                                            }
                                        case 2:
                                            {
                                                if (client.Entity.Reborn > 0)
                                                {
                                                    if (client.Entity.Class >= 50 && client.Entity.Class <= 55)
                                                    {
                                                        dialog.Text("You cannot learn skills like this one. Ninjas don't need such thing. They are much more stronger than every other class.");
                                                        dialog.Option("Alright", 255);
                                                        dialog.Send();
                                                        break;
                                                    }
                                                    if (client.Inventory.Contains(1072054, 1))
                                                    {
                                                        client.Inventory.Remove(1072054, 1);
                                                        if (client.Entity.Class <= 15)
                                                            client.AddSpell(LearnableSpell(4050));
                                                        else if (client.Entity.Class <= 25)
                                                            client.AddSpell(LearnableSpell(4060));
                                                        else if (client.Entity.Class <= 45)
                                                            client.AddSpell(LearnableSpell(4070));
                                                        else if (client.Entity.Class <= 135)
                                                            client.AddSpell(LearnableSpell(4010));
                                                        else if (client.Entity.Class <= 145)
                                                            client.AddSpell(LearnableSpell(4020));
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You cannot learn those skills until you reborn atleast once.");
                                                    dialog.Option("Alright", 255);
                                                    dialog.Send();
                                                    break;
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #endregion
                        }
                        break;
                    }
                #endregion
                #region Stables
                case 1006:
                    {
                        switch (client.ActiveNpc)
                        {
                            #region Stables
                            #region  Breeder
                            case 9883:
                                {
                                    Data data = new Data(true);
                                    data.ID = Data.OpenWindow;
                                    data.UID = client.Entity.UID;
                                    data.TimeStamp = Time32.Now;
                                    data.dwParam = Data.WindowCommands.Breeding;
                                    data.wParam1 = client.Entity.X;
                                    data.wParam2 = client.Entity.Y;
                                    client.Send(data);
                                    break;
                                }
                            #endregion
                            #region SkillTeacher
                            case 9881:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("Ready to learn some great skills? Their prices are as good as they are.");
                                                dialog.Option("Riding - 50000 gold.", 1);
                                                dialog.Option("Spook - 100000 gold.", 2);
                                                dialog.Option("WarCry - 1000000 gold.", 3);
                                                dialog.Option("Nothing.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                if (client.Entity.Money >= 50000)
                                                {
                                                    if (!client.AddSpell(LearnableSpell(7001)))
                                                    {
                                                        dialog.Text("You already know this skill.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        client.Entity.Money -= 50000;
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You don't meet the requierments.");
                                                    dialog.Option("Ahh sorry.", 255);
                                                }
                                                break;
                                            }
                                        case 2:
                                            {
                                                if (client.Entity.Money >= 100000)
                                                {
                                                    if (!client.AddSpell(LearnableSpell(7002)))
                                                    {
                                                        dialog.Text("You already know this skill.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        client.Entity.Money -= 100000;
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You don't meet the requierments.");
                                                    dialog.Option("Ahh sorry.", 255);
                                                }
                                                break;
                                            }
                                        case 3:
                                            {
                                                if (client.Entity.Money >= 1000000)
                                                {
                                                    if (!client.AddSpell(LearnableSpell(7003)))
                                                    {
                                                        dialog.Text("You already know this skill.");
                                                        dialog.Option("Thank you master.", 255);
                                                        dialog.Send();
                                                    }
                                                    else
                                                    {
                                                        client.Entity.Money -= 1000000;
                                                    }
                                                }
                                                else
                                                {
                                                    dialog.Text("You don't meet the requierments.");
                                                    dialog.Option("Ahh sorry.", 255);
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion
                            #endregion
                        }
                        break;
                    }
                #endregion
                #region Lottery
                case 700:
                    {
                        switch (client.ActiveNpc)
                        {
                            #region LuckyBox
                            case 925:
                            case 926:
                            case 927:
                            case 928:
                            case 929:
                            case 930:
                            case 931:
                            case 932:
                            case 933:
                            case 934:
                            case 935:
                            case 936:
                            case 937:
                            case 938:
                            case 939:
                            case 940:
                            case 942:
                            case 943:
                            case 944:
                            case 945:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {
                                                if (client.InLottery)
                                                {
                                                    dialog.Text("Do you really want to chose me?");
                                                    dialog.Option("Yes.", 1);
                                                    dialog.Option("No.", 255);
                                                    dialog.Send();
                                                }
                                                else
                                                {
                                                    dialog.Text("Re-enter the lottery if you want to try me.");
                                                    dialog.Option("Ahh.", 255);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 1:
                                            {
                                                if (client.InLottery)
                                                {
                                                    if (client.Inventory.Count == 40)
                                                    {
                                                        client.Send(Conquer_Online_Server.ServerBase.Constants.FullInventory);
                                                        return;
                                                    }
                                                    client.InLottery = false;
                                                tryagain:
                                                    int rand = Conquer_Online_Server.ServerBase.Kernel.Random.Next(Conquer_Online_Server.Database.LotteryTable.LotteryItems.Count);
                                                    var item = Conquer_Online_Server.Database.LotteryTable.LotteryItems[rand];
                                                    var Itemd = Conquer_Online_Server.Database.ConquerItemInformation.BaseInformations[item.ID];
                                                    if (Itemd == null)
                                                        goto tryagain;
                                                    if (Conquer_Online_Server.ServerBase.Kernel.Rate(item.Rank, item.Chance) && Conquer_Online_Server.ServerBase.Kernel.Rate(item.Rank, 35 - item.Rank))
                                                    {
                                                        IConquerItem Item = new ConquerItem(true);
                                                        Item.ID = item.ID;
                                                        Item.Plus = item.Plus;
                                                        Item.Color = Conquer_Online_Server.Game.Enums.Color.Blue;
                                                        if (item.Sockets > 0)
                                                            Item.SocketOne = Conquer_Online_Server.Game.Enums.Gem.EmptySocket;
                                                        if (item.Sockets > 1)
                                                            Item.SocketTwo = Conquer_Online_Server.Game.Enums.Gem.EmptySocket;
                                                        Item.Durability = Item.MaximDurability = Itemd.Durability;
                                                        client.Inventory.Add(Item, Conquer_Online_Server.Game.Enums.ItemUse.CreateAndAdd);
                                                        if (item.Rank <= 4)
                                                        {
                                                            Conquer_Online_Server.ServerBase.Kernel.SendWorldMessage(new Message("Congratulations! " + client.Entity.Name + " won " + item.Name + " in lottery.", System.Drawing.Color.Black, Message.Talk), Conquer_Online_Server.ServerBase.Kernel.GamePool.Values);
                                                        }
                                                        else
                                                        {
                                                            if (Conquer_Online_Server.ServerBase.Kernel.Rate(item.Chance, 100))
                                                            {
                                                                Conquer_Online_Server.ServerBase.Kernel.SendWorldMessage(new Message("Congratulations! " + client.Entity.Name + " won " + item.Name + " in lottery.", System.Drawing.Color.Black, Message.Talk), Conquer_Online_Server.ServerBase.Kernel.GamePool.Values);
                                                            }
                                                        }
                                                    }
                                                    else
                                                    {
                                                        goto tryagain;
                                                    }
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion
                        }
                        break;
                    }
                #endregion
            }

            switch (client.ActiveNpc)
            {
                #region QuarantineInvite
                case 54236:
                    {
                        switch (npcRequest.OptionID)
                        {
                            case 0:
                                {
                                    if (Conquer_Online_Server.Game.ConquerStructures.Quarantine.Started)
                                    {
                                        dialog.Text("The quarantine tournament has now started!");
                                        dialog.Text("You will get divided into two teams, black and white, and ");
                                        dialog.Text("must eliminate the other. Only fastblade/scentsword is allowed!");
                                        dialog.Option("Let me join!", 1);
                                        dialog.Option("Not intrested", 255);
                                    }
                                    else
                                    {
                                        dialog.Text("The quarantine tournament is not active");
                                        dialog.Option("I see", 255);
                                    }
                                    dialog.Send();
                                    break;
                                }
                            case 1:
                                {
                                    if (client.Equipment.Free(3))
                                    {
                                     dialog.Text("You need to wear an armor that can be colored.");
                                     dialog.Option("I see", 255);
                                     dialog.Send();
                                     break;
                                    }
                                    uint UID = 92000, ID = 0;
                                    if (Quarantine.Black.Count > Quarantine.White.Count)
                                    {
                                        Quarantine.White.Add(client.Entity.UID, client);
                                        UID += (uint)Quarantine.White.Count + (uint)Kernel.Random.Next(1,1000);
                                        client.Entity.Teleport(1844, 114, 163);
                                    }
                                    else
                                    {
                                        Quarantine.Black.Add(client.Entity.UID, client);
                                        UID += (uint)Quarantine.Black.Count + (uint)Kernel.Random.Next(1, 1000);
                                        ID = 200;
                                        client.Entity.Teleport(1844, 225, 162);
                                    }

                                    Conquer_Online_Server.Interfaces.IConquerItem newItem = new Conquer_Online_Server.Network.GamePackets.ConquerItem(true);
                                    newItem.ID = 181315 + ID;
                                    newItem.UID = UID;
                                    newItem.Durability = 1000;
                                    newItem.MaximDurability = 1000;
                                    newItem.Position = 9;
                                    client.Equipment.Remove(9);
                                    if (client.Equipment.Objects[8] != null)
                                        client.Equipment.Objects[8] = null;
                                    client.Equipment.Add(newItem);
                                    newItem.Mode = Conquer_Online_Server.Game.Enums.ItemMode.Update;
                                    newItem.Send(client);
                                    client.SendEquipment(false);
                                    client.Equipment.UpdateEntityPacket();

                                    break;
                                }
                        }
                        break;
                    }
                #endregion
                #region Warden
                case 10082:
                    {
                        switch (npcRequest.OptionID)
                        {
                            case 0:
                                {
                                    dialog.Text("I can take you out of the jail. Just tell me.");
                                    dialog.Option("Take me out.", 1);
                                    dialog.Option("Alright.", 255);
                                    dialog.Send();
                                    break;
                                }
                            case 1:
                                {
                                    client.Entity.Teleport(1002, 514, 356);
                                    break;
                                }
                        }
                        break;
                    }
                #endregion

                #region Tinter
                case 10064: //Tinter
                    {
                        switch (npcRequest.OptionID)
                        {
                            case 0:
                                {
                                    dialog.Text("Select the item.");
                                    dialog.Option("Headgear.", 1);
                                    dialog.Option("Armor.", 3);
                                    dialog.Option("Shield.", 5);
                                    dialog.Option("I'm standing by.", 255);
                                    dialog.Send();
                                    break;
                                }
                            case 1:
                            case 3:
                            case 5:
                                {
                                    client.TinterItemSelect = npcRequest.OptionID;
                                    dialog.Text("Select the new color.");
                                    dialog.Option("Orange.", 13);
                                    dialog.Option("Light Blue.", 14);
                                    dialog.Option("Red.", 15);
                                    dialog.Option("Blue.", 16);
                                    dialog.Option("Yellow.", 17);
                                    dialog.Option("Purple.", 18);
                                    dialog.Option("White.", 19);
                                    dialog.Option("I'm standing by.", 255);
                                    dialog.Send();
                                    break;
                                }
                            case 13:
                            case 14:
                            case 15:
                            case 16:
                            case 17:
                            case 18:
                            case 19:
                                {
                                    if (client.TinterItemSelect == 0)
                                        return;
                                    IConquerItem item = client.Equipment.TryGetItem(client.TinterItemSelect);
                                    if (item == null || item.ID == 0)
                                    {
                                        dialog.Text("You don't have a item like this one equiped.");
                                        dialog.Send();
                                        break;
                                    }
                                    item.Color = (Conquer_Online_Server.Game.Enums.Color)(npcRequest.OptionID % 10);
                                    Conquer_Online_Server.Database.ConquerItemTable.UpdateColor(item, client);
                                    client.TinterItemSelect = 0;
                                    item.Mode = Conquer_Online_Server.Game.Enums.ItemMode.Update;
                                    item.Send(client);
                                    item.Mode = Conquer_Online_Server.Game.Enums.ItemMode.Default;
                                    break;
                                }
                        }
                        break;
                    }
                #endregion

                #region Lottery

                #region JewlarLau
                case 3953:
                case 2065:
                    {
                        switch (npcRequest.OptionID)
                        {
                            case 0:
                                {
                                    dialog.Text("Do you have gems? I'm a great fan of them... I'd give gems with better quality for 15 gems of a lower quality. As long as I'll have many more, I don't care about the quality. I think you know, quantity not quality...ha ha! what fools, they say quality is better than quantity but I don't care.");
                                    dialog.Option("I have 15 normal gems.", 25);
                                    dialog.Option("I have 15 refined gems.", 26);
                                    dialog.Option("I'm too poor.", 255);
                                    dialog.Send();
                                    break;
                                }
                            case 25:
                            case 26:
                                {
                                    client.JewelarLauKind = npcRequest.OptionID;
                                    dialog.Text("What gems?");
                                    dialog.Option("PhoenixGem.", 1);
                                    dialog.Option("DragonGem.", 11);
                                    dialog.Option("FuryGem.", 21);
                                    dialog.Option("RainbowGem.", 31);
                                    dialog.Option("KylinGem.", 41);
                                    dialog.Option("Next.", 50);
                                    dialog.Send();
                                    break;
                                }
                            case 50:
                                {
                                    dialog.Text("What gems?");
                                    dialog.Option("VioletGem.", 51);
                                    dialog.Option("MoonGem.", 61);
                                    dialog.Option("TortoiseGem.", 71);
                                    dialog.Option("ThunderGem.", 101);
                                    dialog.Option("GloryGem.", 121);
                                    dialog.Option("Back.", client.JewelarLauKind);
                                    dialog.Send();
                                    break;
                                }
                            default:
                                {
                                    if (npcRequest.OptionID == 255)
                                        return;
                                    byte gemid = (byte)(npcRequest.OptionID + client.JewelarLauKind - 25);
                                    uint findgemid = (uint)(700000 + gemid);
                                    uint givegemid = findgemid + 1;
                                    if (client.Inventory.Contains(findgemid, 15))
                                    {
                                        client.Inventory.Remove(findgemid, 15);
                                        client.Inventory.Add(givegemid, 0, 1);
                                    }
                                    else
                                    {
                                        dialog.Text("You don't have enough " + (Conquer_Online_Server.Game.Enums.Gem)gemid + "s. Come back when you have all of them.");
                                        dialog.Option("Alright sir.", 255);
                                        dialog.Send();
                                    }
                                    break;
                                }
                        }
                        break;
                    }
                #endregion

                #region LadyLuck
                case 924:
                    {
                        switch (npcRequest.OptionID)
                        {
                            case 0:
                                {
                                    if (client.InLottery)
                                    {
                                        dialog.Text("You may come back later, if you still want to try your luck. It will be free next time you want.");
                                        dialog.Option("Yes please, let me out.", 1);
                                        dialog.Option("No thank you.", 255);
                                        dialog.Send();
                                    }
                                    else
                                    {
                                        dialog.Text("Thank you for trying out the lottery. Please come back any other time, we will wait you.");
                                        dialog.Option("Take me out.", 1);
                                        dialog.Send();
                                    }
                                    break;
                                }
                            case 1:
                                {
                                    client.Entity.Teleport(1036, 219, 189);
                                    break;
                                }
                        }
                        break;
                    }
                #endregion

                    #endregion

                #region Labirinth
                case 1153:
                    {
                        switch (npcRequest.OptionID)
                        {
                            case 0:
                                {
                                    dialog.Text("Hello there. Just let me know if you want to move to the second floor of the labirinth with a SkyToken or go to TwinCity for free.");
                                    dialog.Option("Second floor.", 1);
                                    dialog.Option("TwinCity.", 2);
                                    dialog.Option("Nothing.", 255);
                                    dialog.Send();
                                    break;
                                }
                            case 1:
                                {
                                    if (client.Inventory.Contains(721537, 1))
                                    {
                                        client.Inventory.Remove(721537, 1);
                                        client.Entity.Teleport(1352, 027, 227);
                                    }
                                    else
                                    {
                                        dialog.Text("You don't meet the requierments.");
                                        dialog.Option("Ahh sorry.", 255);
                                    }
                                    break;
                                }
                            case 2:
                                {
                                    client.Entity.Teleport(1002, 428, 379);
                                    break;
                                }
                        }
                        break;
                    }
                case 1154:
                    {
                        switch (npcRequest.OptionID)
                        {
                            case 0:
                                {
                                    dialog.Text("Hello there. Just let me know if you want to move to the third floor of the labirinth with a EarthToken or go to TwinCity for free.");
                                    dialog.Option("Third floor.", 1);
                                    dialog.Option("TwinCity.", 2);
                                    dialog.Option("Nothing.", 255);
                                    dialog.Send();
                                    break;
                                }
                            case 1:
                                {
                                    if (client.Inventory.Contains(721538, 1))
                                    {
                                        client.Inventory.Remove(721538, 1);
                                        client.Entity.Teleport(1353, 025, 268);
                                    }
                                    else
                                    {
                                        dialog.Text("You don't meet the requierments.");
                                        dialog.Option("Ahh sorry.", 255);
                                    }
                                    break;
                                }
                            case 2:
                                {
                                    client.Entity.Teleport(1002, 428, 379);
                                    break;
                                }
                        }
                        break;
                    }
                case 1155:
                    {
                        switch (npcRequest.OptionID)
                        {
                            case 0:
                                {
                                    dialog.Text("Hello there. Just let me know if you want to move to the fourth floor of the labirinth with a SoulToken or go to TwinCity for free.");
                                    dialog.Option("Fourth floor.", 1);
                                    dialog.Option("TwinCity.", 2);
                                    dialog.Option("Nothing.", 255);
                                    dialog.Send();
                                    break;
                                }
                            case 1:
                                {
                                    if (client.Inventory.Contains(721539, 1))
                                    {
                                        client.Inventory.Remove(721539, 1);
                                        client.Entity.Teleport(1354, 005, 290);
                                    }
                                    else
                                    {
                                        dialog.Text("You don't meet the requierments.");
                                        dialog.Option("Ahh sorry.", 255);
                                    }
                                    break;
                                }
                            case 2:
                                {
                                    client.Entity.Teleport(1002, 428, 379);
                                    break;
                                }
                        }
                        break;
                    }
                case 1156:
                    {
                        switch (npcRequest.OptionID)
                        {
                            case 0:
                                {
                                    dialog.Text("Hello there. Just let me know if you want to go to TwinCity.");
                                    dialog.Option("TwinCity.", 1);
                                    dialog.Option("Nothing.", 255);
                                    break;
                                }
                            case 1:
                                {
                                    client.Entity.Teleport(1002, 428, 379);
                                    break;
                                }
                        }
                        break;
                    }
                #endregion

                #region Birth Villiage

                #region RecruitMaster
                case 1060:
                    {
                        switch (npcRequest.OptionID)
                        {
                            case 0:
                                {
                                    dialog.Text("You are about to enter the wonderful world of Trinity Conquer!");
                                    dialog.Text("\n\nYou will have much to learn, to survive here. As the saying goes, if you know yourself and your enemy, you will never lose a battle!");
                                    dialog.Option("Got it!", 1);
                                    dialog.Send();
                                    break;
                                }
                            case 1:
                                {
                                    switch (client.Entity.Class)
                                    {
                                        case 50:
                                            {
                                                dialog.Text("What the..! Oh.. It's just you, Ninja!");
                                                dialog.Text("\n\nSuch a mysterious figures, cloaked in shadow.. Ninjas have the most devastating attacks");
                                                dialog.Text(", but the lowest defence and health of all classes. Their speed and surprising skills are what make");
                                                dialog.Text("are what make them such a dangerous force here!\n\nAlways be aware of your surroundings!\n");
                                                dialog.Option("I am like a shadow!", 2);
                                                dialog.Send();
                                                break;
                                            }
                                        case 100:
                                            {
                                                dialog.Text("Well hello there, young Taoist! Right now, you don't have any specialty in your magic skills.");
                                                dialog.Text("Once you train enough, you can be promoted to a Fire or Water Taoist, and then continure on your path to glory!");
                                                dialog.Option("Fire and Water Taoist?", 11);
                                                dialog.Send();
                                                break;
                                            }

                                    }
                                    break;
                                }
                            case 11:
                                {
                                    dialog.Text("Fire Taoists are able to smite their enemies at long range, as their spells cause much more damage than other Taoists.");
                                    dialog.Text("While the Water Taoists are adept at healing and reviving fallen comrades. Both paths offer their own choices.");
                                    dialog.Text("It's up to you to decide where your heart lies.");
                                    dialog.Option("I see.", 2);
                                    dialog.Send();
                                    break;
                                }
                            case 2:
                                {
                                    dialog.Text("In Conquer Online, Path Finding is efficient in helping you locate shops and places of intrest. ");
                                    dialog.Text("You can check the current map's list by clicking the \"Path Finding\" button to the right. ");
                                    dialog.Text("Just highlight where you would like to go and click, and you're on your way!");
                                    dialog.Option("Anything else?", 3);
                                    dialog.Send();
                                    break;
                                }
                            case 3:
                                {
                                    dialog.Text("If you click \"Status\" in the lower right corner of the screen you will be able to check your character level, status, and attributes.");
                                    dialog.Option("I see.", 4);
                                    dialog.Send();
                                    break;
                                }
                            case 4:
                                {
                                    dialog.Text("You can also check your equipment, weapon proficiency, skills, and skill levels by click the tabs on the left side of the Status window.");
                                    if (client.Entity.Class == 100)
                                    { dialog.Option("Got it!", 55); }
                                    else { dialog.Option("Got it!", 5); }
                                    dialog.Send();
                                    break;
                                }
                            case 5:
                                {
                                    dialog.Text("Now you should go speak with Old General Yang.\n I'm sure he will be able to teach you some more useful tips!");
                                    dialog.Option("Okay, thanks!", 6);
                                    dialog.Send();
                                    break;
                                }
                            case 55:
                                {
                                    dialog.Text("Now you should go speak with Taoist Star.\n I'm sure he will be able to teach you some more useful tips!");
                                    dialog.Option("Okay, thanks!", 66);
                                    dialog.Send();
                                    break;
                                }
                            case 6:
                                {
                                    new Message("You should follow the Recruit Master's advice!\nGo find Old General Yang.", System.Drawing.Color.Green, Message.PopUP);
                                    break;
                                }
                            case 66:
                                {
                                    new Message("You should follow the Recruit Master's advice!\nGo find Taoist Star.", System.Drawing.Color.Green, Message.PopUP);
                                    break;
                                }
                        }
                        break;
                    }
                #endregion

                #region Pharmacist
                case 10008:
                    {
                        switch (npcRequest.OptionID)
                        {
                            case 0:
                                {
                                    dialog.Text("Hi! I sell all sorts of potions and town scrolls in all the citys.\nI also sell fireworks and skill books in the market.");
                                    dialog.Option("What potions?", 1);
                                    dialog.Option("Consult others.", 255);
                                    dialog.Send();
                                    break;
                                }
                            case 1:
                                {
                                    dialog.Text("Healing and mana potions.\nHealing potions make you healthy.\nMana potions will enable you to cast spells, If you have any.\n");
                                    dialog.Text("\nThat is all. If you have not talked to others NPCs...\nYou had better have a chat with them so that you can learn more.\n");
                                    dialog.Option("I see. Thanks.", 255);
                                    dialog.Send();
                                    break;
                                }
                        }
                        break;
                    }
                #endregion

                #region WiseGuy
                case 10004:
                    {
                        switch (npcRequest.OptionID)
                        {
                            case 0:
                                {
                                    dialog.Text("Well, if you want to talk to any NPCs, just click them. Easy, huh?");
                                    dialog.Option("About my class...", 1);
                                    dialog.Option("Ah, Forget about it.", 255);
                                    dialog.Send();
                                    break;
                                }
                            case 1:
                                {
                                    switch (client.Entity.Class)
                                    {
                                        case 50:
                                            {
                                                dialog.Text("The Ninja is an expert in various oriental weapons, boasting swift and powerful melee attack skills. I know somebody. In Twin City there are merchants I know. you go talk to them, they'll sort you out. Got it?");
                                                break;
                                            }
                                        case 10:
                                            {
                                                dialog.Text("The Trojan is an expert in various oriental weapons, dual wield and a powerful melee attack skills. I know somebody. In Twin City there are merchants I know. you go talk to them, they'll sort you out. Got it?");
                                                break;
                                            }
                                        case 40:
                                            {
                                                dialog.Text("The Archer is an expert in Ranged oriental weapons, Ppowerful Ranged attack skills. I know somebody. In Twin City there are merchants I know. you go talk to them, they'll sort you out. Got it?");
                                                break;
                                            }
                                        case 20:
                                            {
                                                dialog.Text("The Warrior is an expert in various oriental weapons, two handed weapons, Sheald and a powerful melee attack skills. I know somebody. In Twin City there are merchants I know. you go talk to them, they'll sort you out. Got it?");
                                                break;
                                            }
                                        case 100:
                                            {
                                                dialog.Text("The Taoist is an expert in various Magic Spells, powerful melee Spells and skills. I know somebody. In Twin City there are merchants I know. you go talk to them, they'll sort you out. Got it?");
                                                break;
                                            }
                                    }
                                    dialog.Option("I see, thanks.", 0);
                                    dialog.Send();
                                    break;
                                }
                        }
                        break;
                    }
                #endregion

                #region VilliageIdiot
                case 10009:
                    {
                        switch (npcRequest.OptionID)
                        {
                            case 0:
                                {
                                    dialog.Text("Hello, new blood! Welcome! It is good that you selected This class!");
                                    dialog.Option("Thank you.", 1);
                                    dialog.Option("Not a chance. Leave me be!", 255);
                                    dialog.Send();
                                    break;
                                }
                            case 1:
                                {
                                    switch (client.Entity.Class)
                                    {
                                        case 10:
                                            {
                                                dialog.Text("Some handy weapons are essential for Trojans. But you'd never do that, Cause your're my friend now, right?");
                                                break;
                                            }
                                        case 40:
                                            {
                                                dialog.Text("Some handy weapons are essential for Archers. But you'd never do that, Cause your're my friend now, right?");
                                                break;
                                            }
                                        case 20:
                                            {
                                                dialog.Text("Some handy weapons are essential for Warriors. But you'd never do that, Cause your're my friend now, right?");
                                                break;
                                            }
                                        case 100:
                                            {
                                                dialog.Text("Some handy weapons are essential for Taoists. But you'd never do that, Cause your're my friend now, right?");
                                                break;
                                            }
                                        case 50:
                                            {
                                                dialog.Text("Some handy weapons are essential for Ninjas. But you'd never do that, Cause your're my friend now, right?");
                                                break;
                                            }
                                    }
                                    dialog.Option("Sure.. I'll be back in my next life.", 255);
                                    dialog.Send();
                                    break;
                                }
                        }
                        break;
                    }
                #endregion

                #region Armorer
                case 10007:
                    {
                        switch (npcRequest.OptionID)
                        {
                            case 0:
                                {
                                    dialog.Text("Armorers swear only to provide the very best in defense.\nWhether it's robes or helmets, we have it all.");
                                    dialog.Option("I see. Where can I find an armorer?", 1);
                                    dialog.Option("Consult others.", 255);
                                    dialog.Send();
                                    break;
                                }
                            case 1:
                                {

                                    dialog.Text("Every city or major settlement has one.\nBut our armors very best from place to place.\nSome armorers have better helms, while others specialize in mail or helms.\n");
                                    dialog.Text("Just to be sure to buy armor without red text in the description.\nYou won't be able to wear those!\n");
                                    dialog.Option("I see. Thanks.", 255);
                                    dialog.Send();
                                    break;

                                }
                        }
                        break;
                    }
                #endregion

                #region Warehouseman
                case 10006:
                    {
                        switch (npcRequest.OptionID)
                        {
                            case 0:
                                {
                                    dialog.Text("Welcome! I run a warehouse in every city.\nYou can store your money and items in my warehouses, and retrieve them for free.");
                                    dialog.Option("Cool. How do I use them?", 1);
                                    dialog.Option("Consult others.", 255);
                                    dialog.Send();
                                    break;
                                }
                            case 1:
                                {

                                    dialog.Text("First, you find my warehouse men in your city..\nClick on him to see your storage box open up.\nTo deposit money, enter the amount in the bank field before clicking Deposit.\n");
                                    dialog.Text("Withdrawing money is the same.\n \nIf you want to put items in your storage space, just drag and drop.\nTaking them out only requires one click.\nAlso, your money is totalled from all warehouses.\n");
                                    dialog.Option("I see. Thanks.", 255);
                                    dialog.Send();
                                    break;
                                }
                        }
                        break;
                    }
                #endregion

                #region Blacksmith
                case 10005:
                    {
                        switch (npcRequest.OptionID)
                        {
                            case 0:
                                {
                                    dialog.Text("We blacksmiths can be found from North to South, East to West.\nWe promise a fine selection of weapons for you to purchase!");
                                    dialog.Option("Tell me more.", 1);
                                    dialog.Option("Consult others.", 255);
                                    dialog.Send();
                                    break;
                                }
                            case 1:
                                {

                                    dialog.Text("Let me tell you how to choose a good weapon.\nHover your mouse pointer over the weapon, check its stats and find a weapon with all white writing.\nIf there's red text, you won't be able to use it.");
                                    dialog.Text("After you buy it, you open your backpack, find the right item and right-click it to equip.\nIt's as easy as that!\n \nOh, and to sell an item, you just drag and drop to my shop!\n");
                                    dialog.Option("What about repairs?", 2);
                                    dialog.Option("Consult others.", 255);
                                    dialog.Send();
                                    break;
                                }
                            case 2:
                                {

                                    dialog.Text("First, unequip the item by double-clicking it in your status window.\nThen find me, click my repair button and click the item.");
                                    dialog.Option("Any other tips?", 3);
                                    dialog.Option("Consult others.", 255);
                                    dialog.Send();
                                    break;
                                }
                            case 3:
                                {

                                    dialog.Text("Yeah, some items are high quality: Normal, Refined, Unique, Elite, Super.\nThat's specialist stuff, only found in the market.\nThat is all. If you have not talked to other NPCs...\nYou had better have a chat with them so that you can learn more.");
                                    dialog.Option("Thanks.", 255);
                                    dialog.Send();
                                    break;
                                }
                        }
                        break;
                    }
                #endregion

                #region GateMan
                case 10010:
                    {
                        switch (npcRequest.OptionID)
                        {
                            case 0:
                                {
                                    dialog.Text("Good day to you" + client.Entity.Name + "! I'm the gateman of the Birth Village.\nIs there any way I can help you?");
                                    dialog.Option("I'm ready to start the adventure.", 1);
                                    dialog.Option("I'm beyond help...", 255);
                                    dialog.Send();
                                    break;
                                }
                            case 1:
                                {
                                    dialog.Text("Welcome to the world of Trinity Conquer Online!\nThe road to becoming a legend is both long and bumpy. You should work very hard to become great! Here is a quest for you. Please take this message to Kungfu Boy in Twin City. You will get a reward for your help.");
                                    dialog.Option("As you wish.", 2);
                                    dialog.Option("I need more advice.", 3);
                                    dialog.Option("I'll stay here for a while.", 255);
                                    dialog.Send();
                                    break;
                                }
                            case 2:
                                {
                                    client.Entity.Teleport(1002, 140, 390);
                                    client.Send(new Message("You've recived a present from the gateman and you agreed to take the message to Kungfu Boy in Twin City for him.", System.Drawing.Color.Green, Message.PopUP));
                                    break;

                                }
                            case 3:
                                {
                                    dialog.Text("You will soon be in Twin City. I advise you not to stray too far from the city gates. Don't leave the Wind Plains until you are truly ready. You wouldn't even cross the river until you've visited");
                                    dialog.Text("the job center for your first promotion. Open your backpack and drag some potion down into the quick slot bar. You will be able to use F1-F10 keys to use things you place in the quick slots. They should help you stay alive.");
                                    dialog.Option("Thanks.", 255);
                                    dialog.Send();
                                    break;
                                }
                        }
                        break;
                    }

                #endregion

                #region OldGeneralYang
                case 425:
                    {
                        switch (npcRequest.OptionID)
                        {
                            case 0:
                                {
                                    dialog.Text("Oh, I so long for the glory of the field, but I'm too old to go back out and deal with these youngsters...\n");
                                    dialog.Text("I see a spark in your eye that reminds me of my younger days... What can I do for you young one?");
                                    dialog.Option("I'm ready for Initiation.", 1);
                                    dialog.Send();
                                    break;
                                }
                            case 1:
                                {
                                    dialog.Text("It would be wise for you to learn alittle more about Conquer before you decide to head out on your own.");
                                    dialog.Option("Fill me in.", 2);
                                    dialog.Send();
                                    break;
                                }
                            case 2:
                                {
                                    dialog.Text("There are two kinds of skills in Conquer.\nOne is the active skills, which are activated through the use of your magic or stamina.");
                                    dialog.Option("And the other?", 3);
                                    dialog.Send();
                                    break;
                                }
                            case 3:
                                {
                                    dialog.Text("The other is known as a passive skill.\nPassive skills will automaticly activate if the situation warrants the passive skills use.");
                                    dialog.Option("Got it!", 4);
                                    dialog.Send();
                                    break;
                                }
                            case 4:
                                {
                                    dialog.Text("Well that is all I can tell you for today. It's time to eat!\nYou can talk to the Village Gateman when you are ready to get started.");
                                    dialog.Option("Okay", 255);
                                    dialog.Send();
                                    break;
                                }
                        }
                        break;
                    }
                #endregion

                #endregion

                #region OUT
                case 9988:
                case 9989:
                case 9990:
                case 9991:
                    {
                        switch (npcRequest.OptionID)
                        {
                            case 0:
                                {
                                    dialog.Text("In exchange of a fee of 500gold, I will teleport you back to the guild war map. Don't bother me if you are poor.");
                                    dialog.Option("Teleport me.", 1);
                                    dialog.Option("I'm too poor.", 255);
                                    dialog.Send();
                                    break;
                                }
                            case 1:
                                {
                                    if (client.Entity.Money >= 500)
                                    {
                                        client.Entity.Money -= 500;
                                        client.Entity.Teleport(1038, 348, 339);
                                    }
                                    break;
                                }
                        }
                        break;
                    }
                #endregion

                #region Warehousemen
                case 8:
                case 10012:
                case 10028:
                case 10011:
                case 10027:
                case 4101:
                case 44:
                    {
                        switch (npcRequest.OptionID)
                        {
                            case 0:
                                {
                                    INpc npc = null;
                                    if (client.Map.Npcs.TryGetValue(client.ActiveNpc, out npc))
                                    {
                                        if (client.WarehousePW == "")
                                            client.Send(new Message("To protect your items that are stored in warehouse, you should set an password at WHSGuardian.", System.Drawing.Color.Maroon, Message.TopLeft));
                                        else
                                        {
                                            if (!client.WarehouseOpen)
                                            {
                                                dialog.Text("Please tell me the password of your warehouse so I can open it. It's like a key, if you don't have it I can't do anything.");
                                                dialog.Input("Here:", 1, 8);
                                                dialog.Option("Nevermind.", 255);
                                                dialog.Send();
                                                return;
                                            }
                                        }
                                        Data data = new Data(true);
                                        data.ID = Data.OpenWindow;
                                        data.UID = client.Entity.UID;
                                        data.TimeStamp = Time32.Now;
                                        data.dwParam = Data.WindowCommands.Warehouse;
                                        data.wParam1 = npc.X;
                                        data.wParam2 = npc.Y;
                                        client.Send(data);
                                    }
                                    break;
                                }
                            case 1:
                                {
                                    if (client.WarehouseOpenTries < 3)
                                    {
                                        client.WarehouseOpenTries++;
                                        if (npcRequest.Input == client.WarehousePW)
                                        {
                                            INpc npc = null;
                                            if (client.Map.Npcs.TryGetValue(client.ActiveNpc, out npc))
                                            {
                                                client.WarehouseOpen = true;
                                                Data data = new Data(true);
                                                data.ID = Data.OpenWindow;
                                                data.UID = client.Entity.UID;
                                                data.TimeStamp = Time32.Now;
                                                data.dwParam = 4;
                                                data.wParam1 = npc.X;
                                                data.wParam2 = npc.Y;
                                                client.Send(data);
                                            }
                                        }
                                        else
                                        {
                                            dialog.Text("Wrong password. Tries left: " + client.WarehouseOpenTries + ". Try again?");
                                            dialog.Input("Here:", 1, 8);
                                            dialog.Option("Alright.", 255);
                                            dialog.Send();
                                        }
                                    }
                                    else
                                    {
                                        dialog.Text("You can try no more to open your warehouse. Come back later.");
                                        dialog.Option("Nevermind.", 255);
                                        dialog.Send();
                                    }
                                    break;
                                }
                        }
                        break;
                    }
                #endregion

                #region Boxers
                case 180:
                    {
                        switch (npcRequest.OptionID)
                        {
                            case 0:
                                {
                                    dialog.Text("If you want to leave just tell me when you are ready. It's free.\nYou will be teleported to the city you were in before coming here.");
                                    dialog.Option("I'm ready.", 1);
                                    dialog.Option("Wait a minute.", 255);
                                    dialog.Send();
                                    break;
                                }
                            case 1:
                                {
                                    int PrevMap = client.Entity.PreviousMapID;
                                    switch (PrevMap)
                                    {
                                        default:
                                            {
                                                client.Entity.Teleport(1002, 429, 378);
                                                break;
                                            }
                                        case 1000:
                                            {
                                                client.Entity.Teleport(1000, 500, 650);
                                                break;
                                            }
                                        case 1020:
                                            {
                                                client.Entity.Teleport(1020, 565, 562);
                                                break;
                                            }
                                        case 1011:
                                            {
                                                client.Entity.Teleport(1011, 188, 264);
                                                break;
                                            }
                                        case 1015:
                                            {
                                                client.Entity.Teleport(1015, 717, 571);
                                                break;
                                            }
                                    }
                                    break;
                                }
                        }
                        break;
                    }
                case 181:
                case 182:
                case 183:
                case 184:
                case 185:
                    {
                        switch (npcRequest.OptionID)
                        {
                            case 0:
                                {
                                    dialog.Text("Hello " + client.Entity.Name + ", if your level is higher than 19, I can send you to a training ground in exchange of 1000 silvers. Be aware of the fact that you can't attack dumes with level higher than yours.");
                                    dialog.Option("Alright, let me in.", 1);
                                    dialog.Option("Nevermind", 255);
                                    dialog.Send();
                                    break;
                                }
                            case 1:
                                {
                                    if (client.Entity.Level >= 20)
                                    {
                                        if (client.Entity.Money >= 1000)
                                        {
                                            client.Entity.Money -= 1000;
                                            client.Entity.Teleport(1039, 216, 214);
                                        }
                                        else
                                        {
                                            dialog.Text("You do not have 1000 silvers.");
                                            dialog.Option("Aww!", 255);
                                            dialog.Send();
                                        }
                                    }
                                    else
                                    {
                                        dialog.Text("Your level is not high enough.");
                                        dialog.Option("Aww!", 255);
                                        dialog.Send();
                                    }
                                    break;
                                }
                        }
                        break;
                    }
                #endregion

                #region Guild War

                #region Jail warden
                case 140:
                    {
                        switch (npcRequest.OptionID)
                        {
                            case 0:
                                {
                                    if (Conquer_Online_Server.Game.ConquerStructures.Society.GuildWar.IsWar)
                                    {
                                        if (Time32.Now <= Conquer_Online_Server.Game.ConquerStructures.Society.GuildWar.LastWin.AddMinutes(5))
                                        {
                                            dialog.Text("My friend, you may leave if you want.");
                                            dialog.Option("Yes please.", 1);
                                            dialog.Option("No need...", 255);
                                            dialog.Send();

                                        }
                                        else
                                        {
                                            dialog.Text("You lost your change. Now wait for the next pardon!");
                                            dialog.Option("No!!!", 255);
                                            dialog.Send();
                                        }
                                    }
                                    else
                                    {
                                        dialog.Text("My friend, you may leave if you want.");
                                        dialog.Option("Yes please.", 1);
                                        dialog.Option("No need...", 255);
                                        dialog.Send();
                                    }
                                    break;
                                }
                            case 1:
                                {
                                    if (Conquer_Online_Server.Game.ConquerStructures.Society.GuildWar.IsWar)
                                    {
                                        if (Time32.Now <= Conquer_Online_Server.Game.ConquerStructures.Society.GuildWar.LastWin.AddMinutes(5))
                                        {
                                            client.Entity.Teleport(1002, 430, 380);
                                        }
                                        else
                                        {
                                            dialog.Text("You lost your change. Now wait for the next pardon!");
                                            dialog.Option("No!!!", 255);
                                            dialog.Send();
                                        }
                                    }
                                    else
                                    {
                                        client.Entity.Teleport(1002, 430, 380);
                                    }
                                    break;
                                }
                        }
                        break;
                    }
                #endregion

                #region Light up runes
                case 4452:
                    {
                        switch (npcRequest.OptionID)
                        {
                            case 0:
                                {
                                    dialog.Text("Hello friend, as you might know, while guild war, you can light up some runes and after guild war is over, you can come to me and I will give you experience in exchange of your rune.");
                                    dialog.Text("Once guild war starts, come to me and ask for a rune, and you will receive it. If you lose it, you can come back and reclaim it, but you will start from level 1 once again.");
                                    dialog.Option("Give me a rune.", 1);
                                    dialog.Option("Claim experience.", 2);
                                    dialog.Option("Nothing.", 255);
                                    dialog.Send();
                                    break;
                                }
                            case 1:
                                {
                                    if (GuildWar.IsWar)
                                    {
                                        for (int c = 0; c <= 10; c++)
                                        {
                                            if (client.Inventory.Contains((uint)(729960 + c), 1))
                                            {
                                                dialog.Text("You already have a rune.");
                                                dialog.Option("Thank you.", 255);
                                                dialog.Send();
                                                return;
                                            }
                                        }
                                        if (client.Inventory.Add(729960, 0, 1))
                                        {
                                            dialog.Text("Go, and light up this rune.");
                                            dialog.Option("Thank you.", 255);
                                            dialog.Send();
                                        }
                                        else
                                        {
                                            dialog.Text("There is not enough room in your inventory.");
                                            dialog.Option("Ah, hold on.", 255);
                                            dialog.Send();
                                        }
                                    }
                                    else
                                    {
                                        dialog.Text("I cannot give you a rune now.");
                                        dialog.Option("Ahh.", 255);
                                        dialog.Send();
                                    }
                                    break;
                                }
                            case 2:
                                {
                                    if (!GuildWar.IsWar)
                                    {
                                        for (int c = 0; c <= 10; c++)
                                        {
                                            if (client.Inventory.Contains((uint)(729960 + c), 1))
                                            {
                                                int expballs = c;
                                                if (729960 + c == 729970)
                                                    expballs += 2;

                                                for (int ex = 0; ex < expballs; ex++)
                                                    client.IncreaseExperience(client.ExpBall, false);
                                                client.Inventory.Remove((uint)(729960 + c), 1);
                                                return;
                                            }
                                        }
                                        dialog.Text("You cannot claim experience if you don't have a rune.");
                                        dialog.Option("Ahh.", 255);
                                        dialog.Send();
                                    }
                                    else
                                    {

                                    }
                                    {
                                        dialog.Text("You cannot claim experience while guild war.");
                                        dialog.Option("Ahh.", 255);
                                        dialog.Send();
                                    }
                                    break;
                                }
                        }
                        break;
                    }
                case 4453:
                case 4454:
                case 4455:
                case 4456:
                case 4457:
                case 4458:
                case 4459:
                case 4460:
                case 4461:
                    {
                        dialog.Avatar(0);
                        uint takeFlame = 725507 + client.ActiveNpc;
                        uint addFlame = 725507 + client.ActiveNpc + 1;
                        if (GuildWar.IsWar)
                        {
                            if (client.Inventory.Contains(takeFlame, 1))
                            {
                                client.Inventory.Remove(takeFlame, 1);
                                client.Inventory.Add(addFlame, 0, 1);
                                dialog.Text("Well done! Next rune is number " + (client.ActiveNpc - 4451) + ".");
                                dialog.Send();
                            }
                            else
                            {
                                dialog.Text("You cannot flame up this stone without the proper rune.");
                                dialog.Send();
                            }
                        }
                        else
                        {
                            dialog.Text("You cannot flame up a rune if guild war is not on.");
                            dialog.Send();
                        }
                        break;
                    }
                case 4462:
                    {
                        dialog.Avatar(0);
                        uint takeFlame = 725507 + client.ActiveNpc;
                        uint addFlame = 725507 + client.ActiveNpc + 1;
                        if (GuildWar.IsWar)
                        {
                            if (GuildWar.Flame10th)
                            {
                                if (client.Inventory.Contains(takeFlame, 1))
                                {
                                    client.Inventory.Remove(takeFlame, 1);
                                    client.Inventory.Add(addFlame, 0, 1);
                                    dialog.Text("Well done! Nothing left to light up. Congratulations!");
                                    dialog.Send();
                                }
                                else
                                {
                                    dialog.Text("You cannot flame up this stone without the proper rune.");
                                    dialog.Send();
                                }
                            }
                            else
                            {
                                dialog.Text("It's not the right time to flame up this rune.");
                                dialog.Send();
                            }
                        }
                    }
                    break;
                #endregion

                #endregion

                #region OfflineTG
                case 3836:
                    {
                        OfflineTGStats sts = new OfflineTGStats(true);
                        var T1 = new TimeSpan(DateTime.Now.Ticks);
                        var T2 = new TimeSpan(client.OfflineTGEnterTime.Ticks);
                        ushort minutes = (ushort)(T1.TotalMinutes - T2.TotalMinutes);
                        minutes = (ushort)Math.Min((ushort)900, minutes);
                        sts.TotalTrainingMinutesLeft = (ushort)(900 - minutes);
                        sts.TrainedMinutes = minutes;
                        ulong exp = client.Entity.Experience;
                        byte level = client.Entity.Level;
                        double expballGain = (double)300 * (double)minutes / (double)900;
                        while (expballGain >= 100)
                        {
                            expballGain -= 100;
                            exp += client.ExpBall;
                        }
                        if (expballGain != 0)
                            exp += (uint)(client.ExpBall * (expballGain / 100));

                        while (exp >= Conquer_Online_Server.Database.DataHolder.LevelExperience(level))
                        {
                            exp -= Conquer_Online_Server.Database.DataHolder.LevelExperience(level);
                            level++;
                        }
                        double percent = (double)exp * (double)100 / (double)Conquer_Online_Server.Database.DataHolder.LevelExperience(level);

                        sts.Character_NewExp = (ulong)(percent * 100000);
                        sts.Character_AcquiredLevel = level;
                        sts.Send(client);
                        break;
                    }
                #endregion

                #region Adventure Zone
                #region Adv zone teleporter
                case 300655:
                    {
                        switch (npcRequest.OptionID)
                        {
                            case 0:
                                {
                                    dialog.Text("I have just discovered a new place, where the turtle doves are so big, that they drop awesome items when they die. It's free, do you want to see it?");
                                    dialog.Option("Yes please.", 1);
                                    dialog.Option("No thank you.", 255);
                                    dialog.Send();
                                    break;
                                }
                            case 1:
                                {
                                    client.Entity.Teleport(1210, 1029, 714);
                                    break;
                                }
                        }
                        break;
                    }
                #endregion
                #region Adv zone mine supervisor
                case 300652:
                    {
                        switch (npcRequest.OptionID)
                        {
                            case 0:
                                {
                                    dialog.Text("In this mine, the minerals are very good. They are really expensive, would you like to enter?");
                                    dialog.Option("Yes please.", 1);
                                    dialog.Option("No thank you.", 255);
                                    dialog.Send();
                                    break;
                                }
                            case 1:
                                {
                                    client.Entity.Teleport(1218, 30, 69);
                                    break;
                                }
                        }
                        break;
                    }
                #endregion
                #region Grandpa
                case 300653:
                    {
                        switch (npcRequest.OptionID)
                        {
                            case 0:
                                {
                                    dialog.Text("Would you like to advance?");
                                    dialog.Option("Yes.", 1);
                                    dialog.Option("No.", 255);
                                    dialog.Send();
                                    break;
                                }
                            case 1:
                                {
                                    client.Entity.Teleport(1219, 448, 272);
                                    break;
                                }
                        }
                        break;
                    }
                #endregion
                #region Boatman
                case 300654:
                    {
                        switch (npcRequest.OptionID)
                        {
                            case 0:
                                {
                                    dialog.Text("Would you like to go in TwinCity?");
                                    dialog.Option("Yes.", 1);
                                    dialog.Option("No.", 255);
                                    dialog.Send();
                                    break;
                                }
                            case 1:
                                {
                                    client.Entity.Teleport(1002, 430, 380);
                                    break;
                                }
                        }
                        break;
                    }
                #endregion
                #endregion

                default:
                    {
                        if (client.Account.State == Conquer_Online_Server.Database.AccountTable.AccountState.GameMaster || client.Account.State == Conquer_Online_Server.Database.AccountTable.AccountState.ProjectManager)
                            client.Send(new Message("NpcID[" + client.ActiveNpc + "]", System.Drawing.Color.Red, Message.TopLeft));
                        break;
                    }
            }

            if (!dialog.Sent)
                if (dialog.Replies.Count > 1)
                    dialog.Send();
        }