Chat constants for these?

Chat constants for these?

Postby 94ge7j998 » 18 Jul 2013, 07:26

I'm thinking of making a better /whois, that is more fit for a zombie server only. I got most of them, but these are the ones I couldn't figure out:

- Rounds won
- brains collected (# of people you have infected)
- total time on the server
- logins
- level (not the map but the experience level)
- experience (the fraction of a level you have)

If you could find any of these out for me it would be a huge help.
94ge7j998
 
Posts: 64
Joined: 26 Oct 2011, 20:49

Re: Chat constants for these?

Postby 94ge7j998 » 21 Jul 2013, 05:18

NVM I don't think these are possible, cause I can't find them in custom commands or anywhere.
94ge7j998
 
Posts: 64
Joined: 26 Oct 2011, 20:49

Re: Chat constants for these?

Postby ismellike » 21 Jul 2013, 05:23

They are definitely possible; I will code you some up tomorrow.
What a beast...
User avatar
ismellike
Coder
 
Posts: 731
Joined: 31 Oct 2012, 04:04
Location: Kansas

Re: Chat constants for these?

Postby 94ge7j998 » 21 Jul 2013, 05:27

Thanks dude, it's a big help.
94ge7j998
 
Posts: 64
Joined: 26 Oct 2011, 20:49

Re: Chat constants for these?

Postby ismellike » 21 Jul 2013, 17:47

Sorry, but I won't be able to finish it.
If anyone wants to help, here is what I have.

Code: Select all
using System;
using System.Linq;

namespace MCDzienny
{
    public class Cmdcustomvar : Command
    {
        public override string name { get { return "customvar"; } }
        public override string shortcut { get { return ""; } }
        public override string type { get { return ""; } }
        public override bool museumUsable { get { return true; } }
        public override LevelPermission defaultRank { get { return LevelPermission.Guest; } }
        public override void Init()
        {
            Player.PlayerChatEvent += CheckFor;
        }
        string[] vars = new string[]
        {
            "pname",
            "tier",
            "xp",
            "logins",
            "infects",
            "survives",
        };
        private bool checking = false;
        /// <summary>
        /// I've got the checker ready, I just need someone to replace the words
        /// </summary>
        public void CheckFor(Player p, ref string message, ref bool stopIt)
        {
            if (message.Contains('$'))
            {
                string builder = "";
                for (int x = 0; x <= message.Length; x++)
                {
                    Char c = message[x];
                    if ((c == ' ' && checking) || x == message.Length)
                    {
                        checking = false;
                    }
                    else if (c == '$')
                        checking = true;
                    else if (checking)
                    {
                        builder += c.ToString();
                    }
                }
                stopIt = true;
            }
        }
        public override void Use(Player p, string message)
        {
            throw new NotImplementedException();
        }
        public override void Help(Player p)
        {
            throw new NotImplementedException();
        }
    }
}

What a beast...
User avatar
ismellike
Coder
 
Posts: 731
Joined: 31 Oct 2012, 04:04
Location: Kansas

Re: Chat constants for these?

Postby 94ge7j998 » 22 Jul 2013, 04:19

Thanks for trying, anyways.
94ge7j998
 
Posts: 64
Joined: 26 Oct 2011, 20:49

Re: Chat constants for these?

Postby Warren1001 » 22 Jul 2013, 07:24

If you are making a command... you could use the database, as well as p. or who.ZombieTier for the level.
Warren1001
 
Posts: 197
Joined: 08 Aug 2012, 03:50


Return to Help

Who is online

Users browsing this forum: No registered users and 3 guests

cron