Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 3.50 KB | None | 0 0
  1. using System;
  2. using Server;
  3. using Server.Gumps;
  4. using Server.Network;
  5. using Server.Commands;
  6.  
  7. namespace Server.Gumps
  8. {
  9.     public class NothyaKharemGump : Gump
  10.     {
  11.         Mobile caller;
  12.         Mobile myMobile;
  13.  
  14.         public static void Initialize()
  15.         {
  16.             CommandSystem.Register("Gumpor", AccessLevel.GameMaster, new CommandEventHandler(Gumpor_OnCommand));
  17.         }
  18.  
  19.         [Usage("NothyaKharemGump")]
  20.         [Description("Makes a call to your custom gump.")]
  21.         public static void Gumpor_OnCommand(CommandEventArgs e)
  22.         {
  23.             Mobile from = e.Mobile;
  24.  
  25.             if (from.HasGump(typeof(NothyaKharemGump)))
  26.                 from.CloseGump(typeof(NothyaKharemGump));
  27.             from.SendGump(new NothyaKharemGump(from));
  28.         }
  29.  
  30.         public NothyaKharemGump(Mobile from) : this()
  31.         {
  32.             myMobile = from;
  33.             caller = from;
  34.         }
  35.  
  36.         public NothyaKharemGump() : base( 0, 0 )
  37.         {
  38.             this.Closable=false;
  39.             this.Disposable=true;
  40.             this.Dragable=true;
  41.             this.Resizable=true;
  42.  
  43.             AddPage(0);
  44.             AddBackground(0, 210, 300, 400, 3500);
  45.             AddImage(20, 230, 7009);
  46.             AddLabel(120, 240, 149, @"Nothya Kha'rem");
  47.             AddHtml( 20, 300, 260, 200, @"<I>Näet miehen uppoutuvan kääröihin. Rustaillessaan merkintöjä hän nostaa katseensa hieman ylemmäs sinua kohden ja viimeistelee vielä merkintönsä. Mies tuijottaa kylmän viileästi häiriköijää.</I><BR><BR> Kas, tervehdys. En huomannutkaan teitä, oliko teillä jotain tärkeääkin asiaa? Minulla on työt kesken, eikä sopisi häiritä turhaan...", (bool)false, (bool)false);
  48.  
  49.             AddRadio(20, 510, 208, 209, false, 1);
  50.             AddRadio(20, 530, 208, 209, false, 2);
  51.             AddRadio(20, 550, 208, 209, false, 3);
  52.             AddButton(200, 570, 247, 248, 20, GumpButtonType.Reply, 0);
  53.             AddHtml( 50, 510, 300, 20, @"Ei minulla mitään...", (bool)false, (bool)false);
  54.             AddHtml( 50, 530, 300, 20, @"Haista paska!", (bool)false, (bool)false);
  55.             AddHtml( 50, 550, 300, 20, @"Kiinostuin, mitä satut tekemään.", (bool)false, (bool)false);
  56.                 }
  57.  
  58.         public override void OnResponse( NetState state, RelayInfo info )
  59.         {
  60.             Mobile from = state.Mobile;
  61.             if( info.ButtonID == 20 )
  62.             {
  63.                 string toSay = "";
  64.  
  65.                 for( int i = 0; i < info.Switches.Length; i++ )
  66.                 {
  67.                     int m = info.Switches[i];
  68.                     switch( m )
  69.                     {
  70.                         case 1:
  71.                             toSay += "Päätit keskustelun."; from.PlaySound( 1049 );
  72.                             // Muokkaa näitä jos haluat
  73.                             myMobile.Animate(16, 5, 1, true, false, 0);
  74.                             break;
  75.                         case 2:
  76.                             toSay += "Suututit hänet!"; from.FixedEffect( 0x374A, 10, 16 );
  77.                             from.PlaySound( 0x474 ); from.PlaySound( 1098 );
  78.                             from.Poison = Poison.Deadly;
  79.                             // Muokkaa näitä jos haluat
  80.                             myMobile.Animate(16, 5, 1, true, false, 0);
  81.                             break;
  82.                         case 3:
  83.                             toSay += "Mies nyökkää ja näyttää sinulle kääröjä, joissa on tuoreella musteella merkittyjä riimuja.";
  84.                             from.PlaySound( 1097 );
  85.                             // Muokkaa näitä jos haluat
  86.                             myMobile.Animate(16, 5, 1, true, false, 0);
  87.                             break;
  88.  
  89.                     }
  90.                 }
  91.                 from.SendMessage( toSay );
  92.  
  93.  
  94.             }
  95.  
  96.         }
  97.  
  98.     }
  99. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement