Guest User

Untitled

a guest
Jun 23rd, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.81 KB | None | 0 0
  1. import java.awt.Color;
  2. import java.awt.Font;
  3. import java.awt.Graphics;
  4. import java.awt.Point;
  5. import java.io.BufferedReader;
  6. import java.io.InputStreamReader;
  7. import java.net.URL;
  8. import java.net.URLConnection;
  9. import java.util.Map;
  10.  
  11. import org.rsbot.bot.Bot;
  12. import org.rsbot.bot.input.Mouse;
  13. import org.rsbot.event.listeners.PaintListener;
  14. import org.rsbot.script.Calculations;
  15. import org.rsbot.script.Constants;
  16. import org.rsbot.script.GEItemInfo;
  17. import org.rsbot.script.Script;
  18. import org.rsbot.script.wrappers.RSInterface;
  19. import org.rsbot.script.wrappers.RSObject;
  20. import org.rsbot.script.wrappers.RSTile;
  21.  
  22. @ScriptManifest(authors
  23. = { "Switchbladed" }, category = "Woodcutting", name =
  24. "SuperSwitchChopper", version = 1.0, description = "<html><body bgcolor='#0099CC'><center><table><tr><td width='350' valign='top'><center><div style='font-family:Calibri, Arial;color:#333333; font-size:36px'>SuperSwitchChopper</div><div style='font-family:Calibri, Arial;color:#333333; font-size:16px'>v1.0 by Switchbladed
  25. </div><div style='font-family:Calibri, Arial;color:#FF3300; font-size:16px'>Quick Select</div><div><table bordercolor='#FF3300' border='1' cellpadding='0' cellspacing='0' ><tr><td align='center' style='font-family:Calibri, Arial;color:#333333; font-size:12px'><b>Which trees do you wish to cut?</b>
  26. <select name='trees'><option>Normal Trees<option>Oak Trees<option>Willow Trees<option>Maple Trees<option>Yew Trees<option>Magic Trees</select>
  27.  
  28. <strong>Get these Hatchets from bank at required level:</strong>
  29. [Bronze<input type='checkbox' name='getBronzeAxeArg' value='true' checked='checked'>][[Iron<input type='checkbox' name='getIronAxeArg' value='true' checked='checked'>][Steel<input type='checkbox' name='getSteelAxeArg' value='true' checked='checked'>][Black<input type='checkbox' name='getBlackAxeArg' value='true' checked='checked'>][Mithril<input type='checkbox' name='getMithrilAxeArg' value='true' checked='checked'>][Adamant<input type='checkbox' name='getAdamantAxeArg' value='true' checked='checked'>][Rune<input type='checkbox' name='getRuneAxeArg' value='true' checked='checked'>]
  30. <strong>Yews</strong>
  31. <div style='font-family:Calibri, Arial;color:#FF3300; font-size:16px'>Instructions</div><div style='font-family:Calibri, Arial;color:#FFFFFF; font-size:11px align=justify>This script is a woodcutter that cuts every tree. Start anywhere and it will start automatically.
  32.  
  33. It will retrieve the selected axes from the bank when you reach the required level to use them, You can also just select the axe you want to use if you dont have one in your inventory. It will automatically go get it from yor bank. The leves below are the levels you will cut each tree.
  34. <ul><li> 1-20 - Normal Trees </li><li> 20-35 - Oak Trees </li><li> 35 - Willow Trees </li><li> 60, 65 or 70 - 80 - Yew Trees </li><li> 80 - 99 - Magic Trees </li></ul>If you have any questions, or any ideas for next release of the script please ask me! Just send me a pm.
  35. This script is not for fast training. It is also for good cash.</div></center></td></tr></table></center></body></html>
  36. public class SuperSwitchChopper extends Script implements PaintListener {
  37.  
  38. //Variables
  39. int[] normalTrees = { 5004, 5005, 5045, 2879, 3881, 3882, 3883, 3885, 3886, 3887, 3888, 3889, 3890, 3891, 3892, 3893, 3928, 3967, 3968, 4048, 4049, 4050, 4051, 4052, 4053, 4054, 3033, 3034, 3035,
  40. 3036, 2409, 2447, 2448, 1330, 1331, 1332, 1310, 1305, 1304, 1303,
  41. 1301, 1276, 1277, 1278, 1279, 1280, 8742, 8743, 8973, 8974, 1315,
  42. 1316 };
  43. int normalLogs = {};
  44. int[] oakTrees = { 1281, 3037, 8462, 8463, 8464, 8465, 8466, 8467 };
  45. int oakLogs = {};
  46. int[] willowTrees = { 1308, 5551, 5552, 5553, 8481, 8482, 8483,
  47. 8484, 8485, 8486, 8487, 8488 };
  48. int willowLogs = 1519;
  49. int[] mapleTrees = {};
  50. int mapleLogs = {};
  51. int[] yewTrees = { 1309, 8503, 8504, 8505, 8506, 8507, 8508, 8509,
  52. 8510, 8511, 8512, 8513 };
  53. int yewLogs = {};
  54. int magicTrees = {};
  55. int magicLogs = {};
  56. int bronzeAxe = {};
  57. int ironAxe = {};
  58. int steelAxe = {};
  59. int blackAxe = {};
  60. int mithrilAxe = 1355;
  61. int adamantAxe = 1357;
  62. int runeAxe = 1359;
  63. int dragonAxe = {};
  64. int woodcuttingAnimation = 867;
  65.  
  66. //Script Manifest
  67. private final ScriptManifest properties = getClass().getAnnotation(ScriptManifest.class);
  68.  
  69. public boolean onStart(Map args) {
  70. // All commands you want executed when the script starts goes here
  71. return true;
  72. }
  73.  
  74. public void onFinish() {
  75. // All commands you want executed when the script finishes goes here
  76. }
  77.  
  78. public int loop() {
  79. // final RSObject tree = getNearestObjectByID(Willow);
  80. if(!isInventoryFull() && !getMyPlayer().getAnimation() == woodcuttingAnimation){
  81. atObject(Tree, "Chop down");
  82. }
  83.  
  84. if(isInventoryFull()){
  85. dropAllExcept(runeAxe);
  86. }
  87. return 1000;
  88. }
  89.  
  90. public void onRepaint(Graphics g) {
  91. //paint goes here
  92. }
  93. }
Add Comment
Please, Sign In to add comment