Negaal
2007-11-24 08:47:56
Hello, I need a good idea how detect is rock mined or not…
I'm still too newbie to understand wizzup's followrock and TPointArray stuff…
So, i'm waiting for an idea or example what i can use…
My mining procedure looks like that:
EDIT: From debug box:
(here you can understand why did it break out of "WorkUntilMined" loop
I'm still too newbie to understand wizzup's followrock and TPointArray stuff…
So, i'm waiting for an idea or example what i can use…
My mining procedure looks like that:
//=== Idea by Sumilion ===//
function Getfreeinvspot : integer;
begin
for InvSpot := 1 to 28 do
if not(ExistsItem(InvSpot))then
begin
result := invspot;
exit;
end;
end;
//========================//
procedure Mining;
var minestart, i, slot : integer;
breakout : boolean;
begin
repeat
if (orenotfound = 20) then begin logout; exit; end;
if welostpick then exit;
if not loggedin then exit;
if random(10) = 5 then Antiban;
slot := getfreeinvspot;
breakout:= false;
if (findobjcustom(a, b,['ine'], [orecolor1,orecolor2,orecolor3], 3)) and (not(GasFound(a, b))) then
begin
mouse(a, b, 0, 0, true);
marktime(minestart);
orenotfound := 0;
wait(350);
findtherandoms;
wait(500);
repeat
while (LoggedIn) and (not breakout) do
begin
for i := 0 to 7 do
begin
case i of
0 : if FindTheRandoms then
begin
writeln('0');
breakout:= true;
Break;
end;
1 : flag;
2 : if Gas then
begin
breakout:= true;
Break;
end;
3 : if(ExistsItem(slot))then
begin
writeln('3');
breakout:= true;
Break;
end;
4 : FindPick;
5 : if(TimeFromMark(MineStart) > Rockwait) then
begin
writeln('5');
breakout:= true;
Break;
end;
6 : if (FindBlackChatMessage('manage')) or (FindBlackChatMessage('no ore')) then
begin
writeln('6');
breakout:= true;
Break;
end;
7 : Talk;
end;
Wait(1);
end;
end;
if breakout then break;
until(false);
end else
orenotfound:= orenotfound + 1;
until (InvFull);
drop;
loads:= loads + 1;
loadsdone := loadsdone + 1;
end;
EDIT: From debug box:
(here you can understand why did it break out of "WorkUntilMined" loop
5
3
3
5
3
6
5
5
5
3
5
3
5
3
5
5
3
5
5
5
3
5
5
3
6
3
6
5
3
6
3
3
6
3
3
6
3
3
6
5
5
3
6
5
5
3
5
3
6
3
3
6
3
6
3
6
5
3
3