SRL Archive - OSR Help

Smart issue with findtext


bud_wis_er_420

2012-01-01 01:00:26

When I try to use the below function with Smart enabled it doesn't find the text. But it I disable Smart, it finds it.

if(FindText(x, y, 'light', SmallChars, 59, 440, 92, 458))then
begin
Writeln('Cannot light a log here');
end;

Gushers

2012-01-02 10:03:04

Do you have SMART included in the script?
Such as( under program new; ) :
 {$i srl/srl/misc/smart.scar}

nickrules

2012-01-02 11:00:24

From: bud_wis_er_420
When I try to use the below function with Smart enabled it doesn't find the text. But it I disable Smart, it finds it.

if(FindText(x, y, 'light', SmallChars, 59, 440, 92, 458))then
begin
Writeln('Cannot light a log here');
end;


Looks like you're trying to get the last message from the chatbox. Check out chat.scar in your SRL folder. There are a couple things you can try, but not all will work. InChat, or GetChatBoxText are probably your best bet from my quick glance. But I suggest you head over there and check everything out for yourself.