# Thread: Fork of KeepBotting's iKaramjaFisher: enchSwordfisher

1. SRL Junior Member
Join Date
Jun 2013
Posts
25
Mentioned
0 Post(s)
Quoted
9 Post(s)

## Fork of KeepBotting's iKaramjaFisher: enchSwordfisher

Hey all, with permission from @KeepBotting and pending permission from @footballjds (though assumed due to his indirect permission for KeepBotting to use his stuff in the first place), I present enchSwordfisher. This is a fork of KeepBotting's awesome script iKaramjaFisher. Meant for higher level F2P fishermen, this script will harpoon tuna and swordfish. It will drop all tuna until you have a full inventory of swordfish, at which point it will note the swordfish at Stiles.

Effectively all credit for this goes to KeepBotting and footballjds, I have only made a few minor modifications to the original script and can't thank those dudes enough. Even this post is mostly taken from his script's page. This is my first contribution to Simba and I'm looking for some good feedback, please be critical and honest. The code is currently stored as an anonymous Gist on GitHub, looking for recommendations for a better service. Been running it for a couple hours and it's been working great so far. Looking forward to hearing what you guys have to say.

KeepBotting and footballjds, if you have any problems at all with the credit I have given you please let me know, I'm more than happy to give as much as you'd like.

enchSwordfisher

Version: BETA

Features
• Fishes tuna/swordfish with incredible speed (>30k xp/hr)!
• Notes swordfish at Stiles and drops tuna!
• 100% color!
• Fast & accurate object finding using DTMs, TPAs, ATPAs, and T2DPAs.
• Robust antipattern to reduce ban rates to an absolute minimum!
• Informative progress report, painted on SMART!
• Passes the 6-hour limit!
• Fast and accurate pathfinding using SPS!
• Compatible with RS3 and uses SRL-6!
• Numerous failsafes to prevent script failure!

How to Use
0) MAKE SURE YOU'RE USING DIRECT-X MODE! Log in to RS > Press Esc > Graphics Options > Custom > Direct-X THE SCRIPT WILL NOT WORK ON OPENGL MODE!

1) Fill out your player info.

Simba Code:
/////////////////////////////////// Start setting up the script here./////////////////////////////////// Refer to the comments/thread if you don't know what you're doing./////       Start Setup     /////////////////////////////////////////////////////////////////////////////const  (* player info *)  PLAYER_NAMES  = ['']; // Put your player's name (or nickname, if you set one) here.  PLAYER_FILE   = 'default'; // Put your playerFile's name here. Default is 'default'.  DESIRED_WORLD = 3; // Enter your desired world number here. 0 for random.  (* options *)  // These will need adjusting based on your fishing level  // They're in seconds, NOT milliseconds  MIN_WAIT = 8;  // MIN wait for catching a fish, make this HIGHER if it waits too SHORT (clicking on another spot while still fishing)  MAX_WAIT = 12; // MAX wait for catching a fish, make this LOWER if it waits too LONG (doing nothing for a long time after spot is gone)  // Default values for these should be just fine.  // If you must change, lower = slower, higher = faster  MIN_MOUSE_SPEED = 15; // MIN speed at which to move the mouse  MAX_MOUSE_SPEED = 20; // MAX speed at which to move the mouse  PROGGY = true; // Set this to true or false based on whether or not you want a proggy///////////////////////////////////Don't modify the script ANY FURTHER unless you know what you're doing. You could break stuff!////////////////////////////////////////       Stop Setup      /////////////////////////////////////////////////////////////////////////////Don't modify the script ANY FURTHER unless you know what you're doing. You could break stuff!

2) Place your character at the Karamja fishing spot, at Stiles, or anywhere along the path in between!
3) Set up your action bar with tuna in the first slot & make sure you're in action mode.
4) Zoom all the way OUT.
5) Start the script!

Requirements
1) Level 50 Fishing.
2) A harpoon or lobster cage in your toolbelt.

-> You MUST be on Direct-X mode for this script to run properly.
-> This script uses the SPS map and walking paths from @footballjds' Karamja fishing script (with (indirect) permission).
Last edited by enchilada; 05-11-2016 at 03:38 AM.

2. SRL Member
Join Date
Jan 2012
Posts
1,596
Mentioned
78 Post(s)
Quoted
826 Post(s)
fixed. https://gist.github.com/turpinator/6...ff765d598deea9
Shuffled the smart get params code and the player declaration around so the player is back at the top and cant be missed.

