كود:
case 151652:
{
switch (npcRequest.OptionID)
{
case 0:
{
dialog.Text("Hey there " + client.Player.Name + " Would you like to claim your Prize?.");
dialog.Option("Yes Please", 1);
dialog.Option("I don't care.", 255);
dialog.Send();
break;
}
case 1:
{
int Alive = 0;
foreach (Mr_Panda.Client.GameState Entitys in Program.Values)
if (Entitys.Player.MapID == 1459 && (!Entitys.Player.Dead))
Alive++;
client.Send(new Message("there are in map" + Alive + "", System.Drawing.Color.Azure, Message.TopLeft));
if (DateTime.Now.Minute > 40)
{
if (Alive == 1)
{
client.Player.ConquerPoints += 30000;
client.Inventory.Add(730004, 4, 2);
//client.Player.BoundCps += 2500;
client.Player.AddTopStatus(Update.Flags2.Top2Warrior, 2, DateTime.Now.AddMinutes(59));
client.Player.Update(_String.Effect, "wspk_third", true);
Kernel.SendWorldMessage(new Message(" Congratulations ! DeputyLeader " + client.Player.Name + " claimed the prize [30.000] ConquerPoints for winning the Top Guild Man for this Hour. ", System.Drawing.Color.Black, Message.Center), Program.Values);
client.Player.Teleport(1002, 300, 278);
foreach (var clients in Program.Values)
{
if (clients.Player.MapID == 1459)
{
clients.Player.Teleport(1002, 300, 278);
clients.Send(new NpcReply(NpcReply.MessageBox, "Sorry Entity God Luck Next Time ;) "));
}
}
}
else
{
dialog.Text("There are still " + Alive + " Entitys in the map kill it first to claim prize!");
dialog.Option("okay", 255);
dialog.Send();
break;
}
}
else
{
dialog.Text("Hey there " + client.Player.Name + "You can only claim the prize when the time on or after 40 ");
dialog.Option("okay", 255);
dialog.Send();
break;
}
break;
}
}
break;
}