SRL Archive - RS3 Outdated / Broken Scripts

Responding...I need help badly!!!


Doofy

2007-02-28 17:01:21

Hey I'm new to this site but I'm decent at scripting. Anyways, I was just wondering if anyone could give me a working procedure or function that looks for messages in the chatbox in RS and responds if there are any words that you want to respond to.

I have this one:

Function CheckChatMsg(Text: String) : Boolean;
Begin
Result:= IsTextAtEx(20, 415, Text, 40, ChrChatChars, False, True, 0, 1, 0);
End;

I got it from this site but it doesn't seem to be working for me… what includes should I have? When I try SSi2 it didn't work and when I had SRL and SSi2 it worked. Idk, but please help!

Ejjman

2007-02-28 17:53:59

if you look at Fawki's potato responder, which works well, you could use that. Or, to take the easy route, you could do something like..


procedure TalkTalk;
begin
if(IsChatMessage('hi')) or (IsChatMessage('hey')) then
begin
case random(4) of
1: Typesend('hi');
2: Typesend('hey');
3: Typesend('yo');
4: Typesend('sup');
end;
end;
end;

That's one route, or you could do…


procedure TalkTalk;
var MessageIt : string;
begin
if(IsChatMessage('hi')) or (IsChatMessage('hey')) then
begin
case random(4) of
1: MessageIt := 'hi';
2: MessageIt := 'hey';
3: MessageIt := 'yo';
4: MessageIt := 'sup';
end;
Typesend(MessageIt);
end;
end;

Of course, extend your vocab…But ya, just look at Fawki's potato responder

botmaster

2007-02-28 17:55:23

Use SRL as include and use the following function:

GetLastChatText(var chat : String) : boolean;

It works guranteed.

Ejjman

2007-02-28 17:59:46

So does IsChatMessage..:p

Doofy

2007-03-01 18:33:05

Thanks a lot guys… for the first code you have to include SRL right? OK I'll try that anyways thanks a lot.