Results 1 to 9 of 9

Thread: Script Base

  1. #1
    Join Date
    Mar 2007
    Posts
    195
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Script Base

    How do i make the base of a script?With all the main loop initiation done(like activate client and things like that),because usually i fuck up with making a main loop to start correctly, separating main loop and procedures,and making main loop repeat procedures until something.

    I would like to have someone to teach me the bases of a looping script,i haven't see that in any tutorial.

    I don't got any trouble scripting any of basic script,but that...
    Dormcheck is a scam,i've posted 1000 messages and i never got paid my 10 bucks.
    http://www.fenjer.com/adnan/SRLStats/348.png

  2. #2
    Join Date
    Mar 2007
    Posts
    80
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    wat like?:
    begin
    repeat
    Procedure;
    until(whatever);
    http://www.fenjer.com/adnan/SRL/16/20/Merchampion.png
    Merchampion is going to be the ultimate autoing script! It will buy items for your set amount of price; trade people without you having to be there, and once your money is all out; guess what! It's going to sell the item for a different set amount of price! It's merchanting without you having to be there

  3. #3
    Join Date
    Nov 2006
    Location
    California, USA
    Posts
    336
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    program HelloWorld;

    const
      Message = 'Hello World!';
      Times = 43;

    var
      Said: Integer;

    begin
      ActivateClient;
      Wait(100);
      repeat
        SendKeys(Message);
        Wait(Random(1000));
        Said:= Said + 1;
      until(Said = Times)
    end.

    Like that?

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

    Default

    Going of TOB's base above:

    SCAR Code:
    program ScriptBase;
    {.include SRL\SRL.scar}
    const
      constant1=0;

    var
      variable1:integer;
     
    procedure DoSomething;
    begin
    //commands here
    end;

    begin
      SetupSRL;
      ActivateClient;
      Wait(100);
      repeat
        DoSomething;
        wait(75+random(75));
      until(not(loggedin))
    end.
    Interested in C# and Electrical Engineering? This might interest you.

  5. #5
    Join Date
    Mar 2007
    Posts
    195
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    That's quite what i want above my post,but i got trouble adding more then one procedure and making it loop too until something
    Dormcheck is a scam,i've posted 1000 messages and i never got paid my 10 bucks.
    http://www.fenjer.com/adnan/SRLStats/348.png

  6. #6
    Join Date
    Jul 2006
    Posts
    152
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

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

    const
    startvalue = 0;
    Numberk = 10; //should end up as half

    var
    Number:integer;

    procedure SetUp; //useless, but displays procedures before loops.
    begin
    writeln('Setting Up Script');
    wait(1000);
    writeln('Please wait.');
    wait(1000);
    writeln('Script has been set up o.O');
    end;

    procedure DeclareNumber; //just sets up the Number
    begin
    Number:=StartValue
    end;

    procedure Addition(times:integer); //Main loop
    var i:integer;
    begin
    i:=0
    repeat
    Number:=Number+random(1)
    i:=i+1
    until(i = times)
    writeln(inttostr(Number)+' is the number.');
    end;

    function UntilThis:boolean; //the until function
    var z:integer;
    begin
    z:=random(10)
    if ( z > 5 ) then
    result:=true;
    end;

    begin  //begins main script
    SetUp;  //does procedure SetUp
    Repeat   //repeat the below
    DeclareNumber;   //repeats this
    Addition(NumberK); //and this
    until(UntilThis) //until function UntilThis results true
    end.
    //end main script

    Ends up always being zero... whatever hope it helps.

    OffTopic: How do you have 90 posts with 1 bar of Longevity, and I have 82 posts with like 12?

  7. #7
    Join Date
    Mar 2007
    Posts
    195
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by seaking View Post
    SCAR Code:
    program LoopBase;
    {.include SRL/SRL.scar}

    const
    startvalue = 0;
    Numberk = 10; //should end up as half

    var
    Number:integer;

    procedure SetUp; //useless, but displays procedures before loops.
    begin
    writeln('Setting Up Script');
    wait(1000);
    writeln('Please wait.');
    wait(1000);
    writeln('Script has been set up o.O');
    end;

    procedure DeclareNumber; //just sets up the Number
    begin
    Number:=StartValue
    end;

    procedure Addition(times:integer); //Main loop
    var i:integer;
    begin
    i:=0
    repeat
    Number:=Number+random(1)
    i:=i+1
    until(i = times)
    writeln(inttostr(Number)+' is the number.');
    end;

    function UntilThis:boolean; //the until function
    var z:integer;
    begin
    z:=random(10)
    if ( z > 5 ) then
    result:=true;
    end;

    begin  //begins main script
    SetUp;  //does procedure SetUp
    Repeat   //repeat the below
    DeclareNumber;   //repeats this
    Addition(NumberK); //and this
    until(UntilThis) //until function UntilThis results true
    end.
    //end main script

    Ends up always being zero... whatever hope it helps.

    OffTopic: How do you have 90 posts with 1 bar of Longevity, and I have 82 posts with like 12?
    That's cause i was registered on the forum for less time then you
    Dormcheck is a scam,i've posted 1000 messages and i never got paid my 10 bucks.
    http://www.fenjer.com/adnan/SRLStats/348.png

  8. #8
    Join Date
    Feb 2007
    Posts
    215
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yes but i think what he is saying is why do you post so much. Seaking you must not post much because i post like 3-6 times a day.
    A common mistake people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.
    -Douglas Adams

  9. #9
    Join Date
    Mar 2007
    Posts
    195
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by SonOfSheep View Post
    yes but i think what he is saying is why do you post so much. Seaking you must not post much because i post like 3-6 times a day.
    Cause i love talking and helping with people

    and also cause i ask usually for help in the script help lol
    Dormcheck is a scam,i've posted 1000 messages and i never got paid my 10 bucks.
    http://www.fenjer.com/adnan/SRLStats/348.png

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Base Jump Script
    By sik of it in forum OSR Help
    Replies: 5
    Last Post: 11-15-2007, 06:47 PM
  2. The dragon pickaxe is almost here. Proof in knowledge base!
    By Just Kidding in forum RuneScape News and General
    Replies: 9
    Last Post: 08-14-2007, 05:09 AM
  3. How to use MultiPlayer to base your script on
    By Killerdou in forum Outdated Tutorials
    Replies: 3
    Last Post: 08-07-2007, 09:24 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
  •