SCAR Code:
// start at the oak in draynor near the bank
program OakOwner;
{.Include SRL/SRL.Scar}
var
LoadsToDo : Integer;
Banked : boolean;
const
OakColor = 3169366 ;// Oak color
HowManyLoads = 10;
procedure DeclarePlayers;
begin
HowManyPlayers := 1; //Number of players
NumberOfPlayers(HowManyPlayers);
CurrentPlayer:= 0;
Players[0].Name :='nereus51';//name of the char
Players[0].Pass :='492268';//pass of the char
Players[0].Nick :='eus';//3-4 letters of the char
Players[0].Active:=True;
end;
{Procedure : RandomHoverMMouse)}
{Author : U L T R A.}
{Description : Randomly moves the mouse somewhere.}
Procedure RandomHoverMMouse;
Begin
Case Random(6)Of
0:MMouse(random(250), random(250), 10, 10);
1:MMouse(random(100), random(100), 50, 50);
2:MMouse(random(50), random(50), 150, 150);
3:MMouse(100, 100, 150, 150);
4:MMouse(300, 300, 100, 100);
5:MMouse(200, 200, 50, 50);
end;
end;
{end of U L T R A's Procedure}
procedure Starting;
begin
MakeCompass('S');
GameTab (4);
end;
procedure AntiRandom;
begin
if not LoggedIn then Exit;
FindNormalRandoms;
end;
procedure LittleAutoResponce;
begin
If(FindChatText('Hi'))then
begin
TypeSend('Ik spreek geen Engels');
If(FindChatText('Wc lvl?'))then
begin
TypeSend('Beter dan de jouwe');
end;
end;
end;
function FindFastRandoms: Boolean;
var
i: Integer;
begin
for i := 1 to 12 do
begin
case I of
1: if FindDead then
Result := True;
2: if FindMod then
Result := True;
3: if FindMime then
Result := True;
4: if FindMaze then
Result := True;
5: if FindQuiz then
Result := True;
6: if FindDemon then
Result := True;
7: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
8: begin
if InBlack then
begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
Logout;
Exit;
end;
end;
9: begin
if FindFight then
begin
RunTo('E', True);
Wait(5000 + random(3000));
Runback;
end;
end;
10: if FindTalk then
Result := True;
11: if ClickToContinue then
Result := True;
12: if SolvePinball then
Result := True;
end;
end;
end;
procedure LetzChopp;
var
x,y : Integer;
begin
FindFastRandoms;
if (FindColorSpiralTolerance(x,y,OakColor,82,52,420,207,6))then
begin
if (IsUpText('ak'))then
begin
Mouse(x,y,1,1,true);
wait(50000)
repeat
until (InvCount=28);
end;
end;
end;
Procedure WalkToBank;
var x,y : Integer;
begin
if (InvCount=28) then
begin
SymbolAccuracy := 0.5;
if FindSymbol(x,y,'bank') then
Mouse(x,y,5,5,True);
SymbolAccuracy := 0.8;
flag;
end;
end;
Procedure BankItems;
begin
Banked := False;
if (InvCount=28) then
begin
OpenBankFast('db');
wait(100);
Deposit(2,28,2);
wait(100);
if CloseBank then
begin
Banked := True;
end;
end;
end;
procedure WalkToTheOak;
begin
if (Banked (:= True))then
begin
MakeCompass('S')
if RadialWalk(216852,250,300,70,0,1) then
begin
Writeln('Walking to the oak');
wait(5000+random(25));
exit;
end;
end;
end;
begin
SetUpSRL;
DeclarePLayers;
LoginPlayer;
ActivateClient;
DeclarePlayers;
RandomHoverMMouse;
Starting;
FindNormalRandoms;
LittleAutoResponce;
repeat
LetzChopp;
WalkToBank;
BankItems;
WalkToTheOak;
until (LoadsToDo >= HowManyLoads)
end.