Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. import java.util.Map;
  2. import org.rsbot.script.Script;
  3. import org.rsbot.script.ScriptManifest;
  4. import org.rsbot.script.wrappers.RSObject;
  5. import org.rsbot.script.wrappers.RSItem;
  6.  
  7.  
  8. @ScriptManifest(authors = "RXbots", name = "CutterfletcherRX", version = 1.0, description = "Cuts trees and fletches them to arrow shafts. Start in a area with many normal trees.")
  9. public class CutterfletcherRX extends Script {
  10.  
  11.  
  12. int[] TreeID = {1276,1278};
  13. int[] KnifeID = {946};
  14. int[] LogsID = {1511};
  15.  
  16. public boolean onStart(){
  17. log("Visit rxbots.yolasite.com pl0x");
  18. log.severe("Enjoy our new Skiller-Friendly Script!");
  19. return true;
  20. }
  21. public void onFinish() {
  22. log("Thanks for using RXbots");
  23. }
  24.  
  25. public void Chop() {
  26. RSObject tree = objects.getNearest(TreeID);
  27. if (tree != null && getMyPlayer().getAnimation() == -1) {
  28. tree.doAction("Chop");
  29. }
  30. sleep(random(1000,3000));
  31. }
  32.  
  33. public void Fletch() {
  34. RSItem Log = inventory.getItem(LogsID);
  35. RSItem Knife = inventory.getItem(KnifeID);
  36. inventory.useItem(Knife, Log);
  37. while (getMyPlayer().getAnimation() == -1 ){
  38. sleep(10000);
  39. }
  40. sleep(random(2000,8000));
  41. break;
  42. }
  43.  
  44. @Override
  45. public int loop(){
  46. if (inventory.isFull()) {
  47. Fletch();
  48. }else{
  49. if (!inventory.isFull()) {
  50. Chop();
  51. }
  52. return (random(1000, 1500));
  53. }
  54. }
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement