Advertisement
Genral

NPC_GlowTownPortal

Oct 16th, 2018
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.84 KB | None | 0 0
  1.  [NpcAttribute(NpcID.GlowTownPortal1)]
  2.         public static void GlowTownPortal1(Client.GameClient client, ServerSockets.Packet stream, byte Option, string Input, uint id)
  3.         {
  4.             Dialog data = new Dialog(client, stream);
  5.             switch (Option)
  6.             {
  7.  
  8.                 case 0:
  9.                     {
  10.                         data.AddText("Are you sure you want to return to Glowtown?")
  11.                             .AddOption("Yes.", 1)
  12.                            .AddOption("No.", 255).AddAvatar(156).FinalizeDialog();
  13.                         break;
  14.                     }
  15.                 case 1:
  16.                     {
  17.                         client.Teleport((ushort)(95 - Program.GetRandom.Next(0, 5)), (ushort)(412 - Program.GetRandom.Next(0, 5)), 10137);
  18.                         break;
  19.                     }
  20.                 default:
  21.                     break;
  22.             }
  23.         }
  24.         [NpcAttribute(NpcID.GlowTownPortal2)]
  25.         public static void GlowTownPortal2(Client.GameClient client, ServerSockets.Packet stream, byte Option, string Input, uint id)
  26.         {
  27.             Dialog data = new Dialog(client, stream);
  28.             switch (Option)
  29.             {
  30.  
  31.                 case 0:
  32.                     {
  33.                         data.AddText("Are you sure you want to return to Glowtown?")
  34.                             .AddOption("Yes.", 1)
  35.                            .AddOption("No.", 255).AddAvatar(156).FinalizeDialog();
  36.                         break;
  37.                     }
  38.                 case 1:
  39.                     {
  40.                         client.Teleport((ushort)(95 - Program.GetRandom.Next(0, 5)), (ushort)(412 - Program.GetRandom.Next(0, 5)), 10137);
  41.                         break;
  42.                     }
  43.                 default:
  44.                     break;
  45.             }
  46.         }
  47.         [NpcAttribute(NpcID.GlowTownPortal3)]
  48.         public static void GlowTownPortal3(Client.GameClient client, ServerSockets.Packet stream, byte Option, string Input, uint id)
  49.         {
  50.             Dialog data = new Dialog(client, stream);
  51.             switch (Option)
  52.             {
  53.  
  54.                 case 0:
  55.                     {
  56.                         data.AddText("Are you sure you want to return to Glowtown?")
  57.                             .AddOption("Yes.", 1)
  58.                            .AddOption("No.", 255).AddAvatar(156).FinalizeDialog();
  59.                         break;
  60.                     }
  61.                 case 1:
  62.                     {
  63.                         client.Teleport((ushort)(95 - Program.GetRandom.Next(0, 5)), (ushort)(412 - Program.GetRandom.Next(0, 5)), 10137);
  64.                         break;
  65.                     }
  66.                 default:
  67.                     break;
  68.             }
  69.         }
  70.  
  71. GlowTownPortal1 = 20571,
  72.         GlowTownPortal2 = 20572,
  73.         GlowTownPortal3 = 20573,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement