Well this is for those using Korvacs PKTournament and using my original SaveHaloes method.
Very simple, just a few class checks.
Go to PKTournament.cs and search for
Code:
public static void BeginTournament()
and above it put this
Code:
public static void BeginNinja()
{
foreach (Character Char in World.H_Chars.Values)
{
if (Char.Job == 55)
{
Char.MyClient.DialogNPC = 666111;
PacketHandling.NPCDialog.Handle(Char.MyClient, null, 666111, 0);
Char.MyClient.EndSend();
}
}
Stage = PKTournamentStage.Inviting;
while (CountDown > 0)
{
if (CountDown == 20)
Broadcast("20 seconds until start", BroadCastLoc.World);
else if (CountDown == 10)
{
Stage = PKTournamentStage.Countdown;
if (PKTHash.Count < 2)
{
Broadcast("The tournament requires atleast 2 people to start, Tournament Cancelled.", BroadCastLoc.World);
Stage = PKTournamentStage.None;
PKTHash = null;
return;
}
Broadcast("10 seconds until start", BroadCastLoc.World);
}
else if (CountDown < 4)
Broadcast(CountDown + " seconds until start", BroadCastLoc.World);
CountDown--;
Thread.Sleep(1000);
}
Stage = PKTournamentStage.Fighting;
Broadcast("Fight!", BroadCastLoc.World);
WaitForWinner();
}
public static void BeginTrojan()
{
foreach (Character Char in World.H_Chars.Values)
{
if (Char.Job == 15)
{
Char.MyClient.DialogNPC = 666111;
PacketHandling.NPCDialog.Handle(Char.MyClient, null, 666111, 0);
Char.MyClient.EndSend();
}
}
Stage = PKTournamentStage.Inviting;
while (CountDown > 0)
{
if (CountDown == 20)
Broadcast("20 seconds until start", BroadCastLoc.World);
else if (CountDown == 10)
{
Stage = PKTournamentStage.Countdown;
if (PKTHash.Count < 2)
{
Broadcast("The tournament requires atleast 2 people to start, Tournament Cancelled.", BroadCastLoc.World);
Stage = PKTournamentStage.None;
PKTHash = null;
return;
}
Broadcast("10 seconds until start", BroadCastLoc.World);
}
else if (CountDown < 4)
Broadcast(CountDown + " seconds until start", BroadCastLoc.World);
CountDown--;
Thread.Sleep(1000);
}
Stage = PKTournamentStage.Fighting;
Broadcast("Fight!", BroadCastLoc.World);
WaitForWinner();
}
public static void BeginWarrior()
{
foreach (Character Char in World.H_Chars.Values)
{
if (Char.Job == 25)
{
Char.MyClient.DialogNPC = 666111;
PacketHandling.NPCDialog.Handle(Char.MyClient, null, 666111, 0);
Char.MyClient.EndSend();
}
}
Stage = PKTournamentStage.Inviting;
while (CountDown > 0)
{
if (CountDown == 20)
Broadcast("20 seconds until start", BroadCastLoc.World);
else if (CountDown == 10)
{
Stage = PKTournamentStage.Countdown;
if (PKTHash.Count < 2)
{
Broadcast("The tournament requires atleast 2 people to start, Tournament Cancelled.", BroadCastLoc.World);
Stage = PKTournamentStage.None;
PKTHash = null;
return;
}
Broadcast("10 seconds until start", BroadCastLoc.World);
}
else if (CountDown < 4)
Broadcast(CountDown + " seconds until start", BroadCastLoc.World);
CountDown--;
Thread.Sleep(1000);
}
Stage = PKTournamentStage.Fighting;
Broadcast("Fight!", BroadCastLoc.World);
WaitForWinner();
}
public static void BeginArcher()
{
foreach (Character Char in World.H_Chars.Values)
{
if (Char.Job == 45)
{
Char.MyClient.DialogNPC = 666111;
PacketHandling.NPCDialog.Handle(Char.MyClient, null, 666111, 0);
Char.MyClient.EndSend();
}
}
Stage = PKTournamentStage.Inviting;
while (CountDown > 0)
{
if (CountDown == 20)
Broadcast("20 seconds until start", BroadCastLoc.World);
else if (CountDown == 10)
{
Stage = PKTournamentStage.Countdown;
if (PKTHash.Count < 2)
{
Broadcast("The tournament requires atleast 2 people to start, Tournament Cancelled.", BroadCastLoc.World);
Stage = PKTournamentStage.None;
PKTHash = null;
return;
}
Broadcast("10 seconds until start", BroadCastLoc.World);
}
else if (CountDown < 4)
Broadcast(CountDown + " seconds until start", BroadCastLoc.World);
CountDown--;
Thread.Sleep(1000);
}
Stage = PKTournamentStage.Fighting;
Broadcast("Fight!", BroadCastLoc.World);
WaitForWinner();
}
public static void BeginFire()
{
foreach (Character Char in World.H_Chars.Values)
{
if (Char.Job == 145)
{
Char.MyClient.DialogNPC = 666111;
PacketHandling.NPCDialog.Handle(Char.MyClient, null, 666111, 0);
Char.MyClient.EndSend();
}
}
Stage = PKTournamentStage.Inviting;
while (CountDown > 0)
{
if (CountDown == 20)
Broadcast("20 seconds until start", BroadCastLoc.World);
else if (CountDown == 10)
{
Stage = PKTournamentStage.Countdown;
if (PKTHash.Count < 2)
{
Broadcast("The tournament requires atleast 2 people to start, Tournament Cancelled.", BroadCastLoc.World);
Stage = PKTournamentStage.None;
PKTHash = null;
return;
}
Broadcast("10 seconds until start", BroadCastLoc.World);
}
else if (CountDown < 4)
Broadcast(CountDown + " seconds until start", BroadCastLoc.World);
CountDown--;
Thread.Sleep(1000);
}
Stage = PKTournamentStage.Fighting;
Broadcast("Fight!", BroadCastLoc.World);
WaitForWinner();
}
public static void BeginWater()
{
foreach (Character Char in World.H_Chars.Values)
{
if (Char.Job == 135)
{
Char.MyClient.DialogNPC = 666111;
PacketHandling.NPCDialog.Handle(Char.MyClient, null, 666111, 0);
Char.MyClient.EndSend();
}
}
Stage = PKTournamentStage.Inviting;
while (CountDown > 0)
{
if (CountDown == 20)
Broadcast("20 seconds until start", BroadCastLoc.World);
else if (CountDown == 10)
{
Stage = PKTournamentStage.Countdown;
if (PKTHash.Count < 2)
{
Broadcast("The tournament requires atleast 2 people to start, Tournament Cancelled.", BroadCastLoc.World);
Stage = PKTournamentStage.None;
PKTHash = null;
return;
}
Broadcast("10 seconds until start", BroadCastLoc.World);
}
else if (CountDown < 4)
Broadcast(CountDown + " seconds until start", BroadCastLoc.World);
CountDown--;
Thread.Sleep(1000);
}
Stage = PKTournamentStage.Fighting;
Broadcast("Fight!", BroadCastLoc.World);
WaitForWinner();
}
roflmao! U are definetly ******* up ur server bro...Did u hear wat .Arco said? U MUST USE KORVAC'S PKTournament RELEASE and .Arco's SaveHalos release...To me it seems u are using neither becuz that shouldn't happen and I just got done implementing it in my source "NO ERRORS"...
@.Arco
when I do /pkt or /starttourny it doesn't start and I have everything set up right o_0...
roflmao! U are definetly ******* up ur server bro...Did u hear wat .Arco said? U MUST USE KORVAC'S PKTournament RELEASE and .Arco's SaveHalos release...To me it seems u are using neither becuz that shouldn't happen and I just got done implementing it in my source "NO ERRORS"...
@.Arco
when I do /pkt or /starttourny it doesn't start and I have everything set up right o_0...
Post the pkt command here.
I'll fix it for each one.