SRL Archive - OSR Help

???


bigjosh0315

2010-02-11 12:56:45

This says "Did not examine trout" when it did, and I can't figure out why… help? 0.o

Function FindTrout: Boolean;
var
Trout: Integer;
begin
Trout := DTMFromString('78DA639CCCC4C0F09C01054C9F3891E13F906' +
'604E2FF40C0D80D54F382010D30814946288F1164CE43026AA601' +
'F9B709A85908E45F27A06609907F8F809A1940FE4B026ABA80FC0' +
'FF8D50000283A12AA');
result := FindDTM(Trout, X, Y, MIX1, MIY1, MIX2, MIY2);
if result then
begin
Mouse(X, Y, 3, 3, false);
Wait(200 + random(100));
ChooseOption('Examine');
wait(2000 + random(50));
if (not (inchat('I should try'))) then
writeln('Did not examine trout…')
else
writeln('Succesfully examined trout!');
end else
begin
writeln('Did not find raw trout in inventory…');
TerminateScript;
end;
end;

Dynamite

2010-02-11 13:00:36

Use:
FindBlackChatBoxText()

T~M

bigjosh0315

2010-02-11 13:02:38

Unknown identifier 'FindBlackChatBoxText' in script C:\Program Files\SCAR 3.23\Scripts\new1.scar

Wanted

2010-02-11 14:01:10

From: bigjosh0315
Unknown identifier 'FindBlackChatBoxText' in script C:\Program Files\SCAR 3.23\Scripts\new1.scar


Use something in here http://www.villavu.com/repositories/srl-opendev/SRL/core/Chat.scar

jimthesoundman

2010-02-11 16:45:56

I think you are looking for FindBlackChatMessage('');

It is currently working for me.

It only searches the bottom line in the chatbox.

bigjosh0315

2010-02-11 18:09:23

Well It started working and i didn't change anything… Idk what was going on. I'll try that too. thanks for the help guys.

Coh3n

2010-02-12 01:17:18

Also, if the ChooseOption function works then you examined the Trout. The extra chat box check isn't really needed. You can just do:

if (ChooseOption('Examine')) then
Writeln('Examined Trout!')
else
Writeln('Didn''t examine Trout. :(');

bigjosh0315

2010-02-12 08:52:42

I guess you're right. I didn't think of that.:D