SRL Archive - Test corner

Autoresponder Database (in development)


mickaliscious

2007-12-16 12:26:01

Hello folks, I've always wanted a nice autoresponder, but all of them are either repetitive, slow or they respond to your own name. I found Pentti's ChatBoxRespond and combined it with a 'huge' non-repetitive database of responces. If anyone could please check that this works that would be great.

Also, if anyone has any other suggested trigger words I'd like to know so I can expand this to cover as many topics as possible.

Just replace the CAutoRespond.scar in your SRL/Core folder with the one I've attached, and call the function "Respond" in your script. Let me know if it responds to what it should respond to.

Thanks to Pentti for letting me use his ChatBoxRespond procedure for the database.

the scar noob

2007-12-16 13:40:52

Great work, but I wont use it, sorry.
Humans also don't respond that much if they're leveling ;)

-Tsn.

mickaliscious

2007-12-16 13:56:25

Lol, then just edit it for a 1 out of 3 chance of responding. Tada, human.

Pentti

2007-12-17 12:52:47

Dude… Stop it now, alright?
Its funny to see MY autoresponder posted by you in SRL Test corner, and
procedure  ChatBoxRespond;
by: Pentti + Mickaliscious
Description: Used in SRL's respond procedure.
>>"by: Pentti + Mickaliscious"
>>"+ Mickaliscious"
>>"Mickaliscious"
And wow! You didnt change nothing in that function!
+ That is really shit autoresponder.

Stop it now before I really start getting mad at you, alright?

And I havent even seen you around before, and when did you became SRL member?! When did you even joined at SRL?
Whatever… I told in some topics about these "New SRL members"…

From: the scar noob
Great work, but I wont use it, sorry.

Haha! Thanks. :D

Sp0rky

2007-12-17 14:12:44

lmao pentti, calm down.

Mick may have mis-credited by accident…

Rikje

2007-12-17 15:01:26

Pennti he didn't meant it that way. he credited you etc. just on the wrong place. I can understand you mad, cause it isn't nice posting someone else works without asked. and its the *high number* time it happens… but he dint want it this way. (the others did).

@mick,, pennti is a great scripter. but hes work gets most of the time leeched and stolen. his mcmb etc.. his auto respownder is just a little but changed by the great masterkill. just talk to pennti about this i think :rolleyes:

King of Knives

2007-12-17 15:24:51

Why do you always get so mad, Pentti? Yea, I'm new too, go ahead and shout. But I think it's getting over the top, that you always start out by shouting instead of checking if it was an accident, and/or asking people nicely.
But maybe that's just me?

-Knives

mickaliscious

2007-12-17 16:10:05

From: Pentti
Dude… Stop it now, alright?
Its funny to see MY autoresponder posted by you in SRL Test corner, and
procedure  ChatBoxRespond;
by: Pentti + Mickaliscious
Description: Used in SRL's respond procedure.
>>"by: Pentti + Mickaliscious"
>>"+ Mickaliscious"
>>"Mickaliscious"
And wow! You didnt change nothing in that function!
+ That is really shit autoresponder.

Stop it now before I really start getting mad at you, alright?

And I havent even seen you around before, and when did you became SRL member?! When did you even joined at SRL?
Whatever… I told in some topics about these "New SRL members"…


Haha! Thanks. :D


Umm, I'm sorry. I didn't know you felt this way. If you don't want me to use your function in it I'll take it off and develop my own or find someone who will let me use it. I merely used yours because it is the best. I'm not kissing ass here or anything, its just the fastest, most accurate autoresponder out there. I made a few changes so that it will work with my database but I guess I improperly credited… sorry.

I'm just taking credit for the database thus far, and not the actual responder btw. I think there may have been some confusion there.

I'm assuming you want me to remove it? If thats so I will. If you just want to me give you full credit for the ChatBoxRespond I can do that as well. I certainly don't want anyone having negative opinions of me. I'm just here to help the community and learn while I'm at it.

Sorry again. Please respond with what you would like me to do. A PM will work also.

P1nky

2007-12-17 16:25:09

aww pentii take it easy there dawg =S mis-Credit lol dude this guy is new here and he is doing so much in SRL its amazing

