Results 1 to 3 of 3

Thread: my first auto talker

  1. #1
    Join Date
    Feb 2007
    Posts
    849
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    my first auto talker

    hey there, ime trying to get my first auto talker (that i used a great tut for) to say 2 diffrent things

    SCAR Code:
    program talk;

    procedure Hello;
    begin
      wait(1000)
      Writeln('Hello world!');
    end;

    procedure Hello2;
    begin
      wait(1000)
      Writeln('Hello Peeps!');
    end;


    begin
     repeat
       hello;
     until(false)
     end;
     
     begin
     repeat
       hello2;
     until(false)
     
     


    end.


    i only want it to be showed how to shorten i and let you say wether you want to say this (a) or this (b).

  2. #2
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok i fixed it ill explain it.
    Code:
    program talk;
    
    const
    aorb=(''); // a=Hellow World! b=Hello Peeps
    
    procedure Hello;
    begin
    if(aorb=('a'))then
    begin
    wait(1000)
    writeln('Hello World!')
    end;
    end;
    
    procedure Hello2;
    begin
    if(aorb=('b'))then
    begin
    wait(1000)
    writeln('Hello Peeps!')
    end;
    end;
    
    begin
     repeat
       hello;
       hello2;
     until(false)
    end.
    1-You dont need 2 main loops( the end. part) for each procedure to repeat.
    2-for the if thing
    go into the const or make it under program blah;
    then put w/e you want into it like
    saythisorthat=('this');
    it always needs a semicolon at the end.
    then in a procedure after the thing put.
    if(saythisorthat=('this'))then
    but that doesnt need a semi colon.
    but for every start round '(' it needs a extra clode round ')'.

    Also you need a diffrent word to put in there for the second procedure.
    Finally make sure you have a qoute, you make qoutes like this // (to forward slashes) and '{' to make a start and a end thing.To end the qoute with '{' just put a '}' after it.You can do that to leave notes to tell people what the stuff in the const means

    For further and better options for this post or PM me.

  3. #3
    Join Date
    Feb 2007
    Posts
    849
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    cheers dude, i have just restarted RS too do stuff like this

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. My First Auto Talker
    By jacka scar MASTER in forum First Scripts
    Replies: 5
    Last Post: 05-08-2008, 10:59 PM
  2. Replies: 5
    Last Post: 11-23-2007, 08:45 PM
  3. Help with auto trade/ auto talker script
    By logik in forum OSR Help
    Replies: 5
    Last Post: 03-16-2007, 11:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •