احصائياتى

الردود
0

المشاهدات
629
 
Hazem
.:: المدير العام::.

    متواجد  الان

المشاركات
2,312

+التقييم
0.84

تاريخ التسجيل
Apr 2019

الاقامة
Egypt

نظام التشغيل
windows 7

رقم العضوية
1
2019-05-06, 12:27 PM
المشاركة 1
2019-05-06, 12:27 PM
المشاركة 1
افتراضي حرب البولات
All Pole TwinCity [فكرة البوشي]
الكويستة بتشتغل الساعه 6 وبتخلص 7 :teeth_smile:

كل عمود بيقعد 10 دقايق

وبتقدر تستلم الجايزة من الانبسي عادي ,

المهم هنخش في الاضافات ,

اعمل كلاس اسمو Pole1 وحط جواه دا

كود:
using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Text; 
using Conquer_Online_Server.Network.GamePackets; 
using Conquer_Online_Server.Game.ConquerStructures.Society; 

namespace 
Conquer_Online_Server.Game 
{ 
    public class 
Pole1 
    
{ 
        public static 
SobNpcSpawn Poles; 

        public static 
SafeDictionary<uint, Guild> Scores = new SafeDictionary<uint, Guild>(100); 

        public static 
bool IsWar = false, Flame10th = false, FirstRound = false; 

        public static 
Time32 ScoreSendStamp, LastWin; 

        public static 
Guild PoleKeeper, CurrentTopLeader; 

        private static 
bool changed = false; 

        private static 
string[] scoreMessages; 

        public static 
DateTime StartTime; 

        public static 
bool Claim 
        
{ 
            
get { return Program.Vars["egwclaim"]; } 
            
set { Program.Vars["egwclaim"] = value; } 
        } 

        public static 
uint KeeperID 
        
{ 
            
get { return Program.Vars["egwkeeperid"]; } 
            
set { Program.Vars["egwkeeperid"] = value; } 
        } 

        public static 
void EliteGwint() 
        { 
            var 
Map = Kernel.Maps[5002]; 
            
Poles = (SobNpcSpawn)Map.Npcs[818]; 
        } 

        public static 
void Start() 
        { 
            if (
Poles == null) return; 
            
Claim = false; 
            
Scores = new SafeDictionary<uint, Guild>(100); 
            
StartTime = DateTime.Now; 
            
Kernel.SendWorldMessage( 
                new 
Message("Pole 1 Guild war has began!", System.Drawing.Color.Red, Message.Center), Program.Values); 
            
FirstRound = true; 
            foreach (
Guild guild in Kernel.Guilds.Values) 
            { 
                
guild.EWarScore = 0; 
            } 
            
IsWar = true; 
        } 

        public static 
void Reset() 
        { 
            
Scores = new SafeDictionary<uint, Guild>(100); 

            
Poles.Hitpoints = Poles.MaxHitpoints; 


            foreach (
Guild guild in Kernel.Guilds.Values) 
            { 
                
guild.EWarScore = 0; 
            } 

            
IsWar = true; 
        } 

        public static 
void FinishRound() 
        { 
            if (
PoleKeeper != null && !FirstRound) 
            { 
                if (
PoleKeeper.Wins == 0) 
                    
PoleKeeper.Losts++; 
                else 
                    
PoleKeeper.Wins--; 
                
Database.GuildTable.UpdateGuildWarStats(PoleKeeper); 
            } 
            
LastWin = Time32.Now; 

            
FirstRound = false; 
            
SortScores(out PoleKeeper); 
            if (
PoleKeeper != null) 
            { 
                
KeeperID = PoleKeeper.ID; 
                
Kernel.SendWorldMessage( 
                    new 
Message( 
                        
"The guild, " + PoleKeeper.Name + ", owned by " + PoleKeeper.LeaderName + 
                        
" has won this guild war round!", System.Drawing.Color.Red, Message.Center), Program.Values); 
                
//Kernel.SendWorldMessage(new Message("It is generald pardon time. You have 5 minutes to leave, run for your life!", System.Drawing.Color.White, Message.TopLeft), Program.Values, (ushort)6001); 
                
if (PoleKeeper.Losts == 0) 
                    
PoleKeeper.Wins++; 
                else 
                    
PoleKeeper.Losts--; 
                
Database.GuildTable.UpdateGuildWarStats(PoleKeeper); 
                
Poles.Name = PoleKeeper.Name; 
            } 
            
Poles.Hitpoints = Poles.MaxHitpoints; 
            
Kernel.SendWorldMessage(Poles, Program.Values, (ushort)5002); 
            
Reset(); 
        } 

        public static 
void End() 
        { 
            if (
PoleKeeper != null) 
            { 
                
Kernel.SendWorldMessage( 
                    new 
Message( 
                        
"The Pole 1 Guild, " + PoleKeeper.Name + ", owned by " + PoleKeeper.LeaderName + 
                        
" has won this guild war!---Pole 1 war has ended!", System.Drawing.Color.White, Message.Center), 
                    
Program.Values); 
                
//Conquer_Online_Server.Database.EntityTable.Status2(); 
            
} 
            else 
            { 
                
Kernel.SendWorldMessage( 
                    new 
Message("Pole 1 war has ended and there was no winner!", System.Drawing.Color.Red, 
                        
Message.Center), Program.Values); 
                
//Conquer_Online_Server.Database.EntityTable.Status2(); 
            
} 
            
IsWar = false; 
            
Claim = true; 
            
UpdatePole(Poles); 
        } 

        public static 
void AddScore(uint addScore, Guild guild) 
        { 
            if (
guild != null) 
            { 
                
guild.EWarScore += addScore; 
                
changed = true; 
                if (!
Scores.ContainsKey(guild.ID)) 
                    
Scores.Add(guild.ID, guild); 
                if ((int)
Poles.Hitpoints <= 0) 
                { 
                    
FinishRound(); 

                    return; 
                } 
            } 
        } 

        public static 
void SendScores() 
        { 
            if (
scoreMessages == null) 
                
scoreMessages = new string[0]; 
            if (
Scores.Count == 0) 
                return; 
            if (
changed) 
                
SortScores(out CurrentTopLeader); 

            for (
int c = 0; c < scoreMessages.Length; c++) 
            { 
                
Message msg = new Message(scoreMessages[c], System.Drawing.Color.Red, 
                    
c == 0 ? Message.FirstRightCorner : Message.ContinueRightCorner); 
                
Kernel.SendWorldMessage(msg, Program.Values, (ushort)5002); 
                
Kernel.SendWorldMessage(msg, Program.Values, (ushort)5002); 
            } 
        } 

        private static 
void SortScores(out Guild winner) 
        { 
            
winner = null; 
            List<
string> ret = new List<string>(); 

            
int Place = 0; 
            foreach (
Guild guild in Scores.Values.OrderByDescending((p) => p.EWarScore)) 
            { 
                if (
Place == 0) 
                    
winner = guild; 
                
string str = "No  " + (Place + 1).ToString() + ": " + guild.Name + "(" + guild.EWarScore + ")"; 
                
ret.Add(str); 
                
Place++; 
                if (
Place == 4) 
                    break; 
            } 

            
changed = false; 
            
scoreMessages = ret.ToArray(); 
        } 

        private static 
void UpdatePole(SobNpcSpawn pole) 
        { 
            new 
Database.MySqlCommand(Conquer_Online_Server.Database.MySqlCommandType.UPDATE) 
                .
Update("sobnpcs").Set("name", pole.Name).Set("life", Poles.Hitpoints).Where("id", pole.UID).Execute(); 
        } 
    } 
} 

وكلاس تاني اسمو Pole2 وحط جواة دا

كود:
using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Text; 
using Conquer_Online_Server.Network.GamePackets; 
using Conquer_Online_Server.Game.ConquerStructures.Society; 

