Code:
{.include srl/srl.scar}
var
x, y, cactuscolor:integer;
procedure DeclarePlayers;//add more if needed
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True; // Use this account?
Players[0].strings[0]:= 'rune'; // what bar to smith
players[0].pin:='';//bank pin
Players[0].BoxRewards := ['XP', 'ostume', 'mote', 'Gem', 'ithril', 'oal'];
end;
procedure banker;
begin
openbankfast('akb');
if bankscreen or pinscreen then
begin
writeln('opened bank');
end else
openbankglass('akb', true, true);
if bankscreen or pinscreen then
begin
writeln('opened bank');
end else
Writeln('could not open bank.');
if pinscreen then inpin(players[0].strings[1]);
end;
procedure getore;
var
mainamount, secamount : integer;
begin
case (Lowercase(Players[CurrentPlayer].Strings[0])) of
'bronze':
begin
mainamount := 14;
secamount:= 14;
end;
'iron':
begin
mainamount := 28; // Fill the acutal amounts in for the following though.
secamount:= 0;
end;
'steel':
begin
mainamount := 9;
secamount:= 18;
end;
'mithril':
begin
mainamount := 5;
secamount:= 20;
end;
'addy':
begin
mainamount := 4;
secamount:= 24;
end;
'runite':
begin
mainamount := 3;
secamount:= 24;
end;
else Writeln('incorrect spelling srry');
end;
Withdraw(1, 1, mainamount);
wait(100 + random(200));
Withdraw(2, 1, secamount);
end;
{*******************************************************************************
function Findcactuscolor: integer;
By: XcanadamanX
Description: Finds the cactus color for walking.
*******************************************************************************}
function FindCactusColor: Integer;
var
GC, a, l, TestColor: integer;
var
P:array of Tpoint;
Begin
if CactusColor = 0 then
Begin
GC := 3502663;
Flag;
FindColorsSpiralTolerance(MMCX,MMCY, P, GC, MMX1,MMY1,MMX2,MMY2, 75);
l:=GetArrayLength(P);
for a:= 0 to l-1 do
begin
TestColor := GetColor(P[a].x,P[a].y);
if (GetColor(P[a].x,P[a].y + 1)=TestColor-1708041) then
begin
Result := TestColor;
CactusColor:=Result;
writeln('Cactus Color = ' + IntToStr(TestColor));
Exit;
end;
end;
writeln('Could not find Cactus Color!');
Result := 0;
end;
end;
procedure tofurnace;
begin
radialwalk(cactuscolor, 0, 140, 100, 1, 1);
flag;
if findcolortolerance(x, y, 127739, mmx1, mmy1, mmx2, mmy2,15) then
begin
mouse(x, y, 3, 3, true);
writeln('found funace')
flag;
end;
end;
procedure findfurnace;
begin
makecompass('w');
if findcolortolerance(x, y, 3355447, msx1, msy1, msx2, msy2, 15) then
begin
mouse(x,y,3,3,false);
wait(100 + random (20));
chooseoption('melt');
end;
end;
procedure choosebar;
var
barcolor, amount : integer;
begin
case (Lowercase(Players[CurrentPlayer].Strings[0])) of
'bronze':
begin
barcolor := 2440527;
amount:= 14;
end;
'iron':
begin
barcolor := 5066067;
amount:= 28;
end;
'steel':
begin
barcolor := 7368825;
amount:= 14;
end;
'mithril':
begin
barcolor := 6176832;
amount:= 14;
end;
'adamant':
begin
barcolor := 4346434;
amount:= 14;
end;
'rune':
begin
barcolor := 6576708;
amount:= 14;
end;
else Writeln('incorrect spelling srry');
end;
if findcolortolerance(x, y, barcolor, msx1, msy1, msx2, msy2, 50) then
mmouse(x,y,3,3);
if(isuptext(Lowercase(Players[CurrentPlayer].Strings[0]))) then
begin
mouse(x, y, 0, 0, false);
wait(100 + random(20));
chooseoption('X');
wait(100 + random(30));
typesend(inttostr(amount));
end;
end;
begin
setupsrl;
activateclient;
graphicsset:=true;
declareplayers;
loginplayer;
//banker;
//getore;
//Findcactuscolor;
//tofurnace;
findfurnace;
choosebar;
end.