Results 1 to 5 of 5

Thread: make a procedure and run it

  1. #1
    Join Date
    Feb 2007
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default make a procedure and run it

    Hi im new to Scar see my post count, i hope this doesnt matter
    Im a bit fimilair with PHP so i was trying to make a procedure.

    Very simple i want it to press <ctrl> and then wait for 0,2 seconds so i made this so far.

    Code:
    program maplestorybot;
    begin
    
    // autoattack function
    procedure autoattack;
      begin
      wait(200);
      end;
    
    autoattack;
    end.
    but i get the error:

    Code:
    Line 5: [Error] (5:1): Identifier expected in script
    what is wrong?

  2. #2
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Format should be

    SCAR Code:
    program new;

    function functionname(functionparamaters);
    begin
      stuff;
    end;

    begin
      functionname;
    end.
    pressing ctrl

  3. #3
    Join Date
    Feb 2007
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks man its totaly working!
    Last question how can i make a infinitif loop? like this

    Code:
    while 0=0
      begin
      autoattack;
      autopickup;
      end;
    sorry too bad search does not work. It doesnt give me any results

  4. #4
    Join Date
    Jun 2006
    Posts
    66
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Just do this
    begin
    repeat
    autoattack;
    autopickup;
    until(false);
    end;

  5. #5
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    And until (isfkeydown(12)); will make it stop when you press F12

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Procedure TypeSendRandom & Procedure AutoResponder!
    By Ultra in forum Research & Development Lounge
    Replies: 12
    Last Post: 01-08-2008, 07:04 PM
  2. Replies: 8
    Last Post: 05-24-2007, 11:57 PM
  3. Procedure that calls random procedure?
    By Secet in forum OSR Help
    Replies: 2
    Last Post: 03-03-2007, 03:56 PM
  4. how do i make a procedure true
    By the scar noob in forum OSR Help
    Replies: 17
    Last Post: 01-17-2007, 07:45 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
  •