namespace 
Conquer_Online_Server.Game 
{ 
    public class 
Pole2 
    
{ 
        public static 
SobNpcSpawn Poles; 

        public static 
SafeDictionary<uint, Guild> Scores = new SafeDictionary<uint, Guild>(100); 

        public static 
bool IsWar = false, Flame10th = false, FirstRound = false; 

        public static 
Time32 ScoreSendStamp, LastWin; 

        public static 
Guild PoleKeeper, CurrentTopLeader; 

        private static 
bool changed = false; 

        private static 
string[] scoreMessages; 

        public static 
DateTime StartTime; 

        public static 
bool Claim 
        
{ 
            
get { return Program.Vars["egwclaim"]; } 
            
set { Program.Vars["egwclaim"] = value; } 
        } 

        public static 
uint KeeperID 
        
{ 
            
get { return Program.Vars["egwkeeperid"]; } 
            
set { Program.Vars["egwkeeperid"] = value; } 
        } 

        public static 
void EliteGwint() 
        { 
            var 
Map = Kernel.Maps[5002]; 
            
Poles = (SobNpcSpawn)Map.Npcs[8189]; 
        } 

        public static 
void Start() 
        { 
            if (
Poles == null) return; 
            
Claim = false; 
            
Scores = new SafeDictionary<uint, Guild>(100); 
            
StartTime = DateTime.Now; 
            
Kernel.SendWorldMessage( 
                new 
Message("Pole 2 war has began!", System.Drawing.Color.Red, Message.Center), Program.Values); 
            
FirstRound = true; 
            foreach (
Guild guild in Kernel.Guilds.Values) 
            { 
                
guild.DCScore = 0; 
            } 
            
IsWar = true; 
        } 

        public static 
void Reset() 
        { 
            
Scores = new SafeDictionary<uint, Guild>(100); 

            
Poles.Hitpoints = Poles.MaxHitpoints; 


            foreach (
Guild guild in Kernel.Guilds.Values) 
            { 
                
guild.DCScore = 0; 
            } 

            
IsWar = true; 
        } 

        public static 
void FinishRound() 
        { 
            if (
PoleKeeper != null && !FirstRound) 
            { 
                if (
PoleKeeper.Wins == 0) 
                    
PoleKeeper.Losts++; 
                else 
                    
PoleKeeper.Wins--; 
                
Database.GuildTable.UpdateGuildWarStats(PoleKeeper); 
            } 
            
LastWin = Time32.Now; 

            
FirstRound = false; 
            
SortScores(out PoleKeeper); 
            if (
PoleKeeper != null) 
            { 
                
KeeperID = PoleKeeper.ID; 
                
Kernel.SendWorldMessage( 
                    new 
Message( 
                        
"The guild, " + PoleKeeper.Name + ", owned by " + PoleKeeper.LeaderName + 
                        
" has won this guild war round!", System.Drawing.Color.Red, Message.Center), Program.Values); 
                
//Kernel.SendWorldMessage(new Message("It is generald pardon time. You have 5 minutes to leave, run for your life!", System.Drawing.Color.White, Message.TopLeft), Program.Values, (ushort)6001); 
                
if (PoleKeeper.Losts == 0) 
                    
PoleKeeper.Wins++; 
                else 
                    
PoleKeeper.Losts--; 
                
Database.GuildTable.UpdateGuildWarStats(PoleKeeper); 
                
Poles.Name = PoleKeeper.Name; 
            } 
            
Poles.Hitpoints = Poles.MaxHitpoints; 
            
Kernel.SendWorldMessage(Poles, Program.Values, (ushort)5002); 
            
Reset(); 
        } 

        public static 
void End() 
        { 
            if (
PoleKeeper != null) 
            { 
                
Kernel.SendWorldMessage( 
                    new 
Message( 
                        
"The Pole 2, " + PoleKeeper.Name + ", owned by " + PoleKeeper.LeaderName + 
                        
" has won this guild war!---Guild war has ended!", System.Drawing.Color.White, Message.Center), 
                    
Program.Values); 
                
//Conquer_Online_Server.Database.EntityTable.Status2(); 
            
} 
            else 
            { 
                
Kernel.SendWorldMessage( 
                    new 
Message("Pole 2 war has ended and there was no winner!", System.Drawing.Color.Red, 
                        
Message.Center), Program.Values); 
                
//Conquer_Online_Server.Database.EntityTable.Status2(); 
            
} 
            
IsWar = false; 
            
Claim = true; 
            
UpdatePole(Poles); 
        } 

        public static 
void AddScore(uint addScore, Guild guild) 
        { 
            if (
guild != null) 
            { 
                
guild.DCScore += addScore; 
                
changed = true; 
                if (!
Scores.ContainsKey(guild.ID)) 
                    
Scores.Add(guild.ID, guild); 
                if ((int)
Poles.Hitpoints <= 0) 
                { 
                    
FinishRound(); 

                    return; 
                } 
            } 
        } 

        public static 
void SendScores() 
        { 
            if (
scoreMessages == null) 
                
scoreMessages = new string[0]; 
            if (
Scores.Count == 0) 
                return; 
            if (
changed) 
                
SortScores(out CurrentTopLeader); 

            for (
int c = 0; c < scoreMessages.Length; c++) 
            { 
                
Message msg = new Message(scoreMessages[c], System.Drawing.Color.Red, 
                    
c == 0 ? Message.FirstRightCorner : Message.ContinueRightCorner); 
                
Kernel.SendWorldMessage(msg, Program.Values, (ushort)5002); 
                
Kernel.SendWorldMessage(msg, Program.Values, (ushort)5002); 
            } 
        } 

        private static 
void SortScores(out Guild winner) 
        { 
            
winner = null; 
            List<
string> ret = new List<string>(); 

            
int Place = 0; 
            foreach (
Guild guild in Scores.Values.OrderByDescending((p) => p.DCScore)) 
            { 
                if (
Place == 0) 
                    
winner = guild; 
                
string str = "No  " + (Place + 1).ToString() + ": " + guild.Name + "(" + guild.DCScore + ")"; 
                
ret.Add(str); 
                
Place++; 
                if (
Place == 4) 
                    break; 
            } 

            
changed = false; 
            
scoreMessages = ret.ToArray(); 
        } 

        private static 
void UpdatePole(SobNpcSpawn pole) 
        { 
            new 
Database.MySqlCommand(Conquer_Online_Server.Database.MySqlCommandType.UPDATE) 
                .
Update("sobnpcs").Set("name", pole.Name).Set("life", Poles.Hitpoints).Where("id", pole.UID).Execute(); 
        } 
    } 
} 

وكلاس 3 وسمي Pole3 وحط جواة دا

كود:
using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Text; 
using Conquer_Online_Server.Network.GamePackets; 
using Conquer_Online_Server.Game.ConquerStructures.Society; 

