Results 1 to 15 of 15

Thread: Extremely Nooby First Script

  1. #1
    Join Date
    Jul 2007
    Location
    Mo-Town
    Posts
    259
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Nething's First Script

    I have been "scripting" for about 2 months. I have mainly just been altering other peoples scripts to fit my needs. This is my first Solo attempt to make a script. It is really simple but this is what I got.

    What it is is an extremely complicated version of the "Hello World" Script. I included A lot of the basics like constants, vars, If/then, and the SRL Declare Players (for practice). Well, Here it is. My first Solo Script:

    SCAR Code:
    program Hello;
    {.include srl/srl.scar}

    var
      TimesWritten: Integer;

    const
      TimesToWrite = 5; //how many time to write
      WhatToWrite = 'Hello Everyone'; //What you want to say
      TimeBetween = 0; //Milliseconds
      ClearDeBugs = False; //Clear the Debug First?
      MySRLID = ''; // SRL Stats ID
      MySRLPassword = ''; //SRL Stats Password

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      SRLID := MySRLID;
      SRLPassword := MySRLPassword;

      Players[0].Name := '';
      Players[0].Pass := '';
      Players[0].Nick := '';
      Players[0].Active := True;
      begin
        if (ClearDebugs) then
        begin
          ClearDebug;
        end else
          Writeln('Not Clearing Debug');
      end;
      Writeln('Player(s): ' + IntToStr(HowManyPlayers) + ';');
    end;

    procedure WriteIt;
    begin
      repeat
        WriteLn(WhatToWrite);
        TimesWritten := TimesWritten + 1;
        Wait(TimeBetween);
      until TimesWritten = TimesToWrite;
    end;

    begin
      DeclarePlayers;
      WriteIt;
    end.

    Any Compliments/Suggestions are welcome.
    Quote Originally Posted by Napolean
    In Politics, Stupidity is Not a Handicap
    Quote Originally Posted by Unknown
    Marriage is like a bank. You put it in, Pull it out, then lose interest.

  2. #2
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    Looks nice for a first script- better than all the 5 line autotalkers we see here.

    SCAR Code:
    begin
    repeat
    SendKeys('lol spam');
    until(false);
    end.


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  3. #3
    Join Date
    Jun 2007
    Location
    Greenville, SC
    Posts
    1,149
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    for 1 thing, its a script... but to add srl stats to it, LMAO!

  4. #4
    Join Date
    Feb 2007
    Location
    SparklesProd.com
    Posts
    2,406
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    nething, thats a fantastic first script. Great job.

    Why not use the declare players? At the moment its pointless.

    SCAR Code:
    program Hello;
    {.include srl/srl.scar}
     
    var
      TimesWritten: Integer;
     
    const
      TimesToWrite = 5; //how many time to write
      WhatToWrite = 'Hello Everyone'; //What you want to say
      TimeBetween = 0; //Milliseconds
      ClearDeBugs = False; //Clear the Debug First?
      MySRLID = ''; // SRL Stats ID
      MySRLPassword = ''; //SRL Stats Password
     
    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
     
      SRLID := MySRLID;
      SRLPassword := MySRLPassword;
     
      Players[0].Name := '';
      Players[0].Pass := '';
      Players[0].Nick := '';
      Players[0].Active := True;
      begin
        if (ClearDebugs) then
        begin
          ClearDebug;
        end else
          Writeln('Not Clearing Debug');
      end;
      Writeln('Player(s): ' + IntToStr(HowManyPlayers) + ';');
    end;
     
    procedure WriteIt;
    begin
      repeat
        TypeSend(WhatToWrite);
        TimesWritten := TimesWritten + 1;
        Wait(TimeBetween);
      until TimesWritten = TimesToWrite;
    end;
     
    begin
     ActivateClient;
     SetupSRL;  
     DeclarePlayers;
     LoginPlayer;  
     WriteIt;
    end.

    And now it's an rs autotalker that logs you in! Haha.

    You seem to be really getting a firm grasp of the basics, why not move onto more advanced stuff?

  5. #5
    Join Date
    Jul 2007
    Location
    Mo-Town
    Posts
    259
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Sp0rky View Post
    nething, thats a fantastic first script. Great job.

    Why not use the declare players? At the moment its pointless.

    SCAR Code:
    program Hello;
    {.include srl/srl.scar}
     
    var
      TimesWritten: Integer;
     
    const
      TimesToWrite = 5; //how many time to write
      WhatToWrite = 'Hello Everyone'; //What you want to say
      TimeBetween = 0; //Milliseconds
      ClearDeBugs = False; //Clear the Debug First?
      MySRLID = ''; // SRL Stats ID
      MySRLPassword = ''; //SRL Stats Password
     
    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
     
      SRLID := MySRLID;
      SRLPassword := MySRLPassword;
     
      Players[0].Name := '';
      Players[0].Pass := '';
      Players[0].Nick := '';
      Players[0].Active := True;
      begin
        if (ClearDebugs) then
        begin
          ClearDebug;
        end else
          Writeln('Not Clearing Debug');
      end;
      Writeln('Player(s): ' + IntToStr(HowManyPlayers) + ';');
    end;
     
    procedure WriteIt;
    begin
      repeat
        TypeSend(WhatToWrite);
        TimesWritten := TimesWritten + 1;
        Wait(TimeBetween);
      until TimesWritten = TimesToWrite;
    end;
     
    begin
     ActivateClient;
     SetupSRL;  
     DeclarePlayers;
     LoginPlayer;  
     WriteIt;
    end.

    And now it's an rs autotalker that logs you in! Haha.

    You seem to be really getting a firm grasp of the basics, why not move onto more advanced stuff?
    Lol Never thought about that. Dang just noticed I forgot SetupSRL.

    @rs2pro666 I just put it there for practice. No real reason.
    Quote Originally Posted by Napolean
    In Politics, Stupidity is Not a Handicap
    Quote Originally Posted by Unknown
    Marriage is like a bank. You put it in, Pull it out, then lose interest.

  6. #6
    Join Date
    Jul 2007
    Location
    Mo-Town
    Posts
    259
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    How bout this?! Just finished lol. It is So Amazingly Pointless But it Works!

    SCAR Code:
    program Hello;
    {.include srl/srl.scar}

    var
      TimesWritten: Integer;
      TotalTypes: Integer;
      RunningTime: Integer;
      StartTime: Integer;

    const
      TimesToWrite = 3; //how many time to write
      WhatToWrite = 'Hello Everyone'; //What you want to say
      TimeBetween = 1000; //Milliseconds
      ClearDeBugs = True;
      MySRLID = '';
      MySRLPassword = '';

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      SRLID := MySRLID;
      SRLPassword := MySRLPassword;

      Players[0].Name := '';
      Players[0].Pass := '';
      Players[0].Nick := '';
      Players[0].Active := True;
      begin
        if (ClearDebugs) then
        begin
          ClearDebug;
        end else
          Writeln('Not Clearing Debug');
      end;
      Writeln('Player(s): ' + IntToStr(HowManyPlayers) + ';');
    end;

    //---------------------------------------------------------------------
    //FindFastRandoms
    //By: WT-Fakawi
    //---------------------------------------------------------------------

    Function FindFastRandoms: Boolean;
    var
      i: Integer;
    begin
      for i:=1 to 10 do
      begin
        case I of
         1:  If FindDead then
               Result := True;
         2:  If FindMod then
               Result := True;
         3:  If FindMime then
               Result := True;
         4:  If FindMaze then
               Result := True;
         5:  If FindQuiz then
               Result := True;
         6:  If FindDemon then
               Result := True;
         7: begin
               if NoGameTab then
               begin
                 Result := True;
                 Players[CurrentPlayer].loc := 'No GameTab';
                 Logout;
                 Exit;
               end;
             end;
         8: begin
               if InBlack then
               begin
                 Result := True;
                 Players[CurrentPlayer].loc := 'InBlack';
                 Logout;
                 Exit;
               end;
             end;
           9: RC;
           10: Respond;
        end;
        wait(1);
      end;
    end;

    //---------------------------------------------------------------------
    //Typing Procedure
    //By: Me
    //---------------------------------------------------------------------

    procedure WriteIt;
    begin
      TimesWritten := 0
        repeat
          Typesend(WhatToWrite);
          TimesWritten := TimesWritten + 1;
          TotalTypes := TotalTypes + 1;
          FindNormalRandoms;
          FindFastRandoms;
          SRLRandomsReport;
          Wait(TimeBetween+Random(250));
        until TimesWritten = TimesToWrite;
    end;

    //--------------------------------------------------------------------
    //Progress Report
    //Design: WT-Fakawi's Goblin Schredduler
    //--------------------------------------------------------------------

    Procedure ProgressReport;
    begin
      writeln(' ');
      WriteLn ('/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\');
      WriteLn ('              -- First AutoTyper  -- Progress Report -- by Nething --           ');
      Writeln ('<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>');
      WriteLn ('Typed A Total Of '+inttostr(TotalTypes)+' Times');
      WriteLn ('Ran for '+ TimeRunning);
      SRLRandomsReport;
    end;

    //--------------------------------------------------------------------
    //Main Loop
    //--------------------------------------------------------------------

    begin
      SetupSRL;
      ScriptID := '371';
      ActivateClient;
      StartTime := GetSystemTime;
      DeclarePlayers;
      LoginPlayer;
      repeat
        RunningTime := GetSystemTime;
        WriteIt;
        Logout;
        ProgressReport;
        Wait(4000+Random(2000));
        NextPlayer(True);
      until(false)
    end.

    Like I said Nobody would actually use this script but it works and it is a script so that is all I care about.

    EDIT: Oh by the way. Just wondering, are the standards right on this?

    EDIT:EDIT: W00T 100th Post

    EDIT:EDIT:EDIT: Oops I just noticed I double posted Sorry :\
    Quote Originally Posted by Napolean
    In Politics, Stupidity is Not a Handicap
    Quote Originally Posted by Unknown
    Marriage is like a bank. You put it in, Pull it out, then lose interest.

  7. #7
    Join Date
    Jan 2007
    Posts
    28
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)
    dude u cant tell me this was your first script??! its solid as..

    keep it up dunn

  8. #8
    Join Date
    May 2007
    Location
    NSW, Australia
    Posts
    2,823
    Mentioned
    3 Post(s)
    Quoted
    25 Post(s)

    Default

    Nice for a first script. I can see you know standards. Well done.

  9. #9
    Join Date
    Jul 2007
    Posts
    12
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    This would be one of the best first auto talkers I've used. Good job.

  10. #10
    Join Date
    Oct 2007
    Posts
    10
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    nice auto talker

  11. #11
    Join Date
    Feb 2007
    Location
    SparklesProd.com
    Posts
    2,406
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    I want to make a 'The person above me is spamming just to get 10 posts' image... I think I might.

    Infact the 2 people above me are doing this...

  12. #12
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    Sporky, if you did, it'd be instantly be the most used picture on SRL
    Interested in C# and Electrical Engineering? This might interest you.

  13. #13
    Join Date
    Jul 2007
    Location
    Mo-Town
    Posts
    259
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hey at least I can post again Nobody had posted and I wanted to bump but I really didn't want to triple post. Double is bad enough.

    Any more feedback? Would be appreciated.
    Quote Originally Posted by Napolean
    In Politics, Stupidity is Not a Handicap
    Quote Originally Posted by Unknown
    Marriage is like a bank. You put it in, Pull it out, then lose interest.

  14. #14
    Join Date
    Jul 2007
    Posts
    242
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    pretty good for your first script, but you forgot SetUpSRL; at the beggining of your main loop





  15. #15
    Join Date
    Jul 2007
    Location
    Mo-Town
    Posts
    259
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yea I know. Its fixed in the edited version (look farther down).
    Quote Originally Posted by Napolean
    In Politics, Stupidity is Not a Handicap
    Quote Originally Posted by Unknown
    Marriage is like a bank. You put it in, Pull it out, then lose interest.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Extremely Fast Agility Trainer *BETA*
    By yvw master in forum RS3 Outdated / Broken Scripts
    Replies: 75
    Last Post: 09-13-2008, 07:15 PM
  2. Extremely Fast Agility Trainer *BETA*
    By yvw master in forum First Scripts
    Replies: 23
    Last Post: 01-13-2008, 09:10 PM
  3. Extremely Annoying error
    By cathering_ in forum OSR Help
    Replies: 1
    Last Post: 08-21-2007, 01:27 AM

Posting Permissions

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