Results 1 to 7 of 7

Thread: [AL] F2P PowerFisher

  1. #1
    Join Date
    Mar 2018
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Post [AL] F2P PowerFisher

    This is my first script here. It's quite simple and doesn't have good antiban features.
    I got lvl 75 fishing with it before getting banned.

    I welcome any feedback and constructive criticism. Also any suggestions are welcome.
    Also feel free to ask for help if can't get the script working for any reason.

    Possible future plans:
    • Adding antiban features.
    • Adding drop for fish only so it doesn't drop fishing tool and other items if they are not in first inventory space.
    • Adding break timer.
    • Adding xp and fish counter.
    • Script stops when out of feathers or bait.
    • Automatic check for:
      • Fishing tool in first inventory space.
    • Automatic check and select for:
      • Enable shift clicking.
      • Have brightness set to max.
      • Have camera pointed to north.
      • Have camera pointed to most up.



    Requirements:


    How to use:
    Run the script near fishing spot with fishing tool in your first slot.

    Code:
    program new;
    {$define SMART} //If not using SMART, then comment this line out
    {$i AeroLib/AeroLib.Simba}
    var
      AFKCounter             : Integer;
      playerIsFishing        : Boolean;
      fishingSpotIsTop       : Boolean;
      fishingSpotIsRight     : Boolean;
      fishingSpotIsBottom    : Boolean;
      fishingSpotIsLeft      : Boolean;
    
    const
      P_USERNAME = '';
      P_PASSWORD = '';
      Fish_Tool_To_Fish_With := 'Cage';  // Net, Bait, Lure, BaitRod, Harpoon, Cage
      PersonalRandomModifier := random(1,1000);
      dropRandom := random(50,150);
    
    procedure declarePlayer();
    begin
      Me.Name := P_USERNAME;
      Me.Pass := P_PASSWORD;
      Me.Active := True;
      Me.Member := False;
    end;
    
    procedure setupPlayer();
    begin
      writeln('player setup...');
      if (not isLoggedIn()) then
        loginPlayer(false);
      if (isLoggedIn()) then
      begin
        setAngle(ANGLE_HIGH);
      end;
    end;
    
    procedure checkIfIsFishing();
    var
      netSearchAreaTop      : TBox;
      netSearchAreaRight    : TBox;
      netSearchAreaBottom   : TBox;
      netSearchAreaLeft     : TBox;
    
      baitSearchAreaTop      : TBox;
      baitSearchAreaRight    : TBox;
      baitSearchAreaBottom   : TBox;
      baitSearchAreaLeft     : TBox;
    
      harpoonSearchAreaTop     : TBox;
      harpoonSearchAreaRight   : TBox;
      harpoonSearchAreaBottom  : TBox;
      harpoonSearchAreaLeft    : TBox;
    
      cageSearchAreaTop     : TBox;
      cageSearchAreaRight   : TBox;
      cageSearchAreaBottom  : TBox;
      cageSearchAreaLeft    : TBox;
    
      color_Net              : TColEx;
      color_Bait             : TColEx;
      color_Cage             : TColEx;
      color_Harpoon          : TColEx;
    
      color_FishingTool : TColEx;
      fishingToolSearchAreaTop : TBox;
      fishingToolSearchAreaRight : TBox;
      fishingToolSearchAreaBottom : TBox;
      fishingToolSearchAreaLeft : TBox;
      fishingToolSearchArea : TBox;
      fishingSpotLocation : Boolean;
      i : Integer;
    
      T                     : Timer;
    begin
      netSearchAreaTop := [254,144,274,157];
      netSearchAreaRight := [273,169,298,191];
      netSearchAreaBottom := [256,178,273,216];
      netSearchAreaLeft := [214,171,237,191];
    
      baitSearchAreaTop := [262,101,273,149];
      baitSearchAreaRight := [273,165,331,183];
      baitSearchAreaBottom := [248,186,256,237];
      baitSearchAreaLeft := [184,157,238,178];
    
      harpoonSearchAreaTop := [258,139,268,166];
      harpoonSearchAreaRight := [253,158,294,187];
      harpoonSearchAreaBottom := [253,156,264,215];
      harpoonSearchAreaLeft := [227,140,268,167];
    
      cageSearchAreaTop := [247,142,262,152];
      cageSearchAreaRight := [282,166,295,182];
      cageSearchAreaBottom := [257,229,272,246];
      cageSearchAreaLeft := [219,168,234,182];
    
      color_Net.create(2765113, 15, 0.34, 0.00);
      color_Bait.create(6694, 15, 0.34, 0.00);
      color_Harpoon.create(1140619, 15, 0.34, 0.00);
      color_Cage.create(872564, 15, 0.34, 0.00);
    
      Case Fish_Tool_To_Fish_With of
        'Net': begin
                color_FishingTool    := color_Net;
                fishingToolSearchAreaTop := netSearchAreaTop;
                fishingToolSearchAreaRight := netSearchAreaRight;
                fishingToolSearchAreaBottom := netSearchAreaBottom;
                fishingToolSearchAreaLeft := netSearchAreaLeft;
               end;
        'Bait', 'Lure', 'BaitRod': begin
                color_FishingTool    := color_Bait;
                fishingToolSearchAreaTop := baitSearchAreaTop;
                fishingToolSearchAreaRight := baitSearchAreaRight;
                fishingToolSearchAreaBottom := baitSearchAreaBottom;
                fishingToolSearchAreaLeft := baitSearchAreaLeft;
               end;
        'Cage': begin
                color_FishingTool    := color_Cage;
                fishingToolSearchAreaTop := cageSearchAreaTop;
                fishingToolSearchAreaRight := cageSearchAreaRight;
                fishingToolSearchAreaBottom := cageSearchAreaBottom;
                fishingToolSearchAreaLeft := cageSearchAreaLeft;
               end;
        'Harpoon': begin
                color_FishingTool    := color_Harpoon;
                fishingToolSearchAreaTop := harpoonSearchAreaTop;
                fishingToolSearchAreaRight := harpoonSearchAreaRight;
                fishingToolSearchAreaBottom := harpoonSearchAreaBottom;
                fishingToolSearchAreaLeft := harpoonSearchAreaLeft;
               end;
      end;
    
      playerIsFishing := False;
      fishingSpotLocation := False;
      T.start();
    
      while ((playerIsFishing = True) OR (T.timeElapsed() <= 5000)) do
      begin
    
        for i := 1 to 4 do
        begin
        if (playerIsFishing = True) then
        begin
          break;
        end;
    
          Case i of
          1 : begin
                fishingSpotLocation := fishingSpotIsTop;
                fishingToolSearchArea := fishingToolSearchAreaTop;
              end;
          2 : begin
                fishingSpotLocation := fishingSpotIsRight;
                fishingToolSearchArea := fishingToolSearchAreaRight;
              end;
          3 : begin
                fishingSpotLocation := fishingSpotIsBottom;
                fishingToolSearchArea := fishingToolSearchAreaBottom;
              end;
          4 : begin
                fishingSpotLocation := fishingSpotIsLeft;
                fishingToolSearchArea := fishingToolSearchAreaLeft;
              end;
          end;
    
          if (fishingSpotLocation = True) then
          begin
            if color_FishingTool.findIn(fishingToolSearchArea) then
            begin
              playerIsFishing := TRUE;
              writeln('playerIsFishing = ' + toStr(playerIsFishing));
              exit;
            end;
          end;
    
        end;
    
      end else
      begin
        playerIsFishing := FALSE;
      end;
    
      writeln('playerIsFishing = ' + toStr(playerIsFishing));
    end;
    
    procedure fish();
    var
      Pnt : TPoint;
      Pnts : TPointArray;
      TestPnts : TPointArray;
    
      fishingSpotSearchAreaTop    : TBox;
      fishingSpotSearchAreaRight  : TBox;
      fishingSpotSearchAreaBottom : TBox;
      fishingSpotSearchAreaLeft   : TBox;
    
      obj_FishingSpot             : TMSObject;
      color_FishingSpot           : TColEx;
    
      textToCheckFor              : String;
      textToCheckForTwo           : String;
      mouseRightNeeded            : Boolean;
      clickedOnFishingSpot        : Boolean;
      i                           : Integer;
      T                           : Timer;
    
    begin
    
      obj_FishingSpot.create('Fishing Spot', [''], [createCol(14336937, 13, 0.27, 2.10)], [createCol(14996397, 20, 0.23, 1.15)], 10, 25, 25, 15);
    
    
      Case Fish_Tool_To_Fish_With of
        'Net': begin
                textToCheckFor    := 'Net Fishing spot';
                mouseRightNeeded  := False;
               end;
        'Bait': begin
                textToCheckFor    := 'Net Fishing spot';
                mouseRightNeeded  := True;
                textToCheckForTwo := 'Bait Fishing spot';
               end;
        'Lure': begin
                textToCheckFor    := 'Lure Rod Fishing spot';
                mouseRightNeeded  := False;
               end;
        'BaitRod': begin
                textToCheckFor    := 'Lure Rod Fishing spot';
                mouseRightNeeded  := True;
                textToCheckForTwo := 'Bait Rod Fishing spot';
               end;
        'Cage': begin
                textToCheckFor    := 'Cage Fishing spot';
                mouseRightNeeded  := False;
               end;
        'Harpoon': begin
                textToCheckFor    := 'Cage Fishing spot';
                mouseRightNeeded  := True;
                textToCheckForTwo := 'Harpoon Fishing spot';
               end;
      end;
    
      //Finding fishing spot
      while (NOT clickedOnFishingSpot = True) do
      begin
        if obj_FishingSpot.findall(10, MSCP, Pnts) then
        begin
          for i := low(Pnts) to high(Pnts) do
          begin
            if (NOT clickedOnFishingSpot = True) then
            begin
              HumanMMouse(Pnts[i], 5, 5);
              if IsUpTextMulti([textToCheckFor]) then
              begin
                if (mouseRightNeeded = False) then
                begin
                  fastClick(MOUSE_LEFT);
                  clickedOnFishingSpot := True;
                end;
                if (mouseRightNeeded = True) then
                begin
                  fastClick(MOUSE_RIGHT);
                  if WaitOption(textToCheckForTwo, 1000) then
                  begin
                    ChooseOption(textToCheckForTwo);
                    clickedOnFishingSpot := True;
                  end;
                end;
              end;
            end;
          end;
        end;
      end;
    
      AFKCounter := 0;
    
      wait(10000);
    
      // Check fishing spots locations.
      color_FishingSpot.create(14336937,13,0.27,2.10);
    
      fishingSpotSearchAreaTop := [253,139,278,157];
      fishingSpotSearchAreaRight := [286,169,307,189];
      fishingSpotSearchAreaBottom := [247,203,273,227];
      fishingSpotSearchAreaLeft := [208,171,233,195];
    
      fishingSpotIsTop    := False;
      fishingSpotIsRight  := False;
      fishingSpotIsBottom := False;
      fishingSpotIsLeft   := False;
    
      T.start();
      while (T.timeElapsed() <= 5000) do
      begin
        //Top
        if ((fishingSpotIsTop = False) AND color_FishingSpot.findIn(fishingSpotSearchAreaTop)) then
        begin
          writeln('Found fishing spot in area: Top.');
          fishingSpotIsTop := True;
        end;
    
        //Right
        if ((fishingSpotIsRight = False) AND color_FishingSpot.findIn(fishingSpotSearchAreaRight)) then
        begin
          writeln('Found fishing spot in area: Right.');
          fishingSpotIsRight := True;
        end;
    
        //Bottom
        if ((fishingSpotIsBottom = False) AND color_FishingSpot.findIn(fishingSpotSearchAreaBottom)) then
        begin
          writeln('Found fishing spot in area: Bottom.');
          fishingSpotIsBottom := True;
        end;
    
        //Left
        if ((fishingSpotIsLeft = False) AND color_FishingSpot.findIn(fishingSpotSearchAreaLeft)) then
        begin
          writeln('Found fishing spot in area: Left.');
          fishingSpotIsLeft := True;
        end;
      end;
    
    end;
    
    procedure drop();
    var
      dropPattern : TIntegerArray;
      dropPatternWithBait : TIntegerArray;
      i : Integer;
    begin
    
      if((Fish_Tool_To_Fish_With = 'Net') OR (Fish_Tool_To_Fish_With = 'Cage') OR (Fish_Tool_To_Fish_With = 'Harpoon')) then
      begin
        for i := 2 to 28 do
        begin
          fastDropSlots([i]);
          wait(gaussRandom(dropRandom));
        end;
      end;
    
      if((Fish_Tool_To_Fish_With = 'Bait') OR (Fish_Tool_To_Fish_With = 'BaitRod') OR (Fish_Tool_To_Fish_With = 'Lure')) then
      begin
        for i := 3 to 28 do
        begin
          fastDropSlots([i]);
          wait(gaussRandom(dropRandom));
        end;
      end;
    
      AFKCounter := 0;
    end;
    
    begin
      clearDebug();
      initAL();
      declarePlayer();
      setupPlayer();
    
      setAngle(ANGLE_HIGH);
      writeln('PersonalRandomModifier = ' + toStr(PersonalRandomModifier));
      writeln('dropRandom = ' + toStr(dropRandom));
    
      Repeat
      checkIfIsFishing();
    
      if isInvFull() then
      begin
        drop();
      end;
    
      if (playerIsFishing = FALSE) then
      begin
        fish();
      end;
    
      if (AFKCounter >= 25) then
      begin
        fastClick(MOUSE_RIGHT);
        HumanMMouse([400, 400], 100, 100);
        AFKCounter := 0;
      end;
    
      wait(5000);
      AFKCounter := AFKCounter + 1;
    
      Until(false);
    end.
    Attached Files Attached Files
    Last edited by Nixes; 05-22-2021 at 11:20 AM.

  2. #2
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,225
    Mentioned
    36 Post(s)
    Quoted
    492 Post(s)

    Default

    Hey Nixes, originally stopped here to test your script and provide feedback. However, i see it is using Aero Lib and I'm familiar with the SRL include...

    That being said, I can make a few suggestions.
    - Randomize! To avoid bans you want to avoid patterns. Take a look at your script and see where you can adjust wait times or mix up the order you do certain things.
    - Add pointless tasks for antiban. Mouse off client, check quest points, look at music, scroll through recent game chat, etc.

  3. #3
    Join Date
    Mar 2018
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Thank you for the feedback. I will certainly try to add them.

  4. #4
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,333
    Mentioned
    266 Post(s)
    Quoted
    1399 Post(s)

    Default

    Looking good mate. It's clearly been a while since anyone has been putting out new work, I'm pleased to see this. Keep it up my friend.

    Current project:
    [AIO Fisher]

  5. #5
    Join Date
    Mar 2018
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Thanks. It means a lot to me. Always liked your scripts, tutorials and your work on Aerolib.

  6. #6
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,225
    Mentioned
    36 Post(s)
    Quoted
    492 Post(s)

    Default

    Quote Originally Posted by Nixes View Post
    Thank you for the feedback. I will certainly try to add them.
    Feel free to ask for anything!

    You have a lot of repeated code, which makes it tedious to critique... You'll improve on that over time.

    Here's a specific suggestion, everywhere that you have a "wait(###)" in your script you could consider adding randomness by doing something like the following:

    Old - Your current code:
    Simba Code:
    while (NOT obj_FishingSpotCage.find(Pnt)) do
    begin
      wait(1000);
      writeln('Searching for fishing spot: Cage. ' + toStr(Pnt));
    end else
    begin
      writeln('Found fishing spot: Cage. ' + toStr(Pnt));
      wait(gaussRandom(2000));
      fastClick(MOUSE_LEFT);
      AFKCounter := 0;
    end;

    New - An example of adding in some randomness:
    Simba Code:
    while (NOT obj_FishingSpotCage.find(Pnt)) do
    begin
      wait(750, 1250);
      if random(50) = 0 then wait(0, 500);
      if random(100) = 0 then wait(1000, 3000);
      writeln('Searching for fishing spot: Cage. ' + toStr(Pnt));
    end else
    begin
      writeln('Found fishing spot: Cage. ' + toStr(Pnt));
      wait(1800, 3000);
      if random(50) = 0 then wait(0, 2000);
      if random(100) = 0 then wait(1000, 5000);
      fastClick(MOUSE_LEFT);
      AFKCounter := 0;
    end;

    Explanation:\
    You said you got banned at lvl 75 fishing. Imagine the pattern you were following. You kept an identical routine and waited an EXACT amount of milliseconds(in most cases). Obviously this "behavior" isn't very human. A lot of times i find the best way to make my script more human is to do the action myself in-game and then attempt to emulate my own behavior. Once you have wait times that are more-human, consider jumbling up the order that you do tasks.

    Cheers
    Last edited by footballjds; 05-23-2021 at 11:41 PM.

  7. #7
    Join Date
    Mar 2018
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Thank you for the helpful feedback. I will certainly keep it in mind when I get to adding antiban.

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
  •