Silverdraco
2014-03-07 12:46:53
Hi everyone,
After a bit of work I finished my copper miner for Eldevin.
[Instructions]
Set up Simba like in this guide: can't post links, will post on first comment (Thanks to HoodZ)
Start this in the mine with the copper ores. Preferably somewhere where at least 3 or 4 copper ores are within sight at all times.
Hold F1 for a sec or so to stop the script. It will stop automatically if it can not find any ores.
Special credits to Wizzup for helping me out with some stuff in IRC!
Edit: yeeeaah I can't post the link in a comment either. Just look for 'Updated SRL-OSR Setup (Jan 4, 2014)' by Turpinator in > HomeForum > Help and Tutorials > Old School Runescape Help and Tutorials > OSR Setup Tutorials
Edit 2: optimized code thanks to Foundry
After a bit of work I finished my copper miner for Eldevin.
program copperMiner;
{$I SRL-OSR/SRL.simba}
{$I SRL-OSR/SRL/misc/al_functions.simba}
////////////////////////////////////////
//// by ///
/// Silverdraco ////
////////////////////////////////////////
var
a, CopperColor, foundX, foundY, clientW, clientH: Integer;
foundOre, allGood: Boolean;
procedure initDTMs;
begin
CopperColor := DTMFromString('mGQAAAHicY2RgYPBgZmDQY2RgUHfzZGAF8oFMBgYAEgwBOA==');
end;
procedure LClickXY(x,y: Integer);
begin
MoveMouse(x,y);
ClickMouse(x,y,0);
end;
procedure RClickXY(x,y: Integer;doubleClick: boolean);
begin
MoveMouse(x,y);
ClickMouse(x,y,1);
if doubleClick then
begin
ClickMouse(x,y,1);
end;
end;
procedure compareDTMScreen(DTM: Integer);
begin
foundOre := FindDTM(CopperColor,foundX,foundY,0,0,clientW-1,clientH-1);
end;
begin
writeln('=================================================');
writeln('Initializing...');
GetClientDimensions(clientW,clientH);
initDTMs;
writeln('done');
allGood:= true;
while allGood do
begin
if isKeyDown(112) then
allGood:=false;
compareDTMScreen(CopperColor);
sleep(400);
if foundOre then
begin
writeln('Found ore at ['+toStr(foundX)+','+toStr(foundY)+'] - Mining...');
RClickXY(foundX,foundY,true);
for a := 0 to 3 do
begin
if isKeyDown(112) then
allGood:=false
else
sleep(1000);
end;
sleep(Random(1000))
end
else
allGood:= false;
end;
if foundOre then
writeln('Stopped by user.')
else
writeln('Can not find ore. Stopping...');
writeln('=================================================');
FreeDTM(CopperColor);
end.[Instructions]
Set up Simba like in this guide: can't post links, will post on first comment (Thanks to HoodZ)
Start this in the mine with the copper ores. Preferably somewhere where at least 3 or 4 copper ores are within sight at all times.
Hold F1 for a sec or so to stop the script. It will stop automatically if it can not find any ores.
Special credits to Wizzup for helping me out with some stuff in IRC!
Edit: yeeeaah I can't post the link in a comment either. Just look for 'Updated SRL-OSR Setup (Jan 4, 2014)' by Turpinator in > HomeForum > Help and Tutorials > Old School Runescape Help and Tutorials > OSR Setup Tutorials
Edit 2: optimized code thanks to Foundry