Robbiej
05-13-2007, 08:06 PM
Hey,
this is my first script...
I haven't really tested it, since my smithing lvl isn't lvl 15 because i got hacked...
Instructions:
- Be in East falador bank with full load of iron ores.
- Run the script.
- Go watch TV.
Any errors?
- Please reply to this topic
The script:
program Autosmelter;
{.include SRL\SRL.scar}
//This program is created by Robbiej.
//Master of the secret society of xD².
var
Banked: integer;
const
Ores= 56; //Change this to your number of ores.
IronOreColor= 2503507; //You can change this if it doesn't work.
BankIconColor= 6543871; //You can change this if it doesn't work.
BankerColor= 195836; //You can change this if it doesn't work.
BankBoothColor= 7570836; //You can change this if it doesn't work.
FurnaceIconColor= 3504639; //You can change this if it doesn't work.
FurnaceColor= 2763308; //You can change this if it doesn't work.
IronBarColor= 3158069; //You can change this if it doesn't work.
House1Color= 6443873; //You can change this if it doesn't work.
House2Color= 3695784; //You can change this if it doesn't work.
CloseBankBoothColor= 7308433; //You can change this if it doesn't work.
procedure Grab;
begin
Writeln('Opening bank account...');
Writeln('Searching iron ore to grab...');
if(FindColorTolerance(x,y,IronOreColor,0,0,400,400 ,50)) then
begin
Writeln('Iron ore found!');
Mouse(x,y,2,2,false);
Wait(500+random(200));
Mouse(x,y+65,2,2,true);
end else
begin
Writeln('Iron ore not found!');
end
end;
procedure BankIronOre;
begin
Writeln('Opening bank account...');
if(FindColorTolerance(x,y,BankBoothColor,0,0,600,6 00,50)) then
begin
Writeln('Bank booth opened!');
Wait(5000+random(500));
Mouse(x,y,2,2,false);
Wait(500+random(200));
Mouse(x,y+40,2,2,true);
Wait(1000+random(300));
Writeln('Searching iron bar to bank...');
if(FindColorTolerance(x,y,IronBarColor,300,300,600 ,600,50)) then
begin
Writeln('Iron bar found!');
Mouse(x,y,2,2,false);
Wait(500+random(100));
Mouse(x,y+65,2,2,true);
Banked:= Banked+1;
Grab;
if(FindColorTolerance(x,y,CloseBankBoothColor,0,0, 600,600,50)) then
begin
Writeln('Closing bank booth...');
Mouse(x,y,2,2,true);
Writeln('Bank booth closed!');
end else
begin
Writeln('Bank booth close not found!');
end
end else
begin
Writeln('Iron bar not found!');
end
end else
begin
Writeln('Bank booth not found!');
end
end;
procedure FindBanker;
begin
Writeln('Searching for banker...');
if(FindColorTolerance(x,y,BankerColor,0,50,700,700 ,50)) then
begin
Writeln('Banker found!');
Mouse(x,y-10,2,2,true);
Wait(6000+random(400));
BankIronOre;
end else
begin
Writeln('Banker not found!');
end
end;
procedure MoveToBank;
begin
Writeln('Searching for bank...');
if(FindColorTolerance(x,y,BankIconColor,0,0,720,72 0,50)) then
begin
Writeln('Bank found!');
Mouse(x,y,2,2,true);
Wait(6000+random(400));
FindBanker;
end else
begin
Writeln('Bank not found!');
end
end;
procedure FurnaceToBank;
begin
Writeln('Moving to house 1...');
if(FindColorTolerance(x,y,House1Color,0,0,700,700, 50)) then
begin
Writeln('House 1 found!');
Mouse(x+50,y+50,2,0,true);
Writeln('Moving to house 2...');
Wait(7000+random(450));
if(FindColorTolerance(x,y,House2Color,0,0,700,700, 50)) then
begin
Writeln('House 2 found!');
Mouse(x,y-30,2,2,true);
Writeln('Moving to halfway bank...');
Wait(8000+random(550));
Writeln('Halfway bank found!');
Mouse(700,117,2,2,true);
Wait(10000+random(700));
MoveToBank;
end else
begin
Writeln('House 2 not found!');
end
end else
begin
Writeln('House 1 not found!');
end
end;
procedure Smelt;
begin
Writeln('Searching furnace...');
if(FindColorTolerance(x,y,FurnaceColor,0,0,600,600 ,50)) then
begin
Writeln('Furnace found!');;
Mouse(x,y,2,2,true);
Writeln('Smelting iron bars...');
Wait(3000+random(300));
if(FindColorTolerance(x,y,IronBarColor,0,400,700,7 00,50)) then
begin
Writeln('Iron bar found!');
Mouse(x,y,2,2,false);
Wait(500+random(100));
Mouse(x,y+30,2,2,true);
Wait(800+random(150));
SendKeys('28'+chr(13));
Wait(40000+random(1000));
FurnaceToBank;
end else
begin
Writeln('Iron bar not found!');
end
end else
begin
Writeln('Furnace not found!');
end
end;
procedure FindFurnace;
begin
Writeln('Searching furnace icon...');
if(FindColorTolerance(x,y,FurnaceIconColor,0,0,700 ,700,50)) then
begin
Writeln('Furnace icon found!');
Mouse(x,y,2,2,true);
Wait(10000+random(700));
Smelt;
end else
Writeln('Furnace icon not found!');
end;
procedure BankToFurnace;
begin
Writeln('Moving to halfway bank...');
Writeln('Halfway bank found!');
Mouse(583,52,2,2,true);
Writeln('Moving to house 1...');
Wait(10000+random(750));
if(FindColorTolerance(x,y,House1Color,0,0,700,700, 50)) then
begin
Writeln('House 1 found!');
Mouse(x,y,2,2,true);
Wait(7000+random(750));
FindFurnace;
end else
begin
Writeln('House 1 not found!');
end
end;
begin
Wait(1000+random(100));
repeat
SetupSRL;
BankToFurnace;
until(Banked = Ores/28)
Writeln('--------------------');
Writeln('Autosmelter results:');
Writeln('--------------------');
Writeln('Banked:');
Writeln(IntToStr(Banked));
Writeln('--------------------');
end.
Edited.
Please post progress report.
Tyvm,
Rob
this is my first script...
I haven't really tested it, since my smithing lvl isn't lvl 15 because i got hacked...
Instructions:
- Be in East falador bank with full load of iron ores.
- Run the script.
- Go watch TV.
Any errors?
- Please reply to this topic
The script:
program Autosmelter;
{.include SRL\SRL.scar}
//This program is created by Robbiej.
//Master of the secret society of xD².
var
Banked: integer;
const
Ores= 56; //Change this to your number of ores.
IronOreColor= 2503507; //You can change this if it doesn't work.
BankIconColor= 6543871; //You can change this if it doesn't work.
BankerColor= 195836; //You can change this if it doesn't work.
BankBoothColor= 7570836; //You can change this if it doesn't work.
FurnaceIconColor= 3504639; //You can change this if it doesn't work.
FurnaceColor= 2763308; //You can change this if it doesn't work.
IronBarColor= 3158069; //You can change this if it doesn't work.
House1Color= 6443873; //You can change this if it doesn't work.
House2Color= 3695784; //You can change this if it doesn't work.
CloseBankBoothColor= 7308433; //You can change this if it doesn't work.
procedure Grab;
begin
Writeln('Opening bank account...');
Writeln('Searching iron ore to grab...');
if(FindColorTolerance(x,y,IronOreColor,0,0,400,400 ,50)) then
begin
Writeln('Iron ore found!');
Mouse(x,y,2,2,false);
Wait(500+random(200));
Mouse(x,y+65,2,2,true);
end else
begin
Writeln('Iron ore not found!');
end
end;
procedure BankIronOre;
begin
Writeln('Opening bank account...');
if(FindColorTolerance(x,y,BankBoothColor,0,0,600,6 00,50)) then
begin
Writeln('Bank booth opened!');
Wait(5000+random(500));
Mouse(x,y,2,2,false);
Wait(500+random(200));
Mouse(x,y+40,2,2,true);
Wait(1000+random(300));
Writeln('Searching iron bar to bank...');
if(FindColorTolerance(x,y,IronBarColor,300,300,600 ,600,50)) then
begin
Writeln('Iron bar found!');
Mouse(x,y,2,2,false);
Wait(500+random(100));
Mouse(x,y+65,2,2,true);
Banked:= Banked+1;
Grab;
if(FindColorTolerance(x,y,CloseBankBoothColor,0,0, 600,600,50)) then
begin
Writeln('Closing bank booth...');
Mouse(x,y,2,2,true);
Writeln('Bank booth closed!');
end else
begin
Writeln('Bank booth close not found!');
end
end else
begin
Writeln('Iron bar not found!');
end
end else
begin
Writeln('Bank booth not found!');
end
end;
procedure FindBanker;
begin
Writeln('Searching for banker...');
if(FindColorTolerance(x,y,BankerColor,0,50,700,700 ,50)) then
begin
Writeln('Banker found!');
Mouse(x,y-10,2,2,true);
Wait(6000+random(400));
BankIronOre;
end else
begin
Writeln('Banker not found!');
end
end;
procedure MoveToBank;
begin
Writeln('Searching for bank...');
if(FindColorTolerance(x,y,BankIconColor,0,0,720,72 0,50)) then
begin
Writeln('Bank found!');
Mouse(x,y,2,2,true);
Wait(6000+random(400));
FindBanker;
end else
begin
Writeln('Bank not found!');
end
end;
procedure FurnaceToBank;
begin
Writeln('Moving to house 1...');
if(FindColorTolerance(x,y,House1Color,0,0,700,700, 50)) then
begin
Writeln('House 1 found!');
Mouse(x+50,y+50,2,0,true);
Writeln('Moving to house 2...');
Wait(7000+random(450));
if(FindColorTolerance(x,y,House2Color,0,0,700,700, 50)) then
begin
Writeln('House 2 found!');
Mouse(x,y-30,2,2,true);
Writeln('Moving to halfway bank...');
Wait(8000+random(550));
Writeln('Halfway bank found!');
Mouse(700,117,2,2,true);
Wait(10000+random(700));
MoveToBank;
end else
begin
Writeln('House 2 not found!');
end
end else
begin
Writeln('House 1 not found!');
end
end;
procedure Smelt;
begin
Writeln('Searching furnace...');
if(FindColorTolerance(x,y,FurnaceColor,0,0,600,600 ,50)) then
begin
Writeln('Furnace found!');;
Mouse(x,y,2,2,true);
Writeln('Smelting iron bars...');
Wait(3000+random(300));
if(FindColorTolerance(x,y,IronBarColor,0,400,700,7 00,50)) then
begin
Writeln('Iron bar found!');
Mouse(x,y,2,2,false);
Wait(500+random(100));
Mouse(x,y+30,2,2,true);
Wait(800+random(150));
SendKeys('28'+chr(13));
Wait(40000+random(1000));
FurnaceToBank;
end else
begin
Writeln('Iron bar not found!');
end
end else
begin
Writeln('Furnace not found!');
end
end;
procedure FindFurnace;
begin
Writeln('Searching furnace icon...');
if(FindColorTolerance(x,y,FurnaceIconColor,0,0,700 ,700,50)) then
begin
Writeln('Furnace icon found!');
Mouse(x,y,2,2,true);
Wait(10000+random(700));
Smelt;
end else
Writeln('Furnace icon not found!');
end;
procedure BankToFurnace;
begin
Writeln('Moving to halfway bank...');
Writeln('Halfway bank found!');
Mouse(583,52,2,2,true);
Writeln('Moving to house 1...');
Wait(10000+random(750));
if(FindColorTolerance(x,y,House1Color,0,0,700,700, 50)) then
begin
Writeln('House 1 found!');
Mouse(x,y,2,2,true);
Wait(7000+random(750));
FindFurnace;
end else
begin
Writeln('House 1 not found!');
end
end;
begin
Wait(1000+random(100));
repeat
SetupSRL;
BankToFurnace;
until(Banked = Ores/28)
Writeln('--------------------');
Writeln('Autosmelter results:');
Writeln('--------------------');
Writeln('Banked:');
Writeln(IntToStr(Banked));
Writeln('--------------------');
end.
Edited.
Please post progress report.
Tyvm,
Rob