Hello,
Due to the recent? change in Eldevin graphic, the double buffering rendered a lot of the bots inert. They are very well done bots, so I'm patching these older bots so that they would work with current version of Eldevin.
This is a patch for the copperMiner by @Silverdraco;: https://villavu.com/forum/showthread.php?t=108330
NOTE: I made a few changes, took away the pausing feature, because I don't think its necessary. And I changed the script so that it doesn't stop the program when it cant find ores. Now it waits for ores to re-spawn and continue mining.
I'm pretty new to simba, so there are probably more elegant way to patch it. But it works.
Requirements:
Have Simba compiler
Instructions:
a) Move character to a mine with copper within your sights
b) Drag the green circle with the cross hair button located on the top of the Simba Compiler to your DESKTOP to define your client to desktop.
IMPORTANT NOTE: The color of the level ball in the bottom left hand corner confuses the program, because it looks like the color of copper ore. Move the left side of the game window off screen. i know i know its a cheap fix but it works.
NOTE: Put your game window at a TOP DOWN VIEW makes it easier on the script.
NOTE: Tested to be working with Game opened in BROWSER
What it should do:
It should start finding ore, within the range of your visual.
When it finds ore, it would move your mouse to right click on it to mine.
When there are no ore within visual range. It would wait for ores to re-spawn and then move to mine it.
What I Changed:
Removed Pause Feature
Added "cant find ore" exception
Added SetClientAsDesktop; to deal with Double Buffering.
Commented out al_functions library, I think the features in there are now included.
I left some of the codes I removed as comments. (after // and with in {})
Le Code:
Code:
program copperMinerReloaded;
{$I SRL-OSR/SRL.simba}
//{$I SRL-OSR/SRL/misc/al_functions.simba}
////////////////////////////////////////
//// by ///
/// Silverdraco ////
// patched by ////
// BUGBUSTER /////
////////////////////////////////////////
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;
SetDesktopAsClient;
repeat
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
writeln('Finding Ore ...');
allGood:= false;
sleep(Random(10000));
allGood := true;
end;
{if foundOre then
writeln('Stopped by user.')
else
writeln('Finding Ore ...');
writeln('=================================================');}
FreeDTM(CopperColor);
until (false);
end.
NOTE: If you needed Coal or any other type of minerals, find their DTM, i dont know what DTMs are but here is one for coal:
Code:
CopperColor := DTMFromString('mWAAAAHicXchBCsAgEEPRP0Oggrry/tdzV9AbGJdt4EESAW/ANCV0G7a9lzX38hQkkRn02vD1ET83BynpBE0=');
replace DTM with above and it will mine coal instead of copper. Dont know the DTM for anything else. took it from @raitr;.