SCAR Code:
program New;
{.include srl\srl\misc\smart.scar}
{.include srl\srl.scar}
{.include srl\srl\skill\woodcutting.scar}
{.include SRL\SRL\Reflection\Reflection.scar}
var
x,y,I,LoadsDone,button:integer;
const
WillowColor = 2965816; //Fill this in if it can't find the trees.
WillowColor1 = 9745827;// Another Willow Color.
Loads2do = 1337; // How many loads to do.
World = 161; // World To Auto On.
Procedure PlayerSetup;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active:= true;
end;
Procedure WillowChoppa;
begin
If IsUpText('chop down') then Exit;
if not FindEnt(x,y,true) then FindObjCustom(x, y, ['hop down','hop','down','Chop Down'], [WillowColor,WillowColor1], 3) else wait(1500+random(200));
mouse(x,y,2,2,true)
GetMousePos(x,y)
MMouse(x,y,1,1)
While IsUpText('Chop down') do wait(500);
ClickToContinue;
End;
Procedure LoadDTMs;
begin
Button := DTMFromString('78DA637CCAC4C0C00DC448A0AFA38E4119483' +
'302F17F20607C09946745550391859140FA15509E9F809AFB44AA' +
'216017005B180A7F');
end;
Procedure NoAxe;
begin
If Not FindAxe then
begin
OpenBankReflection('db')
If FindDTM(Button,x,y,MSX1,MSY1,MSX2,MSY2) then
begin
Mouse(x,y,1,1,true)
Typesend('axe')
end;
end;
end;
Procedure SetupSmart;
Begin
SmartSetupEx(161, True, True, False);
SetTargetDC(SmartGetDC);
ReplaceDebugLine(8, 'Loading RuneScape ...');
Wait(2000);
end;
Function PathWalk(Path : array of TPoint; Tol, FlagD : integer): Boolean;
var
Count : integer;
begin
Count := 0;
repeat
Result := WalkToTile(Path[Count], Tol, FlagD);
if not(Result) then
begin
WriteLn('Path walk failed');
Exit;
end;
Count := Count + 1;
until (not(Result)) or (Count = GetArrayLength(Path))
end;
function LoadPath: TPointArray;
begin
SetLength(Result, 4);
Result[0] := Point(3093, 3245);
Result[1] := Point(3086, 3244);
Result[2] := Point(3087, 3236);
Result[3] := Point(3087, 3231);
end;
function LoadPath2: TPointArray;
begin
SetLength(Result, 4);
Result[0] := Point(3087, 3231);
Result[1] := Point(3086, 3244);
Result[2] := Point(3093, 3246);
Result[3] := Point(3094, 3242);
end;
Procedure WalkToBank;
Var
I: Integer;
Path: TPointArray;
Begin
Path := LoadPath2;
for i := 0 to High(Path) do
Begin
WalkToTile(path[i], 3, 0);
end;
Wait(500+Random(300));
//FindSymbol('bank',x,y)
//mouse(x,y,2,2,true)
end;
Procedure WalkToWillows;
Var
I: Integer;
Path: TPointArray;
Begin
Path := LoadPath;
for i := 0 to High(Path) do
Begin
WalkToTile(path[i], 3, 0);
end;
Wait(500+Random(300));
end;
Procedure Banking;
var
I : Integer;
begin
WalkToBank;
repeat
OpenBankReflection('db')
until(bankscreen)
FixBank;
For I := 2 to 28 do
deposit(I,28,28);
WalkToWillows;
LoadsDone := LoadsDone+1;
Writeln(IntToStr(LoadsDone))
end;
Begin;
repeat
SetupSRL;
SetupSmart;
PlayerSetup;
LoadPath;
LoadPath2;
WalkToWillows;
Repeat
WillowChoppa
FindNormalRandoms;
until(InvFull)
WalkToBank;
Banking
until(inttostr(Loads2do) = inttostr(LoadsDone))
end.
Why do I get this error with my script? it doesn't happen with any others!