Results 1 to 9 of 9

Thread: need help with fishing procedure

  1. #1
    Join Date
    Mar 2013
    Posts
    53
    Mentioned
    0 Post(s)
    Quoted
    22 Post(s)

    Question need help with fishing procedure

    Hi guys. I got this fishing procedure for my barbarian fishing script.

    Code:
    procedure Fish;
    var
    x, y, i: integer;
    begin
          if (FindObjCustom(x, y, ['ure', 'ishin', 'ot'], [14597535, 15123609, 14794914, 14858129, 13216647, 14597268, 15123625, 14398100, 14729121], 3) ) then
          begin
            wait(1000 + random(500));
            mouse(x,y,1,1,1)
            wait(10000 + random(100));
          end else
    end;
    now I got it to wait 10000 ms after clicking a fish spot but the timer keeps going after the spot is gone. I need it to directly search for a new fishing spot when the old one is gone. How can I do this? (Kinda noob but just started scripting).

  2. #2
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    Quote Originally Posted by Bicep View Post
    Hi guys. I got this fishing procedure for my barbarian fishing script.

    Code:
    procedure Fish;
    var
    x, y, i: integer;
    begin
          if (FindObjCustom(x, y, ['ure', 'ishin', 'ot'], [14597535, 15123609, 14794914, 14858129, 13216647, 14597268, 15123625, 14398100, 14729121], 3) ) then
          begin
            wait(1000 + random(500));
            mouse(x,y,1,1,1)
            wait(10000 + random(100));
          end else
    end;
    now I got it to wait 10000 ms after clicking a fish spot but the timer keeps going after the spot is gone. I need it to directly search for a new fishing spot when the old one is gone. How can I do this? (Kinda noob but just started scripting).
    In your mainloop you can do something like
    Simba Code:
    repeat
      Fish;
    until(InvFull);
    This will do the Fish procedure until the inventory is full. Does that help?

  3. #3
    Join Date
    Mar 2013
    Posts
    53
    Mentioned
    0 Post(s)
    Quoted
    22 Post(s)

    Default

    Quote Originally Posted by BMWxi View Post
    In your mainloop you can do something like
    Simba Code:
    repeat
      Fish;
    until(InvFull);

    This will do the Fish procedure until the inventory is full. Does that help?
    Hi mate, thanks for your response.

    I have tried editing this into my main loop.

    Code:
    begin
    SetupSRL;
      activateclient;
      DeclarePlayer;
      LoginPlayer;
      wait(325);
      repeat
        begin
        Antiban;
        Fish;
      until(InvFull);
        Drop;
        until(false);
        end;
    end.
    got this error trying to compile:

    Code:
    [Error] (78:3): Identifier expected at line 77
    Compiling failed.
    Also tried:

    Code:
    until (ItemExists(28));
    No luck
    Last edited by Bicep; 04-02-2013 at 04:12 PM.

  4. #4
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    Quote Originally Posted by Bicep View Post
    Hi mate, thanks for your response.

    I have tried editing this into my main loop.

    Code:
    begin
    SetupSRL;
      activateclient;
      DeclarePlayer;
      LoginPlayer;
      wait(325);
      repeat
        begin
          Antiban;
          Fish;
      until(InvFull);
        Drop;
        until(false);
      end;
    end.
    got this error trying to compile:

    Code:
    [Error] (78:3): Identifier expected at line 77
    Compiling failed.
    That's because your begins, ends, repeats, and untils are all mixed up. I recommend indenting after each begin and repeat and un-indenting after every end and until because it makes it easier to read the code and see these errors.

    Here is what it should be like:

    Simba Code:
    begin
      SetupSRL;
      activateclient;
      DeclarePlayer;
      LoginPlayer;
      wait(325);
      repeat
        Antiban;
        repeat
          Fish;
        until(InvFull);
        Drop;
      until(false);
    end.

  5. #5
    Join Date
    Mar 2013
    Posts
    53
    Mentioned
    0 Post(s)
    Quoted
    22 Post(s)

    Default

    Quote Originally Posted by BMWxi View Post
    That's because your begins, ends, repeats, and untils are all mixed up. I recommend indenting after each begin and repeat and un-indenting after every end and until because it makes it easier to read the code and see these errors.

    Here is what it should be like:

    Simba Code:
    begin
      SetupSRL;
      activateclient;
      DeclarePlayer;
      LoginPlayer;
      wait(325);
      repeat
        Antiban;
        repeat
          Fish;
        until(InvFull);
        Drop;
      until(false);
    end.
    Cheers mate I got it compiling Still learning hehe....

  6. #6
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    Quote Originally Posted by Bicep View Post
    Cheers mate I got it compiling Still learning hehe....
    Just post here if you have any other questions

  7. #7
    Join Date
    Mar 2013
    Posts
    53
    Mentioned
    0 Post(s)
    Quoted
    22 Post(s)

    Default

    Quote Originally Posted by BMWxi View Post
    Just post here if you have any other questions
    Will do, running into ENOUGH problems :P.. Now it's mass clicking the fishing spot. Adjusted the timer but can I get it to recognize when it's fishing and when not? So it will start looking for a new fishing spot when it's not fishing and that it won't mass click the fishing spot.

  8. #8
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    Quote Originally Posted by Bicep View Post
    Will do, running into ENOUGH problems :P.. Now it's mass clicking the fishing spot. Adjusted the timer but can I get it to recognize when it's fishing and when not? So it will start looking for a new fishing spot when it's not fishing and that it won't mass click the fishing spot.
    I use PixelShift to detect when it's fishing, see Flight's tutorial to learn how

  9. #9
    Join Date
    Mar 2013
    Posts
    53
    Mentioned
    0 Post(s)
    Quoted
    22 Post(s)

    Default

    Quote Originally Posted by BMWxi View Post
    I use PixelShift to detect when it's fishing, see Flight's tutorial to learn how
    ah thats the method i was looking for. didnt know such thing did exist thanks will have a look!

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
  •