You declare spott as a TNPCEx and then you want to store a TPoint in it.
TileToMS returns a TPoint.
http://www.villavu.com/forum/showthread.php?t=48399Although it's not about FindNPCEx but should give you some idea.
Also if you look into that type
{type TNPCEx;
Description: Holds information related to an NPC. }
TNPCEx = record
MS, MM: TPoint;
Tile: TTile;
Index, NPCType, Height, Animation, TurnDirection, Combat: Integer;
HPRatio: Integer;
Name: string;
InFight, IsMoving: Boolean;
end;
you can see that it already got an MS record or whatever it's called.
So what I would do:
var
N: TNPCEx;
FindNPCEx(313, N); //so we find it
if TileOnMS(N.Tile, 5) then //we see if it is on MS or not
MMouse(N.MS.x, N.MS.y, 3, 3); //move the mouse there
etc, etc //uptext and such
Please note that this is not the actual code for it. Just an example.
Hahh I just looked at it. There is already a TileOnMs check in GetNPC or whatever it uses. So I think we don't need it.
I got some stick movie to watch so if you got any more problem and nobody(who better in reflection) answered the question I will look more deeply in it.