Bliss
2007-10-08 09:20:21
This is absolutely my first script, so be nice!
program AutoTalker;
{.include SRL/SRL.scar}
type
texts = record
str: string;
end;
var
Say: array[0..19] of texts;
numOfLines, i, k, loops: Integer;
waitForLoop: boolean;
procedure setup;
begin
k := 0;
{///////////Setup\\\\\\\\\\\\\}
Say[0].str := 'text1'; //line #1
Say[1].str := 'text2'; //line #2
Say[2].str := 'text3'; //line #3
//Copy & Paste the above lines to create more line
//but change the [1] to [2],[3], and so on.
waitForLoop := true; //If true, it will wait 1000msecs (1sec) before looping the lines
numOfLines := 3; //change to the number of lines you have
loops := 3; //change to number of times you want to say the lines (0 for infinite)
{///////////End of setup//////}
numofLines := numOfLines - 1;
end;
procedure talk;
begin
for i := 0 to numOfLines do
begin
Wait(1000+Random(Random(100)));
TypeSend(Say[i].str);
end;
end;
begin
setup;
repeat
talk;
if (waitForLoop = true) then
wait(1000+Random(500));
k := k + 1;
until (k = loops)
end.