SCAR Code:
program DraynorWillBanker;
{.Include SRL\SRL.SCAR}
{.Include SRL\SRL\skill\WoodCutting.scar}
var
x,y,tree:integer;
WillowTree: array [0..6] of integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1; //How many players?
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; //username
Players[0].Pass := ''; //password
Players[0].Nick := ''; //3-4 letters of name
Players[0].Pin := ''; //bank Pin
Players[0].Booleans[0] := true; //true if weilding an axe
Players[0].Booleans[1] := true; //true if using sleep
Players[0].Integers[1] := 10; //Switch players/relog after how many loads?
Players[0].Active := True;
end;
Procedure IntroText;
begin
ClearDebug;
WriteLn('#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#');
Wait(150);
WriteLn(' ____ ');
Wait(150);
WriteLn('| \ ___ ___ _ _ ___ ___ ___ ');
Wait(150);
WriteLn('| | | _| . | | | | . | _|');
Wait(150);
WriteLn('|____/|_| |__,|_ |_|_|___|_| ');
Wait(150);
WriteLn(' |___| ');
Wait(150);
WriteLn('#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#');
Wait(150);
WriteLn(' ');
Wait(150);
WriteLn('#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#');
Wait(150);
WriteLn('| | | |_| | |___ _ _ _ ');
Wait(150);
WriteLn('| | | | | | | . | | | | ');
Wait(150);
WriteLn('|_____|_|_|_|___|_____| ');
Wait(150);
WriteLn('#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#');
Wait(150);
WriteLn(' ');
Wait(150);
WriteLn('#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#');
Wait(150);
WriteLn(' _____ _ ');
Wait(150);
WriteLn('| __ |___ ___| |_ ___ ___ ');
Wait(150);
WriteLn('| __ -| . | | _| -_| _| ');
Wait(150);
WriteLn('|_____|__,|_|_|_,_|___|_| ');
Wait(150);
WriteLn('#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#');
Wait(150);
end;
function FindAxeBool: Boolean;
var
Ix, Iy: Integer;
I, InvAxe, WieldAxe, FoundAxe: Byte;
begin
if not LoggedIn then exit;
srl_LoadBitmaps([47, 48, 49, 50, 51, 52, 53, 54]);
I := 0;
repeat
case GetCurrentTab of
5: begin
for WieldAxe := 0 to 7 do
if FindBitmapToleranceIn(srl_GetBitmap(54-WieldAxe),Ix, Iy, 566, 285, 606, 327, 10) then
Break;
if I = 0 then
if not GameTab(4) then exit;
Inc(I);
end;
4: begin
for InvAxe := 0 to 7 do
if FindBitmapToleranceIn(srl_GetBitmap(54 - InvAxe), Ix, Iy, MIX1, MIY1, MIX2, MIY2, 10) then
Break;
if I = 0 then
if not GameTab(5) then exit;
Inc(I);
end;
else
if not GameTab(5) then exit;
end;
until I = 2;
if (InvAxe = 8) and (WieldAxe = 8) then
begin
Writeln('No axe was found.');
Result := False;
srl_FreeBitmaps;
Exit;
end;
FoundAxe := Min(WieldAxe, InvAxe);
Result := True;
srl_FreeBitmaps;
end;
procedure ApxCustomAntiban;
begin
if(not(LoggedIn))then
Exit;
case Random(13) of
0: RandomRClick;
1: begin
HoverSkill('woodcutting', false);
wait(4000+random(1000));
GameTab(4);
end;
2: begin
HoverSkill('fishing', false);
wait(4000+random(1000));
GameTab(4);
end;
3: begin
MakeCompass(Random(300));
Wait(random(3000));
MakeCompass('N');
end;
4: begin
PickUpMouse;
BoredHuman;
end;
5: SayCurrentLevels('woodcutting');
6: PickUpMouse;
7: WriteLn('No Antiban this round');
8: begin
GameTab(1 + Random(12));
wait(4000+random(4000));
GameTab(4);
end;
9: begin
case random(8) of
0: TypeSend('Fishing lvls?');
1: TypeSend('Fishing levels');
2: TypeSend('Woodcutting lvls');
3: TypeSend('Wc levels');
4: TypeSend('Exp till next level');
end;
end;
10: MouseBox(MSX1,MMY1,MMX2,MMY2,3);
11: WriteLn('No Antiban this round');
12: SleepAndMoveMouse(400000+random(200000));
end;
end;
procedure LoadTreeArray;
begin
WriteLn('Willow Tree Array 1 loading...');
WillowTree[0] := 1979698
wait(500);
WriteLn('Sucessfull!!');
WriteLn('Willow Tree Array 2 loading...');
WillowTree[1] := 2637622
wait(500);
WriteLn('Sucessfull!!');
WriteLn('Willow Tree Array 3 loading...');
WillowTree[2] := 1518369
wait(500);
WriteLn('Sucessfull!!');
WriteLn('Willow Tree Array 4 loading...');
WillowTree[3] := 1780784
wait(500);
WriteLn('Sucessfull!!');
WriteLn('Willow Tree Array 5 loading...');
WillowTree[4] := 3165781
wait(500);
WriteLn('Sucessfull!!');
WriteLn('Willow Tree Array 6 loading...');
WillowTree[5] := 2110778
wait(500);
WriteLn('Sucessfull!!');
end;
Procedure ChooseArray;
begin
tree := Random(5);
case tree of
0: begin
tree := WillowTree[0];// this is line 208
end;
1: begin
tree := WillowTree[1];
end;
2: begin
tree := WillowTree[3];
end;
3: begin
tree := WillowTree[4];
end;
4: begin
tree := WillowTree[5];
end;
5: begin
tree := WillowTree[2];
end;
end;
end;
Procedure Equipmentcheck;
begin
If(FindAxeBool)Then
begin
WriteLn('Hatchet Found');
end;
If not(FindAxeBool)Then
begin
WriteLn('Hatchet Not Found')
exit;
end;
end;
Procedure ChopTheTree1;
begin
repeat
FindObjCustom(x,y,['Willow','illow','will'],[tree],20)
mouse(x,y,4,4,false);
until ChooseOption('Cage');
end;
Procedure ChopTheTree2;
begin
FindObjCustom(x,y,['Willow','illow','will'],[tree],20)
mouse(x,y,4,4,true);
end;
Procedure ChopTree;
begin
case random(1) of
0: begin
ChopTheTree1;
end;
1: begin
ChopTheTree2;
end;
end;
begin
SetupSRL;
DeclarePlayers;
SetAutoingDefaults;
LoginPlayer;
end.