Advertisement
Guest User

Untitled

a guest
Jul 10th, 2013
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. import org.tribot.api2007.Object
  2. import org.tribot.api2007.Player
  3. import org.tribot.api2007.types.RSObject;
  4. import org.tribot.script.Scripts;
  5. import org.tribot.script.ScriptManifeat;
  6.  
  7. @ScriptManifeat(authors = ( "Zeenixx"), category = "Mining", name= "CoalMiner")
  8. public class CoalMiner extends Scripts {
  9.  
  10. private final int ROCK_ID = (11931);
  11.  
  12. private final int[] PICKAXES = (1265);
  13.  
  14. private boolean onStart() {
  15. println("CoalMiner has started!");
  16. return true;
  17.  
  18. }
  19.  
  20. public void run () {
  21. if (onStart()) {
  22. while (true) {
  23. sleep (loop());
  24. }
  25. }
  26. }
  27.  
  28. public RSObject findNearest (int distant, int ids) {
  29. RSObject[] rock = Objects.findNearest(15, ROCK_ID);
  30.  
  31. for(Object != null) {
  32.  
  33. }
  34.  
  35. return null;
  36.  
  37. }
  38.  
  39.  
  40. private int loop() {
  41. if(Inventory.isFull()); {
  42. Inventory.dropAllExcept(PICKAXES);
  43. } else {
  44. if(Player.getRSPlayer.get().getAnimation() == -1) {
  45. RSObject rock = Objects.findNearest(15, ROCK_ID);
  46.  
  47. if(rock !=null) {
  48. if(rock.isOnScreen()) {
  49. rock.click ("Mine");
  50.  
  51. }
  52. }
  53. }
  54. }
  55.  
  56. return 42;
  57. }
  58.  
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement