AhmedKorwash

Elite Pk Npc

Dec 30th, 2015
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 10.62 KB | None | 0 0
  1. #region ElitePk
  2.                 case 448582:
  3.                     {
  4.                         switch (npcRequest.OptionID)
  5.                         {
  6.                             case 0:
  7.                                 {
  8.                                     dialog.Text("Glad to see you! I take it that you haven`t heard of the Elite PK Tournament, have you? No? Aha, please allow me to introduce this exciting event for you! It`s a new PK Tournament that takes place every Friday. You will be divided into four groups, based");
  9.                                     dialog.Text("~on your level. Not only will the top 3 winners of each group receive nice prizes, you will also receive EXP worth 1 EXP Ball and 1000 Honor points for each match you take part in at the end of that round. Do you want to have a go?");
  10.  
  11.                                     dialog.Option("Tell~me~more~about~the~rules.", 1);
  12.                                     dialog.Option("Sign~me~up!", 3);
  13.                                     dialog.Option("I~want~to~claim~my~prize!", 5);
  14.                                     dialog.Option("Not~interested.", 255);
  15.                                     dialog.Avatar(26);
  16.                                     break;
  17.                                 }
  18.                             case 1:
  19.                                 {
  20.                                     dialog.Text("The Elite PK Tournament begins at 20:00 every Friday night, and players will be divided into four groups, which are the Under 100 group, the 100-119 group, the 120-129 group, and the 130+ group. You can sign up for it");
  21.                                     dialog.Text("~between 16:55 and 16:59. No admittance after the tournament begins. Players should first wait in the Waiting Area, and if you leave the area before your round, you will forfeit your chance. There will be a Knockout round before the Final.");
  22.                                     dialog.Text("~But if there are less than 8 players at the start of the Elite PK Tournament, the Final will be replaced by the Knockout. Each round in the Knockout lasts 3 minutes. At the end of 3 minutes, if no one is killed, the player with a higher score wins.");
  23.                                     dialog.Text("~After you finish your round, you`ll have to wait for all the other players to finish this round to enter the next round.");
  24.  
  25.                                     dialog.Option("There~is~a~Final?", 2);
  26.                                     dialog.Avatar(26);
  27.                                     break;
  28.                                 }
  29.                             case 2:
  30.                                 {
  31.                                     dialog.Text("Sure. When there are less than 8 players left in the field, the Final starts. Each round of the Final lasts for 5 minutes. Though all of the Top 8 players will receive nice prizes, the top 3 will earn special prizes! Claim your reward before the next");
  32.                                     dialog.Text("~week`s Elite PK Tournament begins, or you won`t get them. We hope everyone will join this tournament, and so not only will the top 3 winners of each group receive nice prizes, you will also receive EXP worth 1 EXP Ball and 1000 Honor");
  33.                                     dialog.Text("~points for each match you take part in at the end of that match!");
  34.  
  35.                                     dialog.Option("Sign~me~up!", 3);
  36.                                     dialog.Option("Not~interested.", 255);
  37.                                     dialog.Avatar(26);
  38.                                     break;
  39.                                 }
  40.                             case 3:
  41.                                 {
  42.                                     if (!ElitePKTournament.SignUp(client))//dy test only hmmmm oki
  43.                                     {
  44.                                         dialog.Text("Please sign up between " + ElitePK.EventTime + ":55 and " + ElitePK.EventTime + ":59 every night for the Elite PK Tournament.");
  45.  
  46.                                         dialog.Option("Okay.", 255);
  47.                                         dialog.Avatar(26);
  48.                                     }
  49.                                     break;
  50.                                 }
  51.                             case 5:
  52.                                 {
  53.                                     byte rank = 0;
  54.                                     byte elitestage = 0;
  55.                                     if (Game.ElitePK.GetReward(client, out rank, out elitestage))
  56.                                     {
  57.                                         uint cpsprice = 0;
  58.                                         if (rank == 1)
  59.                                         {
  60.                                             cpsprice = rates.SkillTeam1;
  61.                                             if (elitestage == 3)
  62.                                                 client.Entity.AddTopStatus((ulong)Titles.ElitePKChamption_High, 0, DateTime.Now.AddDays(1), true);
  63.                                             else
  64.                                                 client.Entity.AddTopStatus((ulong)Titles.ElitePKChamption_Low, 0, DateTime.Now.AddDays(1), true);
  65.  
  66.                                         }
  67.                                         else if (rank == 2)
  68.                                         {
  69.                                             cpsprice = rates.SkillTeam2;
  70.                                             if (elitestage == 3)
  71.                                                 client.Entity.AddTopStatus((ulong)Titles.ElitePK2ndPlace_High, 0,DateTime.Now.AddDays(1), true);
  72.                                             else
  73.                                                 client.Entity.AddTopStatus((ulong)Titles.ElitePK2ndPlace_Low, 0, DateTime.Now.AddDays(1), true);
  74.  
  75.                                         }
  76.                                         else if (rank == 3)
  77.                                         {
  78.                                             cpsprice = rates.SkillTeam3;
  79.                                             if (elitestage == 3)
  80.                                                 client.Entity.AddTopStatus((ulong)Titles.ElitePK3ndPlace_High, 0, DateTime.Now.AddDays(1), true);
  81.                                             else
  82.                                                 client.Entity.AddTopStatus((ulong)Titles.ElitePK3ndPlace_Low, 0, DateTime.Now.AddDays(1), true);
  83.  
  84.                                         }
  85.                                         else
  86.                                         {
  87.                                             cpsprice = rates.SkillTeam4;
  88.                                             if (elitestage == 3)
  89.                                                 client.Entity.AddTopStatus((ulong)Titles.ElitePKTopEight_High, 0, DateTime.Now.AddDays(1), true);
  90.                                             else
  91.                                                 client.Entity.AddTopStatus((ulong)Titles.ElitePKTopEight_Low, 0, DateTime.Now.AddDays(1), true);
  92.  
  93.                                         }
  94.                                         client.Entity.ConquerPoints += cpsprice;
  95.                                         Kernel.SendWorldMessage(new Network.GamePackets.Message("" + client.Entity.Name + " has receive " + cpsprice + " for rank " + rank + " in Elite Pk Tournament", Color.Red, Network.GamePackets.Message.System).ToArray());
  96.                                     }
  97.                                     else
  98.                                     {
  99.  
  100.                                         dialog.Text("Sorry, just the lider of 8 top teams will receive the reward!");
  101.                                         dialog.Option("Ok thx.", 255);
  102.                                         dialog.Send();
  103.                                     }
  104.                                     break;
  105.                                 }
  106.                             //case 5:
  107.                             //    {
  108.                             //        int group = client["epk_id"];
  109.                             //        var epk = ElitePKTournament.Tournaments[group];
  110.                             //        if (epk.State == ElitePK.States.GUI_Top8Ranking && DateTime.Now >= epk.EndDateTime)
  111.                             //        {
  112.                             //            if (client.Inventory.Count < 40)
  113.                             //            {
  114.                             //                if (client["epk_prize"] == true)
  115.                             //                {
  116.                             //                    client["epk_prize"] = false;
  117.                             //                    int rank = 0;
  118.                             //                    for (; rank < 8; rank++)
  119.                             //                        if (epk.Top8[rank].Name == client.Entity.Name)
  120.                             //                            break;
  121.                             //                    if (rank > 3) rank = 3;
  122.                             //                    client.Inventory.Add((uint)((720726 + group) - 4 * (3 - rank)), 0, 1);
  123.                             //                    //#warning EPK 7 DAYS NOT 1
  124.                             //                    if (group == 3)
  125.                             //                        client.Entity.AddTopStatus((ulong)(((int)Titles.ElitePKChamption_High) + rank), epk.EndDateTime.AddDays(3));
  126.                             //                    else
  127.                             //                        client.Entity.AddTopStatus((ulong)(((int)Titles.ElitePKChamption_Low) + rank), epk.EndDateTime.AddDays(3));
  128.                             //                }
  129.                             //            }
  130.                             //            else
  131.                             //            {
  132.                             //                dialog.Text("You need atleast one spot free in your inventory!");
  133.  
  134.                             //                dialog.Option("Okay.", 255);
  135.                             //                dialog.Avatar(26);
  136.                             //            }
  137.                             //        }
  138.                             //        else
  139.                             //        {
  140.                             //            dialog.Text("Elite PK Tournament is not yet finished!");
  141.  
  142.                             //            dialog.Option("Okay.", 255);
  143.                             //            dialog.Avatar(26);
  144.                             //        }
  145.                             //        break;
  146.                             //    }
  147.                         }
  148.                         break;
  149.                     }
  150.                 #endregion
Advertisement
Add Comment
Please, Sign In to add comment