Bot names are equivalent to client IDs.
AI IDs are equivalent to player IDs.
Try:
Code: Select all
Client::setSkin(%newName, "beagle");
%bot = AI::getID(%newName);
GameBase::setDamageLevel(%bot, Player::getArmor(%bot).maxDamage * 0.9); // 90% damage = 10% health.