so im Practicing TPA's
, so what better way to practice then to put them in action. Can you guys review this function I made, it does not work at all, it doesn't even move the mouse to the ATPA >.>, It just stays in one place, and then it stops after running for 5 seconds. Im gonna see if its a problem with the length etc... but most likely im missing something, maybe ( I mean Most-Likely ) You guys can identify my problem
Sorry Im asking, im really trying to figure out the problem, its just really giving me headaches.
SCAR Code:
Function Mine_Ore : Boolean; // Mines the Ore until Inventory is Full :D.
var
TPA : TPointArray; // Used for Finding the Points and Mining them.
ATPA : T2DPointArray; // Array of TPA.
X, Y : Integer; // Used for Storing Points.
I, Z, A, H : Integer; // Misc, Variables.
begin
if not LoggedIn then Exit; // Standard Failsafe.
X := MSCX; // MainScreenCenter X. Needed for Spiral Functions.
Y := MSCY; // MainScreenCenter Y. Needed for Spiral Functions.
ColorToleranceSpeed(2); // Needed for Accurate Color Finding.
SetColorSpeed2Modifiers(0.07, 0.43); // Modified Luminance and Saturation.
SetRun(True); // Enables Running.
MakeCompass(Random(360)); // Rotates Compass in a Random Direction.
for I := 1 to 28 do // Repeatedly Finds the Color of the rock, and then Mines the Rock.
begin
FindColorsSpiralTolerance(x, y, TPA, 3692065, MSX1, MSY1, MSX2, MSY2, 2); // Finds the Mineral Color and Stores its Points.
ATPA := SplitTPAEx(TPA, 5, 5); // Each Point is Seperated in a box, 5x5 Pixels.
A := High(ATPA)
for H := 0 to A do
begin
MiddleTPAEx(ATPA[h], x, y);
MMouse(x, y, 4, 4);
if WaitUpText('ine', 1000) then
repeat
Wait(Random(1300));
Mouse(x, y, 0, 0, True);
until not WaitUpText('ine', 1000);
if InvFull then
begin
Result := True
Writeln('Inventory is Full, Function Complete');
Exit;
end;
end;
SetColorSpeed2Modifiers(0.2,0.2);
ColorToleranceSpeed(1);
end;
end;
I'm really thinking its one of my loops >.> Can you guys see the problem?
Sorry, the quotes really messed up the Standards of my script(When i declare var), its nicely spaced, the quotes just made it look nasty.