fre
2011-08-06 05:36:01
[php]
Procedure GetFight;
var
NPCS:TNPCArray;
NPC: TNPC;
i: Integer;
Box, Boxx: TBox;
begin
Box.x1:= 2860;
Box.y1:= 4223;
Box.x2:= 2864;
Box.x2:= 4219;
Boxx.x1:= 2862;
Boxx.y1:= 4219;
Boxx.x2:= 2866;
Boxx.x2:= 4218;
NPCs:=R_GetNPCs('Monster', False);
for i := 0 to high(NPCs) do
begin
if NPCs.Animation = -1 then
if ((R_TileInBox(Box, NPCs.tile)) or (R_TileInBox(Boxx, NPCs.tile))) then
begin
writeln(tostr(NPCs.tile));
MMouseToMS(NPCs.tile,5);
wait(10+random(10));
if R_WaitUpText('ttack',100) then
ClickMouse(True);
Exit;
end;
end;
end;
[/php]
It often clicks on monsters below 4218, altough i set that as the lowest y coordinate possible to attack monsters.
Any idea how this may happen?
~Fre
Procedure GetFight;
var
NPCS:TNPCArray;
NPC: TNPC;
i: Integer;
Box, Boxx: TBox;
begin
Box.x1:= 2860;
Box.y1:= 4223;
Box.x2:= 2864;
Box.x2:= 4219;
Boxx.x1:= 2862;
Boxx.y1:= 4219;
Boxx.x2:= 2866;
Boxx.x2:= 4218;
NPCs:=R_GetNPCs('Monster', False);
for i := 0 to high(NPCs) do
begin
if NPCs.Animation = -1 then
if ((R_TileInBox(Box, NPCs.tile)) or (R_TileInBox(Boxx, NPCs.tile))) then
begin
writeln(tostr(NPCs.tile));
MMouseToMS(NPCs.tile,5);
wait(10+random(10));
if R_WaitUpText('ttack',100) then
ClickMouse(True);
Exit;
end;
end;
end;
[/php]
It often clicks on monsters below 4218, altough i set that as the lowest y coordinate possible to attack monsters.
Any idea how this may happen?
~Fre