PostMMO Empire server Add /kill command

Posts 1–5 of 5 · Page 1 of 1
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!
AW-E-SOME!
THANKS MAN! I'll implement that into my server !

Works fine! Thanks
It seems you are just posting Trapped's code?

At least credit him.
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).
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 GitHub
Posts 1–5 of 5 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?