SRL Archive - OSR Help

help with looop


Peanuts

2013-06-14 08:52:05

SOLVED -

why wont it do the ismining thing.. it works on other function but i tried to put this new function in n it just doesnt seem to want to wait after clicking..


function addycolor
begin
end;

Function FindAddy: Boolean;
var
// B: TBox;
TPA: TPointArray;
i,CTS,X,Y, Addycounter, q: Integer;
ATPA: T2DPointArray;
begin
Result := False;

if (not loggedin) then exit;

CTS := GetColorToleranceSpeed;

ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.08, 0.51);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, AddyColor, MSX1, MSY1, MSX2, MSY2, 15);
SetColorSpeed2Modifiers(0.02, 0.02);
ColorToleranceSpeed(CTS);

if (Length(TPA) < 1) then Exit;

ATPA := TPAToATPAEx(TPA, 10, 10);
filterTPAsBetween(ATPA, 10, 100)
SortATPAFromFirstpoint(ATPA, Point(MSCX, MSCY));
smart_debugATPA(true,ATPA);
for i := 0 to High(ATPA) do
begin
MiddleTPAEx(ATPA[i], X, Y);
HumanMMouse(x, y, 2, 2);
Wait(RandomRange(50,150));
if WaitUpTextMulti(['ine','damantite'], 600) then
begin
Mouse(x, y, 0, 0, true);
StatsGuise('Mining Addy');
Result := true;
makecompass('w');
While IsMining Do
begin
if InvCount = AddyCounter then
exit;
if TimeFromMark(q) > MineRuneFor then
exit;
StatsGuise('waiting for rrune ore');
MouseAntiBan;
end;
end else
begin
StatsGuise('No Addy left');
GetEmAlls := GetEmAlls + 1;
BotherWalking := BotherWalking + 1;
end;
end;
end;

begin
repeat
findaddy
until(false)
end.

Itankbots

2013-06-14 09:05:12

Did you make sure you IsMining function is called before this loop?

And if it relys on pixel shift, you might need to adjust the ratios some, might not be detecting if its mining or not correctly.