SRL Archive - Research & Development Lounge

Post Responders


osmm

2007-12-24 23:18:04

Well in the process of making my frist script, I use examples to help me. When I chose to start making my responder I was clue less. I know there are a few responders out there but not many. I would like for people to post the responders you use or have made. Thank you.

mickaliscious

2007-12-25 01:41:58

Wrong place to put this? I don't really know where it belongs, maybe scripting help.

Search for Pentti's ChatBoxRespond or look at MasterKill's autorespond procedure. Those are the only two I can name off the top of my head.

osmm

2007-12-25 10:36:14

Yea, I was thinking for a long time where to put this. I think I got 3 good examples (Timeothegreat - sorry about spelling) has the best. He has a responder thing for every state and tons more. Its at least 100 lines +. I'm probably going off of that.

Naum

2007-12-25 12:15:15

Try this:

procedure NAutoRespond;
begin
if InChat('lol') then
begin
case Random(36) of
2: TypeSend('...s')
5: TypeSend('Lilol')
8: TypeSend('contento')
13: TypeSend('Hehe')
15: TypeSend('funyy')
17: TypeSend(':)')
19: TypeSend('wave:zzzzzz')
end;
Exit;
end;
if InChat(Players[CurrentPlayer].Nick) then
begin
case Random(11) of
2: TypeSend('!!!.');
5: TypeSend('No me gusta ingles'); // <-- SPanish :p
7: TypeSend('Estoy Trieste'); // some more spanish :D
9: Typesend('chicos verqueros')
end;
end;
end;
Pretty small but gets the job done :D

osmm

2007-12-25 12:55:13

Thank you for your help. I'll probably be using Timothythegreats er w/e.

munk

2007-12-25 21:51:43

I truly believe that autoresponders cause more trouble than they do help. They cause lag, bulky scripts, and even give wrong answers or repetitive similar answers that make it more noticeable that you're not actually at the keyboard. I believe if you auto properly and use a character with a higher lvl, nobody will question the fact that your not talking. When I play legit I leave all chats off or atleast on friends only, because basically, i dont give a fuck what any of the stupid kids in runescape have to say.

Ok, that being said, heres some things Ive thought about in auto responders. Most poeple use InChat, but Id actually suggest looking at the function InChat and using that to create your responder. The reason you shouldnt use InChat is because each time it has to search the chatbox to get the text, then run the string pos command on it, which is why most responders will cause lag. You should use one of the getLastChatLine functions, or whatever they are, to set a variable to the chat line, then run string commands on that variable. Reduces alot of overhead because it only has to search for text 1 time. thats the one problem I see in almost all autoresponders.

just my 2 cents

osmm

2007-12-26 00:44:53

Thank you, I already have expierenced the lag they give on my comp with only 512mg RAM. Also I think that if you use enough logic you can get it right to make acurate responds. Lastly I have always autoed on my main lvl 95 atm and hardly anyone talks to me, but not every has high lvls that have the automatic feature of not being expected to reply. So I have to make a responder for the people with the low lvls, possibly make it a constant for them to deiced weather to leave it on or off.

HyperSecret

2007-12-26 18:09:19


function AutoResponce:Boolean;
var Responce, Lvl: String;
Reply: Integer;
begin
if AutoRespond then
if FindBlackChatMessage(Players[CurrentPlayer].Name) then Exit;
if (InChat(Players[CurrentPlayer].Name)) then
begin
Reply := Random(10);
case Reply of
0: Responce := ('yea');
1: Responce := ('wat');
2: Responce := ('what');
3: Responce := ('yeah');
4: Responce := ('ya');
5: Responce := ('??');
6: Responce := ('yep that''s me');
7: Responce := ('yes');
8: Responce := ('hhmmm?');
9: Responce := ('yep');
end;
TypeSend(Responce);
Result := True;
Responds := Responds + 1;
end;

if (InChatMulti('lol', 'lawl', 'haha')) or
(InChatMulti('haha', 'rofl', 'lmfao')) or
(InChatMulti('lmoa', 'funny', 'hehe')) then
begin
Reply := Random(10);
case Reply of
0: Responce := ('lol');
1: Responce := ('rofl');
2: Responce := ('lawl');
3: Responce := ('lmao');
4: Responce := ('lmfao');
5: Responce := ('haha');
6: Responce := ('haha');
7: Responce := ('hehe');
8: Responce := ('geez lol');
9: Responce := ('roflmfao');
end;
TypeSend(Responce);
Result := True;
Responds := Responds + 1;
end;

if (InChatMulti('str', 'strength', 'str')) then
begin
Lvl := IntToStr(GetSkillLevel('strength'));
Reply:= Random(5);
case Reply of
0, 2, 4: Responce := (Lvl);
1: Responce := ('My str lvl is '+ Lvl);
3: Responce := (Lvl +' is my str lvl');
end;
TypeSend(Responce);
Result := True;
Responds := Responds + 1;
end;

if (InChatMulti('att', 'attack', 'att')) then
begin
Lvl := IntToStr(GetSkillLevel('attack'));
Reply:= Random(5);
case Reply of
0, 2, 4: Responce := (Lvl);
1: Responce := ('My att lvl is '+ Lvl);
3: Responce := (Lvl +' is my att lvl');
end;
TypeSend(Responce);
Responds := Responds + 1;
Result := True;
end;
Result := False;
end;

that is the one i made for my autofighter