NPC:
Code:
#region First Blood Event
case 987899:
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("Do you want to sign-up for the First Blood event ?"));
GC.AddSend(Packets.NPCSay(" First Blood is an simple event coded by Paralyzer[PM]"));
GC.AddSend(Packets.NPCSay(" You will then be sent to a map and then the First Person"));
GC.AddSend(Packets.NPCSay(" To kill someone using ScentSword or FastBlade and you will"));
GC.AddSend(Packets.NPCSay(" Then be sent to a map with 2 NPCs and each NPC will have random"));
GC.AddSend(Packets.NPCSay(" Prizes they will have the same random prizes but not in the same order"));
GC.AddSend(Packets.NPCSay(" Prizes from 10-50CPs and/or 1DB to 5DB(s)."));
GC.AddSend(Packets.NPCLink("Sign up.", 1));
GC.AddSend(Packets.NPCLink("No.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 1)
{
if (GC.MyChar.dmjoin == 0)
{
if (World.fb == true)
{
if (GC.MyChar.fbjoin == 0)
{
if (World.fb == true)
{
GC.MyChar.fbjoin = 1;
}
}
}
else
{
GC.AddSend(Packets.NPCSay("Sorry but the FirstBlood is not active"));
GC.AddSend(Packets.NPCLink("Ok", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
}
else
{
GC.AddSend(Packets.NPCSay("Sorry but you have signed up!"));
GC.AddSend(Packets.NPCLink("Ok...", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
}
break;
}
#endregion
Code:
public static bool fb = false;
public class Fb
{
public static int fbjoin = 0;
}
Code:
if (fbjoin == 1)
{
foreach (DictionaryEntry DE in Game.World.H_Chars)
{
Game.Character Chaar = (Game.Character)DE.Value;
if (Chaar.Name != MyClient.MyChar.Name)
{
if (Chaar.fbjoin == 1)
{
Damage = 0;
return;
}
}
}
}
Code:
if (Cmd[0] == "/fbtrue")
{
if (GC.AuthInfo.Status == "[PM]")
Game.World.fb = true;
Game.World.SendMsgToAll("Server", "First Blood start in 2 mins! Goto TwinCity at 424 361 to join the tornament!", 2011, 0);
new Thread(new ThreadStart(delegate()
{
Console.WriteLine("First Blood Activated (via Console).");
Thread.Sleep(30000);
Game.World.SendMsgToAll("Server", "First Blood will start in 1 minutes and 30 Seconds! Goto TwinCity at 424 361 to join the tornament!", 2011, 0);
Console.WriteLine("1 Minutes 30 seconds Left");
Thread.Sleep(30000);
Game.World.SendMsgToAll("Server", "First Blood will start in 1 minutes! Goto TwinCity at 424 361 to join the tornament!", 2011, 0);
Console.WriteLine("1 Minutes Left");
Thread.Sleep(30000);
Game.World.SendMsgToAll("Server", "First Blood will start in 30 Seconds! Goto TwinCity at 424 361 to join the tornament!", 2011, 0);
Console.WriteLine("30 seconds Left");
Thread.Sleep(30000);
Game.World.SendMsgToAll("Server", "First Blood has started ", 2011, 0);
Console.WriteLine("First Blood has started ");
foreach (DictionaryEntry DE in Game.World.H_Chars)
{
Game.Character Chaar = (Game.Character)DE.Value;
if (Chaar.fbjoin == 1)
{
if (Chaar.fbjoin == 1)
{
Chaar.Teleport(1950, 049, 148);
}
else if (Chaar.fbjoin == 0)
{
Chaar.Teleport(1950, 049, 148);
}
}
}
Game.World.sr = false;
Thread.Sleep(60000);
Game.World.SendMsgToAll("Server", "First Blood will finish in 9 minutes", 2011, 0);
Console.WriteLine("9 Minutes Left");
Thread.Sleep(60000);
Game.World.SendMsgToAll("Server", "First Blood will finish in 8 minutes", 2011, 0);
Console.WriteLine("8 Minutes Left");
Thread.Sleep(60000);
Game.World.SendMsgToAll("Server", "First Blood will finish in 7 minutes", 2011, 0);
Console.WriteLine("7 Minutes Left");
Thread.Sleep(60000);
Game.World.SendMsgToAll("Server", "First Blood will finish in 6 minutes", 2011, 0);
Console.WriteLine("6 Minutes Left");
Thread.Sleep(60000);
Game.World.SendMsgToAll("Server", "First Blood will finish in 5 minutes", 2011, 0);
Console.WriteLine("5 Minutes Left");
Thread.Sleep(60000);
Game.World.SendMsgToAll("Server", "First Blood will finish in 4 minutes", 2011, 0);
Console.WriteLine("4 Minutes Left");
Thread.Sleep(60000);
Game.World.SendMsgToAll("Server", "First Blood will finish in 3 minutes", 2011, 0);
Console.WriteLine("3 Minutes Left");
Thread.Sleep(60000);
Game.World.SendMsgToAll("Server", "First Blood will finish in 2 minutes", 2011, 0);
Console.WriteLine("2 Minutes Left");
Thread.Sleep(60000);
Game.World.SendMsgToAll("Server", "First Blood will finish in 1 minutes", 2011, 0);
Console.WriteLine("1 Minutes Left");
Thread.Sleep(30000);
Game.World.SendMsgToAll("Server", "First Blood will finish in 30 seconds! ", 2011, 0);
Console.WriteLine("Steed Race will finish in 30 seconds!");
Thread.Sleep(30000);
Game.World.SendMsgToAll("Server", "First Blood has finished! ", 2011, 0);
Console.WriteLine("First Blood has finished");
}
)).Start();
}






as a reference?...