Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. import org.rsbot.script.Script;
  2. import org.rsbot.script.ScriptManifest;
  3. import org.rsbot.script.wrappers.RSObject;
  4. import org.rsbot.script.wrappers.RSNPC;
  5.  
  6. @ScriptManifest(authors = "Alfansor", name = "Alfies FishnDrop", version = 0.1, description = "Just go to the trout/salmon spot near barbarian village and run the script.")
  7. public class AlfFishnDrop extends Script {
  8.  
  9. int[] Inventory = { 309, 314};
  10. int[] spotID = {328};
  11. Thread abThread;
  12.  
  13. public boolean onStart() {
  14. log("Welcome to Alfies FishnDrop!");
  15. log.severe("NEN IS AWESOME!");
  16. abThread = new Thread(new antiBan());
  17. abThread.start();
  18. return true;
  19.  
  20. }
  21. private void Lure() {
  22. RSNPC lureSpot = npcs.getNearest(spotID);
  23. if (lureSpot != null && getMyPlayer().getAnimation() == -1) {
  24. lureSpot.doAction("Lure");
  25. }
  26. }
  27.  
  28. private void dropFish() {
  29. inventory.dropAllExcept(Inventory);
  30. }
  31.  
  32. public void onFinish() {
  33. abThread = null;
  34. log("Thanks for using Alfies FishnDrop.");
  35. }
  36.  
  37.  
  38.  
  39. public int loop() {
  40. if (inventory.isFull()) {
  41. dropFish();
  42. } else if (!inventory.isFull()) {
  43. Lure();
  44. }
  45. return (random(600, 1250));
  46.  
  47. }
  48.  
  49. class antiBan extends Thread {
  50. public void run() {
  51. while(abThread != null) {
  52. int state = random(0,6);
  53. switch(state) {
  54. case 1:
  55. int currTab = game.getCurrentTab();
  56. game.openTab(random(0,5));
  57. sleep(random(1000,4000));
  58. game.openTab(currTab);
  59. break;
  60. case 2:
  61. camera.setAngle(random(0,360));
  62. break;
  63. case 3:
  64. camera.setPitch(random(0,100));
  65. break;
  66. case 4:
  67. mouse.moveSlightly();
  68. sleep(random(850,1150));
  69. mouse.moveSlightly();
  70. break;
  71. }
  72. Thread.sleep(5000);
  73. }
  74. }
  75. }
  76.  
  77. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement