Claymore
2008-10-20 21:19:55
While my script ran a crash test course (Draynor > Law Alter) It took like hell-ish long time for the mouse to finally get to the monks. So i thought, why can't the script wait for the mother f-er (I was pissed) to stop moving THEN click on them. Then i PAUSED! I found out i CAN do that.
All i need to do is use the TPA functions. So for example…
Then i'm stuck here, so what do i do next? This is what IM thinking.
I'm not sure if that's correct, because i'm no good at TPA's (Well I have not alot of knowledge about how they work) anyways i need someone to help me, A HERO… No seriously though someone experinced at TPAs. Thanks!
Not the best function, but it works… ;D
All i need to do is use the TPA functions. So for example…
FindColorsTolerance(TPA1....);
Wait(750);
FindColorsTolerance(TPA2);
TPA3 := CombineTPA(TPA1, TPA2);
Then i'm stuck here, so what do i do next? This is what IM thinking.
if (Length(TPA3) < 5) then //So...If the NPC doesnt move
begin
//I move on to the function
I'm not sure if that's correct, because i'm no good at TPA's (Well I have not alot of knowledge about how they work) anyways i need someone to help me, A HERO… No seriously though someone experinced at TPAs. Thanks!
function FindMonks: Boolean;
var
ATPA: T2DPointArray;
TPA: TPointArray;
CTS, I: Integer;
P: TPoint;
Begin
Result := False;
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.03, 0.08);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 2112600, MSX1, MSY1, MSX2, MSY2, 14);
SetColorspeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(CTS);
ATPA := TPAToATPAEx(TPA, 25, 30);
SetLength(TPA, 0);
for I := 0 to Length(ATPA) - 1 do
begin
P := MiddleTPA(ATPA[I]);
MMouse(P.X, P.Y, 3, 3);
if (TextWait(500, ['k-t', 'onk', 'f Ent'])) then
begin
GetMousePos(P.X, P.Y);
Mouse(P.X, P.Y, 0, 0, False);
Wait(175 + Random(50));
if (ChooseOption('e-b')) then
begin
Flag;
if (HandleMonk) then
begin
Result := True;
Exit;
end;
end;
end;
Wait(175 + Random(50));
if (ClickToContinue) then
begin
if (HandleMonk) then
begin
Result := True;
Exit;
end;
end;
end;
WriteLn('Could not find a Monk.');
Exit;
end;
Not the best function, but it works… ;D