Anyone have code for finding NPCs that works, either in Reflection or (better still) Reflection 2?
Tried this code with Simba 0.96 and Reflection and a fresh install of Simba 0.97rc6 with Reflection 2 (on 2 separate machines). Neither finds a thing.
Usage: Login and stand next to a chicken.
Simba Code:
program new;
{$DEFINE SMART}
{$i SRL\SRL.scar}
{$i Reflection\Reflection.simba}
var
NPCs: TNPCArray;
I: integer;
begin
Smart_Server := 152;
Smart_Signed := True;
Smart_Members:= False;
Smart_SuperDetail := False;
SetupSRL;
ClearDebug;
NPCs := GetNPCs('Chicken');
if (Length(NPCs) = 0) then
begin
writeln('No NPCs Found.');
exit;
end;
for I := 0 to High(NPCs) do
begin
writeln(Format('Name: %s, ID: %d, Tile(%d,%d)', [NPCs[I].Name, NPCs[I].ID, NPCs[I].Tile.X, NPCs[I].Tile.Y]));
end;
end.