SqueezeTheorem Posted February 25, 2018 Share Posted February 25, 2018 (edited) Introduction: EDIT:Just noticed like 1000 other people have made this same script lol. Hopefully when I add account replacement and automatic muling it'll actually be more useful than it is now. Hey guys. SqueezeTheorem here. I'm a computer science student, and I like to code weird stuff in my free time. This is my current project, and once It's done, I think it'll be pretty cool. My goal is to create a bot you can run that will create a self-repairing network of lobster fishing bots and mules that will replace themselves as they get banned. I've got it in my head how this whole thing is supposed to work and what technology i need to use to get there, and now it's just a matter of sitting down and writing the code. This project is a means to an end. I don't really want a lobster fishing network. I want a network for a more profitable kind of bot, but since there's no overhead and no real risk with f2p lobster fishing, this is a great way to test the efficacy of a self-repairing network and explore if it's worth pursuing another kind of network like this. When the bot is completed, the only thing you'll have to do management wise is check up on your mule accounts and make sure the database has unbanned accounts to use -- that's it. Right now, this script is still usable and somewhat useful. You start the bot with coins, a small net, and a lobster pot in the Lumbridge swamp. From there, it gets level 45 fishing, and then heads off to karamja to catch lobsters. These are the only features so far. Goals: 1. Have the bot be able to complete tutorial island 2. Have the bot power fish until level 45 3. Once level 45, have the bot get coins and a lobster pot from a mule account where it then continues to fish lobster 4. Use a MySQL database to manage accounts, and allow for multiple bot networks to connect to one MySQL "hub" as a means of communication 5. Have all accounts marked as "fishing" mule their caught lobsters to a random mule account from the MySQL database after every X number of lobsters, but only if the account is at least 18 hours old 6. Once an account is banned, have the bot log in to the next account from the MySQL DB and repeat this process 7. Implement obscure, awkward antiban (ie: the bot will, on a random time interval, find a nearby player and address them by name in conversation, randomly using emotes, etc) Current Features: - Power fishes lobsters and anchovies until level 45 fishing, and then travels to karamja to catch lobster - Randomly AFKs for 0 - 180 seconds. The chance of this occurring is 1/33 every time the bot clicks on a fishing pool. - That's it. It's a fishing bot, what were you expecting? Instructions: 1. Start with some coins (15k - 25k), a small fishing net, and a lobster pot. 2. Start the bot, preferably near the lumbridge swamp. 3. Let the bot catch lobsters until its banned. Mule as needed. Known issues: - If you get to level 45 fishing and don't have any coins, the bot is gonna derp out. Same story if it runs out of money. I have no idea what it'll do. TODO: - Fully automatic muling using MySQL - MySQL support to allow for banned accounts to be easily replaced by those in a queue, creating a near fully-auto farm. - Add support for starting without money/selling lobsters to get more money for travel - Built in Tutorial Island solver for truly godly automation Currently working on: Tutorial island solver Download: https://www.dropbox.com/s/1gp8ezp3u13r6w7/NewbFisher.jar?dl=0 Source: Spoiler package squeezetheorem.newbfisher.main; import java.awt.Color; import java.awt.Graphics2D; import java.util.Random; import org.osbot.rs07.api.map.Area; import org.osbot.rs07.api.model.NPC; import org.osbot.rs07.api.model.RS2Object; import org.osbot.rs07.api.ui.Skill; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; @ScriptManifest(author = "SqueezeTheorem", info = "Powerfishes shrimp and anchoves until level 45 fishing, and then goes to Karamja to catch and deposit lobster", name = "NewbFisher", version = 0.1, logo = "") public class Main extends Script { Area swamp = new Area(3250, 3156, 3237, 3142); Area docks = new Area(2918, 3172, 2930, 3180); Area depoArea = new Area(3043, 3236, 3047, 3235); int startXP = -1; int startLevel = -1; int currentXP = -1; int currentLevel = -1; long startTime = -1; @Override public void onStart() { startTime = System.currentTimeMillis(); log("NewbFisher initialized."); } @Override public int onLoop() throws InterruptedException { shrimp(); lobster(); return random(1000, 1500); } private void shrimp() { if (skills.getStatic(Skill.FISHING) >= 45) return; shrimpGoTo(); shrimpFish(); dropShrimp(); } private void shrimpGoTo() { if (!myPlayer().isMoving() && !myPlayer().isAnimating() && !inventory.isFull() && !swamp.contains(myPlayer().getPosition())) { walking.webWalk(swamp.getRandomPosition()); } } private void shrimpFish() { if(!myPlayer().isAnimating() && !myPlayer().isMoving() && swamp.contains(myPlayer().getPosition()) && !inventory.isFull()) { NPC pool = npcs.closest(1530); if(pool != null) { pool.interact("Net"); } try { sleep(random(5000, 7500)); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } AFK(); } } private void dropShrimp() { if(inventory.isFull() && !myPlayer().isMoving() && !myPlayer().isAnimating()) { inventory.dropAll("Raw shrimps"); inventory.dropAll("Raw anchovies"); } } private void lobster() { if(skills.getStatic(Skill.FISHING) <= 44) return; lobsterGoTo(); lobsterFish(); depositLobster(); } private void lobsterGoTo() { if(!myPlayer().isMoving() && !myPlayer().isAnimating() && !inventory.isFull() && !docks.contains(myPlayer().getPosition())) { walking.webWalk(docks.getRandomPosition()); } } private void lobsterFish() { if(!myPlayer().isAnimating() && !myPlayer().isMoving() && docks.contains(myPlayer().getPosition()) && !inventory.isFull()) { NPC pool = npcs.closest(1522); if(pool != null) { pool.interact("Cage"); } try { sleep(random(5000, 7500)); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } AFK(); } } private void depositLobster() { if(!myPlayer().isAnimating() && !myPlayer().isMoving() && inventory.isFull()) { if(!depoArea.contains(myPlayer().getPosition())) walking.webWalk(depoArea.getRandomPosition()); while(!depositBox.isOpen()) { RS2Object depoBox = getObjects().closest("Bank deposit box"); if(depoBox != null) { depoBox.interact("Deposit"); } try { sleep(2500); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } while(depositBox.isOpen() && inventory.isFull()) { depositBox.depositAllExcept("Coins", "Lobster pot"); } while(!inventory.isFull() && depositBox.isOpen()) { depositBox.close(); } } } private void AFK() { Random RNG = new Random(); int out = RNG.nextInt(33) + 1; if(out == 2) { int time = RNG.nextInt(180000) + 1; try { log("Going AFK for " + time + "ms."); sleep(time); } catch(Exception exc) { exc.printStackTrace(); } } } @Override public void onExit() { log("Thanks for being a newb."); } @Override public void onPaint(Graphics2D g) { long timeElapsed = System.currentTimeMillis() - startTime; long second = (timeElapsed / 1000) % 60; long minute = (timeElapsed / (1000 * 60)) % 60; long hour = (timeElapsed / (1000 * 60 * 60)) % 24; int levelsGained = currentLevel - startLevel; int xpGained = currentXP - startXP; if(myPlayer().isOnScreen()) { if(startXP == -1) { startXP = skills.getExperience(Skill.FISHING); } if(startLevel == -1) { startLevel = skills.getStatic(Skill.FISHING); } currentXP = skills.getExperience(Skill.FISHING); currentLevel = skills.getStatic(Skill.FISHING); } g.setColor(new Color(255, 0, 255)); g.drawString("XP gained: " + xpGained, 25, 25); g.drawString("Levels gained: " + levelsGained, 25, 50); g.drawString("Runtime: " + (hour + ":" + minute + ":" + second), 25, 75); } } Edited February 26, 2018 by SqueezeTheorem fixed a couple mistakes and stuff 6 Quote Link to comment Share on other sites More sharing options...
Jack Sparrow Posted February 26, 2018 Share Posted February 26, 2018 Good luck with this Quote Link to comment Share on other sites More sharing options...
Dab in a Lab Posted February 26, 2018 Share Posted February 26, 2018 Looking forward to that automated muling. Adding a 7qp completer after tutorial island would be the cherry on top. Good luck 1 Quote Link to comment Share on other sites More sharing options...
taraz Posted February 26, 2018 Share Posted February 26, 2018 shiiit kinda automatic farm :P Quote Link to comment Share on other sites More sharing options...
SqueezeTheorem Posted February 26, 2018 Author Share Posted February 26, 2018 Shit, didn't expect anyone to even reply to this haha. I've made some progress with the tutorial island solver. OSBot has an amazing API, so it's much easier than it would have been with other clients. There's a few kinks to iron out, but hopefully I can complete it by this weekend. 1 Quote Link to comment Share on other sites More sharing options...
scriptersteve Posted February 26, 2018 Share Posted February 26, 2018 Very nice matey, https://github.com/Explv/Tutorial-Island may help you if u get stuck on tut island. I am sure you will be fine though 1 Quote Link to comment Share on other sites More sharing options...
SqueezeTheorem Posted February 27, 2018 Author Share Posted February 27, 2018 (edited) 6 hours ago, scriptersteve said: Very nice matey, https://github.com/Explv/Tutorial-Island may help you if u get stuck on tut island. I am sure you will be fine though Ay, thanks for the link. Didn't think about getting the tutorial island's progress percentage like that script does. Thanks for sending it my way. Edited February 27, 2018 by SqueezeTheorem Quote Link to comment Share on other sites More sharing options...
taraz Posted March 12, 2018 Share Posted March 12, 2018 (edited) On 27.2.2018 at 2:28 AM, SqueezeTheorem said: Ay, thanks for the link. Didn't think about getting the tutorial island's progress percentage like that script does. Thanks for sending it my way. Please add Tut island + 7 Quest points. It will be awesome! Write to me when the script is mule able :P Edited March 12, 2018 by taraz 1 Quote Link to comment Share on other sites More sharing options...
pallmalled Posted March 12, 2018 Share Posted March 12, 2018 Bruh that is such a nice script mate, could u pm me your skype or discord? I'd like to chat with you Quote Link to comment Share on other sites More sharing options...
Vainiven Posted March 13, 2018 Share Posted March 13, 2018 Why does it powerlevel until 45 btw instead of 40? 1 Quote Link to comment Share on other sites More sharing options...
SqueezeTheorem Posted March 16, 2018 Author Share Posted March 16, 2018 I've made some progress with this. Using an open source tutorial island solver and quester, I was able to make a script that completed tutorial island & got 7 qp all in one go. I've got a serious problem with this that I can't yet resolve with scripting... It's a much larger logistical challenge and it's gonna require the right VPN/VPS provider to get it done. On 3/13/2018 at 6:49 PM, Vainiven said: Why does it powerlevel until 45 btw instead of 40? fishing at level 40 is somewhat slow, so I just had the script go to level 45 instead. Very easy to adjust. Quote Link to comment Share on other sites More sharing options...
osrs42 Posted March 16, 2018 Share Posted March 16, 2018 I wish I was cool enough to make scripts like this lol Quote Link to comment Share on other sites More sharing options...
fgsfdsfgh Posted March 20, 2018 Share Posted March 20, 2018 man this looks super promising i love mule scriprters. cant wait to be proficient in java in a few years and ill join the ranks with u guys ha ha Quote Link to comment Share on other sites More sharing options...
zekeria Posted April 10, 2018 Share Posted April 10, 2018 does this work or did u drop out o.0 Quote Link to comment Share on other sites More sharing options...
delirious93 Posted May 1, 2018 Share Posted May 1, 2018 I wish I could write a script like this Quote Link to comment Share on other sites More sharing options...