namespace 
Conquer_Online_Server.Game 
{ 
    public class 
Pole3 
    
{ 
        public static 
SobNpcSpawn Poles; 

        public static 
SafeDictionary<uint, Guild> Scores = new SafeDictionary<uint, Guild>(100); 

        public static 
bool IsWar = false, Flame10th = false, FirstRound = false; 

        public static 
Time32 ScoreSendStamp, LastWin; 

        public static 
Guild PoleKeeper, CurrentTopLeader; 

        private static 
bool changed = false; 

        private static 
string[] scoreMessages; 

        public static 
DateTime StartTime; 

        public static 
bool Claim 
        
{ 
            
get { return Program.Vars["egwclaim"]; } 
            
set { Program.Vars["egwclaim"] = value; } 
        } 

        public static 
uint KeeperID 
        
{ 
            
get { return Program.Vars["egwkeeperid"]; } 
            
set { Program.Vars["egwkeeperid"] = value; } 
        } 

        public static 
void EliteGwint() 
        { 
            var 
Map = Kernel.Maps[5002]; 
            
Poles = (SobNpcSpawn)Map.Npcs[8188]; 
        } 

        public static 
void Start() 
        { 
            if (
Poles == null) return; 
            
Claim = false; 
            
Scores = new SafeDictionary<uint, Guild>(100); 
            
StartTime = DateTime.Now; 
            
Kernel.SendWorldMessage( 
                new 
Message("Pole 3 war has began!", System.Drawing.Color.Red, Message.Center), Program.Values); 
            
FirstRound = true; 
            foreach (
Guild guild in Kernel.Guilds.Values) 
            { 
                
guild.DPScore = 0; 
            } 
            
IsWar = true; 
        } 

        public static 
void Reset() 
        { 
            
Scores = new SafeDictionary<uint, Guild>(100); 

            
Poles.Hitpoints = Poles.MaxHitpoints; 


            foreach (
Guild guild in Kernel.Guilds.Values) 
            { 
                
guild.DPScore = 0; 
            } 

            
IsWar = true; 
        } 

        public static 
void FinishRound() 
        { 
            if (
PoleKeeper != null && !FirstRound) 
            { 
                if (
PoleKeeper.Wins == 0) 
                    
PoleKeeper.Losts++; 
                else 
                    
PoleKeeper.Wins--; 
                
Database.GuildTable.UpdateGuildWarStats(PoleKeeper); 
            } 
            
LastWin = Time32.Now; 

            
FirstRound = false; 
            
SortScores(out PoleKeeper); 
            if (
PoleKeeper != null) 
            { 
                
KeeperID = PoleKeeper.ID; 
                
Kernel.SendWorldMessage( 
                    new 
Message( 
                        
"The guild, " + PoleKeeper.Name + ", owned by " + PoleKeeper.LeaderName + 
                        
" has won this guild war round!", System.Drawing.Color.Red, Message.Center), Program.Values); 
                
//Kernel.SendWorldMessage(new Message("It is generald pardon time. You have 5 minutes to leave, run for your life!", System.Drawing.Color.White, Message.TopLeft), Program.Values, (ushort)6001); 
                
if (PoleKeeper.Losts == 0) 
                    
PoleKeeper.Wins++; 
                else 
                    
PoleKeeper.Losts--; 
                
Database.GuildTable.UpdateGuildWarStats(PoleKeeper); 
                
Poles.Name = PoleKeeper.Name; 
            } 
            
Poles.Hitpoints = Poles.MaxHitpoints; 
            
Kernel.SendWorldMessage(Poles, Program.Values, (ushort)5002); 
            
Reset(); 
        } 

        public static 
void End() 
        { 
            if (
PoleKeeper != null) 
            { 
                
Kernel.SendWorldMessage( 
                    new 
Message( 
                        
"The Pole 3, " + PoleKeeper.Name + ", owned by " + PoleKeeper.LeaderName + 
                        
" has won this guild war!---Guild war has ended!", System.Drawing.Color.White, Message.Center), 
                    
Program.Values); 
                
//Conquer_Online_Server.Database.EntityTable.Status2(); 
            
} 
            else 
            { 
                
Kernel.SendWorldMessage( 
                    new 
Message("Pole 3 war has ended and there was no winner!", System.Drawing.Color.Red, 
                        
Message.Center), Program.Values); 
                
//Conquer_Online_Server.Database.EntityTable.Status2(); 
            
} 
            
IsWar = false; 
            
Claim = true; 
            
UpdatePole(Poles); 
        } 

        public static 
void AddScore(uint addScore, Guild guild) 
        { 
            if (
guild != null) 
            { 
                
guild.DPScore += addScore; 
                
changed = true; 
                if (!
Scores.ContainsKey(guild.ID)) 
                    
Scores.Add(guild.ID, guild); 
                if ((int)
Poles.Hitpoints <= 0) 
                { 
                    
FinishRound(); 

                    return; 
                } 
            } 
        } 

        public static 
void SendScores() 
        { 
            if (
scoreMessages == null) 
                
scoreMessages = new string[0]; 
            if (
Scores.Count == 0) 
                return; 
            if (
changed) 
                
SortScores(out CurrentTopLeader); 

            for (
int c = 0; c < scoreMessages.Length; c++) 
            { 
                
Message msg = new Message(scoreMessages[c], System.Drawing.Color.Red, 
                    
c == 0 ? Message.FirstRightCorner : Message.ContinueRightCorner); 
                
Kernel.SendWorldMessage(msg, Program.Values, (ushort)5002); 
                
Kernel.SendWorldMessage(msg, Program.Values, (ushort)5002); 
            } 
        } 

        private static 
void SortScores(out Guild winner) 
        { 
            
winner = null; 
            List<
string> ret = new List<string>(); 

            
int Place = 0; 
            foreach (
Guild guild in Scores.Values.OrderByDescending((p) => p.DPScore)) 
            { 
                if (
Place == 0) 
                    
winner = guild; 
                
string str = "No  " + (Place + 1).ToString() + ": " + guild.Name + "(" + guild.DPScore + ")"; 
                
ret.Add(str); 
                
Place++; 
                if (
Place == 4) 
                    break; 
            } 

            
changed = false; 
            
scoreMessages = ret.ToArray(); 
        } 

        private static 
void UpdatePole(SobNpcSpawn pole) 
        { 
            new 
Database.MySqlCommand(Conquer_Online_Server.Database.MySqlCommandType.UPDATE) 
                .
Update("sobnpcs").Set("name", pole.Name).Set("life", Poles.Hitpoints).Where("id", pole.UID).Execute(); 
        } 
    } 
} 

كمان كلاس ونسمية Pole4 وحط جواة دا

كود:
using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Text; 
using Conquer_Online_Server.Network.GamePackets; 
using Conquer_Online_Server.Game.ConquerStructures.Society; 

namespace 
Conquer_Online_Server.Game 
{ 
    public class 
Pole4 
    
{ 
        public static 
SobNpcSpawn Poles; 

        public static 
SafeDictionary<uint, Guild> Scores = new SafeDictionary<uint, Guild>(100); 

        public static 
bool IsWar = false, Flame10th = false, FirstRound = false; 

        public static 
Time32 ScoreSendStamp, LastWin; 

        public static 
Guild PoleKeeper, CurrentTopLeader; 

        private static 
bool changed = false; 

        private static 
string[] scoreMessages; 

        public static 
DateTime StartTime; 

        public static 
bool Claim 
        
{ 
            
get { return Program.Vars["egwclaim"]; } 
            
set { Program.Vars["egwclaim"] = value; } 
        } 

        public static 
uint KeeperID 
        
{ 
            
get { return Program.Vars["egwkeeperid"]; } 
            
set { Program.Vars["egwkeeperid"] = value; } 
        } 

        public static 
void EliteGwint() 
        { 
            var 
Map = Kernel.Maps[5002]; 
            
Poles = (SobNpcSpawn)Map.Npcs[8187]; 
        } 

        public static 
void Start() 
        { 
            if (
Poles == null) return; 
            
Claim = false; 
            
Scores = new SafeDictionary<uint, Guild>(100); 
            
StartTime = DateTime.Now; 
            
Kernel.SendWorldMessage( 
                new 
Message("Pole 4 war has began!", System.Drawing.Color.Red, Message.Center), Program.Values); 
            
FirstRound = true; 
            foreach (
Guild guild in Kernel.Guilds.Values) 
            { 
                
guild.PPScore = 0; 
            } 
            
IsWar = true; 
        } 

        public static 
void Reset() 
        { 
            
Scores = new SafeDictionary<uint, Guild>(100); 

            
Poles.Hitpoints = Poles.MaxHitpoints; 


            foreach (
Guild guild in Kernel.Guilds.Values) 
            { 
                
guild.PPScore = 0; 
            } 

            
IsWar = true; 
        } 

        public static 
void FinishRound() 
        { 
            if (
PoleKeeper != null && !FirstRound) 
            { 
                if (
PoleKeeper.Wins == 0) 
                    
PoleKeeper.Losts++; 
                else 
                    
PoleKeeper.Wins--; 
                
Database.GuildTable.UpdateGuildWarStats(PoleKeeper); 
            } 
            
LastWin = Time32.Now; 

            
FirstRound = false; 
            
SortScores(out PoleKeeper); 
            if (
PoleKeeper != null) 
            { 
                
KeeperID = PoleKeeper.ID; 
                
Kernel.SendWorldMessage( 
                    new 
Message( 
                        
"The guild, " + PoleKeeper.Name + ", owned by " + PoleKeeper.LeaderName + 
                        
" has won this guild war round!", System.Drawing.Color.Red, Message.Center), Program.Values); 
                
//Kernel.SendWorldMessage(new Message("It is generald pardon time. You have 5 minutes to leave, run for your life!", System.Drawing.Color.White, Message.TopLeft), Program.Values, (ushort)6001); 
                
if (PoleKeeper.Losts == 0) 
                    
PoleKeeper.Wins++; 
                else 
                    
PoleKeeper.Losts--; 
                
Database.GuildTable.UpdateGuildWarStats(PoleKeeper); 
                
Poles.Name = PoleKeeper.Name; 
            } 
            
Poles.Hitpoints = Poles.MaxHitpoints; 
            
Kernel.SendWorldMessage(Poles, Program.Values, (ushort)5002); 
            
Reset(); 
        } 

        public static 
void End() 
        { 
            if (
PoleKeeper != null) 
            { 
                
Kernel.SendWorldMessage( 
                    new 
Message( 
                        
"The Pole 4, " + PoleKeeper.Name + ", owned by " + PoleKeeper.LeaderName + 
                        
" has won this guild war!---Guild war has ended!", System.Drawing.Color.White, Message.Center), 
                    
Program.Values); 
                
//Conquer_Online_Server.Database.EntityTable.Status2(); 
            
} 
            else 
            { 
                
Kernel.SendWorldMessage( 
                    new 
Message("Pole 4 war has ended and there was no winner!", System.Drawing.Color.Red, 
                        
Message.Center), Program.Values); 
                
//Conquer_Online_Server.Database.EntityTable.Status2(); 
            
} 
            
IsWar = false; 
            
Claim = true; 
            
UpdatePole(Poles); 
        } 

        public static 
void AddScore(uint addScore, Guild guild) 
        { 
            if (
guild != null) 
            { 
                
guild.PPScore += addScore; 
                
changed = true; 
                if (!
Scores.ContainsKey(guild.ID)) 
                    
Scores.Add(guild.ID, guild); 
                if ((int)
Poles.Hitpoints <= 0) 
                { 
                    
FinishRound(); 

                    return; 
                } 
            } 
        } 

        public static 
void SendScores() 
        { 
            if (
scoreMessages == null) 
                
scoreMessages = new string[0]; 
            if (
Scores.Count == 0) 
                return; 
            if (
changed) 
                
SortScores(out CurrentTopLeader); 

            for (
int c = 0; c < scoreMessages.Length; c++) 
            { 
                
Message msg = new Message(scoreMessages[c], System.Drawing.Color.Red, 
                    
c == 0 ? Message.FirstRightCorner : Message.ContinueRightCorner); 
                
Kernel.SendWorldMessage(msg, Program.Values, (ushort)5002); 
                
Kernel.SendWorldMessage(msg, Program.Values, (ushort)5002); 
            } 
        } 

        private static 
void SortScores(out Guild winner) 
        { 
            
winner = null; 
            List<
string> ret = new List<string>(); 

            
int Place = 0; 
            foreach (
Guild guild in Scores.Values.OrderByDescending((p) => p.PPScore)) 
            { 
                if (
Place == 0) 
                    
winner = guild; 
                
string str = "No  " + (Place + 1).ToString() + ": " + guild.Name + "(" + guild.PPScore + ")"; 
                
ret.Add(str); 
                
Place++; 
                if (
Place == 4) 
                    break; 
            } 

            
changed = false; 
            
scoreMessages = ret.ToArray(); 
        } 

        private static 
void UpdatePole(SobNpcSpawn pole) 
        { 
            new 
Database.MySqlCommand(Conquer_Online_Server.Database.MySqlCommandType.UPDATE) 
                .
Update("sobnpcs").Set("name", pole.Name).Set("life", Poles.Hitpoints).Where("id", pole.UID).Execute(); 
        } 
    } 
} 

