From: The Man
That is soo weird…
function WaitUntilMined(Rock: TOre): Boolean;
var
GetAnimationTime, T, CX, CY, IC, P: 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;
Wait(750); //was 500
if ClickContinue(false, false) then
begin
Inc(Stats_CustomVars[13]);
TakePic;
end;
if IC < InvCount then Break;
until (GetAnimation <= 0);
if FindBlackChatMessage('You manage') then
Begin
Inc(Mined);
WriteLn('Success!');
Writeln(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;
Result := True;
end;
It only sometimes detects the last line for me… :S
Try
if FindBlackChatMessage('mine some ore.') then
I'm assuming this is for your T.E.M.P. script :p I always use the last part of the line, or the whole line…i don't know if it makes a difference though.
Eg:
If FindBlackChatMessage('Your inventory is too full to hold any more logs.') Then
If FindBlackChatMessage('You need a Woodcutting level of 30 to chop down this tree.') Then
If FindBlackChatMessage('t light a fire here.') Then