Results 1 to 6 of 6

Thread: 2 main loops?? wtf?

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

    Default 2 main loops?? wtf?

    I was looking at this persons script and i saw 2 main loops and i was like.. oh its not going to compile but i try to compile it and it worked? I thought you can only have one main loop?

    SCAR Code:
    {///////////////////////////////////////////////////////////////////////////////
    / My first scrip Logik's Auto Talker V 0.2 (Most credit goes to JAD)                                      /
    / Any questions, comments, tips, ideas, please post.                            /
    / Type your message where is says 'Delete this and type your message here!!!'   /
    / To use the chat effects type them in the same area where you type your message/
    / but type one of the chat effects before/infront of your message.              /
    / Here are some chat effects:                                                   /
    /      Color Chat Effects:                                                      /
    /            glow1: then type ur message     SETUP LINE 30-31 AND CHANGE        /
    /            glow2: then type ur message     LINE 36-38 FOR SPEED               /
    /            flash1: then type ur message    READ PARAGRAPH FOR MORE INFO       /
    /            flash2: then type ur message    YOU CAN HAVE 2 MESSAGES            /
    /            flash3: then type ur message    IF YOU ONLY WANT ONE MESSAGE       /
    /            red: then type ur message       TYPE THE SAME MESSAGE IN BOTH      /
    /            green: then type ur message     AREAS (LINES 30-31) WHERE IT SAYS  /
    /            cyan: then type ur message      'DELETE THIS AND TYPE YOU MESSAGE  /
    /            white: then type ur message     HERE!!!'                           /
    /      Moving Chat Effects:                                                     /
    /            shake: then type ur message     ALSO MUST HAVE PUBLIC CHAT ON HIDE                                   /
    /            wave: then type ur message      OR OFF!!!!!!!                                   /
    /            scroll: then type ur message                                       /
    /            slide: then type ur message                                        /
    /And you can combine chat effects, but you have to first                        /
    /type a moving chat effect then type a color effect.                            /
    /For example: wave:glow1: "message here"                                        /
    ///////////////////////////////////////////////////////////////////////////////}


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

    {-----Setup-----} {REMEMBER TURN PUBLIC CHAT ON HIDE OR OFF}
    const
    Message1='';
    Message2='';
    waittime=1000; //set wait time here.
    DoTrades=true; // thanks to JAD :P
    {-----End of Setup-----}

    procedure talk;
    begin
      Writeln('{~~~~~~~~~~~~~~~~~~~~LOGIKS AUTO TALKER VERSION 0.2~~~~~~~~~~~~~~~~~~~~');
      Writeln('++++++++++++++++++++GIVE CREDIT TO JAD FOR HELPING!++++++++++++++++++++');
      wait((waittime)+random(200)); //Amt of time before next message typed in milliseconds
      TypeSend(Message1);
      wait((waittime)+random(200));
      TypeSend(Message2);
    end;

    begin
     repeat
      talk;
     until(false)
    end.

    {PROCEDURE TRADE ALL THANKS TO JAD}

    procedure Trade;
    begin
    if(DoTrades=false)then
    Exit;
    if(FindColorSpiralTolerance(variable,color,coords,coords,coords,coords))then
    begin
    Mouse(variable,0,0,true);
    TerminateScript;
    end;
    begin
    Trade;
    end.





  2. #2
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    its only got 1 main loop -_-
    ~Hermen

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

    Default

    SCAR Code:
    begin
     repeat
      talk;
     until(false)
    end.


    procedure Trade;
    begin
    if(DoTrades=false)then
    Exit;
    if(FindColorSpiralTolerance(variable,color,coords,coords,coords,coords))then
    begin
    Mouse(variable,0,0,true);
    TerminateScript;
    end;
    begin
    Trade;
    end.





  4. #4
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    then it wont do 1 of the 2 procedures or it just works
    ~Hermen

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

    Default

    ooh wait i think i see

    SCAR Code:
    DoTrades=true;

    SCAR Code:
    if(DoTrades=false)then
    Exit;

    i still didnt know you could have 2 main loops though even if you dont use one :O





  6. #6
    Join Date
    May 2007
    Location
    Ohio
    Posts
    2,296
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    {///////////////////////////////////////////////////////////////////////////////
    / My first scrip Logik's Auto Talker V 0.2 (Most credit goes to JAD)                                      /
    / Any questions, comments, tips, ideas, please post.                            /
    / Type your message where is says 'Delete this and type your message here!!!'   /
    / To use the chat effects type them in the same area where you type your message/
    / but type one of the chat effects before/infront of your message.              /
    / Here are some chat effects:                                                   /
    /      Color Chat Effects:                                                      /
    /            glow1: then type ur message     SETUP LINE 30-31 AND CHANGE        /
    /            glow2: then type ur message     LINE 36-38 FOR SPEED               /
    /            flash1: then type ur message    READ PARAGRAPH FOR MORE INFO       /
    /            flash2: then type ur message    YOU CAN HAVE 2 MESSAGES            /
    /            flash3: then type ur message    IF YOU ONLY WANT ONE MESSAGE       /
    /            red: then type ur message       TYPE THE SAME MESSAGE IN BOTH      /
    /            green: then type ur message     AREAS (LINES 30-31) WHERE IT SAYS  /
    /            cyan: then type ur message      'DELETE THIS AND TYPE YOU MESSAGE  /
    /            white: then type ur message     HERE!!!'                           /
    /      Moving Chat Effects:                                                     /
    /            shake: then type ur message     ALSO MUST HAVE PUBLIC CHAT ON HIDE                                   /
    /            wave: then type ur message      OR OFF!!!!!!!                                   /
    /            scroll: then type ur message                                       /
    /            slide: then type ur message                                        /
    /And you can combine chat effects, but you have to first                        /
    /type a moving chat effect then type a color effect.                            /
    /For example: wave:glow1: "message here"                                        /
    ///////////////////////////////////////////////////////////////////////////////}


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

    {-----Setup-----} {REMEMBER TURN PUBLIC CHAT ON HIDE OR OFF}
    const
    Message1='';
    Message2='';
    waittime=1000; //set wait time here.
    DoTrades=true; // thanks to JAD :P
    {-----End of Setup-----}

    procedure talk;
    begin
      Writeln('{~~~~~~~~~~~~~~~~~~~~LOGIKS AUTO TALKER VERSION 0.2~~~~~~~~~~~~~~~~~~~~');
      Writeln('++++++++++++++++++++GIVE CREDIT TO JAD FOR HELPING!++++++++++++++++++++');
      wait((waittime)+random(200)); //Amt of time before next message typed in milliseconds
      TypeSend(Message1);
      wait((waittime)+random(200));
      TypeSend(Message2);
    end;

    begin
     repeat
      talk;
     until(false)
    end.

    see this wont try compile any thing after the first
    "end." because after is not counted as part of the script it wont try to
    compile it beacuse its after the end. and the end. means like
    " done with script "or " last line of script "... =รพ

    Highlight all the scar code...

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Loops.
    By skilld u in forum Outdated Tutorials
    Replies: 7
    Last Post: 07-03-2008, 08:40 PM
  2. All about loops.
    By Negaal in forum Outdated Tutorials
    Replies: 5
    Last Post: 03-31-2008, 09:43 PM
  3. Loops
    By Pancakes in forum Outdated Tutorials
    Replies: 27
    Last Post: 11-05-2007, 10:34 PM
  4. Loops: What they are and how to use them
    By ZephyrsFury in forum OSR Outdated Tutorials
    Replies: 3
    Last Post: 07-24-2007, 07:25 AM
  5. for loops
    By del_signo in forum OSR Help
    Replies: 4
    Last Post: 03-23-2007, 04:16 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
  •