كمان كلاس وسمية Pole5 وحط جواه دا

كود:
using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Text; 
using Conquer_Online_Server.Network.GamePackets; 
using Conquer_Online_Server.Game.ConquerStructures.Society; 

namespace 
Conquer_Online_Server.Game 
{ 
    public class 
Pole5 
    
{ 
        public static 
SobNpcSpawn Poles; 

        public static 
SafeDictionary<uint, Guild> Scores = new SafeDictionary<uint, Guild>(100); 

        public static 
bool IsWar = false, Flame10th = false, FirstRound = false; 

        public static 
Time32 ScoreSendStamp, LastWin; 

        public static 
Guild PoleKeeper, CurrentTopLeader; 

        private static 
bool changed = false; 

        private static 
string[] scoreMessages; 

        public static 
DateTime StartTime; 

        public static 
bool Claim 
        
{ 
            
get { return Program.Vars["egwclaim"]; } 
            
set { Program.Vars["egwclaim"] = value; } 
        } 

        public static 
uint KeeperID 
        
{ 
            
get { return Program.Vars["egwkeeperid"]; } 
            
set { Program.Vars["egwkeeperid"] = value; } 
        } 

        public static 
void EliteGwint() 
        { 
            var 
Map = Kernel.Maps[5002]; 
            
Poles = (SobNpcSpawn)Map.Npcs[8186]; 
        } 

        public static 
void Start() 
        { 
            if (
Poles == null) return; 
            
Claim = false; 
            
Scores = new SafeDictionary<uint, Guild>(100); 
            
StartTime = DateTime.Now; 
            
Kernel.SendWorldMessage( 
                new 
Message("Pole 5 war has began!", System.Drawing.Color.Red, Message.Center), Program.Values); 
            
FirstRound = true; 
            foreach (
Guild guild in Kernel.Guilds.Values) 
            { 
                
guild.PIScore = 0; 
            } 
            
IsWar = true; 
        } 

        public static 
void Reset() 
        { 
            
Scores = new SafeDictionary<uint, Guild>(100); 

            
Poles.Hitpoints = Poles.MaxHitpoints; 


            foreach (
Guild guild in Kernel.Guilds.Values) 
            { 
                
guild.PIScore = 0; 
            } 

            
IsWar = true; 
        } 

        public static 
void FinishRound() 
        { 
            if (
PoleKeeper != null && !FirstRound) 
            { 
                if (
PoleKeeper.Wins == 0) 
                    
PoleKeeper.Losts++; 
                else 
                    
PoleKeeper.Wins--; 
                
Database.GuildTable.UpdateGuildWarStats(PoleKeeper); 
            } 
            
LastWin = Time32.Now; 

            
FirstRound = false; 
            
SortScores(out PoleKeeper); 
            if (
PoleKeeper != null) 
            { 
                
KeeperID = PoleKeeper.ID; 
                
Kernel.SendWorldMessage( 
                    new 
Message( 
                        
"The guild, " + PoleKeeper.Name + ", owned by " + PoleKeeper.LeaderName + 
                        
" has won this guild war round!", System.Drawing.Color.Red, Message.Center), Program.Values); 
                
//Kernel.SendWorldMessage(new Message("It is generald pardon time. You have 5 minutes to leave, run for your life!", System.Drawing.Color.White, Message.TopLeft), Program.Values, (ushort)6001); 
                
if (PoleKeeper.Losts == 0) 
                    
PoleKeeper.Wins++; 
                else 
                    
PoleKeeper.Losts--; 
                
Database.GuildTable.UpdateGuildWarStats(PoleKeeper); 
                
Poles.Name = PoleKeeper.Name; 
            } 
            
Poles.Hitpoints = Poles.MaxHitpoints; 
            
Kernel.SendWorldMessage(Poles, Program.Values, (ushort)5002); 
            
Reset(); 
        } 

        public static 
void End() 
        { 
            if (
PoleKeeper != null) 
            { 
                
Kernel.SendWorldMessage( 
                    new 
Message( 
                        
"The Pole 5, " + PoleKeeper.Name + ", owned by " + PoleKeeper.LeaderName + 
                        
" has won this guild war!---Guild war has ended!", System.Drawing.Color.White, Message.Center), 
                    
Program.Values); 
                
//Conquer_Online_Server.Database.EntityTable.Status2(); 
            
} 
            else 
            { 
                
Kernel.SendWorldMessage( 
                    new 
Message("Pole 5 war has ended and there was no winner!", System.Drawing.Color.Red, 
                        
Message.Center), Program.Values); 
                
//Conquer_Online_Server.Database.EntityTable.Status2(); 
            
} 
            
IsWar = false; 
            
Claim = true; 
            
UpdatePole(Poles); 
        } 

        public static 
void AddScore(uint addScore, Guild guild) 
        { 
            if (
guild != null) 
            { 
                
guild.PIScore += addScore; 
                
changed = true; 
                if (!
Scores.ContainsKey(guild.ID)) 
                    
Scores.Add(guild.ID, guild); 
                if ((int)
Poles.Hitpoints <= 0) 
                { 
                    
FinishRound(); 

                    return; 
                } 
            } 
        } 

        public static 
void SendScores() 
        { 
            if (
scoreMessages == null) 
                
scoreMessages = new string[0]; 
            if (
Scores.Count == 0) 
                return; 
            if (
changed) 
                
SortScores(out CurrentTopLeader); 

            for (
int c = 0; c < scoreMessages.Length; c++) 
            { 
                
Message msg = new Message(scoreMessages[c], System.Drawing.Color.Red, 
                    
c == 0 ? Message.FirstRightCorner : Message.ContinueRightCorner); 
                
Kernel.SendWorldMessage(msg, Program.Values, (ushort)5002); 
                
Kernel.SendWorldMessage(msg, Program.Values, (ushort)5002); 
            } 
        } 

        private static 
void SortScores(out Guild winner) 
        { 
            
winner = null; 
            List<
string> ret = new List<string>(); 

            
int Place = 0; 
            foreach (
Guild guild in Scores.Values.OrderByDescending((p) => p.PIScore)) 
            { 
                if (
Place == 0) 
                    
winner = guild; 
                
string str = "No  " + (Place + 1).ToString() + ": " + guild.Name + "(" + guild.PIScore + ")"; 
                
ret.Add(str); 
                
Place++; 
                if (
Place == 4) 
                    break; 
            } 

            
changed = false; 
            
scoreMessages = ret.ToArray(); 
        } 

        private static 
void UpdatePole(SobNpcSpawn pole) 
        { 
            new 
Database.MySqlCommand(Conquer_Online_Server.Database.MySqlCommandType.UPDATE) 
                .
Update("sobnpcs").Set("name", pole.Name).Set("life", Poles.Hitpoints).Where("id", pole.UID).Execute(); 
        } 
    } 
} 

