SCAR Code:
procedure Cop_wait(waittime: integer);
var
r1: Integer;
begin
r1 := randomrange(1, 4);
wait((waittime/r1)+random(50));
wait(waittime-random(waittime/2));
wait((waittime/4)+random(20));
end;
You could just do something like wait(100+random(100)), and it would be just as good.
SCAR Code:
procedure Cop_mouse(x, y: integer; leftclick: boolean);
var
ranx1, rany1: Integer;
begin
ranx1 := randomrange(2, 5);
rany1 := randomrange(2, 5);
Mouse(x, y, ranx1, rany1, leftclick);
end;
???
Mouse(x, y, 4, 4, false); doesn't seem very long to me 
SCAR Code:
case random(14) of
0: Gametab(tab_Notes);
1: Gametab(tab_Combat);
2: Gametab(tab_Stats);
3: Gametab(tab_Quest);
4: Gametab(tab_Diary);
5: Gametab(tab_Equip);
6: Gametab(tab_Prayer);
7: Gametab(tab_Magic);
8: Gametab(tab_Friends);
9: Gametab(tab_Ignore);
10: Gametab(tab_Clan);
11: Gametab(tab_Options);
12: Gametab(tab_Emotes);
13: Gametab(tab_Music);
end;
Cop_wait(500);
Gametab(tab_Inv);
shortened:
SCAR Code:
GameTab(RandomRange(1, 13));
Wait(500+random(100));
GameTab(tab_Inv);
SCAR Code:
procedure Cop_dropload(itemcolor: integer);
var
i: Integer;
begin
if not (LoggedIn) then Exit;
if FindColor(itemcolor, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
CountItemsIn('inv', 'colour', itemcolor, [5, 1]);
for i := 1 to 28 do
begin
DropAll;
//inc(LoadsDone);
end;
for i := 2 to 28 do
begin
DropItem(i);
//inc(LoadsDone);
end;
end;
end;
shortened:
SCAR Code:
procedure Cop_dropload(itemcolor: integer);
var
b: tbox;
i: Integer;
begin
if not (LoggedIn) then Exit;
for i := 1 to 28 do
begin
b := InvBox(i);
if FindColor(itemcolor, x, y,b.x1, b.y1, b.x2, b.y2) then
DropItem(i);
end;
end;
SCAR Code:
function Cop_findtree(treetype: string; leftclick: boolean): boolean;
begin
if not (LoggedIn) then Exit;
case Lowercase(treetype) of
'normal': begin
if FindObjCustom(x, y, ['ree'], [1854786, 3567717, 1062703], 5) then
begin
result := true;
Cop_mouse(x, y, leftclick);
Cop_wait(100);
if (leftclick) then
ChooseOption('hop')
else
end;
end;
'oak': begin
if FindObjCustom(x, y, ['ak'], [1922889, 4624516, 2516570], 5) then
begin
result := true;
Cop_mouse(x, y, leftclick);
Cop_wait(100);
if (leftclick) then
ChooseOption('hop')
else
end;
end;
'willow': begin
if FindObjCustom(x, y, ['illow'], [6919048, 2441789, 5010788], 5) then
begin
result := true;
Cop_mouse(x, y, leftclick);
Cop_wait(100);
if (leftclick) then
ChooseOption('hop')
else
end;
end;
'maple': begin
if FindObjCustom(x, y, ['aple'], [3495048, 1451327, 2176088], 5) then
begin
result := true;
Cop_mouse(x, y, leftclick);
Cop_wait(100);
if (leftclick) then
ChooseOption('hop')
else
end;
end;
'yew': begin
if FindObjCustom(x, y, ['ew'], [2120012, 2648669, 4228986], 5) then
begin
result := true;
Cop_mouse(x, y, leftclick);
Cop_wait(100);
if (leftclick) then
ChooseOption('hop')
else
end;
end;
'magic': begin
if FindObjCustom(x, y, ['agic'], [10479596, 4623230, 2186320], 5) then
begin
result := true;
Cop_mouse(x, y, leftclick);
Cop_wait(100);
if (leftclick) then
ChooseOption('hop')
else
end;
end;
else
writeln('Tree type selected is not supported.');
end;
end;
shortened, also edited it abit
SCAR Code:
function Cop_findtree(treetype: string; Chop: boolean): boolean;
var
Colors: Array of integer;
UpText: string;
begin
if not (LoggedIn) then Exit;
case Lowercase(treetype) of
'normal': Colors := [1854786, 3567717, 1062703];
'oak': Colors := [1922889, 4624516, 2516570];
'willow': Colors := [6919048, 2441789, 5010788];
'maple': Colors := [3495048, 1451327, 2176088];
'yew': Colors := [2120012, 2648669, 4228986];
'magic': Colors := [10479596, 4623230, 2186320];
end else
begin
writeln('Tree type selected is not supported.');
exit;
end;
UpText := copy(treetype, 2, High(treetype)); // this takes the first letter off from treetype and saves it to variable UpText, willow -> illow
if FindObjCustom(x, y, [UpText], Colors, 5) then
begin
result := true;
if Chop then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, false);
result := WaitOption('p down', 500+random(100));
end;
end;
end;
Keep up the good work, but don't make things too complicated!