Guest User

Untitled

a guest
Jul 16th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.75 KB | None | 0 0
  1. //aioWcer version 0.1
  2. //future updates will include-more places, better paint,
  3. //& a better gui
  4.  
  5. ///////IMPORTS///////
  6.  
  7. import java.awt.*;
  8. import java.awt.event.*;
  9. import javax.swing.*;
  10. import javax.swing.event.*;
  11.  
  12. import java.awt.BasicStroke;
  13. import java.awt.Point;
  14. import java.util.Map;
  15. import java.awt.Color;
  16. import java.awt.Font;
  17. import java.awt.Graphics;
  18. import java.awt.Graphics2D;
  19. import java.awt.Rectangle;
  20. import java.awt.event.*;
  21. import java.util.logging.Level;
  22.  
  23. import org.rsbot.script.ScriptManifest;
  24. import org.rsbot.bot.Bot;
  25. import org.rsbot.script.wrappers.RSObject;
  26. import org.rsbot.script.wrappers.RSTile;
  27. import org.rsbot.event.listeners.PaintListener;
  28. import org.rsbot.script.Script;
  29. import org.rsbot.script.Calculations;
  30. import org.rsbot.script.Script;
  31. import org.rsbot.script.ScriptManifest;
  32.  
  33. @ScriptManifest(authors = { "Indaface" }, category = "Woodcutting", name = "DraynorWillowRapist", version = 0.1, description = "<html>\n<head></head>\n<body>\n<center><h2>DraynorWillowRapist</h2><b>Author:</b> Indaface <b>aioWcer</b>,</b><br /><b>Version:</b> 0.1<br /></center></body>\n</html>")
  34. public class aioWcer extends Script implements PaintListener {
  35.  
  36. public long startTime = System.currentTimeMillis();
  37. int[] axes = {1349, 1351, 1353, 1355, 1357, 1359, 1361, 6739};
  38. public int startExp;
  39. public int cut = 0;
  40. public boolean isNPC = false;
  41. public double x1;
  42. public int[] treeID;
  43. public String state = "Starting...";
  44. public int nestzFound = 0;
  45. public int banker;
  46. private final int[] nestIds = { 5070, 5071, 5072, 5073, 5074, 5075, 7413 };
  47. public int profit = 0;
  48. public RSTile[] toBank;
  49. public RSTile[] toTrees;
  50. public int wcanimation = 867;
  51. public int price = 0;
  52.  
  53. public String getName(){
  54. return "aioWcer";
  55. }
  56.  
  57. public String getAuthor(){
  58. return "Indaface";
  59. }
  60.  
  61. public String getScriptCategory(){
  62. return "Woodcutting";
  63. }
  64.  
  65. public double getVersion(){
  66. return 0.1;
  67. }
  68.  
  69. public String getScriptDescription() {
  70. String html = "<html>";
  71. html += "<body>";
  72. html += "<center>";
  73. html += "<b><font size=\"5\" color=\"red\">" + getName() + " v" + getVersion() + "</font></b>";
  74. html += "<br></br>";
  75. html += "<font size=\"4\" color=\"black\">by Indaface<br></b></font>";
  76. html += "<br></br>";
  77. html += "<font size=\"3\" color=\"black\"><b> </b>Select Tree And Location:</b></font>";
  78. html += "<hr></hr>";
  79. html += "<select name='cut'>";
  80. html += "<option>WestVarrock RegularLogs<option>EastVarrock Oaks<option>Draynor Willows<option>Draynor Oaks</select>";
  81. html += "<hr></hr>";
  82. html += "<tr><td colspan=2><b><font size=\"3\">&nbsp&nbsp Enjoy. </font></b></td><td colspan=\"2\" align=right>"
  83. + getVersion() + " &nbsp&nbsp</td></tr></table>";
  84. html += "</center></body>";
  85. html += "</html>";
  86. return (html);
  87. }
  88.  
  89. ///////////LOCATIONS///////////////
  90. public boolean onStart(Map<String, String> args) {
  91. MyPanel gui = new MyPanel();
  92. MyPanel.main(null);
  93. log("aioWcer Initialized!");
  94. if (args.get("cut").equals("WestVarrock RegularLogs")) {
  95. banker = 11402;
  96. price = 36;
  97. treeID = new int[] {1278};
  98. toTrees = new RSTile[] {
  99. new RSTile(3184, 3444), new RSTile(3173, 3456),
  100. new RSTile(3157, 3459)
  101. };
  102. toBank = reversePath(toTrees);
  103. }
  104.  
  105. if (args.get("cut").equals("EastVarrock Oaks")) {
  106. banker = 11402;
  107. price = 48;
  108. treeID = new int[] {1281};
  109. toTrees = new RSTile[] {
  110. new RSTile(3253, 3420), new RSTile(3265, 3428),
  111. new RSTile(3279, 3429)
  112. };
  113. toBank = reversePath(toTrees);
  114. }
  115.  
  116. if (args.get("cut").equals("Draynor Willows")) {
  117. banker = 2213;
  118. price = 8;
  119. treeID = new int[] {5551, 5552, 5553};
  120. toTrees = new RSTile[] {
  121. new RSTile(3092, 3245), new RSTile(3086, 3240),
  122. new RSTile(3087, 3235)
  123. };
  124. toBank = reversePath(toTrees);
  125. }
  126.  
  127. return true;
  128. }
  129.  
  130. ///////LOOP/////////
  131. public int loop() {
  132.  
  133. if (getMyPlayer().isMoving()){
  134. return 500;
  135. }
  136.  
  137. if (getMyPlayer().isInCombat()) {
  138. log("OSHI! We're in a fight");
  139. return 200;
  140. }
  141.  
  142. if(isInventoryFull()){
  143. if(!bank.isOpen()){
  144. openBank();
  145. }
  146. if(bank.isOpen()){
  147. depositLogs();
  148. return 400;
  149. }
  150. return 400;
  151. }
  152.  
  153. if(getMyPlayer().getAnimation() == wcanimation){
  154. return 400;
  155. }
  156.  
  157. RSObject tree = findObject(treeID);
  158. if(tree == null) return 400;
  159. atTree(tree, "Chop");
  160. return 100;
  161.  
  162. boolean openBank;
  163. {
  164. walkPathMM(toBank);
  165. RSObject bank = findObject(bankID);
  166. if(bank == null) return false;
  167. atObject(bank, "Use-quickly");
  168. return true;
  169. }
  170. boolean depositLogs;
  171. {
  172. bank.depositAllExcept(axe);
  173. bank.close();
  174. walkPathMM(toTrees);
  175. return true;
  176. }
  177. }
  178.  
  179. ////////////END OF LOOP//////////////////
Add Comment
Please, Sign In to add comment