Waddo
2008-07-24 16:02:14
Procedure GetNPCInfo;
{*******************************************************************
Procedure GetNPCInfo;
By: Waddo
Description: Displays 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].Name+' ID: '+IntToStr(NPCs[i].NPCType)+
' Tile X: '+IntToStr(NPCs[i].TileX)+' Tile Y: '+IntToStr(NPCs[i].TileY));
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 <---this is the ID I created this to
NPC: Dwarf ID: 3219 Tile X: 3022 Tile Y: 3348 find it is the dwarf with the mining
NPC: Guard ID: 9 Tile X: 3009 Tile Y: 3323 skill cape the X and Y tiles help you
NPC: Guard ID: 9 Tile X: 3005 Tile Y: 3324 to tell him a part from the other dwarfs