• Log in or sign up for an account here: https://www.sythe.org/login

First Script need help please

jaimefire2

Forum Addict
Joined
Feb 19, 2008
Sythe Gold
0
Messages
401
I've read many guides and i still not very fond of scripting. I think i get the basic concept but it get mixed up with the variables and procedures. Here is my first ever script its not even close to done, but i think im at the part where i should put the variables but im not sure how to do it. So i would appreciate your help and i would give you credit for the script. Thanks:)

Code:
Program autotalker;
Begin

Writeln('Plese Report problems')
end;

Const

Msg = Hey;// write what you want to say here

Msg2 = sup;// write the second thing you want to say here

Eff1 = wave2;// what effect you want to do

Eff2 = flash2;// what effevt you want for message 2

Msginterval = 5000;// how long before each message

loops = 100;// how many times you want to say the message.

lastcall = 1// 1 if you want the autoer to say last call after all the loops.
//0 if you want it to execute

Logout = 1// if you want to log out and say too late when done with the loops.








var

a, x, y: integers;

a:=0;

x:= lastcall;

y:= logout;
 
If you wanna autotalk, instead of "Msg1 = Hey;" put " Msg1 = 'Hey'; cuz "hey" is a word not a number so it must be in strings.The same for the effects and msgs.
 
okay so even with the effects i put 'wave2';?
and if so how do i do the parts with the variables.
sorry im asking so much but i really want to learn how to script

Yes with effects too. You can dont need vars. const can be used without vars, the script should be something like this:
Program autotalker;
{.include srl/srl.scar}
Begin

Writeln('Plese Report problems')
end;

Const

Msg = 'Hey';// write what you want to say here

Msg2 = 'sup';// write the second thing you want to say here

Eff1 = 'wave2:';// what effect you want to do

Eff2 = 'flash2:';// what effevt you want for message 2

Msginterval = 5000;// how long before each message

loops = 100;// how many times you want to say the message.

lastcall = 1// 1 if you want the autoer to say last call after all the loops.
//0 if you want it to execute

Logout = 1// if you want to log out and say too late when done with the loops.

Procedure AutoTalk;
var
Count : Integer;
begin
repeat
case random(4) of
0:Typesend(Eff1+Msg);
1:Typesend(Eff1+Msg);
2: Typesend(Eff1+Msg2);
3: Typesend(Eff2+Msg2);
end;
wait(Msginterval+random(1000))
Count := Count +1;
until(loops = Count)
if (LastCall = 1) then
begin
Writeln('Last message is typing now...');
case random(4) of
0:Typesend(Eff1+Msg+' last call');
1:Typesend(Eff1+Msg+' last call');
2: Typesend(Eff1+Msg2+' last call');
3: Typesend(Eff2+Msg2+' last call');
end;
if (Logout = 1) then Logout;
end;
end;

begin
SetupSRL;
ActivateClient;
AutoTalk;
end.
 
duelarena.gg
Back
Top