SRL Archive - General

InChat or FindText?


Zeta Matt

2012-06-01 17:57:10

I want the bot to check the chat box if someone talked with me, should I use InChat procedures, which are much easier or FindText which is:

function FindText(var cx, cy: integer; txt, font: string; xs, ys, xe, ye: integer): boolean;

If FindText is better, could someone explain me those variables and constants, please? Something I don't understand is how to work with 4 variables as coordinates.

Justin

2012-06-02 00:38:20

This is what I use.


Procedure CheckOurName;
begin
if (IsChatBoxTextBetween('PART OF NAME HERE', clBlue, 0,8)) then
begin
writeln('Someone said our name... Changing worlds');
Wait(RandomRange(10000,25400));
ChangeWorld(RandomWorld(true, false));
Wait(3500);
end;
end;

Zeta Matt

2012-06-02 21:57:07

Thanks =)