SRL Archive - Research & Development Lounge

Procedure TypeSendRandom & Procedure AutoResponder!


Ultra

2008-01-04 16:02:11

Procedure TypeSendRandom;
{Procedure: TypeSendRandom}
{Made By: U L T R A.}
{Description: Types one of the three messages you chose to be randomly typed.}
{Credits: Who Ever Made TypeSend.}
{Version: 1.0.}
Procedure TypeSendRandom(FirstWord, SecondWord, ThirdWord : String);
Begin
Case Random(3)Of

0:Begin
TypeSend(FirstWord);
End;

1:Begin
TypeSend(SecondWord);
End;

2:Begin
TypeSend(ThirdWord);
End;

End;
End;

Procedure AutoResponder;
{Procedure: AutoResponder}
{Made By: U L T R A.}
{Description: Talks back to people if they say/ask you something.}
{Credits: Who Ever Made Procedure/Function InChat.}
{Version: 1.1}
Procedure AutoResponder;
Begin
If (InChat('Hi')Or
InChat('Hey')Or
InChat('Hello')Or
InChat('Yo')Or
InChat('Hi man')Or
InChat('Hey man')Or
InChat('Yo man')Or
InChat('Hi dude')Or
InChat('Hey dude')Or
InChat('Yo dude')Or
InChat('Himan')Or
InChat('Heyman')Or
InChat('Yoman')Or
InChat('Hidude')Or
InChat('Heydude')Or
InChat('Yodude'))Then
Begin
TypeSendRandom('Hui there', 'hry', 'hrllo');
End;
If (InChat('Wats up')Or
InChat('Was up')Or
InChat('Wat up')Or
InChat('Wus up')Or
InChat('Wut up')Or
InChat('Wuts up')Or
InChat('Waz up')Or
InChat('Wazz up')Or
InChat('Wuz up')Or
InChat('Wuzz up')Or
InChat('Wats up man')Or
InChat('Wuz up man')Or
InChat('Wuts up man')Or
InChat('Wut up man')Or
InChat('Wuz up man')Or
InChat('Wats up dude')Or
InChat('Wuz up dude')Or
InChat('Wut up dude')Or
InChat('Wt up dude')Or
InChat('Wz up dude'))Then
Begin
TypeSendRandom('Nothing', 'Not much', 'Bored');
End;
If (InChat('?')Or
InChat('!')Or
InChat('.')Or
InChat('?!')Or
InChat('!?'))Then
Begin
TypeSendRandom('What', 'Huh', 'Erm');
End;
If (InChat('Lol')Or
InChat('Lolz')Or
InChat('Lols')Or
InChat('Loll')Or
InChat('Rofl')Or
InChat('Roflmao')Or
InChat('Roflmafao')Or
InChat('Lmao')Or
InChat('Lmfao')Or
InChat('Omg')Or
InChat('Omfg')Or
InChat('Oh my god')Or
InChat('God')Or
InChat('Wtf')Or
InChat('Wtf lol'))Then
Begin
TypeSendRandom('haha', 'hehe', 'funny');
End;
If (InChat('Highest levels')Or
InChat('Highest levels?')Or
InChat('Highest lvls')Or
InChat('Highest lvls?')Or
InChat('Best levels')Or
InChat('Best levels?')Or
InChat('Best lvls')Or
InChat('Best lvls?')Or
InChat('What are your highest levels?')Or
InChat('What are your best levels?')Or
InChat('What are your highest lvls?')Or
InChat('What are your best lvls?')Or
InChat('Best level?')Or
InChat('Highest level?')Or
InChat('Best lvl?')Or
InChat('Highest lvl?'))Then
Begin
TypeSendRandom('I dono', 'Wc', 'Str');
End;
If (InChat('Attack levels')Or
InChat('Attack lvls')Or
InChat('Att levels')Or
InChat('Att lvls')Or
InChat('Attack level')Or
InChat('Att lvl')Or
InChat('Attack levels?')Or
InChat('Attack lvls?')Or
InChat('Att levels?')Or
InChat('Att lvls?')Or
InChat('Attack level')Or
InChat('Attack lvl')Or
InChat('Att level')Or
InChat('Att lvl'))Then
Begin
TypeSendRandom(IntToStr(GetSkillLevel('attack')), 'Me ' + IntToStr(GetSkillLevel('attack')), 'Iam ' +IntToStr(GetSkillLevel('attack')));
End;
End;

