SCAR Code:
program GuildMiner;
{.include SRL/SRL.scar}
{.include SRL/SRL/skill/Mining.scar}
{.include SRL/SRL/misc/FaladorColorFinder.scar}
{Start in east Falador Bank, far left bank slot.}
var x,y:Integer;
const
//SmartWorld = 61; // what world smart uses
//Signed = True;
OreColor = 2900289; //Color of Coal.
LadderColor = 672346; //Ladder color on main screen.
MinmapLadder = 10337; //Ladder Color on minimap.
GuildGround = 2513000; //Color of ground in guild.
loadsdef = 50; //Number of loads to do.
Procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :='Iamnot';
Players[0].Pass :='adirty';
Players[0].Nick :='noob';
Players[0].Active := True;
{Players[1].Name :='';
Players[1].Pass :='';
Players[1].Nick :='';
Players[1].Active := True;
Players[2].Name :='';
Players[2].Pass :='';
Players[2].Nick :='';
Players[2].Active := True;
Players[3].Name :='';
Players[3].Pass :='';
Players[3].Nick :='';
Players[3].Active := True;
Players[4].Name :='';
Players[4].Pass :='';
Players[4].Nick :='';
Players[4].Active := True;
Players[5].Name :='';
Players[5].Pass :='';
Players[5].Nick :='';
Players[5].Active := True;
Players[6].Name :='';
Players[6].Pass :='';
Players[6].Nick :='';
Players[6].Active := True;
Players[7].Name :='';
Players[7].Pass :='';
Players[7].Nick :='';
Players[7].Active := True;}
end;
Procedure Antiban;
Begin
if (not(LoggedIn)) then Exit;
BoredHuman;
End;
Procedure AntiRandom;
Begin
if not LoggedIn then Exit;
LampSkill := 'mining';
FindNormalRandoms;
if FindFight then RunAway('W',True,1,15000);
end;
Procedure ClimbDown;
var
x,y:integer;
begin
if not LoggedIn then Exit;
wait(1000)
If FindColor(x,y,0,MSX1+10,MSY1+10,MSX2-10,MSY2-10) then
begin
Wait(100);
Mouse(x,y,0,0,false);
if ChooseOption('Climb') then
repeat
if not LoggedIn then Break;
Wait(250);
Until FindObj(x,y,'Climb-up',LadderColor,21);
end;
Mouse(680,80,10,10,true);
end;
Procedure ClimbUp;
var
x,y:integer;
begin
if not LoggedIn then Exit;
Repeat
if not LoggedIn then Break;
RadialWalk(GuildGround, 215, 305, 70, 1, 1);
Flag;
Until FindColor(x,y,MinMapLadder,MMCX-15, MMCY-15, MMCX+15, MMCY+15);
if FindObj(x,y,'Climb-',LadderColor,21) then
begin
Wait(100);
Mouse(x,y,0,0,false);
ChooseOption('Climb');
Repeat
if not LoggedIn then Break;
Wait(500);
Until FindColor(x,y,RoadColor,MMX1, MMY1, MMX2, MMY2);
end;
end;
Procedure GoGuild;
var x,y:Integer;
begin
MakeCompass('N');
SetAngle(true);
FindFaladorRoadColor;
if FindSymbol(x,y,'bank') then
RadialWalk(RoadColor, 150, 170, 70, -2,-2);
Flag;
ClimbDown;
end;
Procedure GoBank;
Begin
ClimbUp;
wait(1000)
FindFaladorRoadColor;
RadialWalk(RoadColor, 400, 440, 70, 1, 1);
Flag;
RadialWalk(RoadColor, 300, 340, 70, 1, 1);
Flag;
end;
Procedure Miner;
var cx,cy,count:Integer ;
Begin
repeat
if not LoggedIn then Break;
if FindObjOre2(cx,cy,'ocks',OreColor,5,count) then
begin
Mouse(cx,cy,2,2,true);
repeat
if not LoggedIn then Break;
AntiRandom;
Antiban;
Wait(250 + Random(300));
Until GetColor(cx,cy) <> OreColor;
end;
until InvFull;
end;
Procedure Banker;
begin
FindSymbol(x,y,'bank');
Mouse(x,y,2,2,true);
Flag;
Repeat
if not LoggedIn then Break;
Wait(250 + random(50));
Until FindBank('feb');
Depositall;
CloseBank;
end;
{procedure SetupSmart;
begin
SmartSetupEx(SmartWorld, false, Signed);
ClearDebug;
WriteLn('Setting up Smart... Please Hold...');
Wait(10000 + random(5000));
SetTargetDC(SmartGetDC);
While not(SmartReady) do Wait(100);
end;}
Procedure MainLoop;
var
c:integer;
begin
LoginPlayer;
repeat
if not LoggedIn then Break;
GoGuild;
Miner;
GoBank;
Banker;
c := (c + 1);
until c = loadsdef;
end;
begin
SetupSRL;
SetupMining;
//SetupSmart;
DeclarePlayers;
MainLoop;
end.