Jump to content

[Free] ShrimpFisher


Recommended Posts

Posted
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.

Posted
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 :) 

  • Like 1
Posted (edited)

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 by Jammer
  • Like 1
Posted
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

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...