Save Guild Enemies/Allies

10/05/2010 15:32 Arcо#76
Quote:
Originally Posted by marlyandedsel View Post
its error in my source i duno why maybe you should recode using tanels source, please and thanks in advance
It is for Tanel's 5165, its just with shortcut voids. Its easy to convert.
10/05/2010 22:29 FadMucker#77
Quote:
Originally Posted by Аrco View Post
Just add the name to the dictionary like so;
GC.MyChar.MyGuild.Allies.Add(string, uint);
hey dud if it wudnt be too much trouble cud you point me to the exact location for this because im still having trouble :/
thanks.
10/05/2010 23:00 Arcо#78
Wherever it is your doing the method.
10/05/2010 23:47 FadMucker#79
seem to have gotten rid of all the errors but it doesnt add allies ingame :/ heres the code im using.

Quote:
if (Control == 7)
{
if (GC.MyChar.MyGuild != null && GC.MyChar.GuildRank == NewestCOServer.Features.GuildRank.GuildLeader)
{

GC.AddSend(Packets.NPCSay("Who would you like to ally?"));
GC.AddSend(Packets.NPCLink("Ally", 8));
GC.AddSend(Packets.NPCLink("Nevermind.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
else
{
GC.AddSend(Packets.NPCSay("Only the GuildLeader can allie a guild."));
GC.AddSend(Packets.NPCLink("Oh, i forgot...", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}

if (Control == 8)
{
if (GC.MyChar.MyGuild != null && GC.MyChar.GuildRank == NewestCOServer.Features.GuildRank.GuildLeader)
{
string Ally = ReadString(Data);
foreach (Features.Guild g in Features.Guilds.AllTheGuilds.Values)
{
if (g.GuildName == Ally)
{
if (g.Creator.Info != null)
{
if (g.Creator.Info.MyTeam.Members.Contains(GC.MyChar. EntityID))
{
if (!GC.MyChar.MyGuild.Allies.ContainsValue(Ally))
{


GC.MyChar.MyGuild.Allies.Add(0, Ally);
GC.AddSend(Packets.String(g.GuildID, 21, Ally));
GC.AddSend(Packets.NPCSay(g.GuildName + " is now your ally!"));
GC.AddSend(Packets.NPCLink("Thanks", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());

}
else
{
GC.AddSend(Packets.NPCSay(g.GuildName + " is already your ally."));
GC.AddSend(Packets.NPCLink("Oh my bad", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
}
else
{
GC.AddSend(Packets.NPCSay("Make sure the guild leader of the Allie guild is in your team."));
GC.AddSend(Packets.NPCLink("Okay", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
10/05/2010 23:51 Arcо#80
What is happening when you try?
10/06/2010 00:02 FadMucker#81
the npc works ok upto clicking the link ally (link 8)
then nothin, none of the other dialog boxes pop up and it doeant add as allie.
10/06/2010 00:05 Arcо#82
You're using NPCLink2 for control 7 right?
10/06/2010 00:08 FadMucker#83
no... shud i be?

Quote:
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("I am what my name says. I create and manage guilds. So what do you want to do?"));
GC.AddSend(Packets.NPCLink("Create Guild", 1));
GC.AddSend(Packets.NPCLink("Deputize", 3));
GC.AddSend(Packets.NPCLink("Disband my guild", 5));
GC.AddSend(Packets.NPCLink("Allie Guild.", 7));
GC.AddSend(Packets.NPCLink("Just passing by.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
#region Create
else if (Control == 1)
10/06/2010 00:10 Arcо#84
GC.AddSend(Packets.NPCLink("Allie Guild.", 7));
should be
GC.AddSend(Packets.NPCLink2("Allie Guild.", 7));

NPCLink2 causes the box to pop up where you type in the name of the guild.
10/06/2010 00:17 FadMucker#85
Quote:
Originally Posted by Аrco View Post
GC.AddSend(Packets.NPCLink("Allie Guild.", 7));
should be
GC.AddSend(Packets.NPCLink2("Allie Guild.", 7));

NPCLink2 causes the box to pop up where you type in the name of the guild.
i dont want to have to type the name in.i want it like normal, leaders join a team click ally and they turn to allies :/
10/06/2010 00:18 Arcо#86
Quote:
Originally Posted by FadMucker View Post
i dont want to have to type the name in.i want it like normal, leaders join a team click ally and they turn to allies :/
You have to, cause what you type in, is what is being added to the dictionary.
10/06/2010 00:22 FadMucker#87
Quote:
Originally Posted by Аrco View Post
You have to, cause what you type in, is what is being added to the dictionary.
Would both of the leaders in the team have to type each others guildname?
How would i change it all so i dont have to type??
10/06/2010 00:24 Arcо#88
You can't. They both need to type it in.
10/06/2010 00:28 FadMucker#89
ok thanks for your help..

ive played a few private server and theyve had the original guild system to add/remove ally/unally etc. whats make my server/source any different?
10/06/2010 00:30 Arcо#90
Nothing at all my friend.