noidea
2008-12-13 04:37:07
I made a function when I was suposed to be sleeping. I worked on this from about midnoght to now (4:30 am)?
Yea, it will walk along side that skinny white wall on the rs minimap eigther going north ('n') or south ('s'). With true meaning walk on the left side of the wall, while false meaning, walk along the right side of the wall. Use like
WalkAgainstWhiteWall('s', true);

Rate, hate comments, concerns..?\
Yea, it will walk along side that skinny white wall on the rs minimap eigther going north ('n') or south ('s'). With true meaning walk on the left side of the wall, while false meaning, walk along the right side of the wall. Use like
WalkAgainstWhiteWall('s', true);

Rate, hate comments, concerns..?\
function WalkAgainstWhiteWall(s: string; Left: Boolean): Boolean;
Label rawr;
var
t, cts, x, y, h, w, m, I, f, p : Integer;
TPA : TPointArray;
ATPA : Array of TPointArray;
kk : Boolean;
begin
MakeCompass('360');
cts := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(7.28, 12.9);
Case LowerCase(s) Of
'n': t := -60;
's': t := 60;
end;
FindColorsSpiralTolerance(MMCX, MMCY + T, TPA, 15726570, mmcx-40, MMY1, mmcx+40, MMY2, 12);
ColorToleranceSpeed(CTS);
ATPA := TPAToATPAEx(TPA, 1, 1);
For I := 0 to High(ATPA) do
begin
MiddleTPAEx(ATPA[i], x, y);
mmouse(x,y,0,0);
wait(200);
getmousepos(x,y);
p := Getcolor(x, y);
getmousepos(h,w);
wait(200);
if (getcolor(x, y) = p)then
begin
Goto Rawr
end;
if not (getcolor(x, y) = p)then
begin
for f := 0 to 4 do
begin
mmouse(h,w,0,0);
try
mmouse(x-f,y+f,0,0);
wait(200);
getmousepos(x,y);
if(getcolor(x, y) = p)then
begin
KK := True;
getmousepos(x,y);
break;
end;
except
begin
mmouse(x+f,y-f,0,0);
wait(200);
getmousepos(x,y);
if(getcolor(x, y) = p)then
begin
kk := True;
getmousepos(x,y);
break;
end;
end;
end;
end;
if (kk) then goto rawr;
rawr:
begin
getmousepos(x, y);
if (getcolor(x, y) = p)then
begin
Case Left of
True: m := -8;
False: m := 8
end;
mmouse(x + m, y, 0, 0);
getmousepos(x, y);
if not(getcolor(x, y) = p) then
begin
mouse(x, y, 3, 3, true);
wait(randomRange(200, 300));
flag;
Result := True;
exit;
end;
end;
end;
end;
end;
end;