edit: Hey dude do you have Scar 3.15b and SRL revision 21? I don't think you do.. :/
using ClickMouse and MoveMouse are very detectable. You should use MMouse for moving, and Mouse for clicking. Here's a little something i quickly put together that should help you a lot.
If you need any help, just let me know. =p
SCAR Code:
program New;
{.include /SRL/SRL.SCAR}
const
TreeColor = 12345; // Using a const for a color makes the script much more user friendly.
var
x, y: Integer;
begin
repeat
if FindColorTolerance(x, y, TreeColor, 0, 0, 514, 336, 3) then // 0, 0, is the starting search point, 514, 336 is the edge of the
begin // runescape screen, excluding the minimap, chat box, and inventory.
MMouse(x, y, 2, 2); //moves the mouse to where it found the color.
if IsUpText('hop') then //searches top left of rs screen for text, such as "Chop-down tree"
begin
Mouse(x, y, 0, 0, false); //true=left click, false=right click, 0, 0 is randomness, which isn't needed beacause you already have a randomness on the MMouse.
ChooseOption('hop'); //clicks on the text 'hop', in the word Chop
end;
end;
wait(1000 +random(500)); // waits 1000 ms, which is 1 secon, plus anywhere between 0 and 500 extra ms.
until InvFull; //will repeat the above until the inventory is full.
end.
edit; and to make it repeat forever, you could use "Until false;"
edit2; you can also use counting to do something a particular number of times, like this:
SCAR Code:
program New;
{.include /SRL/SRL.SCAR}
const
TreeColor = 12345; // Using a constant for a color makes the script much more user friendly.
var
x, y, Count: Integer;
begin
repeat
if FindColorTolerance(x, y, TreeColor, 0, 0, 514, 336, 3) then // 0, 0, is the starting search point, 514, 336 is the edge of the
begin // runescape screen, excluding the minimap, chat box, and inventory.
MMouse(x, y, 2, 2); //moves the mouse to where it found the color.
if IsUpText('hop') then //searches top left of rs screen for text, such as "Chop-down tree"
begin
Mouse(x, y, 0, 0, false); //true=left click, false=right click, 0, 0 is randomness, which isn't needed beacause you already have a randomness on the MMouse.
ChooseOption('hop'); //clicks on the text 'hop', in the word Chop
Inc(Count); // Increases the variable "Count", by 1. Dec(Count); would decrease it.
end;
end;
wait(1000 +random(500)); // waits 1000 ms, which is 1 secon, plus anywhere between 0 and 500 extra ms.
until Count = 28; // will repeat until it has done it 28 times.
end.