Well once again my Ore Counting continues to fail 
SCAR Code:
function WaitUntilMined(Rock: TOre): Boolean;
var
GetAnimationTime, T, CX, CY, IC, P, First, Second: Integer;
begin
Status('Walking to Rock');
MarkTime(t);
SetColorspeed2Modifiers(Rock.Hue, Rock.Sat);
repeat
Wait(10);
if (TimeFromMark(t) >= 6000) then Exit;
until (not FlagPresent) and FindBlackChatMessage('u swi') and
(FindColorTolerance(cx, cy, Rock.Color, MSCX-65, MSCY-65, MSCX+65, MSCY+65, Rock.Tol));
Status('Mining Rock');
IC := InvCount;
MarkTime(t);
repeat
Wait(10);
if (TimeFromMark(t) >= 12000) then Exit;
if (not FindColorTolerance(cx, cy, Rock.Color, MSCX-65, MSCY-65, MSCX+65, MSCY+65, Rock.Tol)) or
(GetAnimation <= 0) then
begin
if (IC = InvCount) then
begin
Second := InvCount;
if (Second > First) then
Begin
Inc(Mined);
Inc(Players[CurrentPlayer].Integers[10]);
Inc(Stats_CustomVars[1]);
case Players[CurrentPlayer].Strings[1] Of
'copper' : Inc(Stats_CustomVars[6]);
'tin' : Inc(Stats_CustomVars[7]);
'iron' : Inc(Stats_CustomVars[8]);
'coal' : Inc(Stats_CustomVars[11]);
'mith' : Inc(Stats_CustomVars[12]);
End;
End;
Wait(750); //was 500
if ClickContinue(false, false) then
begin
Inc(Stats_CustomVars[13]);
TakePic;
end;
Exit
end else
Break;
end;
until (not IC = InvCount) and (GetAnimation <= 0);
Result := True;
end;
and then my MineOre
SCAR Code:
Function MineOre(which: TOre): boolean;
var x, y, T:integer;
begin
if not LoggedIn then Exit;
Result := true;
FindNormalRandoms;
wait(random(500));
T := GetSystemTime;
while (not FindOre(which, x, y)) do
begin
AntiRandoms;
Case Random(2) Of
0: Wait(200 + Random(500));
1: SleepAndMoveMouse(400 + Random(1000));
End;
If (GetSystemTime - T > 60000) Then
begin
writeln('couldn''t find ore?'); //lol lol lol lol
Result := false;
exit;
end;
end;
if FindOre(which, x, y) then
begin
case Random(10) of
0..8: Mouse(x, y, 0, 0, True);
9:
begin
Mouse(x, y, 0, 0, False);
if (not WaitOption('ine R', 250)) then Exit;
end;
end;
First := InvCount;
WaitUntilMined(which);
end;
Status('Finding Rocks');
end;
The First and Second InvCount are the ones trying to count the ores.
so I have:
if (Second > First) then
Inc(Ores)
So why is that counting too many??
Ores Mined: 180 |
| Loads: 4
...
Cheers for any help again guys.
T~M