Begin
SetUpSRL;
Begin
AutoResponder;
End;
End.
-Fixed things in version 1.1.
Note that this procedure is still under construction and there will be really alot more stuff in it.


How To Use.
Program ULTRAProgram;
{.Include SRL/SRL.Scar}

{Procedure: TypeSendRandom}
{Made By: U L T R A.}
{Description: Types one of the three messages you chose to be randomly typed.}
{Credits: Who Ever Made TypeSend.}
Procedure TypeSendRandom(FirstWord, SecondWord, ThirdWord : String);
Begin
Case Random(3)Of

0:Begin
TypeSend(FirstWord);
End;

1:Begin
TypeSend(SecondWord);
End;

2:Begin
TypeSend(ThirdWord);
End;

End;
End;

{Procedure: AutoResponder}
{Made By: U L T R A.}
{Description: Talks back to people if they say/ask you something.}
{Credits: Who Ever Made Procedure/Function InChat.}
{Version: 1.1}
Procedure AutoResponder;
Begin
If (InChat('Hi')Or
InChat('Hey')Or
InChat('Hello')Or
InChat('Yo')Or
InChat('Hi man')Or
InChat('Hey man')Or
InChat('Yo man')Or
InChat('Hi dude')Or
InChat('Hey dude')Or
InChat('Yo dude')Or
InChat('Himan')Or
InChat('Heyman')Or
InChat('Yoman')Or
InChat('Hidude')Or
InChat('Heydude')Or
InChat('Yodude'))Then
Begin
TypeSendRandom('Hui there', 'hry', 'hrllo');
End;
If (InChat('Wats up')Or
InChat('Was up')Or
InChat('Wat up')Or
InChat('Wus up')Or
InChat('Wut up')Or
InChat('Wuts up')Or
InChat('Waz up')Or
InChat('Wazz up')Or
InChat('Wuz up')Or
InChat('Wuzz up')Or
InChat('Wats up man')Or
InChat('Wuz up man')Or
InChat('Wuts up man')Or
InChat('Wut up man')Or
InChat('Wuz up man')Or
InChat('Wats up dude')Or
InChat('Wuz up dude')Or
InChat('Wut up dude')Or
InChat('Wt up dude')Or
InChat('Wz up dude'))Then
Begin
TypeSendRandom('Nothing', 'Not much', 'Bored');
End;
If (InChat('?')Or
InChat('!')Or
InChat('.')Or
InChat('?!')Or
InChat('!?'))Then
Begin
TypeSendRandom('What', 'Huh', 'Erm');
End;
If (InChat('Lol')Or
InChat('Lolz')Or
InChat('Lols')Or
InChat('Loll')Or
InChat('Rofl')Or
InChat('Roflmao')Or
InChat('Roflmafao')Or
InChat('Lmao')Or
InChat('Lmfao')Or
InChat('Omg')Or
InChat('Omfg')Or
InChat('Oh my god')Or
InChat('God')Or
InChat('Wtf')Or
InChat('Wtf lol'))Then
Begin
TypeSendRandom('haha', 'hehe', 'funny');
End;
If (InChat('Highest levels')Or
InChat('Highest levels?')Or
InChat('Highest lvls')Or
InChat('Highest lvls?')Or
InChat('Best levels')Or
InChat('Best levels?')Or
InChat('Best lvls')Or
InChat('Best lvls?')Or
InChat('What are your highest levels?')Or
InChat('What are your best levels?')Or
InChat('What are your highest lvls?')Or
InChat('What are your best lvls?')Or
InChat('Best level?')Or
InChat('Highest level?')Or
InChat('Best lvl?')Or
InChat('Highest lvl?'))Then
Begin
TypeSendRandom('I dono', 'Wc', 'Str');
End;
If (InChat('Attack levels')Or
InChat('Attack lvls')Or
InChat('Att levels')Or
InChat('Att lvls')Or
InChat('Attack level')Or
InChat('Att lvl')Or
InChat('Attack levels?')Or
InChat('Attack lvls?')Or
InChat('Att levels?')Or
InChat('Att lvls?')Or
InChat('Attack level')Or
InChat('Attack lvl')Or
InChat('Att level')Or
InChat('Att lvl'))Then
Begin
TypeSendRandom(IntToStr(GetSkillLevel('attack')), 'Me ' + IntToStr(GetSkillLevel('attack')), 'Iam ' +IntToStr(GetSkillLevel('attack')));
End;
End;

