Thanks, but it gives me syntax errors, at the 2nd to last line where you define $afkBot
third to last, forgot a ; at the end of the line actually.
What is this supposed to do anyways?
I fixed the error that Ipquarx listed and it works fine for meJust add a semicolon to the end of the getRandom call
How do you activate it?
Ah thanks, but does anybody know a way for me to client-sidedly detect if there is a brick near my player in any direction?
afkBot();It doesn't loop.nexus knows this for sure.
function getClosestBrick(){ %myPos = serverConnection.getControlObject().getPosition(); for(%i=0; %i < serverConnection.getCount(); %i++) { %o = serverConnection.getObject(%i); if(%o.getClassname() $= "fxDTSBrick") { %dist = vectorDist(%myPos, %o.getPosition()); if(%dist < %closest || %closest $= "") { %closest = %dist; %closestbrick = %o; } } } return %o;}
code-snip