Results 1 to 3 of 3

Thread: Non starting procedure

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

    Default Non starting procedure

    Making a rune buyer + jason2gs, but I seem to be having a problem with my start button?

    It must be a problem with my if statement because when I comment out the if bit and just start the procedure, it actaully starts it.

    Some-one tell me what im doing wrong?

    SCAR Code:
    procedure BuyFireRunes;
        begin
        repeat
          Wait(500 + Random(500));
          MouseBox(85, 80, 100, 90, 2);
          Wait(500 + Random(100));
          ChooseOption(x, y, '10');
          Wait(500 + Random(500));
          MouseBox(85, 80, 100, 90, 1);
          Wait(500 + Random(100));
          RunesBought := RunesBought +10;
         until(RunesBought = RunesToBuy) or (RunesBought > RunesToBuy) or
          (InChat('out of stock.')) or
         (InChat('have enough coins.'));
        end;

    procedure StartScript(sender: TObject);
    begin
    //To test if click works
    Writeln('StartingScript');
     if(RuneType = 'Fire')then
     begin
     BuyFireRunes;
     end;
     end;

    This is a pretty big project so far and I'd really appreciate the help.

  2. #2
    Join Date
    Jan 2007
    Posts
    526
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I would do it like this:

    Put your ShowModal procedures to mainloop, and then make button to close your form. Because when you use ShowModal, SCAR will wait for form to close and pause everything else.
    It's kinda hard to explain but I hope you get it

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

    Default

    Ye I get it, ty I'll try it.

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

Posting Permissions

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