I can't see any negative things resulting from this method, but something like this should work
function copyAppearance(%bot,%player)
{
%player.client.aplayer = %player;
%player.client.player = %bot;
%player.client.applyBodyParts();
%player.client.applyBodyColors();
%player.client.player = %player.client.aplayer;
}
EDIT: Actually you should probably just create %bot.client as a copy of %player.client and then applyBodyParts/Colors on that. Will edit with code.
EDIT2: So using a function I wrote a while ago, haven't tested it extensively but it seems to work from what I've done.
function copy(%obj)
{
%obj.copyFunction_oldName = %obj.getName();
%obj.setName("copyFunction_CopyObj");
%newObj = new (%obj.getClassName())(:copyFunction_CopyObj);
%obj.setName(%obj.copyFunction_oldName);
%obj.copyFunction_oldName = "";
%newObj.copyFunction_oldName = "";
return %newObj;
}
function copyBotAppearance(%bot,%client)
{
%bot.client = copy(%client);
%bot.client.player = %bot;
%bot.client.applyBodyParts();
%bot.client.applyBodyColors();
}
Other than the copy function this is untested.
That copy function would create a GameConnection instead of an AiConnection; I don't know if this will result in anything unwanted or not. Also, this code wouldn't work well if the bod would ever switch to another player's appearance after the client is created; you may want to edit with some slightly different code.