Register for your free account! | Forgot your password?

You last visited: Today at 21:55

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

Advertisement



Enemies/Allies?

Discussion on Enemies/Allies? within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
Wolfy.'s Avatar
 
elite*gold: 0
Join Date: Mar 2014
Posts: 219
Received Thanks: 27
Enemies/Allies?

What handles the guild name colors for allies/enemies? -Is it packet, sub packet or something like that? -Or only server side?
Wolfy. is offline  
Old 04/10/2014, 18:17   #2


 
CptSky's Avatar
 
elite*gold: 0
Join Date: Jan 2008
Posts: 1,445
Received Thanks: 1,176
MsgName packet. You send the guild Id or name (I think it's name) with a subtype saying that it's an ally.
CptSky is offline  
Old 04/10/2014, 23:55   #3
 
Wolfy.'s Avatar
 
elite*gold: 0
Join Date: Mar 2014
Posts: 219
Received Thanks: 27
Do you know the id of the sub type?
Wolfy. is offline  
Old 04/10/2014, 23:59   #4
 
elite*gold: 0
Join Date: Feb 2006
Posts: 726
Received Thanks: 271


Aceking is offline  
Old 04/11/2014, 00:00   #5


 
CptSky's Avatar
 
elite*gold: 0
Join Date: Jan 2008
Posts: 1,445
Received Thanks: 1,176
Not the best reference, but from my COPS v3 - Reborn Edition, which had Allies/Enemies working. Note that it is based on LOTF...

Code:
        public static void SendAllGuild(Character TheChar)
        {
            try
            {
                foreach (Guild TheGuild in Guilds.AllGuilds.Values)
                {
                    TheChar.MyClient.SendPacket(CoServer.MyPackets.GuildName(TheGuild.UniqId, TheGuild.Name));
                    if (TheChar.MyGuild != null && TheGuild != null)
                    {
                        if (TheChar.MyGuild == TheGuild)
                            TheChar.MyClient.SendPacket(CoServer.MyPackets.SendGuild(TheGuild.UniqId, 1));
                        else if (TheChar.MyGuild.Allies.Contains(TheGuild.UniqId))
                            TheChar.MyClient.SendPacket(CoServer.MyPackets.SendGuild(TheGuild.UniqId, 7));
                        else if (TheChar.MyGuild.Enemies.Contains(TheGuild.UniqId))
                            TheChar.MyClient.SendPacket(CoServer.MyPackets.SendGuild(TheGuild.UniqId, 9));
                        else
                            TheChar.MyClient.SendPacket(CoServer.MyPackets.SendGuild(TheGuild.UniqId, 8));
                    }
                    else
                        TheChar.MyClient.SendPacket(CoServer.MyPackets.SendGuild(TheGuild.UniqId, 8));
                }
            }
            catch (Exception Exc) { Program.WriteLine(Exc.ToString()); }
        }
CptSky is offline  
Old 04/11/2014, 00:56   #6
 
elite*gold: 0
Join Date: Feb 2006
Posts: 726
Received Thanks: 271
Quote:
Originally Posted by CptSky View Post
Not the best reference, but from my COPS v3 - Reborn Edition, which had Allies/Enemies working. Note that it is based on LOTF...

Code:
        public static void SendAllGuild(Character TheChar)
        {
            try
            {
                foreach (Guild TheGuild in Guilds.AllGuilds.Values)
                {
                    TheChar.MyClient.SendPacket(CoServer.MyPackets.GuildName(TheGuild.UniqId, TheGuild.Name));
                    if (TheChar.MyGuild != null && TheGuild != null)
                    {
                        if (TheChar.MyGuild == TheGuild)
                            TheChar.MyClient.SendPacket(CoServer.MyPackets.SendGuild(TheGuild.UniqId, 1));
                        else if (TheChar.MyGuild.Allies.Contains(TheGuild.UniqId))
                            TheChar.MyClient.SendPacket(CoServer.MyPackets.SendGuild(TheGuild.UniqId, 7));
                        else if (TheChar.MyGuild.Enemies.Contains(TheGuild.UniqId))
                            TheChar.MyClient.SendPacket(CoServer.MyPackets.SendGuild(TheGuild.UniqId, 9));
                        else
                            TheChar.MyClient.SendPacket(CoServer.MyPackets.SendGuild(TheGuild.UniqId, 8));
                    }
                    else
                        TheChar.MyClient.SendPacket(CoServer.MyPackets.SendGuild(TheGuild.UniqId, 8));
                }
            }
            catch (Exception Exc) { Program.WriteLine(Exc.ToString()); }
        }
No its not the greatest reference in the world, but the enum's is mainly what he needed.
As far as the packet goes, every public source has them so it wouldn't be terribly difficult to figure out.
Aceking is offline  
Old 04/11/2014, 10:52   #7
 
Wolfy.'s Avatar
 
elite*gold: 0
Join Date: Mar 2014
Posts: 219
Received Thanks: 27
Thank you all . I will try and see what works out.
Wolfy. is offline  
Reply


Similar Threads Similar Threads
[Request] Guild allies and enemies
02/03/2012 - CO2 Private Server - 2 Replies
hello guyz could anyone of you help me to add the guilds enemies and allies i have made the one which reallesed by Arco before but its not work for me my source is Newsetco version 2 patch 5165 thanks anyway....
Save Guild Enemies/Allies
12/07/2010 - CO2 PServer Guides & Releases - 131 Replies
First and foremost this is for 5165 Tanel source. NewestCOServer. Well first define this in features/guilds.cs under public class Guild public Dictionary<uint, string> Allies = new Dictionary<uint, string>(); public Dictionary<uint, string> Enemies = new Dictionary<uint, string>(); public static void CreateNewGuild(string GName, ushort GID, Character Creator) And at the bottom of this void, put this
Release Spawn Guild Enemies / Allies !
10/11/2010 - CO2 PServer Guides & Releases - 3 Replies
5165 ftw.. Under String type public enum StringType { GuildName = 3, Spouse = 6, Effect = 10, GuildList = 11, ViewEquipSpouse = 16, Sound = 20,
[Problem]Guild Allies and Enemies
08/16/2010 - CO2 Private Server - 2 Replies
Well after two days of having a go at this, and one day of asking people for help, I finally decided it was time to ask the community for help. Well I am trying to load allies from the Guilds.dat file. They are defined as public Dictionary<uint, string> Allies = new Dictionary<uint, string>(); When something is added to the dictionary its like this. Allies.Add(GuildID, GuildName); Now when saving to the guild.dat file, its saved like this. BW.Write((int)Allies.Count); ...
allies and enemies
03/31/2010 - CO2 Private Server - 1 Replies
Anybody know if Guild Allie and Enemy code is released for LOTF? The status are added, but not codes for npc. And im to lazy to make it, so if is not released ill just leave it untill i got time to make it ^^ Thanks



All times are GMT +1. The time now is 21:56.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

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