h4344

Untitled

Jun 10th, 2011
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. import org.rsbot.script.*;
  2. import org.rsbot.script.wrappers.*;
  3.  
  4. @ScriptManifest(authors = {"h4344"}, keywords = {"mining"}, name = "h4copper", description = "Basic copper miner.", version = 1)
  5.  
  6. public class h4copper extends Script{
  7. int [] copperRockID = {11960, 11961, 11962};
  8. int [] pickaxe = {1265, 1267, 1269, 1271, 1273, 1275, 14099, 14107, 15259};
  9.  
  10. @Override
  11. public boolean onStart() {
  12. return true;
  13. }
  14.  
  15. public int loop() {
  16. if (!inventory.isFull()) {
  17. if (players.getMyPlayer().getAnimation() == -1) {
  18. RSObject rock = objects.getNearest(copperRockID);
  19. if (rock != null) {
  20. rock.doAction("Mine");
  21. }
  22. }
  23. }
  24. if (inventory.isFull()){
  25. inventory.dropAllExcept(pickaxe);
  26. }
  27. return random(500, 1500);
  28. }
  29.  
  30. @Override
  31. public void onFinish() {
  32. }
  33.  
  34. }
Advertisement
Add Comment
Please, Sign In to add comment