[Realms Resolution] Custom Command
I know this can work because I did it on Fsod source but I wanted to make a maxing command that is like /Omax for Owner max. It would max the stats and add 400 to it. I copy and pasted the Max command and added 400 to it like i did last time when it worked. But now i get errors like at the Max in public Ma() and in the : after that. Also in the Process in protected override bool Process.
Code:
public Max()
: base("Smax", Ranks.Mod)
{
}
protected override bool Process(Player player, RealmTime time, string[] args)
{
try
{
player.Stats[0] = player.ObjectDesc.MaxHitPoints + 400;
player.Stats[1] = player.ObjectDesc.MaxMagicPoints + 400;
player.Stats[2] = player.ObjectDesc.MaxAttack + 400;
player.Stats[3] = player.ObjectDesc.MaxDefense + 400;
player.Stats[4] = player.ObjectDesc.MaxSpeed + 60;
player.Stats[5] = player.ObjectDesc.MaxHpRegen + 400;
player.Stats[6] = player.ObjectDesc.MaxMpRegen + 400;
player.Stats[7] = player.ObjectDesc.MaxDexterity + 400;
player.SaveToCharacter();
player.Client.Save();
player.UpdateCount++;
player.SendInfo("Success");
}
catch
{
player.SendError("Error while maxing stats");
return false;
}
return true;
}
}