Sjoe
2014-01-04 05:30:26
Hi :)
i was wondering if you guys had some cool ideas to speeden up my steppingstone function.
At this moment it clicks the steppingstone, wait till players stops moving, then clicks on the next one.
But this is rather slow, I'm losing like 10 seconds this way I think.
i'd rather have it click a stone, and instantly the one that follows up.
Resulting better speeds ;)

this is my nooby function (using srl5 here :o) :
i was wondering if you guys had some cool ideas to speeden up my steppingstone function.
At this moment it clicks the steppingstone, wait till players stops moving, then clicks on the next one.
But this is rather slow, I'm losing like 10 seconds this way I think.
i'd rather have it click a stone, and instantly the one that follows up.
Resulting better speeds ;)

this is my nooby function (using srl5 here :o) :
function steppingStone: Boolean;
var
x, y, i, h, tt: Integer;
r, P: TPoint;
PlayerTPA, TPA: TPointArray;
ATPA: T2DPointArray;
begin
MarkTime(tt);
repeat
if (not LoggedIn) or noStones then
exit;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.26, 0.16);
findColorsTolerance(TPA, 5528417, MSCX - 200, MSY1, MSCX + 200, MSCY + 30, 7);
ColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.02, 0.02);
if (length(TPA) < 20) then
begin
debugS('Did not find steppingstone colors: TPA');
exit;
end;
TPAFromBoxWrap(inttoBox(MSCX - 30, MSCY - 30, MSCX + 30, MSCY + 30), playerTPA);
clearTPAFromTPAWrap(TPA, playerTPA, TPA);
splitTPAWrap(TPA, 25, ATPA);
sortATPAFromFirstPointY(ATPA, point(MSCX, MSCY));
if smartDebug then
Smart_DebugATPA(False, ATPA);
h := High(ATPA);
for i := 0 to h do
//writeln(length(ATPA[i]));
begin
if (length(ATPA[I]) < 150) then
continue;
P := MiddleTPA(ATPA[i]);
if pointInBox(P, intToBox(195, 171, 252, 222)) or pointInBox(P, intToBox(312, 30, 403, 171)) then
continue;
HumanMMouse(P.x, P.y, 0, 0);
if WaitReadmouseovertext(16711168, 10, 400) then
begin
fastClick(mouse_left);
if (not didYellowClick) then
begin
AntiBan;
wait(1000);
while isMoving do
wait(10);
MarkTime(LastAction1);
MarkTime(LastAction2);
Break;
end;
end else
begin
wait(randomRange(100, 200));
break;
end;
end;
wait(100);
until(noStones or (TimeFromMark(tt) > 25000));
end;