Hello, i will show you how to fix guildwar in lotf.
First open World.cs
Then under:
Code:
public static Hashtable GWScores = new Hashtable();
Code:
public static bool GW = false;
Code:
public static void UsingSkill
Code:
public static void GWOFF(Character User)
{
if (User.LocMap == 1038)
{
if (GW == false)
{
User.Teleport(1002, 431, 379);
}
}
}
Search for:
Code:
public void Drop()
Code:
if (MyChar.LocMap == 700)
{
MyChar.CPs += 27;
SendPacket(General.MyPackets.Vital(MyChar.UID, 30, MyChar.CPs));
MyChar.Teleport(1036, 200, 200);
}
Code:
if (MyChar.LocMap == 1038)
{
if (World.GW == false)
{
MyChar.Teleport(1002, 431, 379);
}
}
and search for:
Code:
World.SendMsgToAll(Winner.GuildName + " has won!", "SYSTEM", 2011);
Code:
World.GW = false;
Now the npc for guildwar
(Thanks to PeTe Ninja for the Random thing)
NPC Talk:
Code:
if (CurrentNPC == 600) //Guild Controller
{
if (World.GW == true)
{
SendPacket(General.MyPackets.NPCSay("Would you like to enter Guild Wars?."));
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));//This is only because if you take reward before a new winner comes
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
else
{
SendPacket(General.MyPackets.NPCSay("GuildWar has not started, sorry. If you are GL you can claim your prize."));
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());
}
}
Code:
if (CurrentNPC == 600) // Guild Controller Do
{
if (Control == 1) // What it does for your Respond
{
Random R = new Random(); // New Random
int Nr = R.Next(1, 10); // "Randomally" Picks a number 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("720028-0-0-0-0-0", 0, (uint)General.Rand.Next(345636635));
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());
}
}
}
Search for:
Code:
if (Status == 8)
Code:
if (Splitter[0] == "/gwon")
{
World.GW = true;
World.SendMsgToAll("GuildWar has open, hurry up to the area.", "SYSTEM", 2011);
}
Hope you could use it