though mick dont take it hard =*( its aiiite accdents happen lol like how i type i suck hehe (comp slang people hate it hehe)

FrÕzÑ_§ÕµL

2007-12-20 06:10:40

Not sure if anyone really cares… this works for me… heres mine… (wcing, u gotta edit for wateva u need)


Function PosArray(SubStr : Array of String; S : String) : Boolean;
Begin
for i := 0 to GetArrayLength(SubStr) - 1 do
Begin
Result := Pos(SubStr[i], S) > 0;
if Result then exit;
end;
end;

Procedure AutoRespond;

var
LolChatter : Integer;
TextFound, Name, OldMessage : String;

Begin
GetLastChatText(TextFound);
if OldMessage = TextFound then exit;
OldMessage := TextFound;
if Not(PosArray(['wc l', 'woodcutting l', 'w/c l', 'wc?', 'wcing l', 'lol', 'haha','hehe','lmao','rofl','hi ','hello',' hey',' yo ','bot ','macro','u noob','u nub','u loser',Lowercase(Capitalize(Players[CurrentPlayer].Name)), Left(Lowercase(Capitalize(Players[CurrentPlayer].Name)), 4), Right(Lowercase(Capitalize(Players[CurrentPlayer].Name)), 4), 'woot','woop'],TextFound)) then exit;
LastChatter(Name);
if Lowercase(Name) = Lowercase(Capitalize(Players[CurrentPlayer].Name)) then exit;
if TimeFromMark(RemoveChatters) >= 50000 then
Begin
if Not(PosArray(['wc l', 'woodcutting l', 'w/c l', 'wc?', 'wcing l', 'lol', 'haha','hehe','lmao','rofl','hi ','hello',' hey',' yo ','bot ','macro','u noob','u nub','u loser',Lowercase(Capitalize(Players[CurrentPlayer].Name)), Left(Lowercase(Capitalize(Players[CurrentPlayer].Name)), 4), Right(Lowercase(Capitalize(Players[CurrentPlayer].Name)), 4), 'woot','woop'],TextFound)) then exit;
MarkTime(RemoveChatters);
for i := 0 to FreeSlot - 1 do
Begin
Chatters[i] := ''
end;
FreeSlot := 1;
end;
for i := 0 to FreeSlot - 1 do
Begin
if Chatters[i] = Name then exit;
end;
for i := FreeSlot to 100 do
if Chatters[i] = '' then
Begin
Chatters[i] := Name;
FreeSlot := FreeSlot + 1;
Break;
end;
if (PosArray(['wc l','woodcutting l', 'w/c l', 'wc?', 'wcing l'],TextFound)) then
Begin
if (Players[CurrentPlayer].Integers[2] <= 0) then
Begin
Players[CurrentPlayer].Integers[2] := GetSkillLevel('WoodCutting');
end;
Case Random(6) of
0: TypeSend2(IntToStr(Players[CurrentPlayer].integers[2] + LevelsGained), 33, 5, 5);
1: TypeSend2('me ' + IntToStr(Players[CurrentPlayer].integers[2] + LevelsGained) + ' u?', 33, 5, 5);
2: TypeSend2(IntToStr(Players[CurrentPlayer].integers[2] + LevelsGained) + ' =p', 33, 5, 5);
3: TypeSend2('I' + chr(39) + 'm ' + IntToStr(Players[CurrentPlayer].integers[2] + LevelsGained), 33, 5, 5);
4: TypeSend2(IntToStr(Players[CurrentPlayer].integers[2] + LevelsGained) + '...', 33, 5, 5);
5: TypeSend2('low lol', 33, 5, 5);
end;
WriteLn(Capitalize(Players[CurrentPlayer].Name) + ': Talked to ' + Name);
talks := talks + 1;
exit;
end;
if (PosArray(['lol','haha','hehe','lmao','rofl'],TextFound)) then
Begin
If TimeFromMark(LolChatter) < 10000 then exit;
MarkTime(LolChatter);
Case Random(10) of
0: TypeSend2('lol', 33, 5, 5);
1: TypeSend2('', 33, 5, 5);
2: TypeSend2('lmao', 33, 5, 5);
3: TypeSend2('rofl', 33, 5, 5);
4: TypeSend2('?', 33, 5, 5);
5: TypeSend2('...', 100, 0, 0);
6: TypeSend2('haha', 33, 5, 5);
7: TypeSend2('hehe', 33, 5, 5);
8: TypeSend2('=]', 33, 5, 5);
9: TypeSend2('', 33, 5, 5);
end;
WriteLn(Capitalize(Players[CurrentPlayer].Name) + ': Talked to ' + Name);
talks := talks + 1;
exit;
end;
if (PosArray(['Hi ','Hello',' hey','sup',' yo '],TextFound)) then
Begin
Case Random(12) of
0: TypeSend2('hi', 33, 5, 5);
1: TypeSend2('hello', 33, 5, 5);
2: TypeSend2('hey', 33, 5, 5);
3: TypeSend2('yo', 33, 5, 5);
4: TypeSend2('sup', 33, 5, 5);
5: TypeSend2('wasup', 33, 5, 5);
6: TypeSend2('g' + chr(39) + 'day', 33, 5, 5);
7: TypeSend2('good mornin!', 33, 5, 5);
8: TypeSend2('good aftanoon!', 33, 5, 5);
9: TypeSend2('good evenin!', 33, 5, 5);
10: TypeSend2('ohaiyogozaimasu - im asian hehe', 33, 5, 5);
11: TypeSend2('hau - im indian =]', 33, 5, 5);
end;
WriteLn(Capitalize(Players[CurrentPlayer].Name) + ': Talked to ' + Name);
talks := talks + 1;
exit;
end;
if (PosArray(['bot ', 'macro'],TextFound)) then
Begin
Case Random(10) of
0: TypeSend2('Wat r they?', 33, 5, 5);
1: TypeSend2('wots the point in gettin sumthin else 2 play 4 u?', 33, 5, 5);
2: TypeSend2('bots r stupid', 33, 5, 5);
3: TypeSend2('i h8 bots', 33, 5, 5);
4: TypeSend2('macros r ruinin rs for us =[', 33, 5, 5);
5: TypeSend2('?', 33, 5, 5);
6: TypeSend2('stupid autos r forcing jagex to fight back... wich affects us 2 =[', 33, 5, 5);
7: TypeSend2('macros made our shop prices rise =[', 33, 5, 5);
8: TypeSend2('bots r so obvious', 33, 5, 5);
9: TypeSend2('wots da point banning macros coz there r bots to even make new bots = /', 33, 5, 5);
end;
WriteLn(Capitalize(Players[CurrentPlayer].Name) + ': Talked to ' + Name);
talks := talks + 1;
exit;
end;
if (PosArray(['u noob','u nub','u loser'],TextFound)) then
Begin
Case Random(10) of
0: TypeSend2('stfu', 33, 5, 5);
1: TypeSend2('look in da mirror', 33, 5, 5);
2: TypeSend2('lmao u r', 33, 5, 5);
3: TypeSend2('...', 33, 5, 5);
4: TypeSend2('omg...', 33, 5, 5);
5: TypeSend2('get a life', 33, 5, 5);
6: TypeSend2('gotta start sumwhea', 33, 5, 5);
7: TypeSend2('shut up', 33, 5, 5);
8: TypeSend2('hmph', 33, 5, 5);
9: TypeSend2('=[', 33, 5, 5);
end;
WriteLn(Capitalize(Players[CurrentPlayer].Name) + ': Talked to ' + Name);
talks := talks + 1;
exit;
end;
if (PosArray([Lowercase(Capitalize(Players[CurrentPlayer].Name)), Left(Lowercase(Capitalize(Players[CurrentPlayer].Name)), 4), Right(Lowercase(Capitalize(Players[CurrentPlayer].Name)), 4)],TextFound)) then
Begin
Case Random(9) of
0: TypeSend2('me?', 33, 5, 5);
1: TypeSend2('wot u want', 33, 5, 5);
2: TypeSend2('...', 33, 5, 5);
3: TypeSend2('leave me alone!', 33, 5, 5);
4: TypeSend2('I' + chr(39) + 'm not in the mood =[', 33, 5, 5);
5: TypeSend2('ye?', 33, 5, 5);
6: TypeSend2('yo?', 33, 5, 5);
7: TypeSend2('uh?', 33, 5, 5);
8: TypeSend2('shudup', 33, 5, 5);
end;
WriteLn(Capitalize(Players[CurrentPlayer].Name) + ': Talked to ' + Name);
talks := talks + 1;
exit;
end;
if (PosArray(['woot','woop'],TextFound)) then
Begin
Case Random(9) of
0: TypeSend2('gratz', 33, 5, 5);
1: TypeSend2('grats', 33, 5, 5);
2: TypeSend2('...', 33, 5, 5);
3: TypeSend2('what?', 33, 5, 5);
4: TypeSend2('huh?', 33, 5, 5);
5: TypeSend2('wat?', 33, 5, 5);
6: TypeSend2('wot?', 33, 5, 5);
7: TypeSend2('uh whatd i miss?', 33, 5, 5);
8: TypeSend2('', 33, 5, 5);
end;
WriteLn(Capitalize(Players[CurrentPlayer].Name) + ': Talked to ' + Capitalize(Name));
talks := talks + 1;
exit;
end;
end;

begin
FreeSlot := 1;
AutoRespond;
It's very long yes… but hey, I havn't got a single black mark yet :D

Also do you think that the
if Not(PosArray(['wc l', 'woodcutting l', 'w/c l', 'wc?', 'wcing l', 'lol', 'haha','hehe','lmao','rofl','hi ','hello',' hey',' yo ','bot ','macro','u noob','u nub','u loser',Lowercase(Capitalize(Players[CurrentPlayer].Name)), Left(Lowercase(Capitalize(Players[CurrentPlayer].Name)), 4), Right(Lowercase(Capitalize(Players[CurrentPlayer].Name)), 4), 'woot','woop'],TextFound)) then exit;
is necessary and is likely to lag my script?

mickaliscious

2007-12-20 11:45:19

If pentti lets me use his autoresponder I have an updated database coming.. The one I have posted doesn't work. (The dimensions are off for the chat text and it will respond to something it already responded to) I fixed the errors in it and I'll add some more trigger words.

MasterKill

2007-12-20 13:00:48

I just love auto responders :)