وفتح كلاس SobNpcSpawn

كود:
var _base = Program.World.CTF.Bases[UID]; 
                    
_base.Capture(); 

هتلاقي دول }
}
حط تحتهم الاكواد دي

كود:
else if (MapID == 5002) 
            { 
                if (
UID != 818) 
                { 
                    if (
Hitpoints != 0 || Mesh != 251 && Mesh != 281) 
                    { 
                        if (
Mesh == 241) 
                            
Mesh = (ushort)(250 + Mesh % 10); 
                        else 
                            
Mesh = (ushort)(280 + Mesh % 10); 

                        
Update upd = new Update(true); 
                        
upd.UID = UID; 
                        
upd.Append(Update.Mesh, Mesh); 
                        
killer.Owner.SendScreen(upd, true); 
                        
Hitpoints = 0; 
                    } 
                    
Attack attack = new Attack(true); 
                    
attack.Attacker = killer.UID; 
                    
attack.Attacked = UID; 
                    
attack.AttackType = Network.GamePackets.Attack.Kill; 
                    
attack.X = X; 
                    
attack.Y = Y; 
                    
killer.Owner.Send(attack); 
                    
killer.KOCount++; 
                } 
            } 
            else if (
MapID == 1038) 
            { 
                if (
UID != 810) 
                { 
                    if (
Hitpoints != 0 || Mesh != 251 && Mesh != 281) 
                    { 
                        if (
Mesh == 241) 
                            
Mesh = (ushort)(250 + Mesh % 10); 
                        else 
                            
Mesh = (ushort)(280 + Mesh % 10); 

                        
Update upd = new Update(true); 
                        
upd.UID = UID; 
                        
upd.Append(Update.Mesh, Mesh); 
                        
killer.Owner.SendScreen(upd, true); 
                        
Hitpoints = 0; 
                    } 
                    
Attack attack = new Attack(true); 
                    
attack.Attacker = killer.UID; 
                    
attack.Attacked = UID; 
                    
attack.AttackType = Network.GamePackets.Attack.Kill; 
                    
attack.X = X; 
                    
attack.Y = Y; 
                    
killer.Owner.Send(attack); 
                    
killer.KOCount++; 
                } 
            } 
            else if (
MapID == 5002) 
            { 
                if (
UID != 818) 
                { 
                    if (
Hitpoints != 0 || Mesh != 251 && Mesh != 281) 
                    { 
                        if (
Mesh == 241) 
                            
Mesh = (ushort)(250 + Mesh % 10); 
                        else 
                            
Mesh = (ushort)(280 + Mesh % 10); 

                        
Update upd = new Update(true); 
                        
upd.UID = UID; 
                        
upd.Append(Update.Mesh, Mesh); 
                        
killer.Owner.SendScreen(upd, true); 
                        
Hitpoints = 0; 
                    } 
                    
Attack attack = new Attack(true); 
                    
attack.Attacker = killer.UID; 
                    
attack.Attacked = UID; 
                    
attack.AttackType = Network.GamePackets.Attack.Kill; 
                    
attack.X = X; 
                    
attack.Y = Y; 
                    
killer.Owner.Send(attack); 
                    
killer.KOCount++; 
                } 
            } 
            else if (
MapID == 5002) 
            { 
                if (
UID != 8186) 
                { 
                    if (
Hitpoints != 0 || Mesh != 251 && Mesh != 281) 
                    { 
                        if (
Mesh == 241) 
                            
Mesh = (ushort)(250 + Mesh % 10); 
                        else 
                            
Mesh = (ushort)(280 + Mesh % 10); 

                        
Update upd = new Update(true); 
                        
upd.UID = UID; 
                        
upd.Append(Update.Mesh, Mesh); 
                        
killer.Owner.SendScreen(upd, true); 
                        
Hitpoints = 0; 
                    } 
                    
Attack attack = new Attack(true); 
                    
attack.Attacker = killer.UID; 
                    
attack.Attacked = UID; 
                    
attack.AttackType = Network.GamePackets.Attack.Kill; 
                    
attack.X = X; 
                    
attack.Y = Y; 
                    
killer.Owner.Send(attack); 
                    
killer.KOCount++; 
                } 
            } 
            else if (
MapID == 5002) 
            { 
                if (
UID != 8187) 
                { 
                    if (
Hitpoints != 0 || Mesh != 251 && Mesh != 281) 
                    { 
                        if (
Mesh == 241) 
                            
Mesh = (ushort)(250 + Mesh % 10); 
                        else 
                            
Mesh = (ushort)(280 + Mesh % 10); 

                        
Update upd = new Update(true); 
                        
upd.UID = UID; 
                        
upd.Append(Update.Mesh, Mesh); 
                        
killer.Owner.SendScreen(upd, true); 
                        
Hitpoints = 0; 
                    } 
                    
Attack attack = new Attack(true); 
                    
attack.Attacker = killer.UID; 
                    
attack.Attacked = UID; 
                    
attack.AttackType = Network.GamePackets.Attack.Kill; 
                    
attack.X = X; 
                    
attack.Y = Y; 
                    
killer.Owner.Send(attack); 
                    
killer.KOCount++; 
                } 
            } 
            else if (
MapID == 5002) 
            { 
                if (
UID != 8188) 
                { 
                    if (
Hitpoints != 0 || Mesh != 251 && Mesh != 281) 
                    { 
                        if (
Mesh == 241) 
                            
Mesh = (ushort)(250 + Mesh % 10); 
                        else 
                            
Mesh = (ushort)(280 + Mesh % 10); 

                        
Update upd = new Update(true); 
                        
upd.UID = UID; 
                        
upd.Append(Update.Mesh, Mesh); 
                        
killer.Owner.SendScreen(upd, true); 
                        
Hitpoints = 0; 
                    } 
                    
Attack attack = new Attack(true); 
                    
attack.Attacker = killer.UID; 
                    
attack.Attacked = UID; 
                    
attack.AttackType = Network.GamePackets.Attack.Kill; 
                    
attack.X = X; 
                    
attack.Y = Y; 
                    
killer.Owner.Send(attack); 
                    
killer.KOCount++; 
                } 
            } 
            else if (
MapID == 5002) 
            { 
                if (
UID != 8189) 
                { 
                    if (
Hitpoints != 0 || Mesh != 251 && Mesh != 281) 
                    { 
                        if (
Mesh == 241) 
                            
Mesh = (ushort)(250 + Mesh % 10); 
                        else 
                            
Mesh = (ushort)(280 + Mesh % 10); 

                        
Update upd = new Update(true); 
                        
upd.UID = UID; 
                        
upd.Append(Update.Mesh, Mesh); 
                        
killer.Owner.SendScreen(upd, true); 
                        
Hitpoints = 0; 
                    } 
                    
Attack attack = new Attack(true); 
                    
attack.Attacker = killer.UID; 
                    
attack.Attacked = UID; 
                    
attack.AttackType = Network.GamePackets.Attack.Kill; 
                    
attack.X = X; 
                    
attack.Y = Y; 
                    
killer.Owner.Send(attack); 
                    
killer.KOCount++; 
                } 
            } 

وفتح sobnpc في النافي كات

ضيف فيها دول

كود:
8189    »WTF»BLôOD»    10    1137    5002    321    288    27699644    30000000    24    21    1    0 
8188    »WTF»BLôOD»    10    1137    5002    300    267    438613    30000000    24    21    1    0 
8187    »WTF»BLôOD»    10    1137    5002    321    267    24320242    30000000    24    21    1    0 
8186    Scorpen0    21    35120    5002    310    277    0    900000000    24    21    1    0 

ودي المابة

كود:
5002    1002    8192    0 

وفتح
Constantsوبحث عـن

كود:
 public static readonly System.Collections.Generic.List<ushort> PKFreeMaps 

وضيف جواها المابة دي

كود:
5002, 

وخش علي World.cs
ضيف دول تحت اي اوتو فينت

كود:
///////////////////////Pole1///////////////////////

            #region City OF Egy

            
