Results 1 to 9 of 9

Thread: script loops

  1. #1
    Join Date
    Jan 2007
    Posts
    20
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default script loops

    hello this is my first script for mafiaway a text based game:P

    when i use start button he starts but i need he starts automatic more times
    somone cna make if for my??
    sorry for my lanauge

    my script
    Code:
    program mafia;
    
    begin
    Writeln('mafiawayscript.');
    
      MoveMouse(1100,413);
      ClickMouse(1100,413,true);
      Wait(10000);
      MoveMouse(920,364);
      ClickMouse(920,364,true);
      Wait(10000);
      MoveMouse(1108,432);
      ClickMouse(1108,432,true);
      Wait(10000);
      MoveMouse(925,364);
      ClickMouse(925,364,true);
      Wait(10000);
      MoveMouse(1102,485);
      ClickMouse(1102,485,true);
      Wait(10000);
    end.

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

    Default

    so you want scar to run the script on its own?... well i dont think you can do that. you have to click the button or press ctrl+atl+r

  3. #3
    Join Date
    Feb 2007
    Location
    USA
    Posts
    667
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You can leave it running and just set up a timer using MarkTime and TimeFromMark, and if it has been a certain amount of time, you have the script run it's thing and then stop to wait for the next timer to go off.

  4. #4
    Join Date
    Jan 2007
    Posts
    20
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default no

    no i will that scar automatic restart my script when he is done

  5. #5
    Join Date
    Feb 2007
    Location
    USA
    Posts
    667
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by sowbener View Post
    no i will that scar automatic restart my script when he is done
    what?

  6. #6
    Join Date
    Jan 2007
    Posts
    20
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default start

    Quote Originally Posted by omgh4x0rz View Post
    what?
    when i use start in scar he start when he stopt i will that he auto start again

  7. #7
    Join Date
    Dec 2006
    Location
    .̿̂̔͋͗̎̆ͥ̍̒ͤ͂̾̌̀̅
    Posts
    3,012
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    You mean like this?

    SCAR Code:
    program mafia;

    const
      TimesTo = 100;//Times to repeat?

    var
      Counter: Integer;

    begin
      Writeln('mafiawayscript.');
      Counter := 0;
      repeat
        Counter := Counter + 1;
        MoveMouse(1100,413);
        ClickMouse(1100,413,true);
        Wait(10000);
        MoveMouse(920,364);
        ClickMouse(920,364,true);
        Wait(10000);
        MoveMouse(1108,432);
        ClickMouse(1108,432,true);
        Wait(10000);
        MoveMouse(925,364);
        ClickMouse(925,364,true);
        Wait(10000);
        MoveMouse(1102,485);
        ClickMouse(1102,485,true);
        Wait(10000);
      until(Counter = TimesTo)
    end.

    Just set the times to repeat and start it

  8. #8
    Join Date
    Jan 2007
    Posts
    20
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default yes!!

    Quote Originally Posted by GoF View Post
    You mean like this?

    SCAR Code:
    program mafia;

    const
      TimesTo = 100;//Times to repeat?

    var
      Counter: Integer;

    begin
      Writeln('mafiawayscript.');
      Counter := 0;
      repeat
        Counter := Counter + 1;
        MoveMouse(1100,413);
        ClickMouse(1100,413,true);
        Wait(10000);
        MoveMouse(920,364);
        ClickMouse(920,364,true);
        Wait(10000);
        MoveMouse(1108,432);
        ClickMouse(1108,432,true);
        Wait(10000);
        MoveMouse(925,364);
        ClickMouse(925,364,true);
        Wait(10000);
        MoveMouse(1102,485);
        ClickMouse(1102,485,true);
        Wait(10000);
      until(Counter = TimesTo)
    end.

    Just set the times to repeat and start it
    yes!! thank you very much!!

  9. #9
    Join Date
    Dec 2006
    Location
    utah
    Posts
    1,427
    Mentioned
    2 Post(s)
    Quoted
    7 Post(s)

    Default

    just so you now theres more ways for this...

    SCAR Code:
    program mafia;

    const
      TimesTo = 1;//Times to repeat?

      Var i : Integer;
    begin
     For i:= 1 to TimesTo do
     begin
        MoveMouse(1100,413);
        ClickMouse(1100,413,true);
        Wait(10000);
        MoveMouse(920,364);
        ClickMouse(920,364,true);
        Wait(10000);
        MoveMouse(1108,432);
        ClickMouse(1108,432,true);
        Wait(10000);
        MoveMouse(925,364);
        ClickMouse(925,364,true);
        Wait(10000);
        MoveMouse(1102,485);
        ClickMouse(1102,485,true);
        Wait(10000);
     end;
    end.

    SCAR Code:
    program mafia;

    const
      TimesTo = 1;//Times to repeat?

      Var i : Integer;
    begin
     While i < TimesTo do
     begin
     i:= i + 1;
        MoveMouse(1100,413);
        ClickMouse(1100,413,true);
        Wait(10000);
        MoveMouse(920,364);
        ClickMouse(920,364,true);
        Wait(10000);
        MoveMouse(1108,432);
        ClickMouse(1108,432,true);
        Wait(10000);
        MoveMouse(925,364);
        ClickMouse(925,364,true);
        Wait(10000);
        MoveMouse(1102,485);
        ClickMouse(1102,485,true);
        Wait(10000);
     end;
    end.

    SCAR Code:
    program mafia;

    const
      TimesTo = 1;//Times to repeat?

      Var
          i : Integer;
         
         Label GoBack;
         
    begin
     GoBack:
        i:= i + 1;
        MoveMouse(1100,413);
        ClickMouse(1100,413,true);
        Wait(10000);
        MoveMouse(920,364);
        ClickMouse(920,364,true);
        Wait(10000);
        MoveMouse(1108,432);
        ClickMouse(1108,432,true);
        Wait(10000);
        MoveMouse(925,364);
        ClickMouse(925,364,true);
        Wait(10000);
        MoveMouse(1102,485);
        ClickMouse(1102,485,true);
        Wait(10000);
     if ( i < TimesTo) then goto GoBack;
    end.

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. for loops
    By tylanbo in forum OSR Help
    Replies: 9
    Last Post: 12-16-2007, 10:49 AM
  4. Loops
    By Pancakes in forum Outdated Tutorials
    Replies: 27
    Last Post: 11-05-2007, 10:34 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
  •