Begin
SetUpSRL;
Begin
AutoResponder;
End;
End.

Note that procedure AutoResponder uses procedure TypeSendRandom so if you dont include procedure TypeSendRandom, it will not work.


Anyone who tries to claim this as their own will be banned. Post comments and always credit me if you are using those procedures!

Both of the procedures are still under construction, especially procedure AutoResponder. There will be much more added to procedure AutoResponder, remember that!

SKy Scripter

2008-01-04 16:18:36

Ouch that calls alot of inchat() functions XD.

Sir R. M8gic1an

2008-01-04 18:47:12

and the best part is it'll keep saying hi and yo to itself :)

as well as: ! , ? , … , lol

~ RM

Jackrawl

2008-01-04 19:24:49

From: Rasta Magician
and the best part is it'll keep saying hi and yo to itself :)

as well as: ! , ? , … , lol

~ RM


LOL I didn't even notice that. That's awesome.

Bombo

2008-01-04 19:37:01

I don't know whether to say good job, or whether to say that seems to me like a complete waste of time. But either way it's good that it has been done =). I don't think I'll be using it though xD. But who knows? I might, but I'll be sure to give you credit.

~Bombo

Ultra

2008-01-04 21:30:46

and the best part is it'll keep saying hi and yo to itself

as well as: ! , ? , … , lol

~ RM


Ok i fixed it now lol, it will typesend it a little wrong with 1 letter of the word changed :P.And it also looks more human-like.

Jackrawl

2008-01-04 22:27:34

If you could grab more than one line of text, you could just add in an and statement and not worry about weird responses.

Daniel

2008-01-04 23:07:55

From: JackLKrawl
If you could grab more than one line of text, you could just add in an and statement and not worry about weird responses.

Congratulations on the Members :) Just noticed ;)

Also, InChat happens to lag out the computer. Also, it searches the entire scroll for those words then reply's to it not checking the name. So it will keep on saying hello to yourself after you say one word.

Ultra

2008-01-05 09:38:20

No but now i made it say it kinda wrong so like…

-Someone sais:Hi
-The script sais:hry (instead of hey, so it wont reply to it self).
-After it said the procedure, it goes to the next procedure function.

mickaliscious

2008-01-07 16:17:57


procedure TypeSendRandom(Choices: TStringArray;);
begin
TypeSend(HumanText(Choices[RandomRange(0,High(Choices))], 50));
end;


I know its ugly but it has 1/50 chance of having a typo in the response and can be used with an unlimited amount of word choices. Example:


if InChatMulti('hey', 'hi', 'sup') then
TypeSendRandom(['ey','ello','wazup','hello','hi mate']);

There are ways to stop it from responding to yourself using GetTextAtEx but I won't get into that here. For now, you'll have to choose your responses carefully.

Sir R. M8gic1an

2008-01-07 16:31:58

From: mickaliscious

procedure TypeSendRandom(Choices: TStringArray;);
begin
TypeSend(HumanText(Choices[RandomRange(0,High(Choices))], 50));
end;


I know its ugly but it has 1/50 chance of having a typo in the response and can be used with an unlimited amount of word choices. Example:


if InChatMulti('hey', 'hi', 'sup') then
TypeSendRandom(['ey','ello','wazup','hello','hi mate']);

There are ways to stop it from responding to yourself using GetTextAtEx but I won't get into that here. For now, you'll have to choose your responses carefully.


i'm not 100% sure, but i think HumanText is members only micky.. unless that's been changed.

check the chat include to get stuff like nicknames from people, so that you don't keep talking to them.

~RM

mickaliscious

2008-01-07 18:34:07

HumanText is just a lonely function in SRL, nobody knows him or uses him. Certainly not a members only function, I don't even think there are specific functions for members only. Aside from the ones posted in the members forums of course.

Sir R. M8gic1an

2008-01-08 14:04:55

another suggestion:

function SendText2(Text: String): Boolean;
By: RSN | Modded By: Spky
Description: Types text humanlike making mistakes, returns true if mistake has
been made.
oh n yeah, ur right mick :p