Auto search for given NPC by its name

Every 10 seconds, checks if the npc ‘Rooney’ found in your char’s region. If found, it will notify in adrenaline’s console. Feel free to add your own notification type (maybe send party message or what ever).

uses SysUtils;

procedure SearchRooney;
var
  i:integer;
begin
    while true do begin
        for i := 0 to NpcList.Count-1 do begin
            if (NpcList.items(i).id=32049) then begin
                print('Rooney found! Distance:' +  IntToStr(User.distto(NpcList.items(i))));
            end;
        end;
        delay(10000); // 10 seconds delay
    end;
end;

begin
  Script.NewThread(@SearchRooney);
  Delay(-1);
end.

Author: Velmsun