3. Originally Posted by Turpinator
fixed. https://gist.github.com/turpinator/6...ff765d598deea9
Shuffled the smart get params code and the player declaration around so the player is back at the top and cant be missed.
Is all this overriding stuff for spawning smart still needed?

4. SRL Member
Join Date
Jan 2012
Posts
1,596
Mentioned
78 Post(s)
Quoted
826 Post(s)
Originally Posted by Harrier
Is all this overriding stuff for spawning smart still needed?
Idk. depends if srl got updated or we actually sorted out the correct params.

5. SRL Junior Member
Join Date
Jun 2013
Posts
25
Mentioned
0 Post(s)
Quoted
9 Post(s)
Originally Posted by Turpinator
fixed. https://gist.github.com/turpinator/6...ff765d598deea9
Shuffled the smart get params code and the player declaration around so the player is back at the top and cant be missed.
Good call, thanks for that.

Originally Posted by Harrier
Is all this overriding stuff for spawning smart still needed?
Also interested if this is still necessary.

6. Originally Posted by Turpinator
Idk. depends if srl got updated or we actually sorted out the correct params.
Wizzup updated the files on his server and it loads fine for me.

7. SRL Junior Member
Join Date
Jun 2013
Posts
25
Mentioned
0 Post(s)
Quoted
9 Post(s)
Originally Posted by Harrier
Wizzup updated the files on his server and it loads fine for me.
Does Simba automatically pull those updates? Can I remove that snippet?

8. SRL Junior Member
Join Date
Dec 2013
Location
Pitcairn Island
Posts
288
Mentioned
20 Post(s)
Quoted
166 Post(s)
Does Simba automatically pull those updates? Can I remove that snippet?
If the user has the update settings set to automatic, else they will have to manually update SRL-6 (from within Simba). Either way you can remove that code as it's unnecessary.

9. SRL Junior Member
Join Date
Jun 2013
Posts
25
Mentioned
0 Post(s)
Quoted
9 Post(s)
Originally Posted by TSN
If the user has the update settings set to automatic, else they will have to manually update SRL-6 (from within Simba). Either way you can remove that code as it's unnecessary.
Sweet, pulling it out.

10. SRL Junior Member
Join Date
Jun 2013
Posts
25
Mentioned
0 Post(s)
Quoted
9 Post(s)
So I've run into an interesting bug a few times and am wondering if you guys can maybe help me figure it out. What's happpening is that the script gets stuck in an infinite loop when trying to drop tuna after filling up an inventory. The issue is that it's trying to hit the hotkey to drop but the conversation box is still up so nothing happens. Looks like the script is thinking that the conversation box is gone despite that it isn't? Any ideas?

11. SRL Junior Member
Join Date
Dec 2013
Location
Pitcairn Island
Posts
288
Mentioned
20 Post(s)
Quoted
166 Post(s)
So I've run into an interesting bug a few times and am wondering if you guys can maybe help me figure it out. What's happpening is that the script gets stuck in an infinite loop when trying to drop tuna after filling up an inventory. The issue is that it's trying to hit the hotkey to drop but the conversation box is still up so nothing happens. Looks like the script is thinking that the conversation box is gone despite that it isn't? Any ideas?
A hacky fix is to add a timer to the infinite loop in the dropping procedure so it times out:

until (tabBackpack.countDtm(dtmArr[0]) = 0) or (t.getTime() > random(5000, 10000));

A better solution would be to restructure that whole procedure, so it will recheck if the conversation box is open (as currently a false positive will lead it to get stuck in that loop).

12. SRL Junior Member
Join Date
Jun 2013
Posts
25
Mentioned
0 Post(s)
Quoted
9 Post(s)
New version in the original post that includes a fix for that bug, thanks for the advice @TSN. The new version also includes some cleaned up code, nothing that will cause any noticeable differences for the user.

Looks like the way the proggy is working doesn't work at all with this, so don't trust that output for now. I'll work on that in a few days.

13. SRL Member
Join Date
Jan 2012
Posts
1,596
Mentioned
78 Post(s)
Quoted
826 Post(s)
Looks like the way the proggy is working doesn't work at all with this, so don't trust that output for now. I'll work on that in a few days.
Function > form

14. SRL Junior Member
Join Date
Jun 2013
Posts
25
Mentioned
0 Post(s)
Quoted
9 Post(s)
Alright I know this took a while, but I've finally put up a new version that has a fixed proggy. I haven't actually tested this new stuff but it does compile, and as any good engineer says about untested code, it should work.

I'll try testing it tonight and am at this point looking at releasing this in the public script forum either tonight or tomorrow.