nzb96 Posted May 17 Share Posted May 17 (edited) Hi I just made my first script, I used it for like an hour or two with breaks, next day it was banned. I wanted to ask what are the most obvious things I screwed up in the script. For context, the account was created ~ 2years ago, it was about 300 total and f2p, I did play manually on it till this point (2 years ago) It was fishing trouts in lumbridge. I used built in breaks ~ 15-50 min of botting with 5-20 min breaks. Used stealth client, on mac with java17 in case it makes any difference My thoughts are that I probably should avoid some parts of api, and somehow implement my own mouse movement patterns, but dunno whether it is valid ideas. Let's ignore the code quality I am not java dev ;-; import org.osbot.rs07.api.map.Area; import org.osbot.rs07.api.model.Item; import org.osbot.rs07.api.model.NPC; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.utility.Condition; import org.osbot.rs07.utility.ConditionalSleep; import java.util.Arrays; import java.util.stream.IntStream; @ScriptManifest(author = "Nzb", info = "Lumbridge trout fisher", logo = "", name = "Lumbridge Fisher", version = 1) public class Fisher extends Script { static final String[] SUPPORTED_FISHES = {"Raw trout", "Raw salmon"}; private final Area fishArea = new Area(3238, 3255, 3242, 3235); @Override public void onStart() throws InterruptedException { checkPreconditions(); setUpInventory(); log(getInventory().getSlotBoundingBox(0)); } @Override public int onLoop() throws InterruptedException { if (!fishArea.contains(myPlayer())) { walkToFishingSpot(); } else { fishTrouts(); } return 0; } private void walkToFishingSpot() { if (getWalking().webWalk(fishArea)) { new ConditionalSleep(random(1542, 2534), random(5129, 7412)) { @Override public boolean condition() { return fishArea.contains(myPlayer()); } }.sleep(); } } private void fishTrouts() throws InterruptedException { if (getInventory().isFull()) { sleep(random(500, 6000)); dropFish(); } if (!myPlayer().isAnimating()) { NPC fishingSpot = getNpcs().closest("Rod Fishing Spot"); fishingSpot.interact("lure"); getMouse().moveOutsideScreen(); sleep(random(2421, 6521)); } } private void dropFish() throws InterruptedException { int[] slotsWithFish = IntStream.rangeClosed(0, 25).toArray(); if (getSettings().isShiftDropActive()) getKeyboard().pressKey(16); for (int slotId : slotsWithFish) { log(slotId); Item item = getInventory().getItemInSlot(slotId); if (item != null) { log(item.getName()); if (Arrays.asList(SUPPORTED_FISHES).contains(item.getName())) { if (getSettings().isShiftDropActive()) { item.interact(); } } sleep(random(1052, 1370)); } } if (getSettings().isShiftDropActive()) getKeyboard().releaseKey(16); } private void checkPreconditions() { if (!getInventory().containsAll("Feather", "Fly fishing rod")) { stop(); } } private void setUpInventory() { int featherPosition = getInventory().getSlot("Feather"); int rodPosition = getInventory().getSlot("Fly fishing rod"); if (featherPosition != 26 & rodPosition != 27) { moveItemInSlot(featherPosition, 26); moveItemInSlot(rodPosition, 27); } } private void moveItemInSlot(int startSlot, final int endSlot) { if (getInventory().isItemSelected()) { getInventory().deselectItem(); } getMouse().continualClick(getInventory().getMouseDestination(startSlot), new Condition() { @Override public boolean evaluate() { getMouse().move(getInventory().getMouseDestination(endSlot), true); return getInventory().getMouseDestination(endSlot).getBoundingBox().contains(getMouse().getPosition()); } }); } } Edited May 17 by nzb96 Quote Link to comment Share on other sites More sharing options...
Alakazizam Posted May 17 Share Posted May 17 In my experience, if you're botting any common activity in f2p expect a ban. Quote Link to comment Share on other sites More sharing options...
Khaleesi Posted May 17 Share Posted May 17 f2p is always high ban rates, especially some hotspots Quote Link to comment Share on other sites More sharing options...
Czar Posted May 17 Share Posted May 17 If using the same exact script on a members world you’ll see different results Quote Link to comment Share on other sites More sharing options...
nzb96 Posted May 17 Author Share Posted May 17 Ok, thanks guys - btw are there any guidelines of what not to do in scripts? From what you all wrote it seems like if you get flagged for "macroing scan" you are doomed, is that correct? Quote Link to comment Share on other sites More sharing options...
FushigiBot Posted May 18 Share Posted May 18 Best script antiban is creating a script with 0 code in it. "Antiban" has not been shown to do anything. Jagex uses a flag system to monitor and ban accounts. If you were botting yesterday, you might've got caught in the w400 bot busting event. Quote Link to comment Share on other sites More sharing options...
yfoo Posted May 18 Share Posted May 18 (edited) For a fishing script I do the following. I generate a gaussian mean and std dev at script start. - AFK when fishing (mouse offscreen) + AFK afterwards for a gaussian random amount of time. - Drop fish even if inventory is nearly full after afking - Random shift click drop orders (ex: snake left/right, snake up down, ect...) F2p is just high ban rate. Pretty sure there are tons of false positives too. Edited May 18 by yfoo Quote Link to comment Share on other sites More sharing options...
nzb96 Posted May 18 Author Share Posted May 18 Thank you guys. Quote Link to comment Share on other sites More sharing options...