Page 1 of 2 12 LastLast
Results 1 to 25 of 27

Thread: Fly fisher and dropper

  1. #1
    Join Date
    Mar 2013
    Posts
    41
    Mentioned
    0 Post(s)
    Quoted
    24 Post(s)

    Default Fly fisher and dropper

    Having a fly fisher script with normal trouts and salmons or barbarian fly fisher would be very nice to have. The xp/hr rate is quite good and really helps when you're aiming 99 fishing. If someone could try to make one, i'm also willing to help making it with the few basics I've learned from the guide here.

    Thanks in advance!

  2. #2
    Join Date
    Dec 2011
    Posts
    37
    Mentioned
    2 Post(s)
    Quoted
    16 Post(s)

    Default

    i would love a script like this too

  3. #3
    Join Date
    Mar 2013
    Posts
    41
    Mentioned
    0 Post(s)
    Quoted
    24 Post(s)

    Default

    People are saying it's easy to make yet no one is trying to make one. I've tried something myself but I really don't know anything more than the basic lape guide I've read. Could anyone please help out?

  4. #4
    Join Date
    Dec 2013
    Posts
    95
    Mentioned
    2 Post(s)
    Quoted
    37 Post(s)

    Default

    Quote Originally Posted by Roko View Post
    People are saying it's easy to make yet no one is trying to make one. I've tried something myself but I really don't know anything more than the basic lape guide I've read. Could anyone please help out?
    The rough outline works something like as follows.

    Clicking the fish spot:

    Have a list of colors found in the whirlpool/bubbles of the active fish spot but not the calm river.
    Search the main screen for them. (Easiest way is probably MainScreen.FindObject (docs here, but you will need to wrap that in success checking.)
    Click one when found.
    Right click "Fish".

    Detecting we are currently fishing:

    Some combination of the following.
    Count the inventory. (See TabBackpack.Count.)
    Look for character movement with pixel shift. (my tutorial on it)
    Look for exp change. (There's an implementation of ChatBox.GetExp on these forums. Can't find the link right this moment.)
    Look for the color of the extended fly fishing rod.

    Main loop:

    Wait while fishing.
    Click fish.

    Of course, vastly oversimplified, but that's a rough outline of the idea.

    I wouldn't say it's easy. But it's certainly a lot easier than some of the scripts that have been done before. So one could say it is somewhat easy in comparison.
    Last edited by vwxz; 01-10-2014 at 10:13 AM.

  5. #5
    Join Date
    Oct 2011
    Posts
    100
    Mentioned
    1 Post(s)
    Quoted
    25 Post(s)

    Default

    I have just finished writing this now, just adding in a very basic on screen paint now. In regards to object finding vwxz I suggest you read up about CTS2, TPA's and ATPA's. They are a lot more accurate than using the FindObject method (if used correctly).

  6. #6
    Join Date
    Dec 2013
    Posts
    95
    Mentioned
    2 Post(s)
    Quoted
    37 Post(s)

    Default

    Quote Originally Posted by mxtrix View Post
    I have just finished writing this now, just adding in a very basic on screen paint now. In regards to object finding vwxz I suggest you read up about CTS2, TPA's and ATPA's. They are a lot more accurate than using the FindObject method (if used correctly).
    Just curious, are you working on a script for regular or barbarian fly fishing?

    Yea, there are much more reliable main screen object finding methods which rely on clusters of colors, relative positioning, etc. I was just giving a very brief (and arguably oversimplified) outline because the OP asked how to make a fishing script.

  7. #7
    Join Date
    Oct 2011
    Posts
    100
    Mentioned
    1 Post(s)
    Quoted
    25 Post(s)

    Default

    Regular, however once I post this one and finish my dungeoneering farmer I might look into making a barbarian one and adding more features.

  8. #8
    Join Date
    Dec 2013
    Posts
    95
    Mentioned
    2 Post(s)
    Quoted
    37 Post(s)

    Default

    Quote Originally Posted by mxtrix View Post
    Regular, however once I post this one and finish my dungeoneering farmer I might look into making a barbarian one and adding more features.
    I'm in the early stages of making a barbarian one, but it's gonna be a really long time before anything comes of it. I'm not sure which ends up faster, because regular fly fishing you can use the action bar hotkeys.

  9. #9
    Join Date
    Oct 2011
    Posts
    100
    Mentioned
    1 Post(s)
    Quoted
    25 Post(s)

    Default

    Quote Originally Posted by vwxz View Post
    I'm in the early stages of making a barbarian one, but it's gonna be a really long time before anything comes of it. I'm not sure which ends up faster, because regular fly fishing you can use the action bar hotkeys.
    I am not sure, they would be relatively similar. From memory C2 fishing is the fastest xp, weather it is sustainable for long periods of time without starting a new dungeon or not might be worth investigating as it is something like 100k experience/hour. Here is a video guide if that helps- I might look into it myself at a later-date:

    http://www.youtube.com/watch?v=N58YeVgT4YY

    EDIT: In regards to the script I will make a proper paint tomorrow morning.

  10. #10
    Join Date
    Jan 2014
    Location
    Error: Data Unavailable
    Posts
    38
    Mentioned
    0 Post(s)
    Quoted
    12 Post(s)

    Default

    Hey guys check out my script? It fly fishes near Barbarian Village but uses the manual drop method although I do intend on using the keyboard method soon
    Tell me what you think of it please http://villavu.com/forum/showthread....7595&p=1280468

  11. #11
    Join Date
    Jun 2012
    Location
    Howell, Michigan
    Posts
    1,585
    Mentioned
    34 Post(s)
    Quoted
    553 Post(s)

    Default

    Im bored and only have a F2P account to work with. Ill post it in a few hours, probably will use reflection to check location ext.. any other features you want?

  12. #12
    Join Date
    Sep 2012
    Location
    Netherlands
    Posts
    2,752
    Mentioned
    193 Post(s)
    Quoted
    1468 Post(s)

    Default

    Quote Originally Posted by King View Post
    Im bored and only have a F2P account to work with. Ill post it in a few hours, probably will use reflection to check location ext.. any other features you want?
    Reflection with rs3? I thought we only used ogl for rs3

  13. #13
    Join Date
    Jun 2012
    Location
    Howell, Michigan
    Posts
    1,585
    Mentioned
    34 Post(s)
    Quoted
    553 Post(s)

    Default

    I was under the impression that they were developing an reflection include for runescape. I was just going to use it for tile walking..does it only work with OSRS? If that is the case I rather script something of that nature :P
    Quote Originally Posted by hoodz View Post
    Reflection with rs3? I thought we only used ogl for rs3

  14. #14
    Join Date
    Oct 2006
    Posts
    6,752
    Mentioned
    95 Post(s)
    Quoted
    532 Post(s)

    Default

    Quote Originally Posted by King View Post
    I was under the impression that they were developing an reflection include for runescape. I was just going to use it for tile walking..does it only work with OSRS? If that is the case I rather script something of that nature :P
    Yeah, AFAIK there hasn't been anything in the works for rs3 using reflection. Just Osr as Hoodz said.
    “The long-lived and those who will die soonest lose the same thing. The present is all that they can give up, since that is all you have, and what you do not have, you cannot lose.” - Marcus Aurelius

  15. #15
    Join Date
    Jun 2012
    Location
    Howell, Michigan
    Posts
    1,585
    Mentioned
    34 Post(s)
    Quoted
    553 Post(s)

    Default

    Quote Originally Posted by elfyyy View Post
    Yeah, AFAIK there hasn't been anything in the works for rs3 using reflection. Just Osr as Hoodz said.
    Well looks like it is OSRS scripting for me then :P The whole reason I want to start again is I love tile walking.

  16. #16
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

    Default

    Quote Originally Posted by King View Post
    Well looks like it is OSRS scripting for me then :P The whole reason I want to start again is I love tile walking.
    Just use SPS

  17. #17
    Join Date
    Mar 2013
    Posts
    41
    Mentioned
    0 Post(s)
    Quoted
    24 Post(s)

    Default

    Quote Originally Posted by King View Post
    Im bored and only have a F2P account to work with. Ill post it in a few hours, probably will use reflection to check location ext.. any other features you want?
    Switching from the two fishing spots would be pretty nice. Having a powerfishing method that uses the hotkeys would be pretty nice too

  18. #18
    Join Date
    Jun 2012
    Location
    Howell, Michigan
    Posts
    1,585
    Mentioned
    34 Post(s)
    Quoted
    553 Post(s)

    Default

    Quote Originally Posted by Roko View Post
    Switching from the two fishing spots would be pretty nice. Having a powerfishing method that uses the hotkeys would be pretty nice too
    Worked on it a bit last night, so far, so good ;P

  19. #19
    Join Date
    Mar 2013
    Posts
    41
    Mentioned
    0 Post(s)
    Quoted
    24 Post(s)

    Default

    Have you been able to finish it mate? I'm wondering what it looks like

  20. #20
    Join Date
    Mar 2013
    Posts
    41
    Mentioned
    0 Post(s)
    Quoted
    24 Post(s)

    Default

    It would be really nice to have :/

  21. #21
    Join Date
    Feb 2013
    Location
    Belgium
    Posts
    86
    Mentioned
    6 Post(s)
    Quoted
    35 Post(s)

    Default

    Barbarian fisher with action bar dropper would be nice!

  22. #22
    Join Date
    Mar 2013
    Posts
    41
    Mentioned
    0 Post(s)
    Quoted
    24 Post(s)

    Default

    Any fisher would be nice as long as it powerfish and drops the fish it would be pretty cool! I'm having hard time with the shark fishing scripts as it averages 20k xps per hour and it's not much reliable. I don't have much gold on RS3 but I'm willing to pay 5M gold for one!

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

    Default

    Quote Originally Posted by Roko View Post
    Any fisher would be nice as long as it powerfish and drops the fish it would be pretty cool! I'm having hard time with the shark fishing scripts as it averages 20k xps per hour and it's not much reliable. I don't have much gold on RS3 but I'm willing to pay 5M gold for one!
    I had one for RS2 that I could update/write from scratch. I won't be able to start tonight because of homework but I can start tomorrow probably. BTW, don't pay for scripts

  24. #24
    Join Date
    Mar 2013
    Location
    Freedomville.
    Posts
    155
    Mentioned
    2 Post(s)
    Quoted
    107 Post(s)

    Default

    Simba Code:
    program sdfFlyFisher;
    {$DEFINE SMART}
    {$i srl-6/srl.simba}

    const
      {GENERAL SETTINGS}
      DropLower       = 24;                 //Lower bound of inventory count to start dropping fish at
                                            //CHANGE LOWER TO ~24+ IF BARB FISHING
      DropUpper       = 27;                 //Upper bound of inventory count to start dropping fish at
      TroutSlot       = 1;                  //Actionbar slot bound to Trout
      SalmonSlot      = 2;                  //Actionbar slot bound to Salmon
      UrnSlot         = 8;                  //Actionbar slot bound to Decorated fishing urn (FULL)
      RunFor          = 16200;              //How long to run for in seconds. Note 3600s/hr.
      debug           = false;
      debugspots      = false;              //draw boxes around fishing spots?
      silentmode      = false;              //won't beep if new chat text is found.
      UseOpenGL       = false;
      MouseDebug      = True;               //water colours change with modes.
      DisableCountLog = True;
      BarbFishing     = True;
      LTroutSlot      = 1;                  //Leaping trout slot
      LSalmonSlot     = 2;                  //Leaping salmon
      LSturgeonSlot   = 3;                  //Leapin sturgeon

    {*ADDITIONAL NOTES*}
    //Failsafes have not yet been implemented, it is strongly advised that you babysit this script.

    var
      MSCenter: TPoint;
      MSCenterX, MSCenterY, TroutDTM, SalmonDTM, ProgBG, StartXP, CurrentXP,
      XPTotal, XPperHour, Ticks, DropAt, UrnDTM, UrnsTeled, FeatherDTM, chatLength: integer;
      FishSpotCol, FishSpotTol, RodCol,
      RodTol, TroutSlotCol, TroutSlotTol, SalmonSlotCol, SalmonSlotTol, InvFullDTM, FindTries: Integer;
      LTroutCol, LTroutTol, LSalmonCol, LSalmonTol, LSturgeonCol, LSturgeonTol, ControlsWindow: Integer;
      LTroutHue, LTroutSat, LSalmonHue, LSalmonSat, LSturgeonHue, LSturgeonSat: Extended;
      FishSpotHue, FishSpotSat, RodHue, RodSat, TroutSlotHue,
      TroutSlotSat, SalmonSlotHue, SalmonSlotSat: Extended;
      MSBounds, PlayerBox: TBox;
      CurStatus: String;
      Rotated, fullurn, C1D1, SkipFix1, SkipFix2: Boolean;

    procedure declarePlayers();
    begin
      setLength(players, 1);
      currentPlayer := 0;

      with players[0] do
      begin
        loginName := ' ';
        displayName := ' ';
        password := ' ';
        isActive := true;
        isMember := true;
        bankPin := '';
        world := -1;
      end;
    end;

    procedure SetDTMs;
    begin
      TroutDTM := DTMFromString('mlwAAAHicY2dgYFjGxMCwAYi3A/FuIN4IxAuBeBUQxzNCcCgQ+wFxIBAnAHEIEB/YsQOoG6iIgRGKmeCYC0mUFAwFAGAjCZg=');
      SalmonDTM := DTMFromString('mlwAAAHicY2dgYLjBxMBwE4jPAfFDIH4CxFeA+DQQRzIyMCQCcRIQhwKxHxCHAHEsEM9JjgDqBjIYmJBoCOaCipCKoQAAr6AJ6A==');
      UrnDTM := DTMFromString('mQwAAAHicY2ZgYDBiYWCwB2J9ID7IxMBwAYjPA7Hn5HcMzh13GXzn/GUQAaqDYUYkDAQAUhEIrQ==');
      ProgBG := BitmapFromString(224, 56, 'meJztXWtzG8eVrY1FkCBIERJJAOQMnsOXBJuiZIq23pZUsZM4dmp3P23l//+PPfee6TN3GqRkx7ubTRlVU6hBT7/u6fvuHuA/fri5elwuT4ffXM3/8y+vsuvvf3utz7uuHz9ex/rx6y+5/v7vH1Y7yW5WZ6X6n54b++cQGutWEu6a9hqB/3sEni3H5/P9s9nD//r59Z++e/posX/hXy8vBtfLYrnYzy484s3N1QJ1VitUxzufLkG36pm9XV4c42I5x2VJbMIbPGWT2BD3uFDn1bNKlVFSjR/g5qvTo1sJEYFs/okKawT+iQjgKfjz0XwfHPvx5VJ0sRWq6T52zlmpN05Ag8bRb72EvG7YRA1XCcyGjqRpLJF2V9tb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Rrh16/sEH/RsW0UuwCtahrwhLmuvtk48vv/zmckqejPH7Mv0rLk2//k92mf4WLV4o4R9RXV4cf/YpL9yvVsPn5cUg6yd2WKW/Klj3/6/YPyuw8q2jrzJb/GMp/T8XrTwfqWYcsUqnDbM6+ke/TzxdnTAu1NR97IHk0C78wtHX/f9/7j/WFO/FzsVmsQ7NOpjzh3dPmWWiradG1SdfoPv2csqbWIEln30ay/V3YLqytipkCZ+u+//X7T+roMI4yirLsQ6Z878BpOjIxw==');
      InvFullDTM := DTMFromString('mLgAAAHicY2JgYJDkZGDwAmJmZgYGFiA+PEmC4cAkQQZWoBwIM0IxAwMAVsQDYQ==');
      ControlsWindow := DTMFromString('mbQAAAHicY2VgYBDhZmCQAGJ+KAaxXwDFn0DxWyj+sdOP4flSJzA+ncsNxlxAcVY0zIgFgwEAcUINbQ==');
    end;

    procedure Fr33DTMs;
    begin
      FreeDTM(TroutDTM);
      FreeDTM(SalmonDTM);
      FreeDTM(UrnDTM);
      FreeDTM(InvFullDTM);
      FreeBitmap(ProgBG);
      FreeDTM(ControlsWindow);

      writeln('Terminated during: ' +CurStatus);
    end;

    procedure DebugMouseClicks();
    var
      mX, mY: Integer;
    begin
      if MouseDebug then
        begin
          GetMousePos(mX, mY);
          if inRange(mX, 0, 800) and inRange(mY, 0, 600) then smartImage.drawCircle(point(mX,mY), 0, false, clLime)        //Point draw
          else writeln('Mouse is offscreen, not drawing since it causes script to end on exception.');
        end;
    end;

    function TRSChatBox.getXP: Integer;                     //Thanks to Ashaman88.
    var
      b: TBox;
      s: String;
      tpa : TPointArray;
      atpa : T2DPointArray;
      i,cts,p: Integer;
    begin
      b := self.getBounds();
      b.edit(+(b.x2-b.x1)-140, +10, -5, -94);

      findColorsTolerance(tpa, 10856614, b, 21, colorSetting(2, 1.46, 0.14));       //colours updated.

      if length(tpa) < 2 then
      begin
        print('chatBox.getXP(): No XP found', TDebug.SUB);
        Exit;
      end;

      atpa := tpa.cluster(5);
      atpa.sortFromFirstPoint(point(b.x2,b.y2));                                    //sorts from second set of coords of xp bounds

      b:= atpa[low(atpa)].getbounds;                                                //uses only XP text (ignores the +gained xp)
      b.edit(-2,-2,+2,+2);

      smartImage.drawBox(b);

      s:=Replace(tesseractgettext(b.x1,b.y1,b.x2,b.y2, FILTER_SMALL_CHARS), ' ', '', [rfReplaceAll]);

      P := Pos('x', S);
      if P > 0 then
        Result := StrToIntDef(ExtractFromStr(Copy(s, P, Length(S)), Numbers), 0)
      else
        Result := StrToIntDef(ExtractFromStr(S, Numbers), 0);

      print('chatBox.getXP(): XP found: ' + tostr(result), TDebug.SUB);
    end;

    procedure LoadVars
    begin
      if UseOpenGL then
      begin         //OpenGL Colours. Water and ripples rendered differently :(
        writeln('USING OPENGL COLOURS');
        FishSpotCol := 15719353; //15059379; //15322035;
        FishSpotTol := 15; //15;
        FishSpotHue := 0.32; //0.10; //0.11;
        FishSpotSat := 2.49; //1.56; //2.86;
        RodCol := 204335;
        RodTol := 3;
        RodHue := 0.08;
        RodSat := 1.00;
        TroutSlotCol := 9408666; //9671835;
        TroutSlotTol := 19; //6;
        TroutSlotHue := 0.08; //0.35;
        TroutSlotSat := 0.17; //0.23;
        SalmonSlotCol := 6646938; //7239068;
        SalmonSlotTol := 15; //7;
        SalmonSlotHue := 0.06; //0.03;
        SalmonSlotSat := 0.96; //1.33;

        {if BarbFishing then          //no openGL colours added for barb fishing.
        begin
          LTroutCol := ;
          LTroutTol := ;
          LTroutHue := ;
          LTroutSat := ;
          LSalmonCol := ;
          LSalmonTol := ;
          LSalmonHue := ;
          LSalmonSat := ;
          LSturgeonCol := ;
          LSturgeonTol := ;
          LSturgeonHue := ;
          LSturgeonSat := ;
          //rod and fishing spots might need to change, but should in theory be the same.
        end;}


      end else      //uses colours for DirectX - note that DirectX performs MUCH better but lacks drawing on the canvas.
      begin
        writeln('USING DIRECTX COLOURS');
        FishSpotCol := 14995359;
        FishSpotTol := 22;
        FishSpotHue := 0.24;
        FishSpotSat := 2.00;
        RodCol := 204335;
        RodTol := 2;
        RodHue := 0.18;
        RodSat := 2.17;
        TroutSlotCol := 9671835;
        TroutSlotTol := 6;
        TroutSlotHue := 0.35;
        TroutSlotSat := 0.23;
        SalmonSlotCol := 7239068;
        SalmonSlotTol := 7;
        SalmonSlotHue := 0.03;
        SalmonSlotSat := 1.33;

        if BarbFishing then
        begin
          LTroutCol := 8161687;
          LTroutTol := 10;
          LTroutHue := 0.87;
          LTroutSat := 0.88;
          LSalmonCol := 5921641;
          LSalmonTol := 6;
          LSalmonHue := 0.19;
          LSalmonSat := 0.13;
          LSturgeonCol := 4548159;
          LSturgeonTol := 16;
          LSturgeonHue := 0.96;
          LSturgeonSat := 0.26;
        end;
      end;
    end;

    procedure initscript;
    begin
      mouseOffClient(OFF_CLIENT_RANDOM);

      MSBounds := mainscreen.getBounds();
      MSCenterX := Round(MSBounds.X2/2);
      MSCenterY := Round(MSBounds.Y2/2);
      MSCenter := [MSCenterX, MSCenterY];
      if BarbFishing then PlayerBox := [MSCenterX-30, MSCenterY-18, MSCenterX+30, MSCenterY+18]
      else PlayerBox := [MSCenterX-30, MSCenterY-30, MSCenterX+30, MSCenterY+30];
      smartImage.DrawBox(PlayerBox, false, clLime);       //rod detection occurs inside this region.

      SetDTMs;
      AddOnTerminate('Fr33DTMs');

      DropAt := RandomRange(DropLower, DropUpper);
      StartXP := chatBox.getXP();

      LoadVars;
    end;

    function actionbarfix: Boolean;                                                   //true if successfully finds more than one of each fish and fixes actionbar.
    var
      I, SCount, TCount: Integer;
      p: TPoint;

    begin
      result := false;
      SCount := TabBackpack.CountDTM_MOD(SalmonDTM);                                  //should only send drop keys if both salmon and trout are found in inventory
      TCount := TabBackpack.CountDTM_MOD(TroutDTM);
      if SCount >= 1 then
      begin
        if TCount >=1 then
        begin
          PlaySound(ScriptPath+ '\notif.wav');
          wait(randomRange(50,800));
          if not actionBar.unlock() then actionBar.lock();
          DebugMouseClicks();
          mouseOffClient(OFF_CLIENT_LEFT);

          SendKeys(IntToStr(TroutSlot),10+Random(10),10+Random(10));
          wait(RandomRange(100,300));
          SendKeys(IntToStr(SalmonSlot),10+Random(10),10+Random(10));
          result := true;
        end else exit;
      end;
    end;

    function DetectChat(): Boolean;
    var
      tempTPA: TPointArray;

    begin
      //finds the blue chat text in the chatbox area
      result := findColors(tempTPA, 16755071, Chatbox.getChatArea());
      if result then
      begin
        if not inRange(chatLength, length(tempTPA)-10, length(tempTPA)+10) and not silentmode then
        begin
          if debug then writeln('New chat detected. Attempting to store current chat length.');
          PlaySound(ScriptPath+ '\notif_long.wav');   //if the stored chatlength different to the current chat length, then it plays a sound. If it's the same length as the stored one (i.e. no new messages) then it doesn't play a sound.
          smartImage.DrawText('        CHATTER DETECTED        ', Point(184,367), LoginChars, false, 47232);
        end else if debug then writeln('Chatbox has not changed. No new chat detected.');
        chatLength := length(tempTPA);      //updates and stores the new chatLength
      end else
      begin
        if debug then writeln('No chat detected.');
        chatLength := 0;
        smartImage.clearArea(IntToBox(183,366,440,381));
        exit(false);
      end;
    end;

    function TRSTabBackpack.countDTM_MOD(dtm: integer): integer;     //yes....this was done before I knew about disabling SRL print.
    var
      i, l: integer;
    begin
      result := 0;

      if (not self.open()) then
        exit();

      result := findItem(dtm, self.getSlotBoxes());

      if (result = 0) then
      begin
        if not DisableCountLog then print('tabBackpack.countDTM(): Found no DTM matches', TDebug.SUB);
        exit();
      end;

      if not DisableCountLog then print('tabBackpack.countDTM(): Counted ' + intToStr(result) + ' items');
    end;

    procedure AntiBan;
    var
      i: Integer;

    begin
      i := Random(99)
      if debug then writeln('Antiban value: ' +IntToStr(i));
      case i of
        0..2: hoverSkill(SKILL_FISHING);
        3..5: hoverRandomSkill();
        6..99: Exit;
      end;
      mouseOffClient(OFF_CLIENT_RANDOM);
    end;

    function feathercheck: Boolean;                      //check if the yellow exists in this slot? Yellow from the number count.
    var
      tempTPA: TPointArray;

    begin
      result := findColors(tempTPA, 65535, tabBackpack.getSlotBox(1));
    end;

    function CountFish: Integer;
    var
      SCount, TCount: Integer;

    begin
      SCount := TabBackpack.CountDTM_MOD(SalmonDTM);
      TCount := TabBackpack.CountDTM_MOD(TroutDTM);
      Result := SCount + TCount;
    end;

    procedure progress;
    var
      TerminateIn, RanFor: Integer;

    begin
      Ticks := Ticks + 1;                                //do a store last known good xp thing like in fletcher
      if Ticks > 10 then
      begin
        CurrentXP := chatBox.getXP();
        XPTotal := Round(CurrentXP - StartXP);
        XPperHour := Round(XPTotal * (3600.0 / (GetTimeRunning / 1000.0)));
        Ticks := 0;
      end;

      RanFor := Round(GetTimeRunning/1000);
      TerminateIn := Round(Runfor-Ranfor);

      begin   //onscreen stuff
        smartimage.drawbitmap(progBG,Point(576,544));
        smartImage.DrawText('Run Time: ' +msToTime(GetTimeRunning, TIME_SHORT), Point(582, 548), upchars, false, 47232);
        smartImage.DrawText('Dropping at ' +IntToStr(DropAt) +' invCount', Point(582, 560), upchars, false, 47232);
        smartImage.DrawText('Exp: ' +IntToStr(XPTotal) +' (' +IntToStr(XPperHour) +'/H)', Point(582, 571), upchars, false, 47232);
        smartImage.DrawText('Status: ' +CurStatus, Point(583, 582), upchars, false, 47232);
      end;

      begin   //debug box stuff
        clearDebug();
        writeln('Run Time: ' +msToTime(GetTimeRunning, TIME_SHORT));
        writeln('Exp: ' +IntToStr(XPTotal) +' (' +IntToStr(XPperHour) +'/H)');
        writeln('Status: '+CurStatus);
        writeln('Dropping at approx. ' +IntToStr(DropAt) +' invCount');
        writeln('Terminating in: ' +IntToStr(TerminateIn) +'s');
        writeln('XP update in: ' +IntToStr(Round(10 - Ticks)));
        If UseOpenGL then writeln('Using OpenGL colours!!') else writeln('Using DirectX colours!!');
      end;

    end;

    procedure urncheckvalid;
    var
      x,y: integer;

    begin
      if findDTM(urnDTM,x,y,actionBar.getSlotBox(urnSlot)) then
      begin
        fullurn := True;
      end;
    end;

    procedure urnfullcheck;
    var
      point: TPoint;
      ChatBoxArea: TBox;
      x,y: integer;

    begin
      urncheckvalid;
      if fullurn then
      begin
        MouseBox(actionBar.getSlotBox(urnSlot),Mouse_Left,Mouse_Human);   //Clicks on urn in actionbar
        DebugMouseClicks();
        wait(randomRange(100,750));
        UrnsTeled := UrnsTeled + 1;
        fullurn := false;
        mouseOffClient(OFF_CLIENT_RANDOM);
        wait(randomRange(1000,2000));                                     //time allow for urn to be teleported
      end;
    end;

    function CloseControlsWindow(): Boolean;
    var
      closex, closey: integer;
    begin
      result := false;
      if findDTM(ControlsWindow, closex, closey, IntToBox(759,22,783,44)) then
      begin
        mouseBox(IntToBox(759,22,783,44),MOUSE_LEFT,MOUSE_HUMAN);                     //Looks for and click on the 'x' to close menu
        exit(true);
      end;
    end;

    procedure dropfish;
    var
      TroutSlotTPA, SalmonSlotTPA: TPointArray;
      x, y, DropTry: Integer;
      DropTimer, FullTimer: TTimeMarker;
      SalCount, TroCount: Integer;
      LTroutValid, LSalmonValid, LSturgeonValid: Boolean;
      LTroutTPA, LSalmonTPA, LSturgeonTPA: TPointArray;

    label SkipAttFix;
    begin
      if BarbFishing then
      begin
        DropTimer.start();
        if tabBackpack.count() >= DropAt then
        begin
          CloseControlsWindow;
          repeat
            //right click drop on slot until the slot shows inactive color (or active color is not shown)
            if DropTimer.getTime > 15000+Random(6000) then break;
            DetectChat();
            CloseControlsWindow;
            wait(randomRange(50,90));
            LTroutValid := findColorsTolerance(LTroutTPA, LTroutCol, actionBar.getSlotBox(LTroutSlot), LTroutTol, colorSetting(2, LTroutHue, LTroutSat));
            if not LTroutValid then break; //if not found, then break and moves onto next fish to drop
            mousebox(actionBar.getSlotBox(LTroutSlot), mouse_right, mouse_human);
            DebugMouseClicks();
            wait(randomrange(50,150));
            chooseOption.select(['rop'], 500);
            DebugMouseClicks();
            LTroutValid := findColorsTolerance(LTroutTPA, LTroutCol, actionBar.getSlotBox(LTroutSlot), LTroutTol, colorSetting(2, LTroutHue, LTroutSat));
            if not LTroutValid then break; //if not found, then break and moves onto next fish to drop
          until not findColorsTolerance(LTroutTPA, LTroutCol, actionBar.getSlotBox(LTroutSlot), LTroutTol, colorSetting(2, LTroutHue, LTroutSat));//LTroutValid;

          repeat
            //right click drop on slot until the slot shows inactive color (or active color is not shown)
            if DropTimer.getTime > 15000+Random(6000) then break;
            DetectChat();
            CloseControlsWindow;
            wait(randomRange(50,90));
            LSalmonValid := findColorsTolerance(LSalmonTPA, LSalmonCol, actionBar.getSlotBox(LSalmonSlot), LSalmonTol, colorSetting(2, LSalmonHue, LSalmonSat));
            if not LSalmonValid then break; //if not found, then break and moves onto next fish to drop
            mousebox(actionBar.getSlotBox(LSalmonSlot), mouse_right, mouse_human);
            DebugMouseClicks();
            wait(randomrange(50,150));
            chooseOption.select(['rop'], 500);
            DebugMouseClicks();
            LSalmonValid := findColorsTolerance(LSalmonTPA, LSalmonCol, actionBar.getSlotBox(LSalmonSlot), LSalmonTol, colorSetting(2, LSalmonHue, LSalmonSat));
            if not LSalmonValid then break; //if not found, then break and moves onto next fish to drop
          until not findColorsTolerance(LSalmonTPA, LSalmonCol, actionBar.getSlotBox(LSalmonSlot), LSalmonTol, colorSetting(2, LSalmonHue, LSalmonSat));//not LSalmonValid;

          repeat
            //right click drop on slot until the slot shows inactive color (or active color is not shown)
            if DropTimer.getTime > 15000+Random(6000) then break;
            DetectChat();
            CloseControlsWindow;
            wait(randomRange(50,90));
            LSturgeonValid := findColorsTolerance(LSturgeonTPA, LSturgeonCol, actionBar.getSlotBox(LSturgeonSlot), LSturgeonTol, colorSetting(2, LSturgeonHue, LSturgeonSat));
            if not LSturgeonValid then break; //if not found, then break and moves onto next fish to drop
            mousebox(actionBar.getSlotBox(LSturgeonSlot), mouse_right, mouse_human);
            DebugMouseClicks();
            wait(randomrange(50,150));
            chooseOption.select(['rop'], 500);
            DebugMouseClicks();
            LSturgeonValid := findColorsTolerance(LSturgeonTPA, LSturgeonCol, actionBar.getSlotBox(LSturgeonSlot), LSturgeonTol, colorSetting(2, LSturgeonHue, LSturgeonSat));
            if not LSturgeonValid then break; //if not found, then break and moves onto next fish to drop
          until not findColorsTolerance(LSturgeonTPA, LSturgeonCol, actionBar.getSlotBox(LSturgeonSlot), LSturgeonTol, colorSetting(2, LSturgeonHue, LSturgeonSat));//not LSturgeonValid;

        DropAt := RandomRange(DropLower,DropUpper);
        CloseControlsWindow;
        DetectChat();
        mouseOffClient(OFF_CLIENT_RANDOM);
        wait(randomRange(1500,2300));     //wait time allowed for rod to reappear
        //smallRandomMouse();             //buggy.
        end;
      end else
      begin
        if tabbackpack.isFull() then
        begin
          if debug then writeln('INVENTORY IS FULL, SEEING IF FULL DIALOGUE BOX IS FOUND');
          if findDTM(InvFullDTM, x, y, intToBox(245,543,328,563)) then
          begin
            mousebox(intToBox(250,546,325,560), MOUSE_LEFT, MOUSE_HUMAN);
            DebugMouseClicks();
            if not ActionBarFix() then
            begin
              if not actionBar.unlock() then actionBar.lock();
              FullTimer.start();
              repeat
                SendKeys(IntToStr(TroutSlot),30+Random(30),30+Random(30));
                wait(randomRange(105,230));
                SendKeys(IntToStr(SalmonSlot),30+Random(30),30+Random(30));
                wait(randomRange(105,230));
              until FullTimer.getTime > RandomRange(3000,5000);
            end;
            mouseOffClient(OFF_CLIENT_RANDOM);                                                            //use more dynamic method (get bounds of yellow button or the text inside it)
          end else
          begin
            if debug then writeln('CANT FIND THE INVENTORY FULL DIALOGUE BOX');
          end;                                                      //this is used to close the 'inventory full' notice if found.
        end;

        if tabBackpack.count() >= DropAt then
        begin
          CurStatus := 'Dropping fish';
          SalCount := TabBackpack.CountDTM_MOD(SalmonDTM);       //stores starting amount of each fish, will compare when the loop is done to see if the count stays the same.
          TroCount := TabBackpack.CountDTM_MOD(TroutDTM);        //if stays the same, the keys are likely to be stuck and so the actionbar will be unlocked.
          DropTimer.start();
          repeat
            DropTry := DropTry + 1;

            if DropTimer.getTime() > RandomRange(3500,4600) then break;
            if findColorsTolerance(TroutSlotTPA, TroutSlotCol, actionBar.getSlotBox(TroutSlot), TroutSlotTol, colorSetting(2, TroutSlotHue, TroutSlotSat)) then
            begin
              SkipFix1 := False;
              SendKeys(IntToStr(TroutSlot),10+Random(10),10+Random(10));
              wait(randomRange(135,210));
            end else SkipFix1 := True;

            if findColorsTolerance(SalmonSlotTPA, SalmonSlotCol, actionBar.getSlotBox(SalmonSlot), SalmonSlotTol, colorSetting(2, SalmonSlotHue, SalmonSlotSat)) then
            begin
              SkipFix2 := False;
              SendKeys(IntToStr(SalmonSlot),10+Random(10),10+Random(10));
              wait(randomRange(135,210));
            end else SkipFix2 := True;                             //bug may exist where the actionbar becomes stuck. Gotta fix this manually, or add detection for when it becomes stuck.

            if DropTry > 4 then
            begin
              if inRange(TabBackpack.CountDTM_MOD(TroutDTM), TroCount, TroCount + 1) then
              begin
                if TroCount > 1 then actionbarfix;
                goto skipattfix;
              end;

              if inRange(TabBackpack.CountDTM_MOD(SalmonDTM), SalCount, SalCount + 1) then
              begin
                if SalCount > 1 then actionbarfix;
                goto skipattfix;
              end;

              SkipAttFix:
              DropTry := 0;
            end;
          until CountFish = 0;                                         //see actionBarFix from sdfLRCHopper
          wait(randomRange(2100,2600));
          DropAt := RandomRange(DropLower,DropUpper);
        end;
      end;
    end;

    procedure blindfindspot;
    var
      SpotTPA: TPointArray;

    begin
      if not findColorsTolerance(SpotTPA, FishSpotCol, msBounds, FishSpotTol, colorSetting(2, FishSpotHue, FishSpotSat)) then
      begin
        mainscreen.setAngle(MS_ANGLE_HIGH);
        randomCompass(0, 360, false);                                                   //rotates camera screen if no spots are found
        Rotated := True;
      end;
    end;

    procedure findspot;
    var
      SpotTPA, RodTPA, StoredTPA: TPointArray;
      ClosestPoint: TPoint;
      WaitTimeout: TTimeMarker;
      SplitSpot: T2DPointArray;
      i: Integer;

    label BeginWait;

    begin
      DropAt := RandomRange(DropLower,DropUpper);
      claimSpinTicket();
      dropfish;
      if findColorsTolerance(RodTPA, RodCol, PlayerBox, RodTol, colorSetting(2, RodHue, RodSat)) then exit;
      CurStatus := 'Finding spot';
      progress;

      for i:=0 to 100 do                            //repeats 100 times granting >500ms time to account for fishing spot animations
      begin
        findColorsTolerance(SpotTPA, FishSpotCol, msBounds, FishSpotTol, colorSetting(2, FishSpotHue, FishSpotSat));
        StoredTPA.combine(SpotTPA);
        wait(5);
      end;
      StoredTPA.clearEquals;
      SplitSpot := StoredTPA.cluster(25,25);
      SplitSpot.sortFromFirstPoint(MSCenter);
      if CloseControlsWindow then exit;
      for i := 0 to high(SplitSpot) do
      begin
        if debugspots then SmartImage.DrawBox(GetTPABounds(SplitSpot[I]));
        MouseBox(GetTPABounds(SplitSpot[I]),mouse_move,Mouse_human);
        if BarbFishing then
        begin
          if isMouseOverText(['spot'], 250) then
          begin
            fastClick(MOUSE_LEFT);
            DebugMouseClicks();
            goto BeginWait;
          end;
        end else
        begin
          if isMouseOverText(['Lure'], 250) then
          begin
            fastClick(MOUSE_LEFT);
            DebugMouseClicks();
            goto BeginWait;
          end;
        end;
      end;
      if length(SplitSpot) < 1 then blindfindspot; //if less than 1 spots (i.e. none) are found, then it rotates camera.
                                                   //if length is 0, then the for loop is negated anyway (high = 0)
      BeginWait:
      mouseOffClient(OFF_CLIENT_RANDOM);

      CurStatus := 'Moving to spot';
      progress;
      WaitTimeout.start();
      repeat
        wait(250);
        if debug then writeln('Wait find rod: ' +IntToStr(WaitTimeout.getTime) +'ms');
        if WaitTimeout.getTime() > 5500 then exit;
      until findColorsTolerance(RodTPA, RodCol, PlayerBox, RodTol, colorSetting(2, RodHue, RodSat));  //waits up to 5.5 seconds for rod to be found  //WaitFunc causes error for some reason.

      if Rotated then
      begin            //resets camera to north and highest angle if blind rotated to find spot.
        minimap.clickCompass();
        DebugMouseClicks();
        mouseOffClient(OFF_CLIENT_RANDOM);
        mainscreen.setAngle(MS_ANGLE_HIGH);
        Rotated := False;
      end;
      CurStatus := 'Now Fishing!';
      progress;
    end;

    procedure waitwhilefishing;
    var
      RodTPA: TPointArray;

    begin
      repeat
        dropfish;
        CurStatus := 'Waiting for fishies';
        progress;
        claimSpinTicket();
        urnfullcheck;
        DetectChat();
        wait(1000);
      until not findColorsTolerance(RodTPA, RodCol, PlayerBox, RodTol, colorSetting(2, RodHue, RodSat));
      if not findColorsTolerance(RodTPA, RodCol, PlayerBox, RodTol, colorSetting(2, RodHue, RodSat)) then wait(RandomRange(200,500));      //slightly redundant.
    end;

    procedure mainloop();
    var
      RanFor: Extended;
      baseSpeed: integer;

    begin
      findspot;
      AntiBan();
      waitwhilefishing;
      AntiBan();

      RanFor := GetTimeRunning/1000;
      if (RanFor>RunFor) then
      begin
        WriteLn('Run limit reached! Terminating script');
        Players[CurrentPlayer].Logout;
        Terminatescript;
      end;

      begin                                                                           //Vary the mouse speed every loop
        baseSpeed := 35;                                                              //See VaryMS in fletcher script
        mouseSpeed := baseSpeed + randomRange(8, 15);
      end;
    end;

    begin
      smartEnableDrawing := true;
      clearDebug();
      disableSRLLog := false; //true;
      smartPlugins := ['d3d9.dll'];
      setupSRL();
      declarePlayers();
      players[currentPlayer].login();
      initscript;

      repeat
        mainloop;
      until not players[currentPlayer].isActive;
    end.

    I was going to release this when I hit 99 (a while back) but didn't want to clean it up.

    So here's a very unclean version of a script I wrote earlier this year so there's probably a lot of useless lines in there (much has improved since then I swear!; this was started before my granite miner). I added barbarian fishing support once I hit 85, averaging 90k-110k (with urns, of course). Regular fly fishing was neglected after 85, but should still work (logic is basically the same).

    You will most definitely need to update colours everywhere since this was before colour updates + font changes.

    Fly Fishing works best at the spot west of the fishing guild (~75k/hour with urns). It may or may not work at Barbarian village due to the spots being fairly far apart (it rotates the screen to find spots, rather than map walking).

  25. #25
    Join Date
    Mar 2013
    Posts
    41
    Mentioned
    0 Post(s)
    Quoted
    24 Post(s)

    Default


    I was going to release this when I hit 99 (a while back) but didn't want to clean it up.

    So here's a very unclean version of a script I wrote earlier this year so there's probably a lot of useless lines in there (much has improved since then I swear!; this was started before my granite miner). I added barbarian fishing support once I hit 85, averaging 90k-110k (with urns, of course). Regular fly fishing was neglected after 85, but should still work (logic is basically the same).

    You will most definitely need to update colours everywhere since this was before colour updates + font changes.

    Fly Fishing works best at the spot west of the fishing guild (~75k/hour with urns). It may or may not work at Barbarian village due to the spots being fairly far apart (it rotates the screen to find spots, rather than map walking).
    Thanks alot mate it works perfectly! I'm just trying to change the time it takes to click on the fishing spot and it's gonna work 10/10. Just PM me your RSN I will give you the 5M gold :P. Thank you very much!

Page 1 of 2 12 LastLast

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
  •