Advertisement
Guest User

[36]كويستايه

a guest
Nov 26th, 2015
303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 4.08 KB | None | 0 0
  1. #region Prize WorldPk [xx:36]
  2.                 case 542412:
  3.                     switch (npcRequest.OptionID)
  4.                     {
  5.                         case 0:
  6.                             {
  7.                                 dialog.Text("Hey there " + client.Entity.Name + " Would you like to claim your Prize?.");
  8.                                 dialog.Option("Yes Please", 1);
  9.                                 //dialog.Option("I Need To Leave", 2);
  10.                                 // dialog.Option("Potions HP / Magic", 3);
  11.                                 dialog.Option("I don't care.", 0xff);
  12.                                 dialog.Send();
  13.                                 break;
  14.                             }
  15.  
  16.                         case 1:
  17.                             {
  18.                                 int alive = 0;
  19.                                 foreach (GameState players in Kernel.GamePool.Values)
  20.                                     if (players.Entity.MapID == 129 && (!players.Entity.Dead))
  21.                                         alive++;
  22.                                 if (DateTime.Now.Minute >= 39)
  23.                                 {
  24.                                     if (alive == 1)
  25.                                     {
  26.                                         client.Entity.ConquerPoints += 1000;
  27.                                         client.Entity.TreasuerPoints += 0;
  28.                                         //  client.Entity.OnlinePoints += 5;
  29.                                         client.Entity.QuizPoints += 0;
  30.                                         //  client.Entity.MonstersPoints += 0;
  31.                                         Conquer_Online_Server.Kernel.SendWorldMessage(new Message("Congratulations!  " + client.Entity.Name + " Winner AdultWar Pk Prize 1000 Cps.", System.Drawing.Color.Black, Message.Center), Program.Values);
  32.                                         client.Entity.SendSpawn(client, true);
  33.                                         client.Entity.Teleport(1002, 301, 280);
  34.                                         EntityTable.SaveEntity(client);
  35.                                     }
  36.                                     else
  37.                                     {
  38.                                         dialog.Text("There are still " + Daily.howmanyinmap + " players in the map kill it first to claim prize!");
  39.                                         dialog.Option("okay", 0xff);
  40.                                         dialog.Send();
  41.                                     }
  42.                                 }
  43.                                 else
  44.                                 {
  45.                                     dialog.Text("Hey there " + client.Entity.Name + "You can only claim the prize when the time on or after xx:59");
  46.                                     dialog.Option("okay", 0xff);
  47.                                     dialog.Send();
  48.                                 }
  49.                                 break;
  50.                             }
  51.                         case 2:
  52.                             {
  53.                                 {
  54.                                     client.Entity.Teleport(1002, 302, 280);
  55.                                 }
  56.                                 break;
  57.                             }
  58.                         case 3:
  59.                             {
  60.                                 INpc npc = null;
  61.                                 if (client.Map.Npcs.TryGetValue(client.ActiveNpc, out npc))
  62.                                 {
  63.                                     Data data = new Data(true);
  64.                                     data.ID = Data.OpenWindow;
  65.                                     data.TimeStamp = Time32.Now;
  66.                                     data.dwParam = 0x1FA;
  67.                                     data.wParam1 = npc.X;
  68.                                     data.wParam2 = npc.Y;
  69.                                     client.Send(data);
  70.                                 }
  71.                                 break;
  72.                             }
  73.                     }
  74.                     break;
  75.                 #endregion
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement