Naike
2009-04-01 10:04:37
I took the time to fix Flag & FFlag, as no one seems to do it..
(Adding a timer doesn't count ^^).
Changed: Theres a distance check, if the distance between player & flag
is the same after 230 millisecs, your stuck & it result true.
(Adding a timer doesn't count ^^).
Changed: Theres a distance check, if the distance between player & flag
is the same after 230 millisecs, your stuck & it result true.
{*******************************************************************************
function Flag: Boolean;
By: PPLSUQBAWLZ/Odie533 modified by N1ke!
Description: Waits while flag exists.
*******************************************************************************}
function Flag: Boolean;
var
timeout, x, y, D, OldD: Integer;
begin
if (FindColor(x, y, 255, MMX1, MMY1, MMX2, MMY2)) then
begin
Result := True;
repeat
OldD := Distance(MMCX, MMCY, x + 1, y + 14);
Wait(230);
D := Distance(MMCX, MMCY, x + 1, y + 14);
if (SRL_Procs[srl_AntiBan] <> nil) then
SRL_Procs[srl_AntiBan]();
timeout := timeout + 1;
until (not FindColor(x, y, 255, MMX1, MMY1, MMX2, MMY2)) or (timeout > 300) or(D = OldD);
end;
end;
{*******************************************************************************
procedure FFlag(Distance: Integer);
By: Wizzup? / WT-Fakawi slightly modified by N1ke!
Description: Waits until Flag is within "Distance" distance or not moving.
*******************************************************************************}
function FFlag(Dist: Integer): boolean;
var
XK, YK, XL, YL, D, OldD, x, y: Integer;
var
T1, T2: Extended;
begin
Result := False;
T1 := GetTickCount;
repeat
if (not LoggedIn) then Exit;
T2 := GetTickCount;
Wait(230);
if FindColor(x, y, 255, MMX1, MMY1, MMX2, MMY2) Then
begin
D := Distance(MMCX, MMCY, x + 1, y + 14);
if (Dist > D)or(D = OldD) then
begin
Result := True;
Break;
end;
end;
OldD := Distance(MMCX, MMCY, x + 1, y + 14);
Wait(100);
if T2 - T1 > 30000 then
begin
Result := False;
if FindColor(XL, YL, 255, MMX1, MMY1, MMX2, MMY2) then
MFNF(XL, YL, 1, 1)
else
begin
Mouse(MMCX, MMCY, 0, 0, True);
end;
Exit;
end;
if Random(20) = 1 Then IdleTime(500, 1000, 0.01);
if (SRL_Procs[srl_AntiBan] <> nil) then
SRL_Procs[srl_AntiBan]();
until (not FindColor(XK, YK, 255, MMX1, MMY1, MMX2, MMY2));
end;