SCAR Code:
Procedure GetNPCInfo;
{*******************************************************************
Procedure GetNPCInfo;
By: Waddo
Description: Writes the info of loaded NPC's.
********************************************************************}
var
i: integer;
NPCs: array of TNPC;
begin
NPCs := GetNPCs;
if (GetArrayLength(NPCs)=0) then Exit;
for i := 0 to High(NPCs) do
writeln('NPC: '+NPCs[i].TheName+' ID: '+inttostr(NPCs[i].NPCType)+
' Tile X:'+inttostr(NPCs[i].x)+' Tile Y: '+inttostr(NPCs[i].y));
end;
Helpful when creating scripts using reflection.
When ran in the courtyard above the mining guild it returned
NPC: Dwarf ID: 3220 Tile X: 3010 Tile Y: 3337
NPC: Banker ID: 6200 Tile X: 3010 Tile Y: 3353
NPC: Banker ID: 6200 Tile X: 3011 Tile Y: 3353
NPC: Banker ID: 6200 Tile X: 3012 Tile Y: 3353
NPC: Banker ID: 6200 Tile X: 3013 Tile Y: 3353
NPC: Banker ID: 6200 Tile X: 3014 Tile Y: 3353
NPC: Banker ID: 6200 Tile X: 3015 Tile Y: 3353
NPC: Dwarf ID: 3221 Tile X: 3018 Tile Y: 3332
NPC: Dwarf ID: 382 Tile X: 3018 Tile Y: 3340
NPC: Dwarf ID: 3294 Tile X: 3020 Tile Y: 3338
NPC: Dwarf ID: 3295 Tile X: 3018 Tile Y: 3337
NPC: Dwarf ID: 3219 Tile X: 3022 Tile Y: 3348
NPC: Guard ID: 9 Tile X: 3009 Tile Y: 3323
NPC: Guard ID: 9 Tile X: 3005 Tile Y: 3324