Advertisement
Guest User

Untitled

a guest
Dec 15th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.01 KB | None | 0 0
  1. package salamanderhunter;
  2.  
  3. import java.awt.Graphics;
  4. import net.runelite.api.coords.WorldPoint;
  5. import simple.hooks.scripts.Category;
  6. import simple.hooks.scripts.ScriptManifest;
  7. import simple.hooks.simplebot.ChatMessage;
  8. import simple.hooks.wrappers.SimpleObject;
  9. import simple.robot.script.Script;
  10. import simple.hooks.wrappers.SimpleItem;
  11.  
  12.  
  13. @ScriptManifest(
  14. author = "Esmaabi",
  15. category = Category.HUNTER,
  16. description = "Hunts for red salamander west of the Gnome-Khazard Battlefield at hunter icon. Have 6 ropes and 6 fishings net in inventory start at hunter icon!",
  17. discord = "Esmaabi#5752",
  18. name = "Red salamander hunter by Esmaabi",
  19. servers = { "Zenyte" },
  20. version = "1.0"
  21. )
  22. public class redsalamanderhunter extends Script {
  23.  
  24. private static final WorldPoint HUNTER_TILE = new WorldPoint(2448, 3226, 0);
  25.  
  26.  
  27. @Override
  28. public void onExecute() {
  29. System.out.println("Started Red Salamander hunter!");
  30. }
  31.  
  32. @Override
  33. public void onProcess() {
  34. if (this.ctx.players.getLocal().getLocation().distanceTo(HUNTER_TILE) > 5 && !this.ctx.inventory.inventoryFull()) {
  35. this.ctx.pathing.step(HUNTER_TILE);
  36.  
  37. } else {
  38. if (this.ctx.objects.populate().filter(new int[]{8990}) != null && !this.ctx.inventory.inventoryFull()) {
  39. SimpleObject Youngtree = ctx.objects.populate().filter(new int[]{8990}).next();
  40. Youngtree.click("Set-trap");
  41. ctx.sleep(3500);
  42.  
  43. } else {
  44.  
  45. if (this.ctx.objects.populate().filter(new int[]{8986}) != null && !this.ctx.inventory.inventoryFull()) {
  46. SimpleObject Check = ctx.objects.populate().filter(new int[]{8986}).next();
  47. Check.click("Check");
  48. ctx.sleep(3000);
  49. }
  50.  
  51. if (this.ctx.groundItems.populate().filter(new int[]{303, 954}) != null && !this.ctx.inventory.inventoryFull()) {
  52. SimpleObject Pickup1 = ctx.objects.populate().filter(new int[]{303}).next();
  53. SimpleObject Pickup2 = ctx.objects.populate().filter(new int[]{954}).next();
  54. Pickup1.click("Take");
  55. Pickup2.click("Take");
  56. ctx.sleep(600);
  57. }
  58.  
  59. if (this.ctx.inventory.inventoryFull()) {
  60. this.ctx.inventory.populate().filter(new String[]{"Red salamander"});
  61. SimpleItem Salamander = this.ctx.inventory.populate().filter(new String[]{"Red salamander"}).next();
  62. Salamander.click("Release");
  63. ctx.sleep(600);
  64. }
  65.  
  66. }
  67.  
  68. }
  69. }
  70.  
  71. @Override
  72. public void onTerminate() {
  73. }
  74.  
  75. @Override public void onChatMessage(ChatMessage e) {}
  76.  
  77. @Override
  78. public void paint(Graphics g) {
  79. int x = 10;
  80. int y = 310;
  81. g.drawString("Esmaabi's red salamander hunter", x, y);
  82.  
  83. }
  84.  
  85. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement