Log in

View Full Version : FindNpcChat



Main
11-15-2011, 12:35 PM
I remember there was a way to find npc chat to navigate through npc messages.

Does any one remember what was the function for it? Cause I can't seems to find on in text or chat includes.

Flight
11-15-2011, 01:00 PM
Is it this you're looking for?


function FindNPCChatText(txt: string; Action: fnct_ActionOptions): Boolean;

_ChArMz
11-15-2011, 01:06 PM
function ClickOption(Text: string): Boolean;
var
bTxt, wTxt, SearchTPA, TextTPA, Matches: TPointArray;
Search2D: T2DPointArray;
b: TBox;
Height, i, t: Integer;
begin
Result := False;

FindColors(bTxt, 0, MCX1, MCY1, MCX2, MCY2);
FindColors(wTxt, 16777215, MCX1, MCY1, MCX2, MCY2);

SearchTPA := CombineTPA(bTxt, wTxt);
if Length(SearchTPA) < 1 then
Exit;

Search2D := SplitTPAEx(SearchTPA, 20, 2);

TextTPA := LoadTextTPA(Text, NPCChars, Height);
for i := 0 to High(Search2D) do
begin
Result := FindTextTPAinTPA(Height, TextTPA, Search2D[i], Matches);
if Result then
begin
b := GetTPABounds(Search2D[i]);
with b do
Mouse(RandomRange(x1, x2), RandomRange(y1 + 2, y2 - 2), 0, 0, True);
t := GetSystemTime;
while ( PleaseWait ) and ( GetSystemTime - t < 3500 ) do
Wait(10 + Random(10));
Break;
end;
end;
end;

Main
11-15-2011, 01:13 PM
merci!

function FindNPCChatText(txt: string; Action: fnct_ActionOptions): Boolean; was what am looking for, but will try out yours aswell charm!

Thanks both of yall:P