Results 1 to 4 of 4

Thread: Boolean result true in a procedure

  1. #1
    Join Date
    Nov 2011
    Location
    Australia
    Posts
    418
    Mentioned
    2 Post(s)
    Quoted
    86 Post(s)

    Default Boolean result true in a procedure

    Hi guys I was wondering if in a procedure you can find if a function was true and then the procedure can continue, for example :
    Simba Code:
    Procedure Entrance;
    var
      I: array [0..3] of integer;
    begin
      if isFighting is true then
      repeat
      Report;
         P07_MakeCompassSouth;
        if findcolorspiraltolerance(x,y,3815999,msx1,msy1,msx2,msy2,15) then
        Entry(2);
         MMouse(x, y, 0, 0);
         ClickMouse2(false);
        Entered := Entered + 1;
        wait(500);
        P07_ChooseOptionMulti(['Enter']);
        P07_FFlag;
        wait(500);
        wait(2000 +random(434));
        writeln('Found Entrance!');
        until not (symbol);
        writeln('Entered Entrance!');
        P07_MakeCameraAngleHigh;
         wait(20000 + random(1001));
        StayActive;
        end;

  2. #2
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    Quote Originally Posted by Blakebn2011 View Post
    Hi guys I was wondering if in a procedure you can find if a function was true and then the procedure can continue, for example :
    Simba Code:
    Procedure Entrance;
    var
      I: array [0..3] of integer;
    begin
      if isFighting is true then
      repeat
      Report;
         P07_MakeCompassSouth;
        if findcolorspiraltolerance(x,y,3815999,msx1,msy1,msx2,msy2,15) then
        Entry(2);
         MMouse(x, y, 0, 0);
         ClickMouse2(false);
        Entered := Entered + 1;
        wait(500);
        P07_ChooseOptionMulti(['Enter']);
        P07_FFlag;
        wait(500);
        wait(2000 +random(434));
        writeln('Found Entrance!');
        until not (symbol);
        writeln('Entered Entrance!');
        P07_MakeCameraAngleHigh;
         wait(20000 + random(1001));
        StayActive;
        end;
    Yup. Just do "if IsFighting then."

    EDIT: Oh, sorry, I didn't finish my answer. You can add "if not IsFighting then Exit;" and then continue as usual.
    Last edited by i luffs yeww; 03-14-2013 at 11:46 AM.

  3. #3
    Join Date
    Nov 2011
    Location
    Australia
    Posts
    418
    Mentioned
    2 Post(s)
    Quoted
    86 Post(s)

    Default

    Thanks mate, dam now I feel dumb :P

Thread Information

Users Browsing this Thread

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

Posting Permissions

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