in my first script (bone pick and burry) i was used to use pentti's responder, but when that one outdated i made my own one. and now a few modefields later, i got this;

{*******************************************************************************
Function AutoResponder(FindText, SayText: TStringArray; LookInLastIntegerLines: integer):Boolean;
By: MasterKill.
Description: If Found the FindText then random say one of the SeyTexts
Use: AutoResponder(['bot','auto','macro'], ['im not an bot!','im not ' +PlayerName,'whats that?'], 2);
Error: Use 'PlayerName' on own risk! scars GetTextAt is a lil buggy
*******************************************************************************}
var
PlayerName: String;
Function AutoResponder(FindText, SayText: TStringArray; LookInLastIntegerLines: integer):Boolean;
var
textx, texty, Ymod, GetNameTrys, Coordspace, SRT, R: Integer;
TextSayd, TextFound: String;
begin
If (LookInLastIntegerLines > 8) then
begin
WriteLn(' auto respond [ERROR] Wrong >LookInLastIntegerLines< not setted up correct:');
WriteLn(' error in Respond: ' + FindText[0]);
exit;
end;
case LookInLastIntegerLines of
1: Ymod := 441;
2: Ymod := 428;
3: Ymod := 414;
4: Ymod := 400;
5: Ymod := 386;
6: Ymod := 372;
7: Ymod := 358;
8: Ymod := 344;
end;
For R := 0 To (GetArrayLength(findtext)-1) Do
begin
if IsTextInAreaEx(8, Ymod, 291, 461, textx, texty, FindText[R], 12, smallchars, False, True, 0, 1, 16711680) then
begin
Coordspace := Texty;
//writeLn(IntToStr(Coordspace));
PlayerName := '';
Repeat
PlayerName := GetTextAtEx(12, (Coordspace), 0, SmallChars, False, False, 0, 5, 0, 40, False, tr_AllChars)
If Not (playerName = '') then Break;
GetNameTrys := GetNameTrys + 1;
Until not (PlayerName = '') or (GetNameTrys > 5)
Wait(2000);
if (Pos(Players[CurrentPlayer].Nick, PlayerName) > 0) then exit;
Result := True;
respzz := True;
SRT := Random(GetArrayLength(SayText));
TypeSend(SayText[SRT]);
TextSayd := SayText[SRT];
TextFound := FindText[R];
responds := responds + 1;
WriteLn(' -Auto Respond');
If (Trim(PlayerName) = '') then
begin
PlayerName := 'Anonymous:';
WriteLn(' not found player name');
end;
WriteLn(' ' + Trim(PlayerName) +' ' + TextFound);
WriteLn(' ' + Players[CurrentPlayer].Name + ': '+ TextSayd);
WriteLn(' -Auto Respond');
If (PlayerName = 'Anonymous:') then
begin
Case Random(3) Of
0: PlayerName := 'dude'
1: PlayerName := 'sir'
2: PlayerName := 'noob'
end;
end;
end;
If (Result = True) then exit;
end;
end;
AutoResponder([Players[CurrentPlayer].Nick], ['no.', 'im bussy...', 'dont talk to me', 'su noob', 'get lost!', 'im not lissening'], 1);
AutoResponder(['auto', 'macro'], ['who is? im not', 'i hate macro-erz', '*caugh*'], 2);

mickaliscious

2007-12-20 16:29:22

Updated the attachment… it works now. I'm working on a search for all levels along with responses as we speak.

footballjds

2008-01-16 22:36:56

i was fishing, legit and somone said "<>< lvl?" maybe add that?

=)

mickaliscious

2008-01-17 10:48:40

Lol, okay. I half-way gave up on this though…

footballjds

2008-01-17 11:42:47

Aww.. damnit.:(

mickaliscious

2008-01-18 07:21:56

Lol, you can take over if you want.

Or we can team it to death also.