SCAR Code:
program DudesIronAlKharidSmelter;
{.include SRL/SRL.scar}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
Const
RunDir = 'E'; //Direction to Run away from randoms
StartPlayer = 0; //Your Start Player
{--------Colours--------}
BankBoothColour = 606035; //Colour of the Sleeve on the banker
FurnaceColour = 2763308; //Colour of the Furnace, Leave Alone
RockCol = 1191766; //Colour of the rock, set if needed
IronFurnace = 5921634; //Colour of the Iron Bar on the furnace
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
Var
Loads : integer;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
{--------------------Player Setup--------------------}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
Procedure DeclarePlayers;
begin
HowManyPlayers :=1; //Number of Players your using
NumberOfPlayers(HowManyPlayers); //Just Leave Alone
CurrentPlayer:= StartPlayer; //Your Start Player which you set above
Players[0].Name :='Username'; //Your Runescape Username
Players[0].Pass :='Password'; //Your Runescape Password
Players[0].Nick :='Nickname'; //Choose 3 letters from the center of your username
Players[0].Skill :='Smithing'; //The skill to put your Genie Lamp on
Players[0].Active:=True; //Only one player for now so just leave
end;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
{---------------------End Setup----------------------}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
{--------------------DO NOT EDIT---------------------}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
{--------------------Find Randoms--------------------}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
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 : If RC Then Result := True;
10 : If FindFight Then
Begin
Result := True;
MakeCompass('N');
RunTo(RunDir, True);
MakeCompass('N');
End;
11: If FindTalk Then Result := True;
End;
Wait(1);
end;
end;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
{--------------------Map Settings--------------------}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
Procedure MapSettings;
begin
SetRun(true)
end;
{/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\}
{---------------------Open Bank----------------------}
{\~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/}
Procedure OpenBankScr;
begin
if FindColorTolerance(x,y,BankBoothColour,MSX1,MSY1,MSX2,MSY2,10) then
Mouse(x,y,2,2,false);
ChooseOption(x,y,'uickly');
end;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
{---------------Withdraw and Deposit!----------------}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
Procedure WithdrawBank;
begin
DepositAll;
Withdraw(1,1,28);
CloseBank;
end;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
{--------------------Click Rock!---------------------}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
Procedure ClickRock;
begin
MakeCompass('N');
HighestAngle;
FindNormalRandoms;
FindFastRandoms;
if FindColorSpiral(x,y,RockCol,MMX1,MMY1,MMX2,MMY2) then
begin
Mouse(x,y,6,6,True);
end;
end;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
{--------------------Click Symbol--------------------}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
Procedure ClickSym;
begin
FindNormalRandoms;
FindFastRandoms;
if (FindSymbol (x, y, 'furnace')=true) then
begin
Mouse(x,y,2,2,true);
Flag;
end;
end;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
{-------------------Smelt Furnace!-------------------}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
Procedure SmeltFur;
begin
FindFastRandoms;
FindNormalRandoms;
if (FindMMColorTol(x,y,FurnaceColour,5)) then
begin
Mouse(x,y,5,5,true);
end;
if (FindMMColorTol(x,y,IronFurnace,5)) then
begin
Mouse(x,y,5,5,false);
ChooseOption(x,y,'Smelt X');
TypeSend('28');
HoverEvery(2,'smithing');
BoredEvery(4);
Wait(90000);
end;
end;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
{--------------------Walking Back--------------------}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
Procedure WalkBackBank;
begin
FindFastRandoms;
FindNormalRandoms;
if (FindColorSpiral(x,y,RockCol,MMX1,MMY1,MMX2,MMY2)) Then
begin
Mouse(x,y,5,5,true);
end;
end;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
{-----------------Click Bank Symbol!-----------------}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
Procedure ClickBankS;
begin
FindFastRandoms;
FindNormalRandoms;
if FindSymbol(x,y, 'bank') then
begin
Mouse(x,y,5,5,true);
Loads :=Loads+1;
end;
end;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
{-----------------Dudes Prog Report!-----------------}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
Procedure DudeProgReport;
begin
ClearDebug;
writeln('[ ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[ ]');
writeln(' |------Made By Dudesareus!------|');
writeln(' |----Time Running: '+ ScriptTime2(2)+'----|');
writeln(' |------Loads Done: '+ inttostr(Loads) +' Loads------|');
writeln('[ ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[ ]');
end;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
{-----------------End of the Script!-----------------}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
{------------------Dudes Main Frame------------------}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
begin
SetupSRL;
DeclarePlayers;
ActivateClient;
repeat
DudeProgReport;
MapSettings;
OpenBankScr;
WithdrawBank;
ClickRock;
ClickSym;
SmeltFur;
WalkBackBank;
ClickBankS;
LoginPlayer;
until(False);
end.