PDA

View Full Version : Auto Responding: How to in 5s



Sir R. M8gic1an
01-21-2009, 09:43 PM
How to Auto Respond in 5 Seconds!

well, i have never made a long tutorial and this will not be the first time. My tutorials so far are always about things i think might go unnoticed.

So you have this script which works fairly fine but it doesn't have an autoresponder. What do you do?

You really have two choices. you either make a really cool autoresponder by yourself and use it or you use someone else's. but you don't want to go through the pain of meddleing in the other person's script. And this is where i can help you :)

I don't know how many of you have the habbit of just simply exploring your SRL folders. I do.

function FindNormalRandoms: Boolean;
var
i: Integer;
begin
for i := 1 to 9 do
begin
case I of
1: Result := SolveNonTalkingRandoms;
2: Respond;
3: Result := FindTalk;
4: Result := FindDead;
5: Result := FindLamp(LampSkill);
6: if FindBox then
Result := SolveBox;
7: Result := RC;
8: Result := FindMod;
9: if (SRL_Procs[srl_OnRandomCall] <> nil) then
SRL_Procs[srl_OnRandomCall]();
end;
if Result then
begin
if (SRL_Procs[srl_OnFindRandom] <> nil) then
SRL_Procs[srl_OnFindRandom]();
Break;
end;
//Wait(1);
end;
end;


this is in AntiRandoms.scar in /core/antirandoms.

we've all seen it before, nothing new... but :o notice this:
" 2: Respond; "

Now, have you ever seen srl responding just simply by itself? Think about it.... If you are not a dev then the correct answer is no:p


function Respond:Boolean;
Begin
Result := False;
end;


This is how Respond looks. pretty useless to us really. But the potential in it is that everytime you call FindNormalRandoms it will also call the Responder. And that responder will be in any script that uses srl :)

so how to get your responder into any script? Easy :)

Change the inside part of Respond to your responder :)

Respond is in srl/core/CAutoRespond.scar ;)

Tip: Read through srl. There are actually lots of useful stuff in there :)

~RM

Shuttleu
01-21-2009, 09:47 PM
i used nava2's auto responder which replaces CAutoRespond.scar
you can get it from here
http://www.geocities.com/nava2@ymail.com/CAutoRespond.txt

~shut

Richard
01-21-2009, 09:51 PM
I really should start looking through the SRL files, they have some pretty interesting and useful things in them, just need to get them downloaded properly in this machine.

Great tut!

Rep++

Shuttleu
01-21-2009, 09:54 PM
do you think nava's could be added to srl which will mean everyone will have a autoresponder?

~shut

Sir R. M8gic1an
01-21-2009, 10:03 PM
do you think nava's could be added to srl which will mean everyone will have a autoresponder?

~shut

There is not an AutoResponder in srl because it was chosen not to release an auto responder. probably to avoid everyone answering the same things.

If any auto-responder gets added to srl it will probably be from the person who wins the Auto Responder scripting competition.

~RM