sibeliina
2012-01-05 10:06:32
tell me some methods : l coz got problems with attacking npcs : L
2012-01-05 10:06:32
2012-01-05 10:13:56
2012-01-05 14:58:29
2012-01-05 15:01:00
2012-01-05 15:31:01
2012-01-08 12:53:33
2012-01-10 13:33:45
function FindAnObject(Var storex, storey : integer; Const UpText : TStringArray; Colours : TIntegerArray; Tolerance, xs, ys, xe, ye, Step : integer; RepeatUntilTrue : Boolean) : Boolean;
Var xss, yss, xee, yee : integer; EndIt : Boolean;
begin
xss := xs;
yss := ys;
xee := xs + Step;
yee := ys + Step;
Repeat
if FindColorTolerance(storex, storey, Colours[Random(GetArrayLength(Colours))], xss, yss, xee, yee, Tolerance) then
begin
MMouse(storex, storey,1, 1)
if(WaitUpTextMulti(UpText, 800+Random(200))) then
begin
Exit;
Result := True;
end;
end;
xss := xee;
xee := xss + Step;
if(xss >= xe) then
begin
xss := xs;
yss := yss + Step;
xee := xss + Step;
yee := yss + Step;
end else
begin
if(xee >= xe) then
xee := xe;
end;
if(yss >= ye) then
begin
xss := xs;
yss := ys;
xee := xss + Step;
yee := yss + Step;
EndIt := True;
end else
begin
if(yee >= ye) then
yee := ye;
end;
Until((not RepeatUntilTrue) and EndIt);
end;