Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import org.osbot.rs07.api.model.Entity;
- import org.osbot.rs07.script.Script;
- import org.osbot.rs07.script.ScriptManifest;
- @ScriptManifest(name = "vFisher", author = "Vliegvuur", version = 1.0, info = "An efficient fisher lol", logo = "")
- public class vFisher extends Script {
- public int fishingSpot = 1542;
- public int[] fishingGear = { 11323, 314 };
- public int[] fishToDrop = { 11328, 11330, 11332 };
- public int[] fishingTiles = { 2499, 3507 };
- public String useRod = "Use-rod Fishing Spot";
- @Override
- public int onLoop() throws InterruptedException {
- doFish();
- dropFish();
- return 100;
- }
- public boolean isAtSpot() {
- if (myPlayer().getPosition().equals(fishingTiles)) {
- return true;
- } else {
- return false;
- }
- }
- public void dropFish() {
- if (inventory.isFull()) {
- inventory.dropAllExcept(fishingGear);
- }
- }
- public void doFish() {
- Entity spot = getNpcs().closest(fishingSpot);
- if (myPlayer().getPosition().equals(isAtSpot())) {
- if (spot != null && spot.isVisible()) {
- if (!myPlayer().isAnimating()) {
- spot.interact(useRod);
- }
- } else { // if the spot isn't visible and null
- camera.toEntity(spot);
- }
- } else { // player isn't at the fishing spot
- walking.walk(spot);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement