Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import org.rsbot.script.Script;
- import org.rsbot.script.ScriptManifest;
- import org.rsbot.script.wrappers.RSObject;
- import org.rsbot.script.wrappers.RSNPC;
- @ScriptManifest(authors = "Alfansor", name = "Alfies FishnDrop", version = 0.1, description = "Just go to the trout/salmon spot near barbarian village and run the script.")
- public class AlfFishnDrop extends Script {
- int[] Inventory = { 309, 314};
- int[] spotID = {328};
- Thread abThread;
- public boolean onStart() {
- log("Welcome to Alfies FishnDrop!");
- log.severe("NEN IS AWESOME!");
- abThread = new Thread(new antiBan());
- abThread.start();
- return true;
- }
- private void Lure() {
- RSNPC lureSpot = npcs.getNearest(spotID);
- if (lureSpot != null && getMyPlayer().getAnimation() == -1) {
- lureSpot.doAction("Lure");
- }
- }
- private void dropFish() {
- inventory.dropAllExcept(Inventory);
- }
- public void onFinish() {
- abThread = null;
- log("Thanks for using Alfies FishnDrop.");
- }
- public int loop() {
- if (inventory.isFull()) {
- dropFish();
- } else if (!inventory.isFull()) {
- Lure();
- }
- return (random(600, 1250));
- }
- class antiBan extends Thread {
- public void run() {
- while(abThread != null) {
- int state = random(0,6);
- switch(state) {
- case 1:
- int currTab = game.getCurrentTab();
- game.openTab(random(0,5));
- sleep(random(1000,4000));
- game.openTab(currTab);
- break;
- case 2:
- camera.setAngle(random(0,360));
- break;
- case 3:
- camera.setPitch(random(0,100));
- break;
- case 4:
- mouse.moveSlightly();
- sleep(random(850,1150));
- mouse.moveSlightly();
- break;
- }
- Thread.sleep(5000);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement