This is for the 5165Source by Tanel.
First replace your GWNPC with this:
Code:
#region GWArenaNPC
case 380:
{
if (Control == 0)
{
if (Features.GuildWars.GWW == true)
{
GC.AddSend(Packets.NPCSay("Do you want enter the guild arena?"));
GC.AddSend(Packets.NPCLink("Yes.", 1));
GC.AddSend(Packets.NPCLink("I have won GW and want my price.", 2));
GC.AddSend(Packets.NPCLink("Just passing by.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
else
{
GC.AddSend(Packets.NPCSay("There is no GuildWar going on."));
GC.AddSend(Packets.NPCLink("I have won GW and want my price.", 2));
GC.AddSend(Packets.NPCLink("I see.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
}
if (Control == 1)
{
GC.MyChar.Teleport(1038, 350, 350);
}
if (Control == 2)
{
if (Features.GuildWars.LastWinner == GC.MyChar.MyGuild && Features.GuildWars.GWPRIZE == true && GC.MyChar.GuildRank == Features.GuildRank.GuildLeader)
{
foreach (Character Char in World.H_Chars.Values)
{
if (Char.GuildRank == Features.GuildRank.DeputyManager && Features.GuildWars.LastWinner == Char.MyGuild)
{
Char.Nobility.Donation += 20;
Game.World.NewEmpire(Char);
Char.StatEff.Add(StatusEffectEn.TopDeputyLeader);
GC.Message(2005, Char.Name + " has got the TopDL for being DL in the winner Guild of last GuildWar.");
}
if (Char.GuildRank == Features.GuildRank.GuildLeader && Features.GuildWars.LastWinner == Char.MyGuild)
{
Char.Nobility.Donation += 50;
Game.World.NewEmpire(Char);
Char.StatEff.Add(StatusEffectEn.TopGuildLeader);
GC.Message(2005, Char.Name + " has got the TopGL for being the leader in the winner Guild of last GuildWar.");
}
GC.MyChar.CPs += 1075;
Features.GuildWars.GWPRIZE = false;
GC.AddSend(Packets.NPCSay("Here is your CPs."));
GC.AddSend(Packets.NPCLink("Thanks.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
}
else if (Features.GuildWars.LastWinner == GC.MyChar.MyGuild && Features.GuildWars.GWPRIZE == true)
{
GC.AddSend(Packets.NPCSay("You are not the GuildLeader."));
GC.AddSend(Packets.NPCLink("I see.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
else
{
GC.AddSend(Packets.NPCSay("You have not won the GuildWar."));
GC.AddSend(Packets.NPCLink("I see.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
}
break;
}
#endregion
search for:
Code:
public class GuildWars
Code:
public static bool GWW = false;
public static bool GWPRIZE = false;
Code:
public static void EndWar()
Code:
public static void EndWar()
{
War = false;
TheLeftGate.Opened = false;
TheRightGate.Opened = false;
TheLeftGate.CurHP = TheLeftGate.MaxHP;
TheRightGate.CurHP = TheRightGate.MaxHP;
TheLeftGate.ReSpawn();
TheRightGate.ReSpawn();
GWScore Highest = new GWScore();
Highest.Score = 0;
foreach (GWScore Score in Scores.Values)
{
if (Score.Score > Highest.Score)
Highest = Score;
}
if (Highest.TheGuild != null)
{
foreach (Character Charr in World.H_Chars.Values)
{
if (Charr.Loc.Map == 1038)
{
GWW = false;
Charr.Teleport(1002, 400, 400);
LastWinner = Highest.TheGuild;
LastWinner.Wins++;
ThePole.ReSpawn();
GWPRIZE = true;
World.SendMsgToAll("SYSTEM", Highest.TheGuild.GuildName + " have won the GuildWars Congratulations!", 2011, 0);
}
else
{
GWW = false;
LastWinner = Highest.TheGuild;
LastWinner.Wins++;
ThePole.ReSpawn();
GWPRIZE = true;
World.SendMsgToAll("SYSTEM", Highest.TheGuild.GuildName + " have won the GuildWars Congratulations!", 2011, 0);
}
}
}
SendScores();
Scores = new Hashtable();
}
}
}
Code:
Features.GuildWars.GWW = true;






