Results 1 to 5 of 5
  1. #1
    ossimc82's Avatar
    Join Date
    Jul 2012
    Gender
    male
    Posts
    496
    Reputation
    42
    Thanks
    887
    My Mood
    In Love

    Post MMO Empire server Add /kill command

    open wServer/realm/entities/player/Player.Chat.cs
    and insert before:
    Code:
    else if (cmd.Equals("spawnx", StringComparison.OrdinalIgnoreCase) &&
    this:
    Code:
                else if (cmd.Equals("kill", StringComparison.OrdinalIgnoreCase) &&
                         CmdReqAdmin() && args.Length == 1)
                {
                    try
                    {
                        foreach (var w in RealmManager.Worlds)
                        {
                            World world = w.Value;
                            if (w.Key != 0) // 0 is limbo??
                            {
                                foreach (var i in world.Players)
                                {
                                    //Unnamed becomes a problem: skip them
                                    if (i.Value.Name.ToLower() == args[0].ToLower().Trim() && i.Value.NameChosen)
                                    {
                                        i.Value.Death("Server Admin");
                                        return;
                                    }
                                }
                            }
                        }
                        psr.SendPacket(new TextPacket()
                        {
                            BubbleTime = 0,
                            Stars = -1,
                            Name = "",
                            Text = string.Format("Cannot kill, {0} not found!", args[0].Trim())
                        });
                    }
                    catch
                    {
                        psr.SendPacket(new TextPacket()
                        {
                            BubbleTime = 0,
                            Stars = -1,
                            Name = "",
                            Text = "Cannot kill!"
                        });
                    }
                }
    Questions? -> Ask!

  2. The Following User Says Thank You to ossimc82 For This Useful Post:

    Alde. (04-26-2013)

  3. #2
    The richest man is not the one who has the most but the one who needs the least.
    MPGH Member
    Alde.'s Avatar
    Join Date
    Oct 2012
    Gender
    male
    Posts
    1,706
    Reputation
    166
    Thanks
    3,627
    My Mood
    Sleepy
    AW-E-SOME!
    THANKS MAN! I'll implement that into my server !

    Works fine! Thanks
    Last edited by Alde.; 04-26-2013 at 03:45 PM. Reason: Added more swag
    Alde is Alde is

  4. #3
    Owlupus's Avatar
    Join Date
    Jul 2012
    Gender
    male
    Location
    New England
    Posts
    129
    Reputation
    10
    Thanks
    565
    My Mood
    Tired
    It seems you are just posting Trapped's code?

    At least credit him.

  5. #4
    ossimc82's Avatar
    Join Date
    Jul 2012
    Gender
    male
    Posts
    496
    Reputation
    42
    Thanks
    887
    My Mood
    In Love
    Quote Originally Posted by Owlupus View Post
    It seems you are just posting Trapped's code?

    At least credit him.
    I can't find the kill command on Trapped's ******

  6. #5
    Trapped's Avatar
    Join Date
    May 2012
    Gender
    male
    Location
    Italy.
    Posts
    584
    Reputation
    10
    Thanks
    449
    My Mood
    Asleep
    Quote Originally Posted by Owlupus View Post
    It seems you are just posting Trapped's code?

    At least credit him.
    D:
    Never made a kill command. BUT I LOOOOOVE YOU FOR THAT POST! You made me really happy, you made me feel important. <3
    @ossimc82 Interesting, I'll made a modified version of that command that kills all the mobs selected (not a big change but still useful).
    "The great merit of society is to make one appreciate solitude."
    Charles Chincholles, "Reflections on the Art of Life" (from fortune-mod)

Similar Threads

  1. MMO Empire server How to get the Vault Working
    By ossimc82 in forum Realm of the Mad God Private Servers Tutorials/Source Code
    Replies: 14
    Last Post: 04-28-2013, 01:45 PM
  2. [Help Request] Mmo Empire Server.exe crashes
    By MrSocoo in forum Realm of the Mad God Private Servers Help
    Replies: 7
    Last Post: 04-16-2013, 11:29 AM
  3. MMO Empire Server - Playing With Friends
    By pLolz in forum Realm of the Mad God Private Servers Help
    Replies: 11
    Last Post: 04-16-2013, 10:58 AM
  4. MMO Empire Server Help! I want to play with friends!
    By 3dk1 in forum Realm of the Mad God Private Servers Help
    Replies: 2
    Last Post: 04-15-2013, 02:07 PM
  5. MMO Empire server playing with friends
    By ossimc82 in forum Realm of the Mad God Private Servers Help
    Replies: 9
    Last Post: 04-15-2013, 10:57 AM