Well I wanted this script to make it so that if you chop trees down the more your level goes up for chopping trees down
Here's the Script
Randy helped to..
function serverCmdCheckExp(%client)
{
messageClient(%client, '', '\c5Exp: %1', %client.exp);
}
function serverCmdCheckLvl(%client)
{
messageClient(%client, '', '\c5Lvl: %1', %client.getLvl());
}
function GameConnection::getLvl(%this)
{
return mFloor(%this.exp / 50) + 1;
}
function serverCmdGrantExp(%client, %victim, %amount)
{
%victim = findClientByBL_ID(%victim);
if(!isObject(%victim) || %amount <= 0 || %amount > %client.exp)
return;
%victim.exp += %amount;
%client.exp -= %amount; // i'm guessing this is what you want because you're checking if %amount > %client.exp
messageClient(%client, '', 'Gave %2 %1 exp', %victim.name, %amount);
}