منتدي اكواد

منتدي اكواد (https://code.vpscairo.com/index.php)
-   تطوير سيرفرات كونكر (https://code.vpscairo.com/forumdisplay.php?f=11)
-   -   الارينا سي بي اس واحد ضد واحد 100% كامله (https://code.vpscairo.com/showthread.php?t=199)

محمد ياسر 2019-04-25 11:49 AM

الارينا سي بي اس واحد ضد واحد 100% كامله
 

اقدملكو الارينا سي بي اس كاملة ومجربة 100% ومفهاش اي غلطات ان شاء الله

نخش في الموضوع

اولا هتخش npc.cs تضيف الانبسي دة

كود PHP:

   #region Arenacps   
                
case 53360:   
                    switch (
npcRequest.OptionID)   
                    {   
                        case 
0:   
                            
dialogs.****("Hello " + client.Entity.**** + " This Is Cps Arena U Can Play With ur Friends in PVP ");   
                            
dialogs.****("Sign up and enter Ur Frient **** And How much u wont to Play Cps");   
                            
dialogs.****("When he accpet u will go arena ");   
                            
dialogs.Option("Sign me up.", 1);   
                            
dialogs.Option("Later.", 0xff);   
                            
dialogs.Send();   
                            return;   

                        case 
1:   
                            if (
client.Entity.ConquerPoints < 0x186a0)   
                            {   
                                break;   
                            }   
                            
dialogs.****("If you want to sign up from the Arena CPs select your option.");   
                            
//  dialogs.Option("General sign up.", 2);   
                            
dialogs.Option("Bring my friend.", 5);   
                            
dialogs.Send();   
                            return;   

                        case 
2:   
                            if (
client.Entity.ConquerPoints < 10000)   
                            {   
                                
dialogs.****("Sorry, You don't have enough CPs.");   
                                
dialogs.Option("Sorry.", 0xff);   
                                
dialogs.Send();   
                                return;   
                            }   
                            if (
Kernel.GeneralArenaCPs.ContainsKey(client.Entity.UID))   
                            {   
                                
dialogs.****("You already signed up, Do you want to sign out ?");   
                                
dialogs.Option("Yes please.", 3);   
                                
dialogs.Option("No, Thanks.", 0xff);   
                                
dialogs.Send();   
                                return;   
                            }   
                            if (
Kernel.BringArenaCPs.ContainsKey(client.Entity.UID))   
                            {   
                                
dialogs.****("You can't sign up here, You are signed up at bring your friend arena CPs,You can sign up here after you signing out from bring your friend.");   
                                
dialogs.Option("OK, Sorry.", 0xff);   
                                
dialogs.Send();   
                                return;   
                            }   
                            
client.Entity.SignedAtGeneralArenaCPs = true;   
                            
client.Entity.GeneralArenaCPsStatus = Enums.ArenaCPsSignUpStatusIDs.WaitingInvite;   
                            
Kernel.GeneralArenaCPs.Add(client.Entity.UID, client);   
                            
dialogs.****("You are now in waiting, please wait few minutes or few seconds when anyone sign up to play with him.");   
                            
dialogs.Option("OK, I'm waiting.", 0xff);   
                            
dialogs.Send();   
                            return;   

                        case 
3:   
                            if (!
Kernel.GeneralArenaCPs.ContainsKey(client.Entity.UID))   
                            {   
                                
dialogs.****("You are not signed up in arena CPs.");   
                                
dialogs.Option("Sorry.", 0xff);   
                                
dialogs.Send();   
                                return;   
                            }   
                            
Kernel.GeneralArenaCPs.Remove(client.Entity.UID);   
                            
client.Entity.SignedAtGeneralArenaCPs = false;   
                            return;   

                        case 
4:   
                            return;   

                        case 
5:   
                            if (
client.Entity.ConquerPoints < 0x186a0)   
                            {   
                                
dialogs.****("You are not signed up in arena CPs.");   
                                
dialogs.Option("Sorry.", 0xff);   
                                
dialogs.Send();   
                            }   
                            if (
Kernel.BringArenaCPs.ContainsKey(client.Entity.UID))   
                            {   
                                
dialogs.****("You already signed up, Do you want to sign out ?");   
                                
dialogs.Option("Yes please.", 6);   
                                
dialogs.Option("No, Thanks.", 0xff);   
                                
dialogs.Send();   
                                return;   
                            }   
                            if (
Kernel.GeneralArenaCPs.ContainsKey(client.Entity.UID))   
                            {   
                                
dialogs.****("You can't sign up here, You are signed up at bring my friend arena CPs, You can sign up here after you signing out from bring my friend arena.");   
                                
dialogs.Option("OK, Sorry.", 0xff);   
                                
dialogs.Send();   
                            }   
                            
dialogs.****("Please write your CPs value you want to play.");   
                            
dialogs.Input("CPs Value", 7, 0x10);   
                            
dialogs.Option("Exit.", 0xff);   
                            
dialogs.Send();   
                            return;   

                        case 
6:   
                            if (!
Kernel.BringArenaCPs.ContainsKey(client.Entity.UID))   
                            {   
                                
dialogs.****("You are not signed up in arena CPs.");   
                                
dialogs.Option("Sorry.", 0xff);   
                                
dialogs.Send();   
                            }   
                            
Kernel.BringArenaCPs.Remove(client.Entity.UID);   
                            
client.Entity.SignedAtBringArenaCPs = false;   
                            return;   

                        case 
7:   
                            try   
                            {   
                                
string input = npcRequest.Input;   
                                
uint num3 = Convert.ToUInt32(npcRequest.Input);   
                                if ((
client.Entity.ConquerPoints >= num3) && (num3 >= 0x186a0))   
                                {   
                                    
client.Entity.SignedAtBringArenaCPsValue = num3;   
                                    
dialogs.****("Are you sure? you want to play for " + num3 + " ?");   
                                    
dialogs.Option("Yea, Sure", 8);   
                                    
dialogs.Option("No, Sorry.", 0xff);   
                                    
dialogs.Send();   
                                }   
                                else   
                                {   
                                    
dialogs.****("You don't have " + num3 + " CPs.");   
                                    
dialogs.Option("Sorry.", 0xff);   
                                    
dialogs.Send();   
                                }   
                            }   
                            catch   
                            {   
                                
dialogs.****("Please write the correct value.");   
                                
dialogs.Option("Try Again.", 5);   
                                
dialogs.Option("Quit.", 0xff);   
                                
dialogs.Send();   
                            }   
                            return;   

                        case 
8:   
                            
dialogs.****("Please write your friend **** to play with him.");   
                            
dialogs.Input("Friend ****", 9, 0x10);   
                            
dialogs.Option("Exit.", 0xff);   
                            
dialogs.Send();   
                            return;   

                        case 
9:   
                            {   
                                
string str = client.Entity.SignedAtBringArenaPlayWithSelectPlayer = npcRequest.Input;   
                                if (
client.Entity.**** == client.Entity.SignedAtBringArenaPlayWithSelectPlayer)   
                                {   
                                    
dialogs.****("This is your ****! try again");   
                                    
dialogs.Option("Try Again.", 5);   
                                    
dialogs.Option("No, Thanks.", 0xff);   
                                    
dialogs.Send();   
                                }   
                                else   
                                {   
                                    
MySqlReader reader = new MySqlReader(new MySqlCommand(MySqlCommandType.SELECT).Select("entities").Where("****", client.Entity.SignedAtBringArenaPlayWithSelectPlayer));   
                                    if (
reader.Read())   
                                    {   
                                        
MySqlCommand command = new MySqlCommand(MySqlCommandType.SELECT);   
                                        
command.Select("entities").Where("****", str);   
                                        
MySqlReader reader2 = new MySqlReader(command);   
                                        if (
reader2.Read())   
                                        {   
                                            
uint uID = reader2.ReadUInt32("UID");   
                                            
Conquer_Online_Server.Game.Tour****nts.ArenaCPs.Start(client, dialogs, str, uID);   
                                        }   
                                        else   
                                        {   
                                            
dialogs.****("Sorry, this player may be offline or not found 0. " + str);   
                                            
dialogs.Option("Sorry.", 0xff);   
                                            
dialogs.Send();   
                                        }   
                                        
reader2.Close();   
                                    }   
                                    
reader.Close();   
                                }   
                                return;   
                            }   
                    }   
                    return; 

بعدين هتخش Network/PacketHandler.cs تدور علي دة
كود PHP:

if ((((client.Map.****ID != 0x1771) && (client.Map.****ID != 0x1770)) && (!client.Entity.Dead && (request.OptionID == 0xee))) && (client.Map.****ID != 700))   
                            {   
                                
client.Entity.Teleport(0x3ea, 0x1b9, 0x160);   
                            } 

وتضيف دة تحت اخر القوس
كود PHP:

#region Cps Arena   
                            
if (request.OptionID == 251)   
                            {   


                                
string signedAtBringArenaPlayWithSelectPlayer = client.Entity.SignedAtBringArenaPlayWithSelectPlayer;   
                                
Data****.MySqlReader mySqlReader = new Data****.MySqlReader(new Data****.MySqlCommand(Conquer_Online_Server.Data****.MySqlCommandType.SELECT).Select("entities").Where("****", signedAtBringArenaPlayWithSelectPlayer));   
                                if (
mySqlReader.Read())   
                                {   
                                    
Data****.MySqlCommand mySqlCommand2 = new Data****.MySqlCommand(Conquer_Online_Server.Data****.MySqlCommandType.SELECT);   
                                    
mySqlCommand2.Select("entities").Where("****", signedAtBringArenaPlayWithSelectPlayer);   
                                    
Conquer_Online_Server.Data****.MySqlReader mySqlReader2 = new Conquer_Online_Server.Data****.MySqlReader(mySqlCommand2);   
                                    if (
mySqlReader2.Read())   
                                    {   
                                        
uint uID = mySqlReader2.ReadUInt32("UID");   
                                        
Conquer_Online_Server.Game.Tour****nts.ArenaCPs.StartByAnvite(client, signedAtBringArenaPlayWithSelectPlayer, uID);   
                                    }   
                                    else   
                                    {   
                                        
client.Send(new Network.GamePackets.Message("Sorry, this player may be offline or not found 7." + client.Entity.SignedAtBringArenaPlayWith + " ", Color.Blue, 2000u));   
                                    }   
                                    
mySqlReader2.Close();   
                                    
mySqlReader.Close();   
                                    return;   
                                }   
                                
client.Send(new Network.GamePackets.Message("Sorry, this player may be offline or not found 14." + client.Entity.SignedAtBringArenaPlayWith + " ", Color.Blue, 2000u));   
                                
mySqlReader.Close();   
                                return;   
                            }   

                            
#endregion 

بعدين تخش Game/Entity.cs تضيف دة
كود PHP:

public bool SignedAtGeneralArenaCPs;   
        public 
Enums.ArenaCPsSignUpStatusIDs GeneralArenaCPsStatus;   
        public 
uint SignedAtBringArenaCPsValue;   
        public 
string SignedAtBringArenaPlayWith   
        
public int GeneralArenaCPsInviteTime;   
        public 
Time32 GeneralArenaCPsInviteTimes;   
        public 
bool InTeamArenaorArena;   
        public 
uint ArenaCPs_PlayWith;   
        public 
bool SignedAtBringArenaCPs;   
        public 
string SignedAtBringArenaPlayWithSelectPlayer;   
        public 
bool InArenaCPsMatch; 

بعدين Game/Enums.cs تضيف دول
كود PHP:

public enum ArenaIDs : uint   
        
{   
            
QualifierList = 6,   
            
ShowPlayerRankList = 10   
        
}   

        public 
enum ArenaSignUpIDs : uint   
        
{   
            
Dialog = 10,   
            
DoTheStuff = 8,   
            
ShowQuitButton = 0,   
            
SignUp = 6,   
            
StartCountDown = 2   
        
}   

        public 
enum ArenaSignUpStatusIDs : uint   
        
{   
            
NotSignedUp = 0,   
            
WaitingForOpponent = 1,   
            
WaitingInactive = 2   
        
} 

بعدين خش Game\Tour****nts انشيء ملف بأسم

ArenaCps.cs

وتضيف دة بعد اسم الكلاس
كود PHP:

Conquer_Online_Server.Game.Tour****nts   
{   
    
using Conquer_Online_Server;   
    
using Conquer_Online_Server.Client;   
    
using Conquer_Online_Server.Data****;   
    
using Conquer_Online_Server.Game;   
    
using Conquer_Online_Server.Network.GamePackets;   
    
using Conquer_Online_Server.Server****;   
    
using System;   
    
using System.Drawing;   
    
using NpcDialogs;   

    public class 
ArenaCPs   
    
{   
        public static 
void ArenaCPsSystem_Execute()   
        {   
            
Time32 now = Time32.Now;   
            
GameState[] array = new GameState[Kernel.GeneralArenaCPs.Count + 2];   
            
Kernel.GeneralArenaCPs.Values.CopyTo(array, 0);   
            if (array.
Length >= 2)   
            {   
                for (
int i = 0; i < array.Length; i++)   
                {   
                    
GameState state = array[i];   
                    if ((((((
state != null) && (state.Entity != null)) && (!Constants.PKFreeMaps.Contains(state.Map.ID) && !state.InArenaMatch)) && (!state.Entity.InTeamArenaMap)) && (((state.ArenaStatistic == null) || ((state.ArenaStatistic.Status == 0))))))   
                    {   
                        for (
int j = i + 1; j < array.Length; j++)   
                        {   
                            
GameState state2 = array[j];   
                            if ((((((
state2 != null) && (state2.Entity != null)) && (!Constants.PKFreeMaps.Contains(state2.Map.ID) && !state2.InArenaMatch)) && ((!state.Entity.InArenaCPsMatch && !state2.Entity.InArenaCPsMatch) && (!state2.Entity.InTeamArenaMap))) && (((state2.ArenaStatistic == null)) || ((state2.ArenaStatistic.Status == 0)))))   
                            {   
                                if ((
state2.Entity.GeneralArenaCPsStatus == Enums.ArenaCPsSignUpStatusIDs.WaitingForOpponent) && (state.Entity.GeneralArenaCPsStatus == Enums.ArenaCPsSignUpStatusIDs.WaitingForOpponent))   
                                {   
                                    
state.Entity.ConquerPoints -= state.Entity.SignedAtBringArenaCPsValue;   
                                    
state2.Entity.ConquerPoints -= state2.Entity.SignedAtBringArenaCPsValue;   
                                    
state.Entity.GeneralArenaCPsStatus = Enums.ArenaCPsSignUpStatusIDs.WaitingInactive;   
                                    
state2.Entity.GeneralArenaCPsStatus = Enums.ArenaCPsSignUpStatusIDs.WaitingInactive;   
                                    
state.Entity.ArenaCPs_PlayWith = state2.Account.EntityID;   
                                    
state2.Entity.ArenaCPs_PlayWith = state.Account.EntityID;   
                                    
state.Entity.InArenaCPsMatch = true;   
                                    
state2.Entity.InArenaCPsMatch = true;   
                                    if (!
Kernel.Maps.ContainsKey(700))   
                                    {   
                                        new 
Map(700, DMaps.MapPaths[700]);   
                                    }   
                                    
Map map = Kernel.Maps[700];   
                                    
Map map2 = map.MakeDynamicMap();   
                                    
state.Entity.Teleport(map.ID, map2.ID, (ushort)Kernel.Random.Next(0x23, 70), (ushort)Kernel.Random.Next(0x23, 70));   
                                    
state2.Entity.Teleport(map.ID, map2.ID, (ushort)Kernel.Random.Next(0x23, 70), (ushort)Kernel.Random.Next(0x23, 70));   
                                    
state.Entity.PKMode = Enums.PKMode.PK;   
                                    
Data buffer = new Data(true)   
                                    {   
                                        
UID = state.Entity.UID,   
                                        
ID = 0x60,   
                                        
dwParam = (uint)state.Entity.PKMode   
                                    
};   
                                    
state.Send(buffer);   
                                    
state2.Entity.PKMode = Enums.PKMode.PK;   
                                    
Data data2 = new Data(true)   
                                    {   
                                        
UID = state2.Entity.UID,   
                                        
ID = 0x60,   
                                        
dwParam = (uint)state2.Entity.PKMode   
                                    
};   
                                    
state2.Send(data2);   
                                    
state.Entity.Ressurect();   
                                    
state2.Entity.Ressurect();   
                                }   
                                else if ((
state2.Entity.GeneralArenaCPsStatus == Enums.ArenaCPsSignUpStatusIDs.WaitingInvite) && (state.Entity.GeneralArenaCPsStatus == Enums.ArenaCPsSignUpStatusIDs.WaitingInvite))   
                                {   
                                    if (
state.Entity.GeneralArenaCPsInviteTime >= 30)   
                                    {   
                                        
state.Send(new Message("You have " + state2.Entity.****, System.Drawing.Color.Red, 0x835));   
                                    }   
                                    else   
                                    {   
                                        
state.Entity.GeneralArenaCPsInviteTime++;   
                                        
state.Send(new Message("You have " + state2.Entity.****, System.Drawing.Color.Red, 0x835));   
                                    }   
                                    if (
state2.Entity.GeneralArenaCPsInviteTime < 30)   
                                    {   
                                        
state2.Send(new Message(string.Concat(new object[] { "You have ", state2.Entity.GeneralArenaCPsInviteTime, " second(s) to enter the general arena CPs with ", state.Entity.**** }), System.Drawing.Color.Red, 0x835));   
                                    }   
                                }   
                            }   
                        }   
                    }   
                }   
            }   
        }   

        public static 
void FenishRound(Entity Killer, Entity Killed)   
        {   
            if (((
Killer != null) && (Killed != null)) && (Killer.SignedAtBringArenaCPs && Killed.SignedAtBringArenaCPs))   
            {   
                
Killer.Teleport(0x3ea, 0x1ad, 0x17a);   
                
Killed.Teleport(0x3ea, 0x1ad, 0x17a);   
                
Killer.ConquerPoints += Killer.SignedAtBringArenaCPsValue + Killed.SignedAtBringArenaCPsValue;   
                
Killer.RemoveFlag(0L);   
                
Killed.RemoveFlag(0L);   
                
Kernel.BringArenaCPs.Remove(Killer.UID);   
                
Kernel.BringArenaCPs.Remove(Killed.UID);   
                
_String str = new _String(true)   
                {   
                    
UID = Killed.UID,   
                    
Type = 10,   
                    ****
sCount = 1   
                
};   
                
str.****s.Add("jtwmy");   
                
Killer.Owner.SendScreen(str.ToArray(), true);   
                
_String str2 = new _String(true)   
                {   
                    
UID = Killed.UID,   
                    
Type = 10,   
                    ****
sCount = 1   
                
};   
                
str2.****s.Add("hssmy");   
                
Killed.Owner.SendScreen(str2.ToArray(), true);   
                
Killer.SignedAtBringArenaCPs = false;   
                
Killer.SignedAtBringArenaCPsValue = 0;   
                
Killer.SignedAtBringArenaPlayWith = null;   
                
Killer.SignedAtGeneralArenaCPs = false;   
                
Killed.SignedAtBringArenaCPs = false;   
                
Killed.SignedAtBringArenaCPsValue = 0;   
                
Killed.SignedAtBringArenaPlayWith = null;   
                
Killed.SignedAtGeneralArenaCPs = false;   
            }   
        }   

        public static 
void Start(GameState client, Conquer_Online_Server.Dialogs dialog, string Player****, uint UID)   
        {   
            if (
Kernel.GamePool[UID] != null)   
            {   
                
GameState state = Kernel.GamePool[UID];   
                if (
state == null)   
                {   
                    
dialog.****("Sorry, this player may be offline or not found 2. " + Player****);   
                    
dialog.Option("Sorry.", 0xff);   
                    
dialog.Send();   
                }   
                else if (
state.Entity.**** == client.Entity.SignedAtBringArenaPlayWithSelectPlayer)   
                {   
                    
dialog.****("Your message has been sent, Please wait...");   
                    
dialog.Option("OK, Thanks.", 0xff);   
                    
dialog.Send();   
                    if (
state.Entity.ConquerPoints >= client.Entity.SignedAtBringArenaCPsValue)   
                    {   

                        {   
                            if (!
state.Entity.InTeamArenaorArena)   
                            {   
                                if ((
state.WatchingGroup == null))   
                                {   
                                    if (!
state.Entity.SignedAtBringArenaCPs)   
                                    {   
                                        
state.Entity.SignedAtBringArenaCPsValue = client.Entity.SignedAtBringArenaCPsValue;   
                                        
client.Entity.SignedAtBringArenaPlayWith = Player****;   
                                        
state.Entity.SignedAtBringArenaPlayWith = client.Entity.****;   
                                        
state.Send(new NpcReply(6, string.Concat(new object[] { "This player want to play with you by CPs, Do you want to play with ", client.Entity.****, " for + ", client.Entity.SignedAtBringArenaCPsValue, " CPs ?" })) { OptionID = 251 }.ToArray());   
                                    }   
                                    else   
                                    {   
                                        
dialog.****(Player**** + " already play with someone.");   
                                        
dialog.Option("OK, Sorry.", 0xff);   
                                        
dialog.Send();   
                                    }   
                                }   
                                else   
                                {   
                                    
dialog.****("Sorry, " + Player**** + " watching in arena or team arena and you can't play with him now!");   
                                    
dialog.Option("OK, Sorry.", 0xff);   
                                    
dialog.Send();   
                                }   
                            }   
                            else   
                            {   
                                
dialog.****("Sorry, " + Player**** + " signed up in arena or team arena and you can't play with him now!");   
                                
dialog.Option("OK, Sorry.", 0xff);   
                                
dialog.Send();   
                            }   
                        }   

                    }   
                    else   
                    {   
                        
dialog.****(string.Concat(new object[] { "Sorry, ", Player****, " don't have ", client.Entity.SignedAtBringArenaCPsValue, " CPs." }));   
                        
dialog.Option("OK, Sorry.", 0xff);   
                        
dialog.Send();   
                    }   
                }   
                else   
                {   
                    
dialog.****("Sorry, this player may be offline or not found 1. " + Player****);   
                    
dialog.Option("Sorry.", 0xff);   
                    
dialog.Send();   
                }   
            }   
        }   

        public static 
void StartByAnvite(GameState client, string Player****, uint uID)   
        {   
            if (
Kernel.GamePool[uID] != null)   
            {   
                
GameState state = Kernel.GamePool[uID];   
                if (
state.Entity.**** == client.Entity.SignedAtBringArenaPlayWith)   
                {   

                    {   
                        if (!
client.Entity.InTeamArenaorArena)   
                        {   
                            if ((
client.WatchingGroup == null))   
                            {   
                                if (!
client.Entity.SignedAtBringArenaCPs)   
                                {   
                                    if (
client.Entity.ConquerPoints >= state.Entity.SignedAtBringArenaCPsValue)   
                                    {   
                                        if (
state.Entity.ConquerPoints >= state.Entity.SignedAtBringArenaCPsValue)   
                                        {   
                                            
client.Entity.ConquerPoints -= client.Entity.SignedAtBringArenaCPsValue;   
                                            
state.Entity.ConquerPoints -= state.Entity.SignedAtBringArenaCPsValue;   
                                            
client.Entity.SignedAtBringArenaPlayWith = state.Entity.****;   
                                            
state.Entity.SignedAtBringArenaPlayWith = client.Entity.****;   
                                            
client.Entity.SignedAtBringArenaCPs = true;   
                                            
state.Entity.SignedAtBringArenaCPs = true;   
                                            if (!
Kernel.Maps.ContainsKey(700))   
                                            {   
                                                new 
Map(700, DMaps.MapPaths[700]);   
                                            }   
                                            
Map map = Kernel.Maps[700];   
                                            
Map map2 = map.MakeDynamicMap();   
                                            
client.Entity.Teleport(map.ID, map2.ID, (ushort)Kernel.Random.Next(0x23, 70), (ushort)Kernel.Random.Next(0x23, 70));   
                                            
state.Entity.Teleport(map.ID, map2.ID, (ushort)Kernel.Random.Next(0x23, 70), (ushort)Kernel.Random.Next(0x23, 70));   
                                            
client.Entity.PKMode = Enums.PKMode.PK;   
                                            
Data buffer = new Data(true)   
                                            {   
                                                
UID = client.Entity.UID,   
                                                
ID = 0x60,   
                                                
dwParam = (uint)client.Entity.PKMode   
                                            
};   
                                            
client.Send(buffer);   
                                            
state.Entity.PKMode = Enums.PKMode.PK;   
                                            
Data data2 = new Data(true)   
                                            {   
                                                
UID = state.Entity.UID,   
                                                
ID = 0x60,   
                                                
dwParam = (uint)state.Entity.PKMode   
                                            
};   
                                            
state.Send(data2);   
                                            
Kernel.BringArenaCPs.Add(client.Entity.UID, client);   
                                            
Kernel.BringArenaCPs.Add(state.Entity.UID, state);   
                                            
client.Entity.Ressurect();   
                                            
state.Entity.Ressurect();   
                                        }   
                                        else   
                                        {   
                                            
client.Entity.SignedAtBringArenaPlayWith = "";   
                                            
client.Entity.SignedAtGeneralArenaCPs = false;   
                                            
client.Entity.SignedAtBringArenaCPsValue = 0;   
                                            
Kernel.BringArenaCPs.Remove(client.Entity.UID);   
                                            
state.Entity.SignedAtBringArenaPlayWith = "";   
                                            
state.Entity.SignedAtGeneralArenaCPs = false;   
                                            
state.Entity.SignedAtBringArenaCPsValue = 0;   
                                            
Kernel.BringArenaCPs.Remove(state.Entity.UID);   
                                            
state.Send(new Message("You don't have enough CPs.", System.Drawing.Color.Blue, 0x7d0));   
                                        }   
                                    }   
                                    else   
                                    {   
                                        
client.Entity.SignedAtBringArenaPlayWith = "";   
                                        
client.Entity.SignedAtGeneralArenaCPs = false;   
                                        
client.Entity.SignedAtBringArenaCPsValue = 0;   
                                        
Kernel.BringArenaCPs.Remove(client.Entity.UID);   
                                        
state.Entity.SignedAtBringArenaPlayWith = "";   
                                        
state.Entity.SignedAtGeneralArenaCPs = false;   
                                        
state.Entity.SignedAtBringArenaCPsValue = 0;   
                                        
Kernel.BringArenaCPs.Remove(state.Entity.UID);   
                                        
client.Send(new Message("You don't have enough CPs.", System.Drawing.Color.Blue, 0x7d0));   
                                    }   
                                }   
                                else   
                                {   
                                    
client.Entity.SignedAtBringArenaPlayWith = "";   
                                    
client.Entity.SignedAtGeneralArenaCPs = false;   
                                    
client.Entity.SignedAtBringArenaCPsValue = 0;   
                                    
Kernel.BringArenaCPs.Remove(client.Entity.UID);   
                                    
state.Entity.SignedAtBringArenaPlayWith = "";   
                                    
state.Entity.SignedAtGeneralArenaCPs = false;   
                                    
state.Entity.SignedAtBringArenaCPsValue = 0;   
                                    
Kernel.BringArenaCPs.Remove(state.Entity.UID);   
                                    
client.Send(new Message("You can't sign up now.", System.Drawing.Color.Blue, 0x7d0));   
                                }   
                            }   
                            else   
                            {   
                                
client.Entity.SignedAtBringArenaPlayWith = "";   
                                
client.Entity.SignedAtGeneralArenaCPs = false;   
                                
client.Entity.SignedAtBringArenaCPsValue = 0;   
                                
Kernel.BringArenaCPs.Remove(client.Entity.UID);   
                                
state.Entity.SignedAtBringArenaPlayWith = "";   
                                
state.Entity.SignedAtGeneralArenaCPs = false;   
                                
state.Entity.SignedAtBringArenaCPsValue = 0;   
                                
Kernel.BringArenaCPs.Remove(state.Entity.UID);   
                                
client.Send(new Message("You can't sign up when you watching.", System.Drawing.Color.Blue, 0x7d0));   
                            }   
                        }   
                        else   
                        {   
                            
client.Entity.SignedAtBringArenaPlayWith = "";   
                            
client.Entity.SignedAtGeneralArenaCPs = false;   
                            
client.Entity.SignedAtBringArenaCPsValue = 0;   
                            
Kernel.BringArenaCPs.Remove(client.Entity.UID);   
                            
state.Entity.SignedAtBringArenaPlayWith = "";   
                            
state.Entity.SignedAtGeneralArenaCPs = false;   
                            
state.Entity.SignedAtBringArenaCPsValue = 0;   
                            
Kernel.BringArenaCPs.Remove(state.Entity.UID);   
                            
client.Send(new Message("You can't sign up in when you in arena map.", System.Drawing.Color.Blue, 0x7d0));   
                        }   
                    }   

                }   
                else   
                {   
                    
client.Entity.SignedAtBringArenaPlayWith = "";   
                    
client.Entity.SignedAtGeneralArenaCPs = false;   
                    
client.Entity.SignedAtBringArenaCPsValue = 0;   
                    
Kernel.BringArenaCPs.Remove(client.Entity.UID);   
                    
state.Entity.SignedAtBringArenaPlayWith = "";   
                    
state.Entity.SignedAtGeneralArenaCPs = false;   
                    
state.Entity.SignedAtBringArenaCPsValue = 0;   
                    
Kernel.BringArenaCPs.Remove(state.Entity.UID);   
                    
client.Send(new Message("Sorry, this player may be offline or not found 3." + client.Entity.SignedAtBringArenaPlayWith, System.Drawing.Color.Blue, 0x7d0));   
                }   
            }   
            else   
            {   
                
client.Send(new Message(string.Concat(new object[] { "Sorry, this player may be offline or not found 8, ****:", client.Entity.SignedAtBringArenaPlayWith, " ", uID }), System.Drawing.Color.Blue, 0x7d0));   
            }   
        }   
    }   
} 

بعدين تخش Game/Attacking/Handle.cs تدور علي دة
كود PHP:

  if ((attacker.MapID == 0x80c) && attacked.ContainsFlag2(0x80000000L))   
                        {   
                            
attacked.RemoveFlag2(0x80000000L);   
                            
attacker.AddFlag2(0x80000000L);   
                        } 

وتضيف دة تحت اخر قوس
كود PHP:

  attacked.Die(attacker);   
                        if (
attacker.SignedAtBringArenaCPs && attacked.SignedAtBringArenaCPs)   
                        {   
                            
ArenaCPs.FenishRound(attacker, attacked);   
                        } 

وفي نفس الملف تدور علي دة
كود PHP:

attacked.MonsterInfo.SendScreen(attack); 

وتحت اخر القوس تحط دة
كود PHP:

attacked.Die(attacker);   
                    if (
attacker.SignedAtBringArenaCPs && attacked.SignedAtBringArenaCPs)   
                    {   
                        
ArenaCPs.FenishRound(attacker, attacked);   
                    } 

وفي Enums.cs تدور علي دة
كود PHP:

public enum StatusFlag 

وتضيف دة فوقيه
كود PHP:

 public enum ArenaCPsSignUpStatusIDs : uint   
        
{   
            
NotSignedUp = 0,   
            
WaitingForOpponent = 1,   
            
WaitingInactive = 2,   
            
WaitingInvite = 3   
        
} 

واخرا تخش Server****/Kernel.cs تضيف دة
كود PHP:

public static ThreadSafeDictionary<uint, Conquer_Online_Server.Client.GameState> BringArenaCPs = new ThreadSafeDictionary<uint, Conquer_Online_Server.Client.GameState>(0x3e8);   
        public static 
ThreadSafeDictionary<uint, Conquer_Online_Server.Client.GameState> GeneralArenaCPs = new ThreadSafeDictionary<uint, Conquer_Online_Server.Client.GameState>(0x3e8); 

اضافة النافي كات في npcs
كود PHP:

53360    0    0    ArenaCps    2    9430    -1    1002    424    325    0    0    0    0    0    0    0    0    0    0    0    0        0    0    0    0    0 



الساعة الآن 11:26 PM

مرحبا بكم في منتدي اكواد لتطوير الالعاب