Advertisement
Guest User

Untitled

a guest
Jul 24th, 2014
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 4.69 KB | None | 0 0
  1. ////handle.cs////
  2. #region Allowed Skills
  3.                             if (SpellTable.WeaponSpells.ContainsKey(spellID))
  4.                             {
  5.                                 if (!attack.weaponspell)
  6.                                 {
  7.                                     attacker.AttackPacket = null;
  8.                                     return;
  9.                                 }
  10.                             }
  11.                             if (attacker.Owner.LobbyGroup != null || attacker.MapID == 1707)
  12.                             {
  13.                                 if (spellID != 1045 || spellID != 1046)
  14.                                 {
  15.                                     attacker.AttackPacket = null;
  16.                                     return;
  17.                                 }
  18.                             }
  19.                             if (spellID == 1045 || spellID == 1046)
  20.                             {
  21.                                 if (attack.Attacked != 0)
  22.                                 {
  23.                                     attacker.AttackPacket = null;
  24.                                     return;
  25.                                 }
  26.                             }
  27.                             #endregion
  28.  
  29. ///////////////////////////
  30.  
  31. ///world.cs////
  32. #region Top SS&FB Pk
  33.  
  34.             if (DateTime.Now.Minute == 40 && DateTime.Now.Second == 00)
  35.             {
  36.                  client.MessageBox("Top SS&FB Started! You Wana Join?",
  37.                             (p) => { p.Entity.Teleport(1002, 407, 459); },
  38.                             (p) => { p.Send("You still can join!"); }, 300);
  39.             }
  40.  
  41.             #endregion Top SS&FB Pk            
  42.  
  43. //////////////////////////////
  44.  
  45. /////Npcs.cs//////
  46.  
  47. #region Winner of SS FB
  48.                 case 5658821:
  49.                     {
  50.                         switch (npcRequest.OptionID)
  51.                         {
  52.                             case 0:
  53.                                 {
  54.                                     dialog.Text("Hey there " + client.Entity.Name + "Would you like to claim your Prize?.");
  55.                                     dialog.Option("Yes Please ", 1);
  56.                                     dialog.Option("I don't care.", 255);
  57.                                     dialog.Send();
  58.                                     break;
  59.                                 }
  60.                             case 1:
  61.                                 {
  62.                                     int alive = 0;
  63.                                     foreach (Conquer_Online_Server.Client.GameState players in Kernel.GamePool.Values)
  64.                                         if (players.Entity.MapID == 1707 && (!players.Entity.Dead))
  65.                                             alive++;
  66.                                     if (DateTime.Now.Minute >= 44 && DateTime.Now.Minute <= 50)
  67.                                     {
  68.                                         if (alive == 1)
  69.                                         {
  70.  
  71.                                             client.Entity.ConquerPoints += 10000;
  72.                                             Kernel.SendWorldMessage(new Message("Congratulations! " + client.Entity.Name + " claimed (( 10,000 CPs)) for winning the Top SS & FB for this Hour.", System.Drawing.Color.Black, Message.Talk), Program.Values);
  73.                                             client.Entity.SendSpawn(client, true);
  74.                                             client.Entity.Teleport(1002, 429, 378);
  75.                                             EntityTable.SaveEntity(client);
  76.                                         }
  77.                                         else
  78.                                         {
  79.                                             dialog.Text("There are still " + alive + " players in the map kill it first to claim prize!");
  80.                                             dialog.Option("okay", 255);
  81.                                             dialog.Send();
  82.                                             break;
  83.                                         }
  84.                                     }
  85.                                     else
  86.                                     {
  87.                                         dialog.Text("Hey there " + client.Entity.Name + "You can only claim the prize when the time on or after --:44 To--:50 ");
  88.                                         dialog.Option("Ok I Sorry ", 255);
  89.                                         dialog.Send();
  90.                                         break;
  91.                                     }
  92.                                     break;
  93.                                 }
  94.                         }
  95.                         break;
  96.                     }
  97.                 #endregion
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement