if(isFile("Add-Ons/System_ReturnToBlockland/server.cs"))
{
if(!$RTB::RTBR_ServerControl_Hook)
exec("Add-Ons/System_ReturnToBlockland/RTBR_ServerControl_Hook.cs");
RTB_registerPref("Copies per player","Gameplay","$Copies::Amount","int 0 300","Script_Copybots",3,0,0);
}
else
{
$Copies::Amount = 3;
}
$copyTotal = 0;
$Mahcopycount = 0;
$Copystuff = $Mahcopycount;
function serverCmdcopy(%client)
{
if($Mahcopycount>=0)
{
if($Mahcopycount==$Copies::Amount)
{
return;
cancel();
$Mahcopycount = $Mahcopycount -1;
%client.botlist = trim(strReplace(" "@%client.botlist@" "," "@%bot@" "," "));
Messageclient(%client,0,"<color:FF0000>Silly truffle, you have too many copies! :D");
}
%bot = new AIplayer(%bot)
{
datablock=playernojet; position=%client.player.getTransform();
};
$Mahcopycount = $Mahcopycount +1;
%client.botlist = %client.botlist SPC %bot;
MessageClient(%client,0,"\c3You have cloned yourself.");
//Stuff for bot clearing
$copyBots[$copyTotal] = %bot;
$copyTotal++;
%bot.isCopy = 1;
%client.bot = %bot;
%rawr = %client.player;
%client.player = %bot;
%client.applyBodyParts();
%client.applyBodyColors();
%client.player = %rawr;
%bot.setScale("1 1 1");
%bot.setMoveObject(%client.player);
//%bot.setShapeName(%client.name);
//We can only pretend. :(
%bot.accent = %client.accent;
%bot.faceName = %client.faceName;
%bot.decalName = %client.decalName;
%bot.accent = %client.accent;
%bot.accentColor = %client.accentColor;
%bot.chest = %client.chest;
%bot.chestColor = %client.chestColor;
%bot.hat = %client.hat;
%bot.hatColor = %client.hatColor;
%bot.headColor = %client.HeadColor;
%bot.hip = %client.hip;
%bot.hipColor = %client.hipColor;
%bot.larm = %client.larm;
%bot.larmColor = %client.larmcolor;
%bot.lhand = %client.lhand;
%bot.lhandcolor = %client.lhandcolor;
%bot.lleg = %client.lleg;
%bot.llegcolor = %client.llegcolor;
%bot.pack = %client.pack;
%bot.packcolor = %client.packcolor;
%bot.rarm = %client.rarm;
%bot.rarmcolor = %client.rarmcolor;
%bot.rhand = %client.rhand;
%bot.rhandcolor = %client.rhandcolor;
%bot.rleg = %client.rleg;
%bot.rlegcolor = %client.rlegcolor;
%bot.secondPack = %client.secondpack;
%bot.secondPackColor = %client.secondPackColor;
%client.bot = %bot;
}
}
function servercmdcopytoggle(%client, %toggle)
{
%client.bot = for(%i = 0; %i < getWordCount(%client.botlist); %i++) echo(getWord(%client.botlist,%i));
}
How does that look?
Inb4someonesaysno