Results 1 to 5 of 5

Thread: Fishing Guild script, need to distinguish between different fishing spots [07].

  1. #1
    Join Date
    Feb 2013
    Posts
    18
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default Fishing Guild script, need to distinguish between different fishing spots [07].

    Hey, I'm making a small Fishing Guild script for '07. I've managed to find a fishing spot, right click and select Harpoon. The problem is I want it to only select Lobster/Sword/Tuna fishing spots and it selects Shark fishing spots as well.

    Code:
    program GuildFisher;
      {$i SRL/SRL.simba}
      {$i P07Include.simba}
    
    procedure P07_DeclarePlayer;
    begin
    
      P07_PlayerName := '';
      P07_PlayerPass := '';
      P07_PName := ''
      P07_PPass := '';
    
    end;
    
    function FishSpot: boolean;
    
    var
      x, y: integer;
    
    begin
    
      if P07_FindObjCustom(x, y, ['Cage'], [15717294, 14198143], 5) then
          Wait(100 + random(100));
          ClickMouse2(mouse_right);
          Wait(50 + random(126));
          P07_ChooseOptionMulti(['Harpoon']);
    
    end;
    
    begin
    
      SetupSRL;
      SetupP07Include;
      P07_DeclarePlayer;
    
      FishSpot;
    
    end.
    I have the UpText set for 'Cage' but it still selects the 'Net' spots, there isn't a colour differentiation between them either (I don't think)

    How would I solve this? Cheers.

    I'm also completely new to Pascal as well, only know C#.

  2. #2
    Join Date
    Feb 2013
    Posts
    104
    Mentioned
    1 Post(s)
    Quoted
    32 Post(s)

    Default

    this is what i use
    If P07_FindObjCustom(x, y, ['ree', 'tre'], [TreeColor, TreeColors], 1) Then
    begin
    Mouse(x, y, Random(2), Random(2), false);
    P07_ChooseOptionMulti(['hop']);
    end;
    it hovers over oaks sometimes but never clicks them

  3. #3
    Join Date
    Nov 2012
    Posts
    2,351
    Mentioned
    55 Post(s)
    Quoted
    603 Post(s)

    Default

    You need begin and end's after if statement's like you need { } in c#, you are only calling the line after finding the object because you only have then, meaning all it does is wait when it finds the fishing spot


    Quote Originally Posted by blockay View Post
    this is what i use
    If P07_FindObjCustom(x, y, ['ree', 'tre'], [TreeColor, TreeColors], 1) Then
    begin
    Mouse(x, y, Random(2), Random(2), false);
    P07_ChooseOptionMulti(['hop']);
    end;
    it hovers over oaks sometimes but never clicks them
    Alot of people having this issue, I'm looking into it, and SRL dev's are working on a real UpText function

    Edit - Try this for me, it's working fine for me

    Simba Code:
    If P07_FindObjCustom(x, y, ['Tree', 'Oak'], [TreeColor, TreeColors], 5) Then
    Begin
      ClickMouse2(mouse_right);
      P07_ChooseOptionMulti([Chop]);
    End;
    Last edited by DannyRS; 02-26-2013 at 07:03 AM.


    Programming is like trying keep a wall of shifting sand up, you fix one thing but somewhere else starts crumbling

  4. #4
    Join Date
    Feb 2013
    Posts
    18
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Quote Originally Posted by DannyRS View Post
    You need begin and end's after if statement's like you need { } in c#, you are only calling the line after finding the object because you only have then, meaning all it does is wait when it finds the fishing spot





    Alot of people having this issue, I'm looking into it, and SRL dev's are working on a real UpText function

    Edit - Try this for me, it's working fine for me

    Simba Code:
    If P07_FindObjCustom(x, y, ['Tree', 'Oak'], [TreeColor, TreeColors], 5) Then
    Begin
      ClickMouse2(mouse_right);
      P07_ChooseOptionMulti([Chop]);
    End;

    Ahh, thanks, my bad. Still getting used to Pascal. I'll try this when I get back home.

  5. #5
    Join Date
    Feb 2013
    Posts
    18
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Thanks for the help, sorted out the script. It now successfully clicks 'Harpoon' on the correct spots. Just need to figure out walking now, got banking at almost 90% I think, can open and deposit. Not sure if there's any walking methods for '07 yet though.

    Cheers!

    EDIT: Double posted, my bad.

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
  •