Results 1 to 6 of 6

Thread: Logic seems off

  1. #1
    Join Date
    Jun 2007
    Posts
    532
    Mentioned
    1 Post(s)
    Quoted
    68 Post(s)

    Default Logic seems off

    This doesn't seem to be right to me....trying to find the best logical way to do this. I know I post asking a lot of questions, sorry.



    Simba Code:
    Function ClickFishing : Boolean;
    Var Tries: Integer;
    Begin
      If(Not(LoggedIn))Then Exit;
      Repeat
      Inc(Tries)
      If(Not(FindNormalRandoms)) Then
      Begin
        If FishingSpot(x, y) Then
          HumanMMouse(x, y, 2, 2);
          ClickMouse2(False);
          WaitOption('rpoon', 500);
          If DidRedClick or DidYellowClick Then
          Begin
            Writeln('Yay! We are fishing!');
            Exit;
          End;
      Until(IsFishing or (Tries = 5))
        If (Tries = 5) Then
        Begin
          FailSafe('Tired five times, logging out');
          Logout;
        End;
          Wait(500+Random(250));
      While IsFishing Do
        AntiBan;
        FindNormalRandoms;
        Writeln('Should be fishing now');
        Wait(750+Random(200));
    End;
    Finished B.S. Program in Radiology!!

    Projects: A big one! Total secret! hehe

  2. #2
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    Simba Code:
    Function ClickFishing : Boolean;
    Var Tries: Integer;
    Begin
      If(Not(LoggedIn))Then
        Exit;

      Repeat
        Inc(Tries);

        If(Not(FindNormalRandoms)) Then
        Begin     //begin with no end
          If FishingSpot(x, y) Then //only the next line is if dependent
            HumanMMouse(x, y, 2, 2);

          ClickMouse2(False);
          WaitOption('rpoon', 500);

        If DidRedClick or DidYellowClick Then
        Begin
          Writeln('Yay! We are fishing!');
          Exit;
        End;

      Until(IsFishing or (Tries = 5))

      If (Tries = 5) Then
      Begin
        FailSafe('Tired five times, logging out');
        Logout;
      End;

      Wait(500+Random(250));

      While IsFishing Do
        AntiBan;

      FindNormalRandoms;
      Writeln('Should be fishing now');
      Wait(750+Random(200));
    End;

    It contains some logical errors. Can you spot your mistakes with begin and end?
    Working on: Tithe Farmer

  3. #3
    Join Date
    Jun 2007
    Posts
    532
    Mentioned
    1 Post(s)
    Quoted
    68 Post(s)

    Default

    Yeah I just noticed the being and end error. I just threw this together and it seemed off to me.



    Edit**** Not fixed*Facepalm* Trying pixelshift/animating srl include
    Last edited by Element17; 05-10-2012 at 07:46 PM.
    Finished B.S. Program in Radiology!!

    Projects: A big one! Total secret! hehe

  4. #4
    Join Date
    Dec 2011
    Posts
    353
    Mentioned
    3 Post(s)
    Quoted
    8 Post(s)

    Default

    Simba Code:
    procedure ClickFishing;
    Var
      Tries: Integer;
    Begin
      If(Not(LoggedIn))Then Exit;
      If(FindNormalRandoms) Then exit;

      Repeat
      Inc(Tries)
      If(Not(IsFishing)) Then
      Begin
        If FishingSpot(x, y) Then
        begin
          HumanMMouse(x, y, 2, 2);
          ClickMouse2(False);
          WaitOption('rpoon', 500);
          If DidRedClick Then
          Begin
            Wait(500+Random(250));
            Writeln('Yay! We are fishing!');
            Exit;
          End;
        end;
      end;
      Until(IsFishing or (Tries = 5));

      Wait(500+Random(250));
      While IsFishing Do
        AntiBan;
        FindNormalRandoms;
        Writeln('Should be fishing now');
        Wait(750+Random(200));
    End;

    Fixed a bit why do you use a function if you don't return anything
    Last edited by NexPB; 05-10-2012 at 07:38 PM.

  5. #5
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    Quote Originally Posted by 14578 View Post
    Yeah I just noticed the being and end error. I just threw this together and it seemed off to me.
    There are quite some small mistakes. Just try to fix as much as them as you can find and post the code again.
    Working on: Tithe Farmer

  6. #6
    Join Date
    Jun 2007
    Posts
    532
    Mentioned
    1 Post(s)
    Quoted
    68 Post(s)

    Default

    Quote Originally Posted by NexPB View Post
    Simba Code:
    procedure ClickFishing;
    Var
      Tries: Integer;
    Begin
      If(Not(LoggedIn))Then Exit;
      If(FindNormalRandoms) Then exit;

      Repeat
      Inc(Tries)
      If(Not(IsFishing)) Then
      Begin
        If FishingSpot(x, y) Then
        begin
          HumanMMouse(x, y, 2, 2);
          ClickMouse2(False);
          WaitOption('rpoon', 500);
          If DidRedClick Then
          Begin
            Wait(500+Random(250));
            Writeln('Yay! We are fishing!');
            Exit;
          End;
        end;
      end;
      Until(IsFishing or (Tries = 5));

      Wait(500+Random(250));
      While IsFishing Do
        AntiBan;
        FindNormalRandoms;
        Writeln('Should be fishing now');
        Wait(750+Random(200));
    End;

    Fixed a bit why do you use a function if you don't return anything

    Thank you for your help and to MasterBB Thank you for your help as well.
    Finished B.S. Program in Radiology!!

    Projects: A big one! Total secret! hehe

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
  •