Naike
2010-05-30 15:39:07
function GetNPCsByName(S: TStringArray): TNPCArray;
var
NPCs: TNPCArray;
I, II, arrC: Integer;
begin
If Not LoggedIn then
Exit;
SetArrayLength(Result, 1000);
NPCs := GetNPCs;
If (GetArrayLength(NPCs) = 0) then
Exit;
for i:=0 to High(S)do
for ii:=0 to High(NPCs) do
If (Pos(Lowercase(S[I]), Lowercase(NPCs[II].Name)) > 0) then
begin
Inc(arrC);
Result[arrC-1] := NPCs[I];
end;
SetArrayLength(Result, arrC);
end; Might want that since ID's aren't added?
Don't see why this isn't added yet though..