Enemies/Allies?

04/10/2014 17:44 Wolfy.#1
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 CptSky#2
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 Wolfy.#3
Do you know the id of the sub type?
04/10/2014 23:59 Aceking#4
[Only registered and activated users can see links. Click Here To Register...]

[Only registered and activated users can see links. Click Here To Register...]
04/11/2014 00:00 CptSky#5
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 Aceking#6
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.
04/11/2014 10:52 Wolfy.#7
Thank you all :). I will try and see what works out.