SRL Archive - SRL Archives

CAutoRespond.scar


Nava2

2008-09-04 16:49:16

http://www.villavu.com/forum/showthread.php?t=35039

To Look at it if you would like. :)

Shuttleu

2008-09-04 17:16:16

well atleast if it gets added then they wont have to run a script before running my script to get the autoresponder working

~shut

Nava2

2008-09-04 21:00:05

You use mine? :D

Haha, I see more and more people using it now… :)

EvilChicken!

2008-09-06 06:04:16

The SetUpResponder is commented out because it is intended for people to use in their own scripts, right?

Looks really nice, just two things.
1. Standards are a bit off @ the case in the "Respond" procedure.
2. Refer to small InChatArr thing I changed in your other thread.

Nava2

2008-09-06 10:27:04

Yes, thats exactly why its commented out ;).

I figured, rather than have EVERYONE who uses these functions saying the SAME thing, it would be better to have them customize it per script. Hell, per person works as well :).

Looking now btw.

3Garrett3

2008-09-06 13:39:25

So.. All I need to do is copy the first thing, set it up. Then, I just call If AutoRespond then whenever I want? And it will decide whether or not to respond?

Edit: It doesnt compile? :S

Duplicate *Respond* and *SetupSRLAutoResponder*

Nava2

2008-09-06 14:12:46

Okay, to use, you copy the SetupAutoresponder, then the responding procedure is called in FindNormalRandoms ;). So, just make sure, in the starting of your script, do:


begin
SetupSRL;
UseRespond := true;
SetupAutoResponder;
end.

Its not a script, it shouldn't compile :D

P.S. SetupSRLAutoResponder is only there because SetupSRL calls it.. :)

3Garrett3

2008-09-06 14:36:04

So.. I don't put the thing in my includes at all? :S. I don't fuckzing understand..

Nava2

2008-09-06 14:42:45

You put it in the includes, you just dont put them in your script. In your script, you put in: SetupAutoResponder.

Then, in your script, after SetupSRL, call SetupAutoResponder.

When you call FindNormalRandoms, the procedure Respond is called, aka the actual responder itself.

:)

3Garrett3

2008-09-06 15:54:58

Don't include it in the script? Ok.. :S

I guess I will try this out then now that I can get it to work XD

E: Nope. I still suck.

I have to put {.Include SRL\SRL\Misc\CAutoRespond.scar} at the top, or I know it wont work. Then when I do, I get the duplicate Identifier *RESPOND* error.

Shuttleu

2008-09-06 16:01:32

From: 3Garrett3
Don't include it in the script? Ok.. :S

I guess I will try this out then now that I can get it to work XD

check ultra cut n bank to see how it is included

@Nava2 - only one problem though
From: squancy
hey dude wats up

hey dude thiers some bugs…

well like a really detectible one with the autoresponder

omg.. i hope i dont get banned.. lol well look heres what happened

a person walked up and said 'Hi'

bot responded and it say 'Hey'

then another person said 'hey'
and the bot again said 'hi'

then someone else said it and the bot said it again

then someone said… 'I smell a bot :)'

so i took over and i said 'no' with quick chat..

then it put 'Lol'

then he asked 'whats your favorite color :P'

i was like F**K


so i logged and logged back in regulary and i said 'hey'

then the guy said 'bot is back again'

then i quickly responded saying 'stupid cats unplugged conecttion'

then i just talked normal … hope they didnt report me.. it was my main O_o

so mabey you could make it only respond again after a certain amount of time?

~shut

EDIT: if after looking at UCB you still dont understand then all you have to do is add this as a procedure to your script
procedure SetupAutoResponder;

var
HowManyQuestions : integer;

begin
UseRespond := True;

HowManyQuestions := 1;
SetArrayLength(QnR, HowManyQuestions);

QnR[0][0] := ['hi', 'hey', 'hello']; //Questions
QnR[0][1] := ['whats up', 'heya', 'hiya', 'hi']; //Answers to Previous Questions

SetArrayLength(QnR, Length(QnR));
end;
and at the top of your script just under setupsrl; add SetupAutoResponder;

and the rest is handled in FindNormalRandoms;

3Garrett3

2008-09-06 16:17:02

Fuck life. This is in the *Misc* part. So I added to my misc folder. I realized from yours to put it in Core. Now it works :S. I don't know why. But now that it is in Core, it works.

Nava2

2008-09-06 23:56:18

There is already a CAutoRespond.scar in core ;).

3Garrett3

2008-09-07 09:35:58

Well then you shouldn't have confused me by putting this under misc ;)

Now that it is moved, nobody else needs nooby errors like me :)

Nava2

2008-10-05 23:18:25

Crazy updates to go with my Abyssal Crafter

Nava2

2008-10-13 21:59:17

Fixed some things, prettified it! :D

nielsie95

2008-10-22 03:22:41

Closed at request.