Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 12:48

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



help with TopGL and DL

Discussion on help with TopGL and DL within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
zoro7070's Avatar
 
elite*gold: 0
Join Date: Aug 2008
Posts: 144
Received Thanks: 18
Exclamation help with TopGL and DL


i used that code to add top guild leader flag to winner guild but the problem when the war start the flag doesn't remove here is the c# code
Code:
if (client.Guild != null)
            {
                if (client.Entity.GuildRank == (ushort)Game.Enums.GuildMemberRank.DeputyLeader)
                {
                    if (client.Guild.Name == Game.ConquerStructures.Society.GuildWar.Pole.Name || Game.ConquerStructures.Society.GuildWar.IsWar == false)
                    {
                        client.Entity.AddFlag(Update.Flags.TopDeputyLeader);
                    }
                    else
                    {
                        client.Entity.RemoveFlag(Update.Flags.TopDeputyLeader);
                    }
                }
                else if (client.Entity.GuildRank == (ushort)Game.Enums.GuildMemberRank.GuildLeader)
                {
                    if (client.Guild.Name == Game.ConquerStructures.Society.GuildWar.Pole.Name || Game.ConquerStructures.Society.GuildWar.IsWar == false)
                    {
                       client.Entity.AddFlag(Update.Flags.TopGuildLeader);
                    }
                    else
                    {
                        client.Entity.RemoveFlag(Update.Flags.TopGuildLeader);
                    }
                }

            }
i have another problems the player skills don't save i use @save but didn't do anything
Code:
case "@save":
                    {
                        using (var conn = Database.DataHolder.MySqlConnection)
                        {
                            conn.Open();

                            var WC = ServerBase.Kernel.GamePool.Values.ToArray();
                            int total = WC.Length;
                            foreach (Client.GameState client in WC)
                            {
                                client.Account.Save(conn);
                                Database.EntityTable.SaveEntity(client, conn);
                                Database.SkillTable.SaveSkills(client, conn);
                                Database.ArenaTable.SaveArenaStatistics(client.ArenaStatistic, conn);
                            }
                            conn.Close();
                            new Database.MySqlCommand(Database.MySqlCommandType.UPDATE).Update("configuration")
    .Set("GuildID", Game.ConquerStructures.Society.Guild.GuildCounter.Now)
    .Set("ItemUID", Network.GamePackets.ConquerItem.ItemUID.Now)
    .Set("DetainItemUID", Database.DetainedItemTable.Counter.Now).Set("ClanUID", Game.Clans.ClanCount.Now)
    .Where("Server", ServerBase.Constants.ServerName).Execute();

                        }
                    }

zoro7070 is offline  
Old 03/31/2012, 07:12   #2
 
Sp!!ke's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 380
Received Thanks: 58
learn to code baby , first it's my code but you don't know how to use it ! and for skills , 5517 source it's a fking **** ! , you need to re-code skill save table
Sp!!ke is offline  
Old 03/31/2012, 11:26   #3
 
shadowman123's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
y dont u reset top halos every Saterday and fix the above code
shadowman123 is offline  
Thanks
1 User
Old 03/31/2012, 14:52   #4
 
zoro7070's Avatar
 
elite*gold: 0
Join Date: Aug 2008
Posts: 144
Received Thanks: 18
Talking

Quote:
Originally Posted by shadowman123 View Post
y dont u reset top halos every Saterday and fix the above code
can you help be fix saving skils
zoro7070 is offline  
Old 03/31/2012, 14:57   #5
 
shadowman123's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
Quote:
Originally Posted by zoro7070 View Post
can you help be fix saving skils
actualy i solved this problem in my source but sry i dont give codes away ..Check Trinity Source
shadowman123 is offline  
Old 03/31/2012, 15:20   #6
 
zoro7070's Avatar
 
elite*gold: 0
Join Date: Aug 2008
Posts: 144
Received Thanks: 18
ok np thanks for your help
zoro7070 is offline  
Old 03/31/2012, 16:12   #7
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
Static Guild CurrentWinner

//on win
foreach(Player p in GuildManager.CurrentWinner.Members)
{
p.RemoveEffect(TopGuildHaloEffect);
p.RemoveEffect(TopDepHaloEffect);
}
GuildManager.CurrentWinner = newWinner;
foreach(Player p in GuildManager.CurrentWinner.Members)
{
if(p.Guild.Rank == GuildLeader)
p.AddEffect(TopGuildHaloEffect);
else if(p.Guild.Rank == DeputyLeader)
p.AddEffect(TopGuildHaloEffect)
}


Something like that is how I'd do it. Just store the current winner and add/remove effects every time the winner changes.
pro4never is offline  
Thanks
2 Users
Old 03/31/2012, 18:56   #8
 
zoro7070's Avatar
 
elite*gold: 0
Join Date: Aug 2008
Posts: 144
Received Thanks: 18
you are the best
zoro7070 is offline  
Old 04/01/2012, 21:33   #9
 
Sp!!ke's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 380
Received Thanks: 58
pro4never I'm sure him thanked you for the code but can't understand what you trying to explain !
Sp!!ke is offline  
Old 04/05/2012, 19:53   #10
 
zoro7070's Avatar
 
elite*gold: 0
Join Date: Aug 2008
Posts: 144
Received Thanks: 18
Smile

Quote:
Originally Posted by Sp!!ke View Post
pro4never I'm sure him thanked you for the code but can't understand what you trying to explain !
of course i do
zoro7070 is offline  
Reply




All times are GMT +1. The time now is 12:49.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.