Results 1 to 17 of 17

Thread: Samson420's Fishing Draynor

  1. #1
    Join Date
    Aug 2014
    Posts
    24
    Mentioned
    0 Post(s)
    Quoted
    13 Post(s)

    Default Samson420's Fishing Draynor

    Hello SRL-Community

    this is not my first script, but it's the first i'm releasing.

    It is a realy small and simple Shrimp and Anchovies catcher with banking in Draynor.
    The intention of this Script is to get a new Character fast to higher fishing lvl's (like lvl 1-30).
    and meanwhile bank something for training cooking later

    The experience is estimated because it is random if you catch an anchovie or shrimp. The Proggressreport estimates 20 exp per fish
    (10exp for shrimp 40 exp for anchovie)

    .:. .:. .:. .:. .:. .:. .:. .:. .:. .:.
    .:. Samson420`s Slowpoke-fisher
    .:. Time Run: 1 Hours, 2 Minutes and 24 Seconds
    .:. Fish caught: 672
    .:. Fish per Hour: 646
    .:. estimated EXP: 13440
    .:. estimated EXP per Hour: 12921
    .:. .:. .:. .:. .:. .:. .:. .:. .:. .:.

    The Anti-Ban is realy small, it will act like a player who is browsing other Tab's while leveling his fishing skill.

    the Setup
    is easy, just start the Script inside Draynor Village Bank!

    look at the beginning of the script for this:

    //SET-UP SCRIPT HERE//
    loginName := 'YYY';
    password := 'XXX';
    //SET-UP SCRIPT HERE//

    YYY= your Login name
    XXX= your password

    put this png into your "Simba\Includes\SPS\img\runescape_other" folder

    draynfish2.png

    GL HF !

    Simba Code:
    program Samson420FishDrayner;

    {$DEFINE SMART}
    {$I SRL-6/SRL.simba}
    {$I SPS/lib/SPS-RS3.Simba}

    var fish : integer;

    procedure declarePlayers();
    begin
      setLength(players, 1);
      with players[0] do
      begin
      //SET-UP SCRIPT HERE//
        loginName := 'YYY';
        password := 'XXX';
      //SET-UP SCRIPT HERE//
        isActive := true;
        isMember := false;
      end
      currentPlayer := 0;
    end;

    procedure antibanFishing();
    begin
     case random(100) of
     0..80: mouseOffClient(OFF_CLIENT_TOP);
     81..90:smallRandomMouse();
     91..95:hoverSkill(SKILL_FISHING);
     96..100: boredHuman();
     end;
    end;

    procedure goFishing();
    var wFish: TPointArray;
      begin
        if not isLoggedIn() then
        begin
        players[currentPlayer].login();
        exitSquealOfFortune();
        minimap.setAngle(MM_DIRECTION_NORTH);
        mainScreen.setAngle(MS_ANGLE_HIGH);
        end;
      wFish := [Point(180, 112), Point(152, 157)];
      if SPS.walkPath(wFish) then
      minimap.waitPlayerMoving()
      else
      writeln('Walk to Fish failed!');
    end;

    procedure getfish();
    var
    x, y, fail : integer;
    begin
    repeat
      if mainscreen.findObject(x, y, 14864837, 12, ['ishing'], MOUSE_RIGHT) then
        begin
        writeln('this Fish worked! Failcount now 0');
        fail := 0;  
        chooseOption.select(['et']);
        antibanFishing();
        wait (randomRange(15000, 20000));
        end else
        inc(fail);
        writeln('can`t find fish :(! failcount: ' +intToStr(fail));
        if fail > 20 then
        begin
        writeln(' 21 failes ?! we look for a new path ...');
        goFishing();
        end
    until tabBackPack.isFull();
    end;

    procedure goBanking();
    var wBank: TPointArray;
      begin
        if not isLoggedIn() then
        begin
        players[currentPlayer].login();
        exitSquealOfFortune();
        minimap.setAngle(MM_DIRECTION_NORTH);
        mainScreen.setAngle(MS_ANGLE_HIGH);
        end;
      wBank := [Point(152, 157), Point(180, 112)];
      if SPS.walkPath(wBank) then
      minimap.waitPlayerMoving()
      else
      writeln('Walk to Bank failed!');
    end;

    procedure doBank();
    var x, y : integer;
    begin
      if not isLoggedIn() then
        begin
        players[currentPlayer].login();
        end;
        if mainscreen.findObject(x, y, 11835026, 9, ['eposit'], MOUSE_LEFT) then
        begin
        wait (randomRange (2000, 3000));
        if (depositBox.isOpen()) then
        begin
        depositBox.quickDeposit(QUICK_DEPOSIT_INVENTORY);
        wait(randomRange(300, 1500));
        bankScreen.close();
        inc(fish);
        end else
        doBank()
        end;
    end;

    procedure Prog();
    var fishC, fishPH, exp, expPH: integer;
      begin
      fishC := fish * 28;
      fishPH := round((fishC * 60) / (getTimeRunning() / 60000));
      exp := fishC * 20;
      expPH := round((exp * 60) / (getTimeRunning() / 60000));

      writeLn(' .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. ');
      writeLn(' .:. Samson420`s Slowpoke fish Draynor ');
      writeLn(' .:. Time Run: ' + timeRunning);
      writeLn(' .:. Fish caught: ' + intToStr(fishC));
      writeLn(' .:. Fish per Hour: ' + intToStr(fishPH));
      writeLn(' .:. estimated EXP: ' + intToStr(exp));
      writeLn(' .:. estimated EXP per Hour: ' + intToStr(expPH));
      writeLn(' .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. ');
      end;

    begin
      clearDebug();
      smartEnableDrawing := true;
      setupSRL();
      declarePlayers();
      SPS.setup('draynfish2', RUNESCAPE_OTHER);
      if not isLoggedIn() then
      begin
        players[currentPlayer].login();
        exitSquealOfFortune();
        minimap.setAngle(MM_DIRECTION_NORTH);
        mainScreen.setAngle(MS_ANGLE_HIGH);
      end;

    repeat
    goFishing();
    Prog();
    getFish();
    Prog();
    goBanking();
    Prog();
    doBank();
    Prog();
    until false

    end.


    credits go to TheMayor for his awesome Tutorial
    https://villavu.com/forum/showthread.php?t=107757

    more tips, tricks and suggestions would be awesome!
    Last edited by Samson420; 09-02-2014 at 08:22 PM.

  2. #2
    Join Date
    Sep 2014
    Posts
    45
    Mentioned
    0 Post(s)
    Quoted
    19 Post(s)

    Default

    I might try this out soon but im scared of the ban

  3. #3
    Join Date
    Sep 2014
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    There is a bug inside the script

    Exception in Script: Unknown declaration "expPH" at line 110, column 3

  4. #4
    Join Date
    Sep 2014
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by fatkidsgowii84 View Post
    I might try this out soon but im scared of the ban
    Well like he said the anti ban is fairly small so it's not 100% safe but I guess pausing every once in a while, taking a break and doing something normal will help the problem.

  5. #5
    Join Date
    Aug 2014
    Posts
    24
    Mentioned
    0 Post(s)
    Quoted
    13 Post(s)

    Default

    Quote Originally Posted by Large1 View Post
    There is a bug inside the script

    Exception in Script: Unknown declaration "expPH" at line 110, column 3
    haha ofc there is ^^ i edited it out on the run ... it should work now

    thx alot

    Quote Originally Posted by fatkidsgowii84 View Post
    I might try this out soon but im scared of the ban
    you can try it unmonitored for about an hour my char is running Shrimps for about 2 hours now
    ... but yeah, you are NEVER save from bans when boting ^^
    Last edited by Samson420; 09-02-2014 at 01:05 AM.

  6. #6
    Join Date
    Sep 2014
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Thank you I'll post the progress report as soon I start

  7. #7
    Join Date
    Sep 2014
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Nevermind when I start in the bank it just stuck on the fixing camera part. then it says the problem again

    -- TRSMainscreen.findObject()
    ---- No colors found
    Last edited by Large1; 09-02-2014 at 01:14 AM.

  8. #8
    Join Date
    Aug 2014
    Posts
    24
    Mentioned
    0 Post(s)
    Quoted
    13 Post(s)

    Default

    Quote Originally Posted by Large1 View Post
    Nevermind when I start in the bank it just stuck on the fixing camera part. then it says the problem again

    -- TRSMainscreen.findObject()
    ---- No colors found
    well i added a failsafe there ^^ ... now it should atleast leave the bank and find some fish
    it would be awesome if you try the script again ^^

    i tested it again and it worked fine for me
    Last edited by Samson420; 09-02-2014 at 04:54 AM.

  9. #9
    Join Date
    Aug 2014
    Location
    germany
    Posts
    47
    Mentioned
    4 Post(s)
    Quoted
    15 Post(s)

    Default

    nice script dude! will going to test it when im back at home.
    how long is it running for you now?

  10. #10
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    I don't plan on testing this out, mainly because I just started looking at the forums yesterday after a few years and have no idea how active I'll end up. However, since you asked for suggestions for improvements, I'd like to offer some.

    Starting out with your DeclarePlayers procedure, it would be nice if you went with the SRL Player Manager (full disclosure I have no idea how to do this because it's new to me too). I know that The Mayor touches on it a bit in his tutorial, and there is one by Coh3n on how to set up Simba/SRL which I think mentions how to make a script use the player manager. If not, there are a bunch of scripts around that use it and it's a good standard to use. It not only makes your script easier to use for new people (because it's standard), it also adds a bit of street cred to your work.

    I like the antiban options that you've included, but it looks like it will be performed one time per fishing spot, every time through the loop. Typically it will be performed many times while waiting for the fishing spot to disappear (I'll get to this) but the amount of times will be random, which makes it more human. Usually there is another line such as:

    Simba Code:
    if Random(100) > 90 then
    begin
      DoAntibanStuff
    end;

    This would give you a 10% chance of doing antiban while in the loop waiting for fish. Many people will have the option for the end user to select a percentage like so:

    Simba Code:
    const //At the top of the script
    AntibanPercent = 10


    //In your normal antiban procedure
    if Random(100) > (100-AntibanPercent) then
    begin
      DoAntibanStuff
    end;

    On an unrelated note, are there such things as random events ever anymore? Last time I was at SRL there were so many, like every hour or two an account would get stuck. I don't even see a random check in your script, so I assume that they are no more. This is much better for us anyway.

    At many points in your script, you have this:

    Simba Code:
    if not isLoggedIn() then
    begin
      players[currentPlayer].login();
    end;

    Especially if there aren't randoms anymore, I like the idea of just logging back in and trying to continue (typically that's why accounts got lost and logged out). In an instance like this, there's no reason to have a begin/end in this sequence, just

    Simba Code:
    if not isLoggedIn() then
      players[currentPlayer].login();

    if/then statements complete the line below them only if true, so if you only have one line of code to perform there's no reason to have begin/end.

    Walking to and from the spot seems good to me, SPS is implimented which is nice (to see that you know how to use it.)

    There are many little things that would make your code tidy and easier to go through, mainly using proper standards. Indent after begin (not the line with begin as it shows me you've done). This has no effect on function but it should help people like me read it easier.

    The one big change I'd love to see you impliment is a waiting system for the fishing spot. Anyone who has written a fishing script (myself included) hates trying to figure out when the spot disappears. When I became inactive a few years ago, we were just starting to tinker with pixleshifts to determine animation (I was, anyway. Probably other people had been using it a while). Now, there's a few great examples of how it should work. Coh3n's Draynor Chopper has a really good system outlining where the character is and the shifting. The key with fishing is to play with the times while checking the shift, because the animation is pretty long.

    What would make this script really nice would be a way to determine exactly when the character stops the fishing animation (full inventory or moved spot) and immediately relocating or going to bank. Currently yours just waits a set range and goes again. Inside of this waiting loop you could have antiban (here's where the % of antiban comes in). Without writing the exact code down (I don't have the pixleshift stuff memorized) it would look like this:

    Simba Code:
    procedure getfish();
    var
    x, y, fail, timer : integer;
    begin
    repeat
      if mainscreen.findObject(x, y, 14864837, 12, ['ishing'], MOUSE_RIGHT) then
       begin
        writeln('this Fish worked! Failcount now 0');
        fail := 0;
        wait(X) // I'd add a wait in case there's a bit of lag in the menu  
        chooseOption.select(['et']);
        timer := starttimer //I can't remember this function name, but you want to set a timer starting at 0 so you can time out the repeat loop if required
        repeat
          antibanFishing();
          if pixelshift() > X then //The exact parameters to this function should be easy to find.
            break; //This quits the loop and you would have some logic here to start the function over again if the inventory isn't full.
          wait (randomRange(1000,2000));
        until (timer > 60000) // this would be a 1 minute time out
       end else
       begin
        inc(fail);
        writeln('can`t find fish :(! failcount: ' +intToStr(fail));
        if fail > 20 then
        begin // I've added these in as per the discussion above about if/then statements
          writeln(' 21 failes ?! we look for a new path ...');
          goFishing();
        end;
       end;
    until tabBackPack.isFull();
    end;

    Hopefully any of this helps, I realize it would be better if I knew the SRL6 include better but I really have 0 experience with it. You're definitely on the right track though, a script that works for 6 hours is nothing to be upset about. Just work on having sound logic throughout the script, a good system for waiting on whatever you're doing, and you'll be doing great. Any other questions feel free to ask.

    Full disclosure that none of these changes will probably compile the way I wrote them, because they're different in SRL6 and I don't know the arguments for the functions. The ideas are coming from experience though, I swear.

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  11. #11
    Join Date
    Aug 2014
    Posts
    24
    Mentioned
    0 Post(s)
    Quoted
    13 Post(s)

    Default

    thanks #3Garrett3 thats the kind of feedback i want to have
    My next script can be even more improved now ^^ I'm thinking about making an Air-Runer or maybe a Nature-Crafter, also some sort of Crafting-guild-farmer would be fun i think ... lets see what is going to happen
    Last edited by Samson420; 09-03-2014 at 07:56 AM.

  12. #12
    Join Date
    Aug 2014
    Location
    Australia
    Posts
    932
    Mentioned
    53 Post(s)
    Quoted
    495 Post(s)

    Default

    Quote Originally Posted by Samson420 View Post
    thanks #3Garrett3 thats the kind of feedback i want to have
    My next script can be even more improved now ^^ I'm thinking about making an Air-Runer or maybe a Nature-Crafter, also some sort of Crafting-guild-farmer would be fun i think ... lets see what is going to happen
    It's totally up to you, and it's cool if you do decide to just start another script, but I would personally recommend that you keep updating this script and add onto it as you go, maybe even rewriting it from scratch once you learn how to implement Garrett's suggestions and add support for more fish/locations. The reason I say this is because I've written six scripts in the last month, and only one of them is any good. Had I spent the last month working on a single script, it would be practically flawless by now and I would have learned a lot more. Just my two cents on that, and it's totally up to you.

    As for the script, Garrett said everything I wanted to say and more, so I have nothing else to add. I'll go test it for you now and report any issues.

    EDIT: Just ran it for 23 minutes, here's a proggy and some feedback...

    Progress Report:
     .:. .:. .:. .:. .:. .:. .:. .:. .:. .:. 
     .:. Samson420`s Slowpoke fish Draynor 
     .:. Time Run: 22 Minutes and 44 Seconds
     .:. Fish caught: 84
     .:. Fish per Hour: 222
     .:. estimated EXP: 1680
     .:. estimated EXP per Hour: 4433
     .:. .:. .:. .:. .:. .:. .:. .:. .:. .:.


    The script managed to do 3 loads, but at the end of each load it would repeatedly attempt to fish (at least 2 times, one of the loads was banked after 4 attempts at fishing with a full backpack) despite the backpack being full already. I'm not sure why it did this, and I can't find anything in your code that stands out as a reason to me. Also, while fishing your fail integer repeatedly incremented, but I'm not sure of why that happens either.

    The only useful piece of feedback that I have () is that, on top of updating your script to match the standards, you could make your "main loop" look a lot more clean by putting Prog() inside of your other procedures instead of calling it after each procedure is completed.

    So this:

    Simba Code:
    repeat
    goFishing();
    Prog();
    getFish();
    Prog();
    goBanking();
    Prog();
    doBank();
    Prog();
    until false

    ... would look like this:

    Simba Code:
    repeat
      goFishing();
      getFish();
      goBanking();
      doBank();
    until false

    Much neater, don't you agree?

    Finally, just a quick question (and I actually have no idea, this is actually something I haven't learned yet), will your script ever finish if the only condition in the repeat..until statement is "false"? When will the script become "false"? Or is this an intended feature that the script needs to be stopped manually?

    Either way, congratulations on your first released script, I hope you enjoy scripting and stick around!
    Last edited by Incurable; 09-03-2014 at 11:24 AM.

  13. #13
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    Quote Originally Posted by Incurable View Post
    Finally, just a quick question (and I actually have no idea, this is actually something I haven't learned yet), will your script ever finish if the only condition in the repeat..until statement is "false"? When will the script become "false"? Or is this an intended feature that the script needs to be stopped manually?
    The way that the script is currently set up, it will never "finish". What I like to do is inside of all of my scripts is to have something where if the script messes up (can't find fish, lost, stuck, etc) it logs out and sets the player inactive, and I can call something like this:

    Simba Code:
    if not LoggedIn then
      Exit;

    At the top of all of my functions (so it doesn't bother trying to continue) and then at the end I would have

    Simba Code:
    repeat
      Everything
    until (AllPlayersInactive)

    Then it will repeat for every player, log out when lost, and just continue with whatever active players are left. Once all of them are lost, stuck, or done whatever their task was, it quits.

    *Disclaimer: All of these functions are memorized from SRL5 and probably don't exist anymore.

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  14. #14
    Join Date
    Aug 2014
    Location
    Australia
    Posts
    932
    Mentioned
    53 Post(s)
    Quoted
    495 Post(s)

    Default

    Quote Originally Posted by 3Garrett3 View Post
    The way that the script is currently set up, it will never "finish". What I like to do is inside of all of my scripts is to have something where if the script messes up (can't find fish, lost, stuck, etc) it logs out and sets the player inactive, and I can call something like this:

    Simba Code:
    if not LoggedIn then
      Exit;

    At the top of all of my functions (so it doesn't bother trying to continue) and then at the end I would have

    Simba Code:
    repeat
      Everything
    until (AllPlayersInactive)

    Then it will repeat for every player, log out when lost, and just continue with whatever active players are left. Once all of them are lost, stuck, or done whatever their task was, it quits.

    *Disclaimer: All of these functions are memorized from SRL5 and probably don't exist anymore.
    Thanks for the explanation, and that is actually a really good idea. I'm going to have to steal that if there's no better way to do it with existing SRL-6 procedures, thanks.

    As for SRL-5, as far as I can tell, most of the stuff from SRL-5 still exists in SRL-6, it's just written/done differently. For example, LoggedIn is isLoggedIn in SRL-6.

  15. #15
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    Quote Originally Posted by Incurable View Post
    Thanks for the explanation, and that is actually a really good idea. I'm going to have to steal that if there's no better way to do it with existing SRL-6 procedures, thanks.

    As for SRL-5, as far as I can tell, most of the stuff from SRL-5 still exists in SRL-6, it's just written/done differently. For example, LoggedIn is isLoggedIn in SRL-6.
    Yeah from what I've seen it's the same functions named differently. I feel comfortable suggesting methods but I have no idea what they're actually called anymore.

    It's absolutely fine to use my ideas, as I'm sure that anyone releasing scripts would be glad to let you learn from their methods as well. Usually as long as you give credit (and ask if borrowing larger parts) nobody will mind. There's many ways to solve problems with SRL, and everyone has different preferences.

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  16. #16
    Join Date
    Aug 2014
    Location
    Australia
    Posts
    932
    Mentioned
    53 Post(s)
    Quoted
    495 Post(s)

    Default

    Quote Originally Posted by 3Garrett3 View Post
    Yeah from what I've seen it's the same functions named differently. I feel comfortable suggesting methods but I have no idea what they're actually called anymore.

    It's absolutely fine to use my ideas, as I'm sure that anyone releasing scripts would be glad to let you learn from their methods as well. Usually as long as you give credit (and ask if borrowing larger parts) nobody will mind. There's many ways to solve problems with SRL, and everyone has different preferences.
    It's that exact attitude that has made me love this community from the moment I hit register. I've been here less than a month and already I've received help from a dozen different people on various questions.

    Are you aware of OSRS and the current OSRS include? Because it uses SRL-5 (for now) and you're still used to that. Might give you a reason to be active again.

  17. #17
    Join Date
    Aug 2014
    Posts
    24
    Mentioned
    0 Post(s)
    Quoted
    13 Post(s)

    Default

    Quote Originally Posted by 3Garrett3 View Post
    Yeah from what I've seen it's the same functions named differently. I feel comfortable suggesting methods but I have no idea what they're actually called anymore.

    It's absolutely fine to use my ideas, as I'm sure that anyone releasing scripts would be glad to let you learn from their methods as well. Usually as long as you give credit (and ask if borrowing larger parts) nobody will mind. There's many ways to solve problems with SRL, and everyone has different preferences.
    thx a lot for even more Addings and improvments ... but i guess i wont update this script much much further ... if i find the time i will put it to an good working state and stop the improvements, just because it isn't that usefull to anyone i think ... there are better ways to spend your time with ^^

    Thx @Incurable for the small proggy ^^ i think it's awesome to know that other people try to user ur scripts even if they are not that smoothly working xD ... i will improve that on the next one

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
  •