Marking/Targetting

Mach9824

Destroyer of Worlds
Contributor
Joined
Nov 24, 2011
Messages
256
Reaction score
448
Points
63
This idea may have been proposed before before, I do not know. But I'll keep it short either way.

Typically used to identify zombies as players without using aka. Not really used on humans due to the fact that it might reveal them easier etc.

Anyway! Say I am a human running for my life. There are a select few players on that my pose a threat to my survival. Now typically I am not the biggest fan of aka so I tend to not use it.

But with the command /mark [player] or something along those lines, it takes the name of that players when they are infected and change it to a different colour.

For example: if I were to do /mark Sour_Lemon on my screen alone, it would change the red infected name to maybe yellow or lime or w/e. Now I can use this to my advantage in avoiding them even more so then less skilled or new players.

Not really any benifit but I figured it qould be a cool little quwirk to have. Let me know what you guys think.
 

Conor

Member
Joined
Dec 12, 2012
Messages
34
Reaction score
103
Points
18
Website
cipbot.webs.com
It would be possible. I attempted to make something that would satisfy what you said above, I think it would work.

Code:
using System;
 
namespace MCZombie
{
    public class CmdMark : Command
    {
        public override string name { get { return "mark"; } }
        public override string shortcut { get { return  ""; } }
        public override string type { get { return "other"; } }
        public override bool museumUsable { get { return true; } }
        public override LevelPermission defaultRank { get { return LevelPermission.Operator; } }
        public CmdMark();
 
        public override void Help(Player p)
        {
            Player.SendMessage(p, "/mark [player] [colour] - mark the [player] with [colour] if they are infected.");
            Player.SendMessage(p, "/mark [colour] - mark all infected players with [colour].");
            Player.SendMessage(p, "/mark reset - reset all marked players to default colours.");
        }
 
        public override void Use(Player p, string message)
        {
            if (message.Trim() == "") { Help(p); return; }
 
            if (message.Trim().ToLower() == "reset")
            {
                Player.players.ForEach(delegate(Player who)
                {
                    if (who != p)
                    {
                        if (who.infected)
                        {
                            p.SendDie(who.id);
                            p.SendSpawn(who.id, c.red + "_Infected_", who.pos[0], who.pos[1], who.pos[2], who.rot[0], who.rot[1]);
                        }
                        else
                        {
                            p.SendDie(who.id);
                            p.SendSpawn(who.id, who.color + who.name, who.pos[0], who.pos[1], who.pos[2], who.rot[0], who.rot[1]);
                        }
                    }
                });
            }
 
            if (message.Trim().IndexOf(' ') == -1)
            {
                string colour = c.Parse(message);
                if (colour == "")
                {
                    Player.SendMessage(p, "Invalid colour.");
                }
                else
                {
                    Player.players.ForEach(delegate(Player who)
                    {
                        if (who.infected)
                        {
                            p.SendDie(who.id);
                            p.SendSpawn(who.id, colour + "_Infected_", who.pos[0], who.pos[1], who.pos[2], who.rot[0], who.rot[1]);
                        }
                    });
                }
                return;
            }
 
            Player who2 = Player.Find(message.Split(' ')[0]);
            if (who2 != null && !who2.hidden)
            {
                string colour = c.Parse(message);
                if (colour == "")
                {
                    Player.SendMessage(p, "Invalid colour.");
                }
                else if (!who2.infected)
                {
                    Player.SendMessage(p, who2.color + who2.name + Server.DefaultColor + " is not infected!");
                }
                else
                {
                    p.SendDie(who2.id);
                    p.SendSpawn(who2.id, colour + "_Infected_", who2.pos[0], who2.pos[1], who2.pos[2], who2.rot[0], who2.rot[1]);
                }
            }
            else
            {
                Player.SendMessage(p, "Player could not be found.");
            }
        }
    }
}
 

Mach9824

Destroyer of Worlds
Contributor
Joined
Nov 24, 2011
Messages
256
Reaction score
448
Points
63
It would be possible. I attempted to make something that would satisfy what you said above, I think it would work.
I thank you for creating this. As I do not know very much about coding myself, I look at this rather confused. From what I do know, it does seem plausable. But I will leave that to the experts to decide.
 
  • Like
Reactions: Conor