SCAR Code:
// New redo of Godfather Inc. PowerMiner*** VERS. Alpha~
// Next Vers 'beta' will have anti randoms atleast... And Some SRL includes
//Has an auto color function NOTE: defualt color = iron
program PowerMiner;
{.include SRL/srl.scar}
const
rockcolor= 2305614; //color of rock (will use this to auto color)
nextrock= 3000; // time to wait b4 next click. (1000 = 1 second)
var
i,xD,yD,full,drop,Iro: integer;
MineCol: array [0..3] of integer;
Function GetRockColor(MineCol: array [0..3] of integer): integer;
begin
if (FindColorTolerance(xD, yD, rockcolor, 20, 25, 490, 315, 2)) then
begin
MineCol[0] := GetColor(x+3,y+3);
MineCol[1] := GetColor(x-3,y-3);
MineCol[2] := GetColor(x-3,y+3);
MineCol[3] := GetColor(x+3,y-3);
i := Random(3) + 1;
result := MineCol[i];
end;
end;
Procedure MineRock;
var x1,y1,xR,yR: integer;
begin
repeat
If FindColorTolerance(xR,yR,MineCol[i],20,25,490,315,2) then
Mouse(xR,yR,4,4,true);
wait(nextrock);
until(findbitmap(full,x1,y1));
end;
Procedure LoadBitDTM;
begin
full := BitmapFromString(16, 12, 'z78DA73B27434B5' +
'307442220D908013862C0AE9E8E864E14880C43019934D0209361' +
'3C5854822C8F692693EA66BF19B86D7BF44998F2B344834CD096F' +
'3C620262621C7F4A202A7C70F89754712A9B8FE1E6C1EF7E5CB14' +
'36A6EC29F129C8C2C2DCD4D212401F391546211C7EF1224350043' +
'29FB94');
drop := BitmapFromString(14, 8, 'z78DA33753135313177C3014CC' +
'1B298247EF5C82206480097C9C4A8C754834B2FF1E243C54C626C' +
'21C63D98B64048031C809838C2A59E1812BFAB20240010BE9F4F');
Iro := DTMFromString('78DA6314656060106040018E1AF2609A11CA6' +
'7940012AC0C688011558D349060435561A62889AA0664AC04AA9A' +
'20233554359C40820F554D989B01AA1A909B4550D5F819A8A0AA1' +
'10712A268E69869A0A8010017C304DA');
end;
{****************************************************************}
{*************** PROBLEMS STARTED HERE **************************}
{****************************************************************}
Procedure DropOre;
var
x1, y1, x2, y2, x3, y3: integer;
begin
//repeat
If (FindBitmap(full, x1, y1)) then
begin
repeat
FindDTM(Iro, x2, y2, 555, 200, 740, 465);
Mouse(x2, y2, 4, 4, false);
wait(600 + random(125));
FindBitmap(drop, x3, y3);
Mouse(x3 + 6, y3 + 3, 4, 4, true);
until not(FindDTM(Iro, x2, y2, 555, 200, 740, 465))
end;
//until (false) DONT NEED, ALREADY REPEATING IN MAIN LOOP
end;
begin
SetupSRL;
ActivateClient;
MouseSpeed:= 8+(random(2)); //needed another ')'. for every '(' you need a
// ')' .. you need to close them.
GetRockColor(MineCol);
LoadBitDTM;
repeat
MineRock;
DropOre;
until(false)
end.