Page 1 of 1
Chat constants for these?
Posted:
18 Jul 2013, 07:26
by 94ge7j998
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.
Re: Chat constants for these?
Posted:
21 Jul 2013, 05:18
by 94ge7j998
NVM I don't think these are possible, cause I can't find them in custom commands or anywhere.
Re: Chat constants for these?
Posted:
21 Jul 2013, 05:23
by ismellike
They are definitely possible; I will code you some up tomorrow.
Re: Chat constants for these?
Posted:
21 Jul 2013, 05:27
by 94ge7j998
Thanks dude, it's a big help.
Re: Chat constants for these?
Posted:
21 Jul 2013, 17:47
by ismellike
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();
}
}
}
Re: Chat constants for these?
Posted:
22 Jul 2013, 04:19
by 94ge7j998
Thanks for trying, anyways.
Re: Chat constants for these?
Posted:
22 Jul 2013, 07:24
by Warren1001
If you are making a command... you could use the database, as well as p. or who.ZombieTier for the level.