|
You last visited: Today at 21:55
Advertisement
Enemies/Allies?
Discussion on Enemies/Allies? within the CO2 Private Server forum part of the Conquer Online 2 category.
04/10/2014, 17:44
|
#1
|
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?
|
|
|
04/10/2014, 18:17
|
#2
|
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.
|
|
|
04/10/2014, 23:55
|
#3
|
elite*gold: 0
Join Date: Mar 2014
Posts: 219
Received Thanks: 27
|
Do you know the id of the sub type?
|
|
|
04/10/2014, 23:59
|
#4
|
elite*gold: 0
Join Date: Feb 2006
Posts: 726
Received Thanks: 271
|
|
|
|
04/11/2014, 00:00
|
#5
|
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()); }
}
|
|
|
04/11/2014, 00:56
|
#6
|
elite*gold: 0
Join Date: Feb 2006
Posts: 726
Received Thanks: 271
|
Quote:
Originally Posted by CptSky
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.
|
|
|
04/11/2014, 10:52
|
#7
|
elite*gold: 0
Join Date: Mar 2014
Posts: 219
Received Thanks: 27
|
Thank you all  . I will try and see what works out.
|
|
|
 |
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.
|
|