Exemple #1
0
        public static void GodMode(CharData ch, string[] str)
        {
            if( ch == null ) return;

            if (ch.IsNPC())
                return;

            if (!ch.Authorized("godmode"))
                return;

            if (ch.HasActionBit(PC.PLAYER_GODMODE))
            {
                ch.RemoveActionBit(PC.PLAYER_GODMODE);
                ch.SendText("God mode off.\r\n");
            }
            else
            {
                ch.SetActionBit(PC.PLAYER_GODMODE);
                ch.SendText("God mode on.\r\n");
            }

            return;
        }
Exemple #2
0
        /// <summary>
        /// Fog: Immortal command to turn combat vulnerability on or off.
        /// </summary>
        /// <param name="ch"></param>
        /// <param name="str"></param>
        public static void Fog(CharData ch, string[] str)
        {
            if( ch == null ) return;

            if (ch.IsNPC())
            {
                return;
            }
            if (!ch.Authorized("fog"))
            {
                return;
            }
            ch.ToggleActionBit(PC.PLAYER_FOG);
            if (ch.HasActionBit(PC.PLAYER_FOG))
            {
                ch.SendText("Fog is now on.\r\n");
            }
            else
            {
                ch.SendText("Fog is now off.\r\n");
            }
            return;
        }
Exemple #3
0
        /// <summary>
        /// Command for gods to respond to the players.
        /// </summary>
        /// <param name="ch"></param>
        /// <param name="str"></param>
        public static void PlayerTell(CharData ch, string[] str)
        {
            if( ch == null ) return;

            if (!ch.Authorized("ptell"))
            {
                ch.SendText("&+LYou cannot respond to &+Bpetitions&+L.&n\r\n");
                return;
            }

            if (str.Length < 2)
            {
                ch.SendText("Tell what to who?\r\n");
            }

            /*
            * Can tell to PC's anywhere, but NPC's only in same room.
            */
            CharData victim = ch.GetCharWorld(str[0]);
            if (!victim)
            {
                ch.SendText("They aren't here.\r\n");
                return;
            }

            if (!victim.Socket)
            {
                SocketConnection.Act("$N&n is &+Llinkdead&n.", ch, null, victim, SocketConnection.MessageTarget.character);
                return;
            }

            string text = String.Join(" ", str, 1, (str.Length - 1));
            text = DrunkSpeech.MakeDrunk(text, ch);

            SocketConnection.Act("&n&+rYou tell $N&n&+r '&+R$t&n&+r'&n", ch, text, victim, SocketConnection.MessageTarget.character);
            int position = victim.CurrentPosition;
            victim.CurrentPosition = Position.standing;
            SocketConnection.Act("&n&+r$n&n&+r responds to your petition with '&+R$t&n&+r'&n", ch, text, victim, SocketConnection.MessageTarget.victim);
            string buf = String.Format("&+r{0} responds to {1}'s petition with '&+R{2}&n&+r'&n", ch.Name, victim.Name, text);
            ImmortalChat.SendImmortalChat(ch, ImmortalChat.IMMTALK_PETITION, Limits.LEVEL_AVATAR, buf);
            victim.CurrentPosition = position;
            victim.ReplyTo = ch;

            if (victim.HasActionBit(PC.PLAYER_AFK))
                SocketConnection.Act("Just so you know, $E is &+RAFK&n.", ch, null, victim, SocketConnection.MessageTarget.character);
            else if (victim.HasActionBit(PC.PLAYER_BOTTING))
                SocketConnection.Act("Just so you know, $E is a &+YBOT&n", ch, null, victim, SocketConnection.MessageTarget.character);

            return;
        }
Exemple #4
0
        /// <summary>
        /// Immortal commnand to stop all fights in the current room.
        /// </summary>
        /// <param name="ch"></param>
        /// <param name="str"></param>
        public static void Peace(CharData ch, string[] str)
        {
            if( ch == null ) return;

            ch = ch.GetChar();

            if (!ch.Authorized("peace"))
            {
                return;
            }

            foreach (CharData roomChar in ch.InRoom.People)
            {
                if (roomChar.Fighting)
                {
                    Combat.StopFighting(roomChar, true);
                }
                roomChar.StopHatingAll();
                Combat.StopHunting(roomChar);
                Combat.StopFearing(roomChar);
            }

            ch.SendText("Done.\r\n");
            return;
        }
Exemple #5
0
        public static void NameSucks(CharData ch, string[] str)
        {
            if( ch == null ) return;

            if (!ch.Authorized("namesucks"))
            {
                return;
            }

            if (str.Length == 0)
            {
                ch.SendText("Whose name sucks?\r\n");
                return;
            }

            if (MUDString.NameContainedIn(str[0], Database.SystemData.BannedNames))
            {
                ch.SendText("That name is already banned.\r\n");
                return;
            }

            Database.SystemData.BannedNames += str[0];
            Database.SystemData.BannedNames += " ";

            string buf = String.Format("{0} is now considered an illegal name.", str[0]);
            SocketConnection.Act(buf, ch, null, null, SocketConnection.MessageTarget.character);
            Log.Trace(ch.Name + ": " + buf);

            Sysdata.Save();
        }
Exemple #6
0
        /// <summary>
        /// Immortal invisibility command.
        /// </summary>
        /// <param name="ch"></param>
        /// <param name="str"></param>
        public static void Invis(CharData ch, string[] str)
        {
            if( ch == null ) return;

            if (ch.IsNPC())
                return;

            if (!ch.Authorized("wizinvis"))
                return;

            if (ch.HasActionBit(PC.PLAYER_WIZINVIS))
            {
                ch.RemoveActionBit(PC.PLAYER_WIZINVIS);
                ch.SendText("You slowly fade back into existence.\r\n");
                SocketConnection.Act("$n slowly fades into existence.", ch, null, null, SocketConnection.MessageTarget.room);
            }
            else
            {
                ch.SendText("You slowly vanish into thin air.\r\n");
                SocketConnection.Act("$n slowly fades into thin air.", ch, null, null, SocketConnection.MessageTarget.room);
                ch.SetActionBit(PC.PLAYER_WIZINVIS);
            }

            return;
        }