SRL Archive - First Scripts

Krnpride's Autotalker(1st)


krnpride

2007-11-03 22:45:19

This is my first script ever made
Plz post some suggestions on wut to do

Sir R. M8gic1an

2007-11-04 06:39:19

here, added what you needed, fix a couple things and commented what you might not understand. :)

{Krnpride's First Script
Nothing fancy about it
Please post suggestions and what to do
Thanks for viewing}


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

const
message1 = 'HI';//press F1 to say this
message2 = 'Bye';//press F2 to say this
types = 3;//type in how many times you want to repeat the message
//types is unfinished,, post help plz
var
typed: integer;


procedure typing;
begin
if IsFKeyDown(1) then
begin
typesend(message1)
Inc(Typed);//will add 1 to typed
wait(1000+Random(1000));
end;
if isfkeydown(2) then
begin
typesend(message2)
Inc(Typed);//will add 1 to typed
wait(1000+Random(1000));
end;
end;



begin
setupsrl;
typed:= 0;
repeat
typing;
until(typed >= types) // until typed is great or equal to types
end.
I also added standards

~RMagician

krnpride

2007-11-04 13:56:43

thanks a lot rmagician

i messed up since i put variables into the procedure, not the whole script

Shuttleu

2007-11-04 14:39:31

i see someone beat me to it then :(

krnpride

2007-11-04 19:56:12

lol

its all rite

Sebo

2007-11-04 20:00:11

{Krnpride's First Script
Nothing fancy about it
Please post suggestions and what to do
Thanks for viewing}


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

const
message1 = 'HI';//press F1 to say this
message2 = 'Bye';//press F2 to say this
types = 3//type in how many times you want to repeat the message
//fixed this.

var
typed : integer;

procedure typing;

begin
if IsFKeyDown(1) then
begin

typesend(message1)
typed := typed + 1;
wait(1000+random(1000));

end;
if isfkeydown(2) then
begin

typesend(message2)
typed = typed + 1;
wait(1000+random(1000));
end;

Wait(1000)

end;



begin

setupsrl;
typed:= 0;
repeat

typing;
until(typed = types)



end.

Sir R. M8gic1an

2007-11-05 13:52:56

From: Sebo
{Krnpride's First Script
Nothing fancy about it
Please post suggestions and what to do
Thanks for viewing}

//.....
procedure typing;

begin
if IsFKeyDown(1) then
begin

typesend(message1)
typed := typed + 1;
wait(1000+random(1000));

end;
if isfkeydown(2) then
begin

typesend(message2)
typed = typed + 1;
wait(1000+random(1000));
end;

Wait(1000)

end;

//.....
until(typed = types)

//...



the point of the post was? and you're waiting 1000+R(1000)+1000….. bit long
until(typed = types) might cause a problem, that's why the >= is there, to make sure it doesnt…

i'll edit with review on v2
edit: well v2 is exactly what i posted… you could've at least credited me :p

~RMagician

krnpride

2007-11-05 17:40:43

oh yea

i'll do that wen i add in v.03