austin2162
2011-05-12 22:21:13
imma trying to learn reflection i wrote from a form on how to get npc data this is my code
but it still doesnt work npc are in the area.
procedure DoNPC;
var
NPCs:TNPCArray;
i,ii:integer;
begin
Repeat
NPCs := SortNPCs(getnpcs(15));
Writeln('--NPCs--');
For I:=0 to high(GetNPCs(15)) do
begin
Writeln('[' + ToStr(I) + ']Name: ' + NPCs[I].Name + '(' + ToStr(NPCs[I].Tile.X) + ', ' + ToStr(NPCs[I].Tile.Y) + ') ID: ' + ToStr(NPCs[I].ID) + ' - Index:' + ToStr(NPCs[I].Index));
Writeln(' Orientation: ' + ToStr(NPCs[I].Orientation) + ' - Level: ' + ToStr(NPCs[I].Level) + ' - Animation:' + ToStr(NPCs[I].Animation) + + ' - HPRatio:' + ToStr(NPCs[I].HPRatio));
Writeln(' Moving:' + ToStr(NPCs[I].Moving) + ' - InFight:' + ToStr(NPCs[I].Fighting) + ' - Interacting:' + ToStr(NPCs[I].Interacting) + ' - Height:' + ToStr(NPCs[I].Height));
Writeln(' Actions:');
For II:=0 to High(NPCs[I].Actions) do
Writeln(' ' + NPCs[I].Actions[II]);
end;
Wait(3000);
ClearDebug;
Until(False);
end;i modified slighly to work.but it still doesnt work npc are in the area.