Results 1 to 4 of 4

Thread: ugh script help plz

  1. #1
    Join Date
    Apr 2008
    Posts
    223
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default ugh script help plz

    hey this is my first script and i need help . I need to know why i keep gettin a syntax error and what i need to do to make this work.


    Code:
    {-----------------------------------|
    |                      _______                     |
    |     /\              /___ ___\                    |
    |    /  \                 | |                          |
    |   / -  \                | |                          |
    |  /__|_\UTO       |_|YPER             |
    |   by                              |
    |  scissormetimbers                 |
    |                                   |
    | INFO: It randomly types 3 phrases |
    |         of your choosing          |
    |___________________________________}
    
    
    program AutoTyper;
    {.include SRL/SRL.scar}
    
    const
    
    //-----enter 3 variations of phrase-----\\
     Text1 = 'ex: selling lobs'; //put words here ex. selling lobs
     Text2 = 'ex: lobs for sale'; //if you dont want variations leave blank
     Text3 = 'ex: selling lobs--zezima';  //if you dont want variaions leave blank
     Times = 10; //how many times it says it
    
    //--------Don't Touch Below Here--------\\
    procedure SpeakPhrase;
    
    var
     X: Integer;
     
    begin
      ClearDebug;
    
     begin
       X := Random(3);
       Case X Of
         0: TypeSend(Text1);
         1: TypeSend(Text2);
         3: TypeSend(Text3);
      
      begin
          Repeat
            TypeSend(X);
            Writeln('typing one of 3 phrases...')
            X := X + 1
            Wait(1000 +random(750));
          Until(X >= Times);
      end;
     end;
    end;
    
    begin
      SetupSRL;
      ActivateClient;
      SpeakPhrase;
    end.
    oh yeah, how do i make it so they dont have to type 3 phrases but have that option?

  2. #2
    Join Date
    Jan 2008
    Location
    Stanford, CA
    Posts
    329
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    well since a case is equivalent of a begin....that would mean that the case needs an end too...

    SCAR Code:
    program AutoTyper;
    {.include SRL/SRL.scar}

    const

    //-----enter 3 variations of phrase-----\\
     Text1 = 'ex: selling lobs'; //put words here ex. selling lobs
     Text2 = 'ex: lobs for sale'; //if you dont want variations leave blank
     Text3 = 'ex: selling lobs--zezima';  //if you dont want variaions leave blank
     Times = 10; //how many times it says it

    //--------Don't Touch Below Here--------\\
    procedure SpeakPhrase;

    var
     X: Integer;

    begin
      ClearDebug;

     begin
       X := Random(3);
       Case X Of
         0: TypeSend(Text1);
         1: TypeSend(Text2);
         3: TypeSend(Text3);
       end;

      begin
          Repeat
            TypeSend(inttostr(X));
            Writeln('typing one of 3 phrases...')
            X := X + 1
            Wait(1000 +random(750));
          Until(X >= Times);
      end;
     end;
    end;

    begin
      SetupSRL;
      ActivateClient;
      SpeakPhrase;
    end.

    remember that since you governed X as a int you needa convert X to a string when using it with Typesend(text:STRING); do u understand? Also when you said X:=X+1 you should use another integer for that function because X already plays a REALLy important role in the script.

    btw make sure u clean up your standards a bit too =) keep it up

  3. #3
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    {-----------------------------------|
    |                      _______      |
    |     /\              /___ ___\     |
    |    /  \                 | |       |
    |   / -  \                | |       |
    |  /__|_\UTO       |_|YPER          |
    |   by                              |
    |  scissormetimbers                 |
    |                                   |
    | INFO: It randomly types 3 phrases |
    |         of your choosing          |
    |___________________________________}



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

    const

    //-----enter 3 variations of phrase-----\\
     Text1 = 'ex: selling lobs'; //put words here ex. selling lobs
     Text2 = 'ex: lobs for sale'; //if you dont want variations leave blank
     Text3 = 'ex: selling lobs--zezima';  //if you dont want variaions leave blank
     Times = 10; //how many times it says it

    //--------Don't Touch Below Here--------\\
    procedure SpeakPhrase;
    var
     X: Integer;

    begin
      repeat
        case Random(3) of
          0: TypeSend(Text1);
          1: TypeSend(Text2);
          2: TypeSend(Text3);
        end;
        X := X + 1;
        Wait(2500 +random(750));
      until(X >= Times);
      WriteLn('Done, typed phrases ' + IntToStr(X) + ' times!');
      TerminateScript;
    end;

    begin
      ClearDebug;
      SetupSRL;
      ActivateClient;
      SpeakPhrase;
    end.


    Fixed, enjoy. Use [SCAR] tags next time.

  4. #4
    Join Date
    Apr 2008
    Posts
    223
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

Thread Information

Users Browsing this Thread

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

Posting Permissions

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