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]:= 'runite'; // 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 speeling srry');
end;
Withdraw(1, 1, mainamount);
wait(100 + random(200));
Withdraw(2, 1, secamount);
end;
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, 3289654, 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 := 2374477;
amount:= 14;
end;
'iron':
begin
barcolor := 5000274;
amount := 28;
end;
'steel':
begin
barcolor := 7303288;
amount:= 9;
end;
'mithril':
begin
barcolor := 6111295;
amount := 5;
end;
'addy':
begin
barcolor := 4280641;
amount := 4;
end;
'runite':
begin
barcolor := 6510915;
amount := 3;
end;
else Writeln('failed to select bar srry');
end;
if findcolortolerance(x, y, barcolor, msx1, msy1, msx2, msy2, 15) then
mmouse(x,y,3,3);
if(isuptext(Lowercase(Players[CurrentPlayer].Strings[0]))) then
begin
mouse(x, y, 3, 3, false);
wait(100 + random(20));
chooseoption('X');
wait(100 + random(30));
typesend(inttostr(amount));
end;
end;
begin
setupsrl;
activateclient;
declareplayers;
loginplayer;
banker;
getore;
Findcactuscolor;
tofurnace;
findfurnace;
choosebar;
end.
ok i got thise error eariler today but i cant figure it out can someone do it and then tell me what u did so i can fix it in the future