This gives you the name and id of all currently loaded npcs:
Simba Code:
procedure SearchNPCs;
var
a: Integer;
NPCs: TNPCArray;
begin
NPCs := GetNPCs(False);
for a := 0 to high(NPCs) do
begin
writeln(NPCs[a].Name + ToStr(NPCs[a].ID);
end;
end;
After you run this, record the Id of the npc you want, then run this:
Simba Code:
function InteractNPC(Name: string): Boolean;
var
ID, height, a: Integer;
NPC: TNPC;
NPC_Tile: TPoint;
begin
ID := 0; //<---------replace 0 with id of npc
Result := False;
NPC := GetNPCMulti([ID]);
NPC_Tile := TileToMS(NPC.Tile, NPC.height);
Mouse(NPC_Tile.x, NPC_Tile.y, 0, 0, False);
WaitOptionMultiEx(['alk-'], 'action', ClickLeft, 1000);
while (a < 5) and (IsMoving) do
begin
wait(700 + randomrange(-50, 200));
R_FindRandoms;
Inc(a);
end;
wait(1218 + random(100));
if InteractingWithMe(NPC) then
Result := True;
end;