SRL Archive - OSR Help

ChatBox


DionHacker

2012-10-29 14:55:54

Hi can someone help me?

I need to find a way in which my script can find text in the chatbox which is written in black.

I have tried several codes but none seem to work o.O Does anyone know a working one please? :)

The Killer

2012-10-29 15:01:13

FindChatBoxText(Text , Line, TextCol);
Is that what your looking for?

DionHacker

2012-10-29 15:15:48

I tried that one but in return I get,
"Unknown identifier 'FindChatBoxText'"
:(

Ashaman88

2012-10-29 15:17:36

Are you including srl.simba in your script?

DionHacker

2012-10-29 15:19:21

From: Ashaman88
Are you including srl.simba in your script?


{$i SRL\SRL.simba} 
I think so…
I have put that at the top, is that including it? :/

The Killer

2012-10-29 15:38:32

try updating your srl.

DionHacker

2012-10-29 15:45:02

No Plugins update available.
No SRL update available.

litoris

2012-10-29 15:48:05

^There isn't such a function, where'd you find it killer?

The Killer

2012-10-29 15:50:35

From: litoris
^There isn't such a function, where'd you find it killer?


chat.simba
edit: http://docs.villavu.com/srl-5/chat.html#findchatboxtext

Ian

2012-10-29 15:53:15

Would this work?
http://docs.villavu.com/srl-5/chat.html#findblackchatmessage

DionHacker

2012-10-29 16:01:27

Thanks I'll try it! :)

P1ng

2012-10-29 16:04:08

FindBlackChatMessage?

DionHacker

2012-10-29 16:12:26

From: P1ng
FindBlackChatMessage?


Thanks for the help, this might sound silly (newbie)
but where would I use that? I tried,


var
s: string;

................

S:= FindBlackChatMessage;
If S = ('...') then

But that does not work :(
thanks.

Ian

2012-10-29 16:17:02

From: DionHacker
Thanks for the help, this might sound silly (newbie)
but where would I use that? I tried,


var
s: string;

................

S:= FindBlackChatMessage;
If S = ('...') then

But that does not work :(
thanks.


If FindBlackChatMessage('Your Message'); Then
Action

DionHacker

2012-10-29 16:40:24

Thanks alot! :D

Footy

2012-10-29 16:41:30

function Getchat(text:string):boolean;
var
I:integer;
begin
for i := 1 to 8 do
begin
result := findchatboxtext(text, i, clmessage);
if result then
break
end;
end;

That will search the entire chatbox for your message. Use like this.

 if GetChat('We have died') then
writeln('We have died!');