SRL Archive - OSR Help

Trigger procedure on game text


halgboy_tbc

2012-04-03 18:35:24

I am new to scripting.

What I am looking to do is add some urn support to a script. What I do not know how to do is trigger the action when I get the message "Your decorated cooking urn is full." How would I trigger the procedure to start when I get this message in game?

Gucci

2012-04-03 18:47:32

If it's a black colored message in the chat box then use FindBlackChatMessage('Your decorated cooking urn is full.');

halgboy_tbc

2012-04-03 18:51:47

It looks like this:

So that would that not work?

Gucci

2012-04-03 18:54:36

From: halgboy_tbc
It looks like this:

So that would that not work?


I would say give it a go and see if it works or if the uptext changes you could add a feature to check uptext and act accordingly

Justin

2012-04-04 10:00:18

According to the picture that was supplied (using the colours), this should work.


procedure FindErn;
begin
if IsChatBoxTextBetween('Your decorated cooking urn is full',2429,6,8) then
begin
writeln('Ern found.');
Find dtm ect ect //<-- Need to add that yourself
end
end;