SRL Archive - First Scripts

SRL AutoTalk Function


Blender

2008-10-17 18:16:33

This is one of my first posts, but I want to start an autotalking scar script project. If anyone would like to contribute, please take this basic script and do anything to it so it can talk like a person. (I want to make a YouTube video of an auto having a conversation with some dude.)

procedure HandlePlayerChat;
begin

if InChat('') then
begin
case Random(7) of
0: TypeSend('');
1: TypeSend('');
2: TypeSend('');
3: TypeSend('');
4: TypeSend('');
5: TypeSend('');
6: TypeSend('');
end;
Sleep(2000 + Random(1000));
end;
end;

PLEASE EDIT THIS SCRIPT AND RE-POST IT!
THANKS!

joelster134

2008-10-18 07:32:02

procedure HandlePlayerChat;
begin

If(InChat('Hi'))or (InChat('Hello'))or (InChat('Hey')) Then
Begin
Case Random(4) of
0: TypeSend('hello');

1: TypeSend('hi');

3: TypeSend('hey');

4: TypeSend('morning');
End;
End;
If(InChat('lvl'))or(InChat('woodcutting'))or(InChat('wc'))or(InChat('level'))Then
Begin
Case Random(3) of
0: TypeSend(IntToStr(GetSkillLevel('woodcutting'))+' yours?');

1: TypeSend(IntToStr(GetSkillLevel('woodcutting')));

2: TypeSend(IntToStr(GetSkillLevel('woodcutting'))+' and you?');

3: TypeSend('My wc lvl is '+IntToStr(GetSkillLevel('woodcutting')));
End;
End;
End;
begin
end.

Thats all i got for ya atm :)

Harry

2008-10-18 09:08:11

These things are a surefire way to get banned if there is no randomness in the sentences said ;) Try making a procedure to type with a few mistakes, or something. Nice try though :D

joelster134

2008-10-18 09:16:58

kk thanks for feedback will fix up later..

Blender

2008-10-18 12:55:32

Is this what you mean by more mistakes?

procedure HandlePlayerChat;
begin

if InChat('') then
begin
case Random(7) of
0: TypeSend(AddMistakes('', 30));
1: TypeSend(AddMistakes('', 30));
2: TypeSend(AddMistakes('', 30));
3: TypeSend(AddMistakes('', 30));
4: TypeSend(AddMistakes('', 30));
5: TypeSend(AddMistakes('', 30));
6: TypeSend(AddMistakes('', 30));
end;
Sleep(2000 + Random(1000));
end;
end;

Blender

2008-10-18 12:59:50

I just modified joelstr134 script so that it made some mistakes.
I think it should work…
(I like to keep code clean of mistakes so I cleaned this up a little bit.)



procedure HandlePlayerChat;
begin

if (InChat('Hi')) or (InChat('Hello')) or (InChat('Hey')) then
begin
case Random(4) of
0: TypeSend(AddMistakes('hello', 30));

1: TypeSend(AddMistakes('hi', 30));

3: TypeSend(AddMistakes('hey', 30));

4: TypeSend(AddMistakes('morning', 30));

end;
end;

if (InChat('lvl')) or (InChat('woodcutting')) or (InChat('wc')) or (InChat('level')) then
begin
case Random(3) of
0: TypeSend(AddMistakes(IntToStr(GetSkillLevel('woodcutting')) + ' yours?', 30));

1: TypeSend(IntToStr(AddMistakes(GetSkillLevel('woodcutting')));

2: TypeSend(IntToStr(AddMistakes(GetSkillLevel('woodcutting')) + ' and you?', 30));

3: TypeSend(AddMistakes('My wc lvl is ' + IntToStr(GetSkillLevel('woodcutting')), 30));

end;
end;
end;

joelster134

2008-10-18 17:24:21

you dont want to many mistakes in the script, then it will be to obvious….just one or two