SRL Archive - First Scripts

PhipTalker


phippyr123

2008-04-01 04:00:42

This is ma first one… please ;lave feedback.









{=========- PhipTalker -=========)
{ Created by: PhippyR123
{ On the Date: 29-March-2008
{ Description: An AutoTalker for any game.
{ Setup Information:
{ 1) Setup lines 21-27 below.
{ 2) Press Run.
{ 3) Press F2 to type the first sentence, F3 to type the second and F4 to type the third.
{ 4) Press the termination key, F7, to cancel the script.
{ Information:
{ Please don't be a leecher and provide feedback to where you got this script from.
{================================}


program PhipTalker;
{.include SRL/SRL.scar}

var
Sentence: Array [1..3] of String;
UsingSRL: Boolean;
WaitPeriod: Integer;

procedure SetupScript;
begin
Sentence[1]:='The first sentence to type here.';
Sentence[2]:='The second sentence to type here.';
Sentence[3]:='The third sentence to type here.';
UsingSRL:= False; //Use SRL typing method? False for using my custom one.
WaitPeriod:= 100; //Waiting period (in milliseconds) between each key pressed.
end;

procedure Talk(Text: String; Period: Integer);
var
i: Integer;
b: Boolean;
begin
for i:=1 to Length(Text) do
begin
if(Uppercase(Text)=Text) then
begin
KeyDown(VK_Shift);
b:=True;
Wait(Period+Random(Period/2));
end;
KeyDown(GetKeyCode(Text));
Wait(Period+Random(Period/2));
KeyUp(GetKeyCode(Text));
if(b) then
begin
Wait(Period+Random(Period/2));
b:=False;
KeyUp(VK_Shift);
end;
Wait(Period*2+Random(Period/2));
end;
KeyDown(13);
Wait(Period/2+Random(Period*2));
KeyUp(13);
end;

procedure DetectTalking;
begin
if(IsFKeyDown(2)) then
begin
if(UsingSRL) then TypeSend(Sentence[1]) else Talk(Sentence[1], WaitPeriod);
end;
if(IsFKeyDown(3)) then
begin
if(UsingSRL) then TypeSend(Sentence[2]) else Talk(Sentence[2], WaitPeriod);
end;
if(IsFKeyDown(4)) then
begin
if(UsingSRL) then TypeSend(Sentence[3]) else Talk(Sentence[3], WaitPeriod);
end;
end;

procedure Signature;
begin
ClearDebug;
Writeln('You''re using Phippyr123s'' AutoTalker. The Ultimate AutoTalker =)');
Writeln('Please post feedback to where you found this script from.');
end;

begin
SetupScript;
ClearDebug;
Signature;
repeat
DetectTalking;
Wait(1);
Until(IsKeyDown('q'));
Signature;
end.

Daniel

2008-04-01 04:05:46

Good first script. Like the talking procedure. Just next time, put the script in SCAR tags. So do this [.scar]Script Here but remove the full stop from the first tag.

So instead of doing this:
program PhipTalker;

do this:

program PhipTalker;

Looks better.

EDIT: Welcome to the forums.