ronny.m.p
03-02-2007, 04:21 PM
I think i have found a way to enhance all the flag procedures in srl! Currently the flag itself has the constent color of 255 and this is the color that all flag procedures are searching for. However the color of the pole on the flag is not 255. After testing i have found that the pole has a constent color of 284358. So i thought to myeslf...why not integerate that color into one of the flag procedures to see if it works. And of course it did! Why is this useful? Because this way you will be able to mapwalk greater distances because it will find the pole color and realise the flag is not gone just because it cant find the color 255! Below is my allteration of FFlag; I call it RonnyFlag; All credits for FFlag; go to Wizzup? / WT-Fakawi.
procedure RonnyFlag(Distance: Integer); //This is an edited version of FFlag; to fit the needs of this script.
var //All credits for FFlag; go to Wizzup? / WT-Fakawi.
XK, YK, XL, YL: Integer;
var
T1, T2: Extended;
begin
T1 := GetTickCount;
repeat
T2 := GetTickCount;
Wait(100);
if HumanCircleFlag(Distance) then
Break;
Wait(100);
if T2 - T1 > 30000 then
begin
if FindColor(XL, YL, 255, MMX1, MMY1, MMX2, MMY2) and FindColor(XL, YL, 284358, MMX1, MMY1, MMX2, MMY2) then
MouseFindFlag(XL, YL, 1, 1)
else Mouse(MMCX, MMCY, 0, 0, True);
break;
end;
if Random(20) = 1 then IdleTime(500, 1000, 0.01);
until (not FindColor(XK, YK, 255, MMX1, MMY1, MMX2, MMY2) and (not FindColor(XL, YL, 284358, MMX1, MMY1, MMX2, MMY2)));
end;
:sasmokin:
procedure RonnyFlag(Distance: Integer); //This is an edited version of FFlag; to fit the needs of this script.
var //All credits for FFlag; go to Wizzup? / WT-Fakawi.
XK, YK, XL, YL: Integer;
var
T1, T2: Extended;
begin
T1 := GetTickCount;
repeat
T2 := GetTickCount;
Wait(100);
if HumanCircleFlag(Distance) then
Break;
Wait(100);
if T2 - T1 > 30000 then
begin
if FindColor(XL, YL, 255, MMX1, MMY1, MMX2, MMY2) and FindColor(XL, YL, 284358, MMX1, MMY1, MMX2, MMY2) then
MouseFindFlag(XL, YL, 1, 1)
else Mouse(MMCX, MMCY, 0, 0, True);
break;
end;
if Random(20) = 1 then IdleTime(500, 1000, 0.01);
until (not FindColor(XK, YK, 255, MMX1, MMY1, MMX2, MMY2) and (not FindColor(XL, YL, 284358, MMX1, MMY1, MMX2, MMY2)));
end;
:sasmokin: