Okay when I use "Findcolor" in my script, it works - but when I use Findcolortolerance it just moves the mouse between 5 pixels very fast and does nothing... incase you're wondering - im making an oak chopper / seller.
Its only 10-20% done, and this is my first script.
Also should I use the FindObj function instead? I wanted to use Findcolorspiraltolerance but it just wont work, neither would findcolortolerance..
Heres my script if ur wondering - please give me advice on how I can make it better aswell :P
SCAR Code:
program OaksGotPwned;
{.include SRL/SRL.Scar}
const
Shop = 2709391; // color of the pot of the general shop in minimap
OakColor = 3105112; // color of the oak leaves, pick any color
var
x, y :integer; // do not touch this
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
procedure Signature;
begin
ClearDebug;
writeln('Oaks Got Pwned! OMGZORZ!!!!!!!!!!!!!');
writeln('This Script has been made by r3dr4g0n');
writeln('Please do not distribute without permission');
writeln('You can edit my script to make your own,')
writeln('just give me credit');
writeln('ENJOY THE SCRIPT!');
wait(3000 + random(750));
end;
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
procedure FaceNorth;
begin // Sets up your
MakeCompass('N'); // compass and
HighestAngle; // highest angle
MouseSpeed:=15; // <--- this is your mouse speed, change it if you know what your doing
Gametab(4);
end;
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
Function CutOak: Boolean;
begin
repeat
if(Findcolortolerance(x, y, OakColor, 140, 3, 515, 337, 60)) then
begin
MMouse(x, y, 5, 5);
Wait(100 + random(50));
if IsUpText('ak') then
begin
Mouse(x, y, 0, 0, True);
Result := True;
end;
end;
until (result)
end;
//////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////
procedure WalkItOut;
begin
end;
//////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////
begin
Activateclient; // minimizes scar and opens RS
SetupSRL;
Signature;
Wait(100+random(100)); // waits 3 seconds before doing anything
FaceNorth; // faces in the right direction
repeat
CutOak; // starts cutting oak
Findnormalrandoms;
Wait(1500+random(1500));
until (InvFull);
if InvFull then
WalkItOut; // walks to shop when ur inven is full
end.
OH yeah and my CutOak procedure, I dont understand most of it some guy fixed it for me. I dont understand why we write "Boolean" and what the "Result:=True" and "until(result)" mean ....