EtherFreak
2012-03-04 01:03:30
So I am working on a mining procedure with tpa's. I am trying the findcolorstolerence, and the findcolorsspiraltolerance, which both are working fine to find Adamantium rocks, but this does not seem to work for coal rocks whatsoever. I also am having issues with the FindObjEx for coal mining.
Colors that I am trying
526344
1579032
I am getting a return of an empty TPA even though I select the colors from the rock, and I have the tolerance at a reasonable level. Like I say, it works fine for addy rocks with a color of 7043947
Colors that I am trying
526344
1579032
I am getting a return of an empty TPA even though I select the colors from the rock, and I have the tolerance at a reasonable level. Like I say, it works fine for addy rocks with a color of 7043947
Procedure Mine3(RockerCol: integer; RockerTxt: string);
Var
TPA:TPointArray;
TPAPoint : TPoint;
ATPA:T2DPointArray;
i:integer;
Begin
mousespeed:=(7+random(3));
FindColorsSpiralTolerance(MSCX,MSCY,TPA, RockerCol, MSX1, 40, MSX2,MSY2,6);//7043947 is addy rock color 526344 is coal
writeln(TPA);
for i:=0 to high(TPA) do
begin
TPAPoint := TPA[i]
writeln(High(TPA));
mmouse(TPAPoint.x,TPAPoint.y,1,1);
wait(300+random(100));
if isuptext(RockerTxt) then
begin
Mouse(x,y,1,1,true);
exit;
end else
writeln('failed mining');
end;
writeln('failed comp');
End;Procedure Mine1;
Begin
if findobjex(x,y,['Coal','oal'],[526344],3,45,220,140,MSX2,240) then
begin
mmouse(x,y,4,4);
writeln('found possable coal');
wait(200+random(100));
end;
if isuptext('oal') then
mouse(x,y,1,1,true) else
writeln('failed mining');
End;