Alright, let's get a few things out of the way here.
A: You're THC, the friend that got himself banned from yorktowns server for being a dooschebag.
I'm glad to see you're not a dooschebag.
B:
function Player::activateStuff(%player)
This is OK. Your script will work perfectly fine, but around here, we typically format it as follows:
function Player::activateStuff(%this)
where %this refers to the PLAYER that ACTIVATESTUFF was called on.
It makes sense if you think about it.
C:
if(%health < 36)
{
%health = "\c0" @ %health;
}
else
{
if(%health < 71)
{
%health = "\c3" @ %health;
}
else
{
if(%health < 101)
{
%health = "\c2" @ %health;
}
}
}
Use a little thing called switches.
Switches don't work here, but you could do the above far better.
if(%health < 101)
{
%health = "\c2" @ %health;
}
else if(%health < 71)
{
%health = "\c3" @ %health;
}
else if(%health < 36)
{
%health = "\c0" @ %health;
}
Look, it works just as well, doesn't require a forgetton of else statements, and it doesn't forget up syntax highlighting in my text editor.
OR EVEN BETTER
if(%health > 100)
%health = "\c5" @ %health;
else if(%health < 101)
%health = "\c2" @ %health;
else if(%health < 71)
%health = "\c3" @ %health;
else if(%health < 36)
%health = "\c0" @ %health;
Holy bejeebus batman, where did all those lines go? we're down to 6!
You probably noticed this, but in the last example, I added a if greater than 100, for custom playertype.