if (!Game.Pole1.IsWar)
            {
                if ((
Now64.Hour == 18) && Now64.Minute == 0)
                {
                    
Game.Pole1.Start();
                    foreach (var 
client in Program.Values)
                        if (
client.Entity.GuildID != 0)
                            
client.MessageBox("Pole [ 1 ] War has Started 6:00 End 6:10 Prize [ 250 M ] ?",
                                
p => { p.Entity.Teleport(5002, 300, 290); }, null);
                }
            }
            if (
Game.Pole1.IsWar)
            {
                if (
Time32.Now > Game.Pole1.ScoreSendStamp.AddSeconds(3))
                {
                    
Game.Pole1.ScoreSendStamp = Time32.Now;
                    
Game.Pole1.SendScores();
                }
                if ((
Now64.Hour == 18) && Now64.Minute == 5)
                {
                    
Kernel.SendWorldMessage(new Network.GamePackets.Message("5 Minutes left till [ Pole 1 ] War End Hurry kick other Guild's Ass!.", System.Drawing.Color.White, Network.GamePackets.Message.Center), Program.Values);
                }
            }

            if (
Game.Pole1.IsWar)
            {
                if ((
Now64.Hour == 18) && Now64.Minute == 10)
                {
                    
Game.Pole1.End();
                    {
                        
Kernel.SendWorldMessage(new Network.GamePackets.Message("Pole [ 1 ] War EndeD Thanks To ScorpenProject.", System.Drawing.Color.White, Network.GamePackets.Message.Center), Program.Values);
                    }
                }
            }
            
#endregion
            ///////////////////////End///////////////////////
            ///////////////////////Pole2///////////////////////
            #region City OF Egy

            
if (!Game.Pole2.IsWar)
            {
                if ((
Now64.Hour == 18) && Now64.Minute == 11)
                {
                    
Game.Pole2.Start();
                    foreach (var 
client in Program.Values)
                        if (
client.Entity.GuildID != 0)
                            
client.MessageBox("Pole [ 2 ] War has Started 6:11 End 6:21 Prize [ 250 M ] ?",
                                
p => { p.Entity.Teleport(5002, 322, 290); }, null);
                }
            }
            if (
Game.Pole2.IsWar)
            {
                if (
Time32.Now > Game.Pole2.ScoreSendStamp.AddSeconds(3))
                {
                    
Game.Pole2.ScoreSendStamp = Time32.Now;
                    
Game.Pole2.SendScores();
                }
                if ((
Now64.Hour == 18) && Now64.Minute == 16)
                {
                    
Kernel.SendWorldMessage(new Network.GamePackets.Message("5 Minutes left till [ Pole 2 ] War End Hurry kick other Guild's Ass!.", System.Drawing.Color.White, Network.GamePackets.Message.Center), Program.Values);
                }
            }

            if (
Game.Pole2.IsWar)
            {
                if ((
Now64.Hour == 18) && Now64.Minute == 21)
                {
                    
Game.Pole2.End();
                    {
                        
Kernel.SendWorldMessage(new Network.GamePackets.Message("Pole [ 2 ] War EndeD Thanks To ScorpenProject.", System.Drawing.Color.White, Network.GamePackets.Message.Center), Program.Values);
                    }
                }
            }
            
#endregion
            ///////////////////////End///////////////////////
            ///////////////////////Pole3///////////////////////
            #region City OF Egy

            
if (!Game.Pole3.IsWar)
            {
                if ((
Now64.Hour == 18) && Now64.Minute == 21)
                {
                    
Game.Pole3.Start();
                    foreach (var 
client in Program.Values)
                        if (
client.Entity.GuildID != 0)
                            
client.MessageBox("Pole [ 3 ] War has Started 6:21 + 6:31 Prize [ 250 M ] ?",
                                
p => { p.Entity.Teleport(5002, 296, 267); }, null);
                }
            }
            if (
Game.Pole3.IsWar)
            {
                if (
Time32.Now > Game.Pole3.ScoreSendStamp.AddSeconds(3))
                {
                    
Game.Pole3.ScoreSendStamp = Time32.Now;
                    
Game.Pole3.SendScores();
                }
                if ((
Now64.Hour == 18) && Now64.Minute == 26)
                {
                    
Kernel.SendWorldMessage(new Network.GamePackets.Message("5 Minutes left till [ Pole 3 ] War End Hurry kick other Guild's Ass!.", System.Drawing.Color.White, Network.GamePackets.Message.Center), Program.Values);
                }
            }

            if (
Game.Pole3.IsWar)
            {
                if ((
Now64.Hour == 18) && Now64.Minute == 31)
                {
                    
Game.Pole3.End();
                    {
                        
Kernel.SendWorldMessage(new Network.GamePackets.Message("Pole [ 3 ] War EndeD Thanks To ScorpenProject.", System.Drawing.Color.White, Network.GamePackets.Message.Center), Program.Values);
                    }
                }
            }
            
#endregion
            ///////////////////////End///////////////////////
            ///////////////////////Pole4///////////////////////
            #region City OF Egy

            
if (!Game.Pole4.IsWar)
            {
                if ((
Now64.Hour == 18) && Now64.Minute == 31)
                {
                    
Game.Pole4.Start();
                    foreach (var 
client in Program.Values)
                        if (
client.Entity.GuildID != 0)
                            
client.MessageBox("Pole [ 4 ] War has Started 6:31 End 6:41 Prize [ 250 M ] ?",
                                
p => { p.Entity.Teleport(5002, 321, 269); }, null);
                }
            }
            if (
Game.Pole4.IsWar)
            {
                if (
Time32.Now > Game.Pole4.ScoreSendStamp.AddSeconds(3))
                {
                    
Game.Pole4.ScoreSendStamp = Time32.Now;
                    
Game.Pole4.SendScores();
                }
                if ((
Now64.Hour == 18) && Now64.Minute == 36)
                {
                    
Kernel.SendWorldMessage(new Network.GamePackets.Message("5 Minutes left till [ Pole 4 ] War End Hurry kick other Guild's Ass!.", System.Drawing.Color.White, Network.GamePackets.Message.Center), Program.Values);
                }
            }

            if (
Game.Pole4.IsWar)
            {
                if ((
Now64.Hour == 18) && Now64.Minute == 41)
                {
                    
Game.Pole4.End();
                    {
                        
Kernel.SendWorldMessage(new Network.GamePackets.Message("Pole [ 4 ] War EndeD Thanks To ScorpenProject.", System.Drawing.Color.White, Network.GamePackets.Message.Center), Program.Values);
                    }
                }
            }
            
#endregion
            ///////////////////////End///////////////////////
            ///////////////////////Pole5///////////////////////
            #region City OF Egy

            
if (!Game.Pole5.IsWar)
            {
                if ((
Now64.Hour == 18) && Now64.Minute == 41)
                {
                    
Game.Pole5.Start();
                    foreach (var 
client in Program.Values)
                        if (
client.Entity.GuildID != 0)
                            
client.MessageBox("Pole [ 5 ] War has Started 6:41 End 7:00 Prize [ 500 M ] ?",
                                
p => { p.Entity.Teleport(5002, 310, 279); }, null);
                }
            }
            if (
Game.Pole5.IsWar)
            {
                if (
Time32.Now > Game.Pole5.ScoreSendStamp.AddSeconds(3))
                {
                    
Game.Pole5.ScoreSendStamp = Time32.Now;
                    
Game.Pole5.SendScores();
                }
                if ((
Now64.Hour == 18) && Now64.Minute == 55)
                {
                    
Kernel.SendWorldMessage(new Network.GamePackets.Message("5 Minutes left till [ Pole 5 ] War End Hurry kick other Guild's Ass!.", System.Drawing.Color.White, Network.GamePackets.Message.Center), Program.Values);
                }
            }

            if (
Game.Pole5.IsWar)
            {
                if ((
Now64.Hour == 19) && Now64.Minute == 0)
                {
                    
Game.Pole5.End();
                    {
                        
Kernel.SendWorldMessage(new Network.GamePackets.Message("Pole [ 5 ] War EndeD Thanks To ScorpenProject.", System.Drawing.Color.White, Network.GamePackets.Message.Center), Program.Values);
                    }
                }
            }
            
#endregion
            ///////////////////////End/////////////////////// 

ودا الانبسي .

