First open World.cs then search for:
PHP Code:
public static Hashtable GWScores = new Hashtable();
PHP Code:
public static bool GW = false;
Search for:
PHP Code:
Thetimer = new System.Timers.Timer();
PHP Code:
System.Timers.Timer cTimer = new System.Timers.Timer(1000.0);
cTimer.Start();
cTimer.Elapsed += delegate { GuildWar(); };
System.Timers.Timer BTimer = new System.Timers.Timer(1000.0);
BTimer.Start();
BTimer.Elapsed += delegate { GuildWarEnd(); };
PHP Code:
public static void DoStuff()
PHP Code:
public static void GuildWar()
{
if (DateTime.Now.Minute == 00)
{
World.GW = true;
World.SendMsgToAll("There is GuildWar, hurry up to enter.", "SYSTEM", 2011);
}
}
public static void GuildWarEnd()
{
foreach (DictionaryEntry DE in World.AllChars)
{
Character Char = (Character)DE.Value;
if (DateTime.Now.Minute == 25 && World.Gw == true)
{
World.GW = false;
World.SendMsgToAll("GuildWar has auto ended.", "SYSTEM", 2011);
}
}
}
Search for:
PHP Code:
if (CurrentNPC == 600)
PHP Code:
if (CurrentNPC == 600) //Guild Controller
{
if (World.GW == true)
{
SendPacket(General.MyPackets.NPCSay("Would you like to enter GuildWars?"));
SendPacket(General.MyPackets.NPCLink("Oh Yes Please!", 1));
SendPacket(General.MyPackets.NPCLink("We have won and im GL, so i want the prize!", 2));
SendPacket(General.MyPackets.NPCLink("No No No, It's Too Scary!", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
else
{
SendPacket(General.MyPackets.NPCSay("GuildWar has not started, sorry or either is too late to join."));
SendPacket(General.MyPackets.NPCLink("We have won and im GL, so i want the prize!", 2));
SendPacket(General.MyPackets.NPCLink("Okay sorry.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}
Search for:
PHP Code:
if (MyChar.MyGuild != null && MyChar.MyGuild == World.PoleHolder
PHP Code:
if (CurrentNPC == 600)
{
if (Control == 1)
{
Random R = new Random();
int Nr = R.Next(1, 10);
if (Nr == 1) //Random Spot 1
{
MyChar.Teleport(1038, 351, 341);
}
if (Nr == 2) //Random Spot 2
{
MyChar.Teleport(1038, 335, 345);
}
if (Nr == 3) //Random Spot 3
{
MyChar.Teleport(1038, 309, 369);
}
if (Nr == 4) //Random Spot 4
{
MyChar.Teleport(1038, 283, 340);
}
if (Nr == 5) //Random Spot 5
{
MyChar.Teleport(1038, 310, 327);
}
if (Nr == 6) //Random Spot 6
{
MyChar.Teleport(1038, 318, 297);
}
if (Nr == 7) //Random Spot 7
{
MyChar.Teleport(1038, 347, 309);
}
if (Nr == 8) //Random Spot 8
{
MyChar.Teleport(1038, 337, 320);
}
if (Nr == 9) //Random Spot 9
{
MyChar.Teleport(1038, 309, 293);
}
if (Nr == 10) //Random Spot 10
{
MyChar.Teleport(1038, 371, 300);
}
}
if (Control == 2)
{
if (MyChar.MyGuild != null && MyChar.MyGuild == World.PoleHolder && MyChar.GuildPosition == 100 && !MyChar.MyGuild.ClaimedPrize && MyChar.ItemsInInventory < 40)
{
MyChar.AddItem("1088000-0-0-0-0-0", 0, (uint)General.Rand.Next(346623472)); //LOL a dragonball
MyChar.MyGuild.ClaimedPrize = true;
}
else
{
SendPacket(General.MyPackets.NPCSay("Either the prize has been taken already, your guild has not been victorious the last time or you are not a deputy leader nor guild leader."));
SendPacket(General.MyPackets.NPCLink("Ok.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}
}
and search for:
PHP Code:
foreach (DictionaryEntry DE in Guilds.AllGuilds)
{
Guild AGuild = (Guild)DE.Value;
AGuild.HoldingPole = false;
AGuild.ClaimedPrize = false;
if (AGuild.PoleDamaged > Highest)
PHP Code:
foreach (DictionaryEntry DE in Guilds.AllGuilds)
PHP Code:
Attacker.Attacking = false;
}
PHP Code:
foreach (DictionaryEntry DE in Guilds.AllGuilds)
{
Guild AGuild = (Guild)DE.Value;
AGuild.HoldingPole = false;
AGuild.ClaimedPrize = false;
if (AGuild.PoleDamaged > Highest)
{
Highest = AGuild.PoleDamaged;
Winner = AGuild;
}
AGuild.PoleDamaged = 0;
}
if (Winner != null && World.GW == true)
{
Winner.HoldingPole = true;
World.GW = false;
World.PoleHolder = Winner;
World.SendMsgToAll(Winner.GuildName + " has won the guildwar! The GuildLeader can now go take his/hers Dragonball.", "SYSTEM", 2011);
World.SendMsgToAll("GuildWar has ended. The pole can't be taken, either if you hit it down. No entry allowed to GW.", "SYSTEM", 2005);
}
World.GWScores.Clear();
Attacker.TGTarget = null;
Attacker.Attacking = false;
}
Note:
Code:
The GuildWar Starts XX:00 Every Hour and AutoEnds XX:25 Also the GW Ends, if you hit down the pole :) Press thansk if i helped :) @Dont ask if i release my other tournaments ^^






