When running a script ... sometimes then mouse goes out of the mainscreen and does not come back. Like it goes off screen of something.
Any ideas. Im guessing right then and there the obj tiles probably changed to -1...
Edit: Turns out no to be the problem... Its still going off screen.
Harry
04-05-2011, 10:41 PM
Replace all your MM/Mouses with a copy from SRL, but with writelning the values? It's probably object finding, TileToMS is weird. (I assume you're using Reflection, anyways)
Try something like this (I use this, works like a charm, no longer leaves the screen):
function r_TileOnMSH(moix,moiy: integer) : Boolean; // Drags111
begin
Result := PointInBox(Point(moix,moiy), IntToBox(MSX1, MSY1, MSX2, MSY2));
end;
procedure objStuff;
var J: TPoint; tx,ty: integer;
begin
J := TileToMS(Tile(3048,3270), 300); // example - replace it with something like
if r_TileOnMSH(J.X,J.Y) then
begin
Mouse(J.X,J.Y,10,10,True);
writeln('etc');
end else
begin
WriteLn('run the object finding again / walkToTile (if static object) / etc');
wait(1);
end;
end;
HarryJames
04-05-2011, 10:42 PM
I've found it to do this, it's what happens if the object/tile isn't found, it just defaults to -1 as it's not an actual value for the client, or so I think.
ok yeah I added a few failsafes for mull points/tiles and so far so good ... thanks
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.