NiCbaZ
2008-09-12 19:13:31
Object Finding
Here is an Example of a Object Finding Function i will explain how it all works.
FindObject Returns a Tpoint of a Tile On the MiniMap, we are just declaring that Tpoint.
Is the function we are using for the object finding, its in the reflection Include.
The xX is just the Tpoint We declared so that's what it will return as.
That is the Id of the object to get the ID use Rs bot and the debug will show up for the ID or find an Id list.
Just saying the the function Returns True Because it found the Object.
This is What makes it change the TPoint of the Tile the FindObject Returned onto the Main screen, without this the function cannot work.
Mouse(xX.x,xX.y,2,2,true);
This will Click on the Object You are finding the XX is what TileToMS returned making it possible to get the x and the y cords of the object..
So its all Very simple and easy to do, if you see and errors in here please tell me, also if its hard to understand please tell me.
Here is an Example of a Object Finding Function i will explain how it all works.
{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
function Find: boolean;
By: Nicbaz
Description: Find Obects with reflection.
Status: Good
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-}
function FindBird: boolean;
var
xx : TPoint;
begin
if FindObject(xX,19175) then
begin
Result:= True;
XX:= TileToMS(XX, 0);
Mouse(xX.x,xX.y,2,2,true);
Wait(30 + Random(10));
FindNormalRandoms;
end;
end;
var
xx : TPoint;
FindObject Returns a Tpoint of a Tile On the MiniMap, we are just declaring that Tpoint.
Function FindObject(Var Tile: TPoint; objType: Integer): Boolean;Is the function we are using for the object finding, its in the reflection Include.
if FindObject(xX,19175) thenThe xX is just the Tpoint We declared so that's what it will return as.
19175That is the Id of the object to get the ID use Rs bot and the debug will show up for the ID or find an Id list.
Result:= True;Just saying the the function Returns True Because it found the Object.
XX:= TileToMS(XX, 0);This is What makes it change the TPoint of the Tile the FindObject Returned onto the Main screen, without this the function cannot work.
Mouse(xX.x,xX.y,2,2,true);
Mouse(xX.x,xX.y,2,2,true);
This will Click on the Object You are finding the XX is what TileToMS returned making it possible to get the x and the y cords of the object..
So its all Very simple and easy to do, if you see and errors in here please tell me, also if its hard to understand please tell me.