Dracody
2008-06-03 16:08:23
Well I kind of made this function, its like IsUpTextMultiCustom, I think it may be usefull, so well I posted here to see what you guys think about it :p
{*******************************************************************************
function FindNPCChatTextMC(Text: TStringArray, Action: fnct_ActionOptions): Boolean;
By: Dracody
Description: Similar to FindNPCChatText but you can input as many strings in an array as you like
Writes the amount of matches in the debug
Use: FindNPCChatTextMC(['Att', 'ttac', 'ack', 'monst', 'ster'])
*******************************************************************************}
function FindNPCChatTextMC(txt: TStringArray; Action: fnct_ActionOptions): boolean;
var
i , l , match: Integer;
begin
Result := false;
l := GetArrayLength(txt);
for i := 0 to l -1 do
if(FindNPCChatText(txt[i], Action)) then
begin
match := match + 1;
end;
if(match = l) then
begin
Result := true;
writeLn('Succesfully matched ' + intToStr(match)+ '/' + intToStr(l));