January 20, 20188 yr Hey guys, Just made my first script, it powerfishes at lumbridge and has basic anti ban. Screeny: https://gyazo.com/c658a0b78a38fe527b782978483ec220 ShrimpFisher.jar
January 20, 20188 yr Good first script, however NPC ids change every Thursday. Good job on keeping it clean, not a fan of calling that antiban though.
January 20, 20188 yr Author 6 minutes ago, Alek said: Good first script, however NPC ids change every Thursday. Good job on keeping it clean, not a fan of calling that antiban though. Thanks for the input :p, I had no idea that the Id's changed I suppose I should be finding the npc's by name then. I'm gonna look for some better ways to prevent bans then.
January 20, 20188 yr 27 minutes ago, Heroic said: Thanks for the input :p, I had no idea that the Id's changed I suppose I should be finding the npc's by name then. I'm gonna look for some better ways to prevent bans then. You won't be able to prevent bans, there is literally nothing you can do. Just focus on improving your scripts and finding a way to handle searching for the NPCs without directly using the ids. Let us know once you found your solution
January 20, 20188 yr Great first script in addition to what alek said about the anti-ban there are a couple of things you need to change. I took the libery to decompile your jar. if (myPlayer().getAnimation() == 621) return random(600, 60000); You have if statements like this in many places of your code. This doesn't actually do anything except for returning a random integer. if (fishingSpot == null) return random(600, 60000); fishingSpot.interact(new String[] { "Net" }); Same thing here, returns a random Integer with no use. Also, you need to include the interaction inside the if statement. Otherwise you'll get a nullpointer exception if the fishingspot is null. if (random(0, 5) != 2) { mouse.moveOutsideScreen(); } This would make it move the mouse outside the screen all the time if it weren't for this: return random(600, 60000); } The return value should be a couple hundred ms. This will cause the script to sometimes sleep for 60sec and on average about 30. Going back to the previous code, if you have a normal return value like 200 the random int will be 2 every other second thus moving the mouse outside of screen back and forth constantly. Edited January 20, 20188 yr by Jammer
January 20, 20188 yr Author 1 hour ago, Jammer said: Great first script in addition to what alek said about the anti-ban there are a couple of things you need to change. I took the libery to decompile your jar. if (myPlayer().getAnimation() == 621) return random(600, 60000); You have if statements like this in many places of your code. This doesn't actually do anything except for returning a random integer. if (fishingSpot == null) return random(600, 60000); fishingSpot.interact(new String[] { "Net" }); Same thing here, returns a random Integer with no use. Also, you need to include the interaction inside the if statement. Otherwise you'll get a nullpointer exception if the fishingspot is null. if (random(0, 5) != 2) { mouse.moveOutsideScreen(); } This would make it move the mouse outside the screen all the time if it weren't for this: return random(600, 60000); } The return value should be a couple hundred ms. This will cause the script to sometimes sleep for 60sec and on average about 30. Going back to the previous code, if you have a normal return value like 200 the random int will be 2 every other second thus moving the mouse outside of screen back and forth constantly. Yea I didn't really think about a lot of these returns, the purpose of the long waiting times though was to simulate the "player" being AFK. Ill be updating the script over the next couple of days.
Create an account or sign in to comment