Ejemplo n.º 1
0
        private static void CheckGuarded_OnCommand(Server.Commands.CommandEventArgs e)
        {
            Mobile        from = e.Mobile;
            GuardedRegion reg  = from.Region as GuardedRegion;

            if (reg == null)
            {
                from.SendAsciiMessage("You are not in a guardable region.");
            }
            else
            {
                reg.TellGuardStatus(from);
            }
        }
Ejemplo n.º 2
0
        private static void ToggleGuarded_OnCommand(Server.Commands.CommandEventArgs e)
        {
            Mobile        from = e.Mobile;
            GuardedRegion reg  = from.Region as GuardedRegion;

            if (reg == null)
            {
                from.SendAsciiMessage("You are not in a guardable region.");
            }
            else
            {
                reg.Disabled = !reg.Disabled;
                from.SendAsciiMessage("After your changes:");
                reg.TellGuardStatus(from);
            }
        }
Ejemplo n.º 3
0
        private static void SetGuarded_OnCommand(Server.Commands.CommandEventArgs e)
        {
            Mobile from = e.Mobile;

            if (e.Length == 1)
            {
                GuardedRegion reg = from.Region as GuardedRegion;

                if (reg == null)
                {
                    from.SendAsciiMessage("You are not in a guardable region.");
                }
                else
                {
                    reg.Disabled = !e.GetBoolean(0);
                    from.SendAsciiMessage("After your changes:");
                    reg.TellGuardStatus(from);
                }
            }
            else
            {
                from.SendAsciiMessage("Format: SetGuarded <true|false>");
            }
        }