Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server > CO2 PServer Guides & Releases
You last visited: Today at 12:19

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

Advertisement



Release Spawn Guild Enemies / Allies !

Discussion on Release Spawn Guild Enemies / Allies ! within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
-Shunsui-'s Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 1,152
Received Thanks: 321
Release Spawn Guild Enemies / Allies !

5165 ftw.. Under String type
Code:
public enum StringType
    {
        GuildName = 3,
        Spouse = 6,
        Effect = 10,
        GuildList = 11,
        ViewEquipSpouse = 16,
        Sound = 20,
        GuildEnemies = 22,
        GuildAllies = 21,
    }
and this is how u call it, on THE MOTHER FUCKING SPAWN VOID,
Code:
public static void Spawns(Character C, bool Check)
        {
            try
            {
                COPacket CSpawn = ConquerPacket.SpawnEntity(C);
                foreach (Character CC in Game.H_Chars.Values)
                {
                    if (CC != C && CC.Loc.Map == C.Loc.Map && Calculate.InBox(C.Loc.X, C.Loc.Y, CC.Loc.X, CC.Loc.Y, 17) && !Calculate.InBox(C.Loc.PreviousX, C.Loc.PreviousY, CC.Loc.X, CC.Loc.Y, 17) || !Check)
                    {
                        if (CC.EntityID != C.EntityID)
                        {
                            #region guild name spawn
                            C.Client.Send(ConquerPacket.SpawnEntity(CC));
                            if (C.Guild != null)
                            {
                                Guild T = C.Guild;
                                #region spawn guild name
                                if (CC.Guild != null)
                                {
                                    Guild M = CC.Guild;
                                    if (M.Enemies.ContainsKey(T.ID))
                                        CC.Client.Send(ConquerPacket.String(T.ID, (byte)StringType.GuildEnemies, T.Name));
                                    else if (M.Allies.ContainsKey(T.ID))
                                        CC.Client.Send(ConquerPacket.String(T.ID, (byte)StringType.GuildAllies, T.Name));
                                    else
                                        CC.Client.Send(ConquerPacket.String(T.ID, (byte)StringType.GuildName, T.Name));
                                }
                                else
                                {
                                    CC.Client.Send(ConquerPacket.String(CC.Guild.ID, (byte)StringType.GuildName, CC.Guild.Name));
                                }
                                #endregion
                            }

                            CC.Client.Send(CSpawn);
                            if (CC.Guild != null)
                            {
                                Guild T = CC.Guild;
                                #region spawn guild name
                                if (C.Guild != null)
                                {
                                    Guild M = C.Guild;
                                    if (M.Enemies.ContainsKey(T.ID))
                                        C.Client.Send(ConquerPacket.String(T.ID, (byte)StringType.GuildEnemies, T.Name));
                                    else if (M.Allies.ContainsKey(T.ID))
                                        C.Client.Send(ConquerPacket.String(T.ID, (byte)StringType.GuildAllies, T.Name));
                                    else
                                        C.Client.Send(ConquerPacket.String(T.ID, (byte)StringType.GuildName, T.Name));
                                }
                                else
                                {
                                    C.Client.Send(ConquerPacket.String(C.Guild.ID, (byte)StringType.GuildName, C.Guild.Name));
                                }
                                #endregion
                            }
                            #endregion
                           
                        }
                    }
                }
p.s.. use arcos save and load
-Shunsui- is offline  
Thanks
4 Users
Old 10/11/2010, 06:20   #2
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
When impulse posts on this thread I'll press thanks on him
Arcо is offline  
Old 10/11/2010, 08:11   #3
 
elite*gold: 0
Join Date: Oct 2010
Posts: 21
Received Thanks: 17
Thanks Jose jalapeño on a stick.
-diRt is offline  
Old 10/11/2010, 13:02   #4
 
elite*gold: 0
Join Date: Apr 2010
Posts: 291
Received Thanks: 61
Thanks.
†he Knight is offline  
Reply


Similar Threads Similar Threads
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); ...



All times are GMT +2. The time now is 12:19.


Powered by vBulletin®
Copyright ©2000 - 2024, 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 ©2024 elitepvpers All Rights Reserved.