|
You last visited: Today at 12:19
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.
10/11/2010, 06:13
|
#1
|
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
|
|
|
10/11/2010, 06:20
|
#2
|
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
|
|
|
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.
|
|
|
10/11/2010, 13:02
|
#4
|
elite*gold: 0
Join Date: Apr 2010
Posts: 291
Received Thanks: 61
|
Thanks.
|
|
|
|
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.
|
|