كود:
#region ClaimGuildPrize

                
case 44821144:
                    {
                        switch (
npcRequest.OptionID)
                        {
                            case 
0:
                                {
                                    
client.Entity.Update(_String.Effect, "break_start", true);
                                    
dialog.Text("Hello there. Do you want to Claim GuildWar Prize you can only Claim it 1 Time if you won GW.");
                                    
dialog.Option("Please Sent Me To Map Poles", 80);
                                    
dialog.Option("Leme Claim [ Pole 1 ]", 1);
                                    
dialog.Option("Leme Claim [ Pole 2 ]", 2);
                                    
dialog.Option("Leme Claim [ Pole 3 ]", 3);
                                    
dialog.Option("Leme Claim [ Pole 4 ]", 4);
                                    
dialog.Option("Leme Claim [ Pole 5 ]", 5);
                                    
dialog.Option("Just Passing By!", 255);
                                    
dialog.Send();
                                    break;
                                }
                                case 
80:
                                {
                                    if (
client.Entity.ConquerPoints >= 0)
                                    {
                                        
client.Entity.Money -= 0;
                                        if (
client.Entity.ContainsFlag(Update.Flags.Ride))
                                           
                                        {
                                            
client.Entity.RemoveFlag(Update.Flags.Ride);
                                           
                                        }
                                        
client.Entity.Teleport(5002, 311, 287);
                                    }
                                    else
                                    {
                                        
dialog.Text("You need 50 silvers to be able to enter the jail.");
                                        
dialog.Option("Alright.", 255);
                                    }
                                    break;
                                }
                          case 
1:
                                {
                                    if (!
Pole1.IsWar)
                                    {
                                        if (
client.Guild != null)
                                        { if (
Pole1.KeeperID != 0)
                                            {
                                                if (
Pole1.Claim && client.AsMember.Rank == Game.Enums.GuildMemberRank.GuildLeader && client.Guild.ID == Pole1.KeeperID)
                                           
                                                {
                                                    
Pole1.Claim = false;
                                                    
Pole1.KeeperID = 0;
                                                    
Conquer_Online_Server.Kernel.SendWorldMessage(new Message("Congratulations! " + client.Entity.Name + " claimed the prize 250 M ConquerPoints for winning the Pole 1.", System.Drawing.Color.Black, Message.Center), Program.Values);
                                                    
client.Entity.AddTopStatus(Update.Flags2.ConuqerSuperYellow, DateTime.Now.AddDays(1));
                                                    
client.Entity.AddTopStatus(Update.Flags3.MRConquerHost, DateTime.Now.AddDays(1));
                                                    
client.Entity.AddTopStatus(Update.Flags2.ConuqerSuperBlue, DateTime.Now.AddDays(1));
                                                    
client.Entity.AddTopStatus(Update.Flags2.ConuqerSuperUnderBlue, DateTime.Now.AddDays(1));   
                                                    
Program.AddWarLog("PoleTwin", "5M CPS", client.Entity.Name);
                                                }
                                                else
                                                {
                                                    
dialog.Text("sorry u dont have any prize to claim....");
                                                    
dialog.Option("okay", 255);
                                                    
dialog.Send();
                                                    break;
                                                }
                                            }
                                        }
                                        else
                                        {
                                            
dialog.Text("sorry u dont have any prize to claim");
                                            
dialog.Option("okay", 255);
                                            
dialog.Send();
                                            break;
                                        }
                                    }
                                    else
                                    {
                                        
dialog.Text("Hey there " + client.Entity.Name + " You can't get the prize while the war is on!");
                                        
dialog.Option("okay", 255);
                                        
dialog.Send();
                                        break;
                                    }
                                    break;
                                }
                        
                            case 
2:
                                {
                                    if (
Pole2.Claim && client.AsMember.Rank == Game.Enums.GuildMemberRank.GuildLeader && client.Guild.ID == Pole2.KeeperID)
                                    {
                                        
//#warning GUILD WAR PRIZE
                                        //Program.AddWarLog("GuildWar", "200000", client.Entity.Name);
                                        
Pole2.Claim = false;
                                        
Pole2.KeeperID = 0;
                                        
client.Entity.ConquerPoints += 250000000;
                                    
                                        
client.Entity.AddTopStatus(Update.Flags2.ConuqerSuperYellow, DateTime.Now.AddDays(1));
                                        
client.Entity.AddTopStatus(Update.Flags3.MRConquerHost, DateTime.Now.AddDays(1));
                                        
client.Entity.AddTopStatus(Update.Flags2.ConuqerSuperBlue, DateTime.Now.AddDays(1));
                                        
client.Entity.AddTopStatus(Update.Flags2.ConuqerSuperUnderBlue, DateTime.Now.AddDays(1));
                                        
Conquer_Online_Server.Kernel.SendWorldMessage(new Message("Congratulations! " + client.Entity.Name + " Leader of " + client.Guild.PoleKeeper + " The winner Pole 2 has Claimed Guild War Prize 250 M #35", System.Drawing.Color.White, Message.TopLeft), Program.Values);
                                    }
                                    else
                                    {
                                        
dialog.Text("Sorry you dont have Any Prize to claim only GL of the winner Pole2 can claim Prize After GW");
                                        
dialog.Option("Ahh.", 255);
                                        
dialog.Send();
                                    }
                                    break;
                                }
                            case 
3:
                                {
                                    if (
Pole3.Claim && client.AsMember.Rank == Game.Enums.GuildMemberRank.GuildLeader && client.Guild.ID == Pole3.KeeperID)
                                    {
                                        
//#warning GUILD WAR PRIZE
                                        //Program.AddWarLog("GuildWar", "200000", client.Entity.Name);
                                        
Pole3.Claim = false;
                                        
Pole3.KeeperID = 0;
                                        
client.Entity.ConquerPoints += 250000000;
                                   
                                        
client.Entity.AddTopStatus(Update.Flags2.ConuqerSuperYellow, DateTime.Now.AddDays(1));
                                        
client.Entity.AddTopStatus(Update.Flags3.MRConquerHost, DateTime.Now.AddDays(1));
                                        
client.Entity.AddTopStatus(Update.Flags2.ConuqerSuperBlue, DateTime.Now.AddDays(1));
                                        
client.Entity.AddTopStatus(Update.Flags2.ConuqerSuperUnderBlue, DateTime.Now.AddDays(1));
                                        
Conquer_Online_Server.Kernel.SendWorldMessage(new Message("Congratulations! " + client.Entity.Name + " Leader of " + client.Guild.PoleKeeper + " The winner Pole 3 has Claimed Guild War Prize 250 M #35", System.Drawing.Color.White, Message.TopLeft), Program.Values);
                                    }
                                    else
                                    {
                                        
dialog.Text("Sorry you dont have Any Prize to claim only GL of the winner Pole3 can claim Prize After GW");
                                        
dialog.Option("Ahh.", 255);
                                        
dialog.Send();
                                    }
                                    break;
                                }
                            case 
4:
                                {
                                    if (
Pole4.Claim && client.AsMember.Rank == Game.Enums.GuildMemberRank.GuildLeader && client.Guild.ID == Pole4.KeeperID)
                                    {
                                        
//#warning GUILD WAR PRIZE
                                        //Program.AddWarLog("GuildWar", "200000", client.Entity.Name);
                                        
Pole4.Claim = false;
                                        
Pole4.KeeperID = 0;
                                        
client.Entity.ConquerPoints += 250000000;
                                        
                                        
client.Entity.AddTopStatus(Update.Flags2.ConuqerSuperYellow, DateTime.Now.AddDays(1));
                                        
client.Entity.AddTopStatus(Update.Flags3.MRConquerHost, DateTime.Now.AddDays(1));
                                        
client.Entity.AddTopStatus(Update.Flags2.ConuqerSuperBlue, DateTime.Now.AddDays(1));
                                        
client.Entity.AddTopStatus(Update.Flags2.ConuqerSuperUnderBlue, DateTime.Now.AddDays(1));
                                        
Conquer_Online_Server.Kernel.SendWorldMessage(new Message("Congratulations! " + client.Entity.Name + " Leader of " + client.Guild.PoleKeeper + " The winner Pole 4 has Claimed Guild War Prize 250 M #35", System.Drawing.Color.White, Message.TopLeft), Program.Values);
                                    }
                                    else
                                    {
                                        
dialog.Text("Sorry you dont have Any Prize to claim only GL of the winner Pole4 can claim Prize After GW");
                                        
dialog.Option("Ahh.", 255);
                                        
dialog.Send();
                                    }
                                    break;
                                }
                            case 
5:
                                {
                                    if (
Pole1.Claim && client.AsMember.Rank == Game.Enums.GuildMemberRank.GuildLeader && client.Guild.ID == Pole1.KeeperID)
                                    {
                                        
//#warning GUILD WAR PRIZE
                                        //Program.AddWarLog("GuildWar", "200000", client.Entity.Name);
                                        
Pole5.Claim = false;
                                        
Pole5.KeeperID = 0;
                                        
client.Entity.ConquerPoints += 500000000;
                                   
                                        
client.Entity.AddTopStatus(Update.Flags2.ConuqerSuperYellow, DateTime.Now.AddDays(1));
                                        
client.Entity.AddTopStatus(Update.Flags3.MRConquerHost, DateTime.Now.AddDays(1));
                                          
Conquer_Online_Server.Kernel.SendWorldMessage(new Message("Congratulations! " + client.Entity.Name + " Leader of " + client.Guild.PoleKeeper + " The winner Pole 5 has Claimed Guild War Prize 500 M #35", System.Drawing.Color.White, Message.TopLeft), Program.Values);
                                      
client.Entity.AddTopStatus(Update.Flags2.ConuqerSuperBlue, DateTime.Now.AddDays(1));
                                        
client.Entity.AddTopStatus(Update.Flags2.ConuqerSuperUnderBlue, DateTime.Now.AddDays(1));
                                    }
                                    else
                                    {
                                        
dialog.Text("Sorry you dont have Any Prize to claim only GL of the winner Pole5 can claim Prize After GW");
                                        
dialog.Option("Ahh.", 255);
                                        
dialog.Send();
                                    }
                                    break;
                                }
                       
                           
                        }
                        break;
                    }
                
