Advertisement
Guest User

Vorspire

a guest
Jul 7th, 2009
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.94 KB | None | 0 0
  1. #define RUNUO_2 //Comment this out to enable RunUO 1.0 Mode
  2.  
  3. using System;
  4.  
  5. #if(RUNUO_2)
  6. using Server.Commands;
  7. #else
  8. using Server.Scripts.Commands;
  9. #endif
  10.  
  11. using Server;
  12. using Server.Mobiles;
  13. using Server.Network;
  14.  
  15. namespace Server.Touring
  16. {
  17.     public class TourCommand
  18.     {
  19.         public static void Initialize()
  20.         {
  21. #if (RUNUO_2)
  22.             CommandSystem.Register("Tour", AccessLevel.Player, new CommandEventHandler(Tour_OnCommand));
  23. #else
  24.         Commands.Register("Tour", AccessLevel.Player, new CommandEventHandler(Tour_OnCommand));
  25. #endif
  26.         }
  27.  
  28.         private static void Tour_OnCommand(CommandEventArgs e)
  29.         {
  30.             if (e.Mobile != null && !e.Mobile.Deleted)
  31.             {
  32.                 if (TourConfig.YoungOnly && e.Mobile is PlayerMobile && !((PlayerMobile)e.Mobile).Young)
  33.                 {
  34.                     e.Mobile.SendMessage("Only young players are able to take the tour.");
  35.                     return;
  36.                 }
  37.  
  38.                 if (!Tour.Stages.ContainsKey(e.Mobile))
  39.                     Tour.Start(e.Mobile);
  40.             }
  41.         }
  42.     }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement