SCAR Code:
program New;
{.include srl\srl.scar}
{.include SRL\SRL\Reflection\Reflection.scar}
var
x,y:integer;
const
WillowColor = 2965816; //Fill this in if it can't find the trees.
WillowColor1 = 9745827;// Another Willow Color
Loads = 1337; // How many loads to do.
Procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
end;
Procedure WillowChoppa;
begin
Case random(2) of
0:Begin
FindObjCustom(x, y, ['hop down','hop','down','Chop Down'], [WillowColor,WillowColor1], 3)
mouse(x,y,2,2,true)
end;
1:Begin
FindObjCustom(x, y, ['hop down','hop','down','Chop Down'], [WillowColor,WillowColor1], 3)
mouse(x,y,2,2,false)
ChooseOption('Chop down')
End;
End;
End;
Procedure SetupSmart;
Begin
SmartSetup('161', true, true, false);
SetTargetDC(SmartGetDC);
while not SmartActive do wait(100);
If not(Loggedin) then LoginPlayer;
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));
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
OpenBankquiet('db')
until(bankscreen)
FixBank;
For I := 2 to 28 do
deposit(I,28,2);
WalkToWillows;
end;
Begin;
SetupSRL;
SetupSmart;
LoadPath;
LoadPath2;
if not LoggedIn then LoginPlayer;
WalkToWillows;
Repeat
WillowChoppa
until(InvFull)
WalkToBank;
Banking
end.
And when I press run, smart doesn't load, and nothing happens, whats going on here?