#endregion 

نسيت اكواد ال Handle.cs
ابحث عـن

كود:
public static void ReceiveAttack(Game.Entity attacker, SobNpcSpaw 

وضيف تحتـو دول

كود:
if (attacker.MapID == 5002) 
            { 
                if (
attacked.UID == 818) 
                { 
                    if (
Game.Pole1.PoleKeeper == attacker.Owner.Guild) 
                        return; 
                    if (
attacked.Hitpoints <= damage) 
                        
attacked.Hitpoints = 0; 
                    
Game.Pole1.AddScore(damage, attacker.Owner.Guild); 
                } 
            } 
            if (
attacker.MapID == 5002) 
            { 
                if (
attacked.UID == 8189) 
                { 
                    if (
Game.Pole2.PoleKeeper == attacker.Owner.Guild) 
                        return; 
                    if (
attacked.Hitpoints <= damage) 
                        
attacked.Hitpoints = 0; 
                    
Game.Pole2.AddScore(damage, attacker.Owner.Guild); 
                } 
            } 
            if (
attacker.MapID == 5002) 
            { 
                if (
attacked.UID == 8188) 
                { 
                    if (
Game.Pole3.PoleKeeper == attacker.Owner.Guild) 
                        return; 
                    if (
attacked.Hitpoints <= damage) 
                        
attacked.Hitpoints = 0; 
                    
Game.Pole3.AddScore(damage, attacker.Owner.Guild); 
                } 
            } 
            if (
attacker.MapID == 5002) 
            { 
                if (
attacked.UID == 8187) 
                { 
                    if (
Game.Pole4.PoleKeeper == attacker.Owner.Guild) 
                        return; 
                    if (
attacked.Hitpoints <= damage) 
                        
attacked.Hitpoints = 0; 
                    
Game.Pole4.AddScore(damage, attacker.Owner.Guild); 
                } 
            } 
            if (
attacker.MapID == 5002) 
            { 
                if (
attacked.UID == 8187) 
                { 
                    if (
Game.Pole4.PoleKeeper == attacker.Owner.Guild) 
                        return; 
                    if (
attacked.Hitpoints <= damage) 
                        
attacked.Hitpoints = 0; 
                    
Game.Pole5.AddScore(damage, attacker.Owner.Guild); 
                } 
            } 

وابحث عن

كود:
public static bool CanAttack(Game.Entity attacker, SobNpcSpawn 

وضيف دا تحتو

كود:
if (attacker.MapID == 5002) 
            { 
                if (
attacker.GuildID == 0 || !Game.Pole5.IsWar) 
                { 
                    if (
attacked.UID == 8186) 
                    { 
                        return 
false; 
                    } 
                } 
                if (
Game.Pole5.PoleKeeper != null) 
                { 
                    if (
Game.Pole5.PoleKeeper == attacker.Owner.Guild) 
                    { 
                        if (
attacked.UID == 8186) 
                        { 
                            return 
false; 
                        } 
                    } 
                    else if (
attacked.UID == 516075 || attacked.UID == 516074) 
                    { 
                        if (
Game.Pole3.PoleKeeper == attacker.Owner.Guild) 
                        { 
                            if (
attacker.PKMode == Enums.PKMode.Team) 
                                return 
false; 
                        } 
                    } 
                } 
            } 
            
//////////////////////// 
            
if (attacker.MapID == 5002) 
            { 
                if (
attacker.GuildID == 0 || !Game.Pole4.IsWar) 
                { 
                    if (
attacked.UID == 8187) 
                    { 
                        return 
false; 
                    } 
                } 
                if (
Game.Pole4.PoleKeeper != null) 
                { 
                    if (
Game.Pole4.PoleKeeper == attacker.Owner.Guild) 
                    { 
                        if (
attacked.UID == 8187) 
                        { 
                            return 
false; 
                        } 
                    } 
                    else if (
attacked.UID == 516075 || attacked.UID == 516074) 
                    { 
                        if (
Game.Pole3.PoleKeeper == attacker.Owner.Guild) 
                        { 
                            if (
attacker.PKMode == Enums.PKMode.Team) 
                                return 
false; 
                        } 
                    } 
                } 
            } 
            
//////////////////////////////////////// 
            
if (attacker.MapID == 5002) 
            { 
                if (
attacker.GuildID == 0 || !Game.Pole3.IsWar) 
                { 
                    if (
attacked.UID == 8188) 
                    { 
                        return 
false; 
                    } 
                } 
                if (
Game.Pole3.PoleKeeper != null) 
                { 
                    if (
Game.Pole3.PoleKeeper == attacker.Owner.Guild) 
                    { 
                        if (
attacked.UID == 8188) 
                        { 
                            return 
false; 
                        } 
                    } 
                    else if (
attacked.UID == 516075 || attacked.UID == 516074) 
                    { 
                        if (
Game.Pole3.PoleKeeper == attacker.Owner.Guild) 
                        { 
                            if (
attacker.PKMode == Enums.PKMode.Team) 
                                return 
false; 
                        } 
                    } 
                } 
            } 
            
/////////////////////// 
            
if (attacker.MapID == 5002) 
            { 
                if (
attacker.GuildID == 0 || !Game.Pole2.IsWar) 
                { 
                    if (
attacked.UID == 8189) 
                    { 
                        return 
false; 
                    } 
                } 
                if (
Game.Pole2.PoleKeeper != null) 
                { 
                    if (
Game.Pole2.PoleKeeper == attacker.Owner.Guild) 
                    { 
                        if (
attacked.UID == 8189) 
                        { 
                            return 
false; 
                        } 
                    } 
                    else if (
attacked.UID == 516075 || attacked.UID == 516074) 
                    { 
                        if (
Game.Pole2.PoleKeeper == attacker.Owner.Guild) 
                        { 
                            if (
attacker.PKMode == Enums.PKMode.Team) 
                                return 
false; 
                        } 
                    } 
                } 
            } 
            
////////////////////////////////// 
            
if (attacker.MapID == 5002) 
            { 
                if (
attacker.GuildID == 0 || !Game.Pole1.IsWar) 
                { 
                    if (
attacked.UID == 818) 
                    { 
                        return 
false; 
                    } 
                } 
                if (
Game.Pole1.PoleKeeper != null) 
                { 
                    if (
Game.Pole1.PoleKeeper == attacker.Owner.Guild) 
                    { 
                        if (
attacked.UID == 818) 
                        { 
                            return 
false; 
                        } 
                    } 
                    else if (
attacked.UID == 516075 || attacked.UID == 516074) 
                    { 
                        if (
Game.Pole1.PoleKeeper == attacker.Owner.Guild) 
                        { 
                            if (
attacker.PKMode == Enums.PKMode.Team) 
                                return 
false; 
                        } 
                    } 
                } 
            } 

وفتح Program.cs
وبحث عن

كود:
Game.EliteGuildWar. 

وضيف تحتو دا

كود:
 Game.Pole2.EliteGwint(); 
                
Game.Pole3.EliteGwint(); 
                
Game.Pole4.EliteGwint(); 
                
Game.Pole5.EliteGwint(); 
                
Game.Pole1.EliteGwint(); 




العلامات المرجعية



الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1)
 

الانتقال السريع

المواضيع المتشابهه للموضوع: حرب البولات
الموضوع كاتب الموضوع المنتدى مشاركات آخر مشاركة
كوست البولات ال 4 مدن Hazem تطوير سيرفرات كونكر 1 2020-09-01 01:04 PM


الساعة الآن 11:02 AM