You would generally have a main loop consisting of a repeat ... until false that would run until all players are logged out and unable to continue. What you would place in your main loop would be continuously repeated, so that's where you would put the bit that finds the tree, clicks the tree, searches for randoms, maybe does some antiban stuff then goes back to the top (with probably a check to make sure you're still running and if not, go on to the next person). A pseudocode version of this script would be something like:
SCAR Code:
begin
SetupSRL;
DeclarePlayers;
SetupPlayers;
repeat
FindTheTree;
ChopTheTree;
FindNormalRandoms;
PerformAntibans;
CheckPlayerStatus;
until false;
end;
Then you would just need to go through and create procedures or functions to do each of those steps - except antirandoms as FindNormalRandoms does just about all the randoms there are, with a couple of exceptions.
By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.