Originally Posted by
kingarabian
It shouldn't be doing this. It even does it with objects.
Which function are you using??? Double check zoom is default? Then test this.. as it is working fine for me... Eliminates one thing at a time
Code:
function R_TileOnMS(Tile : TPoint; var OutputPoint : TPoint; x : integer = 0; y : integer = 0; z : integer = 0):boolean;
var tempB : TBox;
begin
OutputPoint := TReflectionTiles.TileToMS(Tile, x, y, z);
tempB := intToBox(MSX1, MSY1, MSX2, MSY2);
result := PointInBox(OutputPoint, tempB);
end;
procedure randomMouseInput(pnt:Tpoint; ranx, rany:integer);
begin
case random(3) of
0:humanMMouse(pnt, ranx, rany);
1:missMouse(pnt, ranx, rany);
2:mouse(pnt, ranx, rany, mouse_move);
end;
end;
function R_InteractTile(tile:Tpoint; action:string; x:integer = 0; y:integer = 0; z:integer = 5):boolean;
var RSTile : TPoint;
begin
if R_TileOnMS(Tile, RSTile, x, y, z) then begin
randomMouseInput(rsTile, 3, 3);
if(Reflect.Text.IsUpText(action)) then begin
FastClick(mouse_left);
result := didClick(true, 1000);
end else begin
if TReflectionText.OptionExists(action) then begin
FastClick(mouse_right);
result := Reflect.Text.ChooseOption(action);
end;
if not result then
randomMouseInput(Point(MSCX, MSCY), 500, 500);
end;
end;
end;
function checkForDrops(): Boolean;
var
i,id : Integer;
strArr : TStringArray;
gItems : TReflectGroundItemArray;
begin
if reflectplayer.IsAnimating or reflectPlayer.IsMoving then begin exit; end;
gItems.GetAll(20);
if length(gItems) = 0 then Exit;
setArrayLength(strArr, 9);
strArr := ['Dragon defender','Rune','Bronze defender','Iron defender','Steel defender','Black defender','Mithril defender','Adamant defender','Rune defender'];
for i:=0 to high(gItems) do
if inStrArrEx(gItems[i].GetName, strArr, id) then
begin
if R_interactTile(gItems[i].GetTile, 'Take '+gItems[i].GetName) then
begin
waitFunc(@isPlayerWalking, 50, 500);
while isPlayerWalking() do
reflectPlayer.FFlag(0);
exit(true);
end;
end;
end;