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.
[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
[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