Results 1 to 2 of 2
  1. #1
    The First Sin's Avatar
    Join Date
    May 2016
    Gender
    male
    Location
    At the Jugg House
    Posts
    54
    Reputation
    10
    Thanks
    16
    My Mood
    Devilish

    Admin/N> Command.cs

    I present to you /tosseff and /remtosseff

    Usage_1 :: /tosseff <playername> <Effectname or Effectnumber>
    Usage_2 :: /remtosseff <playername> <Effectname or Effectnumber>

    Example_1 :: /tosseff TheFirstSin Bleed
    This will make me bleed forever...
    Example_2 :: /remtosseff TheFirstSin Bleed
    This will stop the bleeding effect...

     
    Code:
    
        internal class TossEffCommand : Command
        {
            public TossEffCommand()
                : base("tosseff", 1)
            {
            }
    
            protected override bool Process(Player player, RealmTime time, string[] args)
            {
                if (args.Length != 2)
                {
                    player.SendHelp("Usage: /tosseff <PlayerName> <Effectname or Effectnumber>");
                    return false;
                }
                try
                {
                    foreach (KeyValuePair<string, Client> i in player.Manager.Clients.Where(i => i.Value.Player.Name.EqualsIgnoreCase(args[0])))
                    {
                        i.Value.Player.ApplyConditionEffect(new ConditionEffect
                        {
                            Effect =
                                (ConditionEffectIndex) Enum.Parse(typeof (ConditionEffectIndex), args[1].Trim(), true),
                            DurationMS = -1
                        });
                        player.SendInfo("Success!");
                    }
                }
                catch
                {
                    player.SendError("Invalid effect or player name! ");
                    return false;
                }
                return true;
            }
        }


     
    Code:
    
        internal class RemoveTossEffCommand : Command
        {
            public RemoveTossEffCommand()
                : base("remtosseff", 1)
            {
            }
    
            protected override bool Process(Player player, RealmTime time, string[] args)
            {
                if (args.Length != 2)
                {
                    player.SendHelp("Usage: /tosseff <PlayerName> <Effectname or Effectnumber>");
                    return false;
                }
                try
                {
                     foreach (KeyValuePair<string, Client> i in  player.Manager.Clients.Where(i =>  i.Value.Player.Name.EqualsIgnoreCase(args[0])))
                    {
                        i.Value.Player.ApplyConditionEffect(new ConditionEffect
                        {
                            Effect =
                                (ConditionEffectIndex) Enum.Parse(typeof (ConditionEffectIndex), args[1].Trim(), true),
                            DurationMS = 0
                        });
                        player.SendInfo("Success!");
                    }
                }
                catch
                {
                    player.SendError("Invalid effect or player name! ");
                    return false;
                }
                return true;
            }
        }


    Any Questions or Concerns PM me @</The First Sin/>


    - - - Updated - - -

    @Joe @Luis close it, anyone wanting to speak with me just pm.
    Be thankful that you're blessed yet cursed with life and death.
     



    Violence, Bad Words, Scammers, Pornography, Drugs, Discrimination, Gambling, All on the internet.
    PEGI FAQ
    Review Internet Safety and Stay Safe Kids.

     


    ESRB RATINGS GUIDE
    Review Internet Safety and Stay Safe Kids.



    Gaming since 1994
    Microsoft Computing since 2000
    C since 2001
    Java since 2003
    Mobile since 2007
    Python since 2010


  2. #2
    Danny's Avatar
    Join Date
    Jun 2015
    Gender
    male
    Posts
    9,617
    Reputation
    2835
    Thanks
    3,002
    My Mood
    Aggressive
    /closed as per

    I am not a middleman nor do I buy/sell anything. If you are being contacted by someone off-site from MPGH then it's not me! Please report these to me via PM. Don't be stupid, think first.

Similar Threads

  1. [Solved] AQW Private Server Admin/Mod commands list?
    By k1ngqu33n in forum Adventure Quest Worlds (AQW) Private Servers
    Replies: 12
    Last Post: 01-26-2016, 10:47 AM
  2. [Help Request] [Fabiano Source] How to get admin and donator commands?
    By Eikitnx in forum Realm of the Mad God Private Servers Help
    Replies: 1
    Last Post: 01-20-2016, 01:17 PM
  3. Extra-Admin tools to put in addon, changing commands
    By bezer123 in forum Garry's Mod Discussions & Help
    Replies: 4
    Last Post: 05-01-2014, 11:57 AM
  4. Admin Commands?
    By C453 in forum Realm of the Mad God Discussions
    Replies: 10
    Last Post: 03-28-2013, 02:47 PM
  5. [Research] Admin commands
    By Qix in forum Continent of the Ninth (C9) Hacks / Bots
    Replies: 4
    Last Post: 08-14-2012, 04:51 PM