From: neeger
1.Can someone share a NPC finding/talking funktion that works atm?
There are a few ways to do it, easiest is probably to use
FindNPC() in
Characters.scar:
procedure FindTheNPC;
var
NPC: TNPC; // The variable used to store the information about the NPC
begin
if(FindNPC('Name', NPC))then // The information is here stored in NPC.
WriteLn('Found the NPC!'); // The NPC was found and we write a message to confirm
end;
From: neeger
2.Is ther a way to click on a NPC if i only know NPCs tiles like(3243, 4322)?
Yes. You can do so by converting the tile to a mainscreen point, using the function
TileToMS() inside
Core.scar.
An alternative way would be if you already have the found the NPC and has it stored in a variable (TNPC):
procedure ClickNPC;
var
NPC: TNPC; // The variable used to store the information about the NPC
begin
if(FindNPC('Name', NPC))then // The information is here stored in NPC.
Mouse(NPC.MS.X, NPC.MS.Y, 5, 5); // Clicks the NPC using a randomness of 5
end;
I would recommend you to read up on the subject. NPC-related routines are to be found inside
Characters.scar.
There are also a few tutorials regarding this, for example:
http://www.villavu.com/forum/showthread.php?t=46636