wafflecat

Untitled

Mar 15th, 2012
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 55.86 KB | None | 0 0
  1. import java.awt.BasicStroke;
  2. import java.awt.Color;
  3. import java.awt.Container;
  4. import java.awt.Font;
  5. import java.awt.Graphics;
  6. import java.awt.Graphics2D;
  7. import java.awt.event.ActionEvent;
  8. import java.awt.event.ActionListener;
  9.  
  10. import javax.swing.DefaultComboBoxModel;
  11. import javax.swing.GroupLayout;
  12. import javax.swing.JButton;
  13. import javax.swing.JComboBox;
  14. import javax.swing.JFrame;
  15. import javax.swing.JLabel;
  16. import javax.swing.JRadioButton;
  17. import javax.swing.LayoutStyle;
  18.  
  19. import com.rarebot.event.events.MessageEvent;
  20. import com.rarebot.event.listeners.MessageListener;
  21. import com.rarebot.event.listeners.PaintListener;
  22. import com.rarebot.script.Script;
  23. import com.rarebot.script.ScriptManifest;
  24. import com.rarebot.script.methods.Game.Tab;
  25. import com.rarebot.script.methods.Skills;
  26. import com.rarebot.script.wrappers.RSObject;
  27. import com.rarebot.script.wrappers.RSTile;
  28.  
  29. @ScriptManifest(
  30. authors = {"Whipz_man"},
  31. version = 1.1,
  32. description = "The Ultimate in PowerMining V1.3",
  33. name = "Whipz_PowerMiner"
  34. )
  35.  
  36. public class Whipz_PowerMiner extends Script implements PaintListener, MessageListener{
  37.  
  38. //Pic
  39. int AllPic[] = {1265, 1267, 1269, 1271, 1273, 1275, 14099, 14107, 15259, 15261};
  40.  
  41. //Rock
  42. int Tin_ID[] = {2094, 2095, 3038, 3245, 5776, 5777, 5778, 9714, 9716, 11933, 11934, 11935, 11957, 11958, 11959, 14902, 14903, 21293, 21294, 21295} ;
  43.  
  44. int Copper_ID[] = {2090, 2091, 2097, 3027, 3229, 5779, 5780, 5781, 9708, 9709, 9710, 11936, 11937, 11938, 11960, 11961, 11962, 14906, 14907, 21284, 21285, 21286};
  45.  
  46. int Iron_ID[] = {2092, 2093, 5773, 5774, 5775, 9717, 9718, 9719, 11954, 11955, 11956, 14099, 14107, 14913, 14914, 21281, 21282, 21283, 37307, 37308, 37309 };
  47.  
  48. int Silver_ID[] = {2311, 11186, 11187, 11188, 11948, 11949, 11950, 15580, 15581, 29224, 29225, 29226, 32444, 32445, 32446, 37304, 37305, 37306};
  49.  
  50. int Coal_ID[] = {2096, 2097, 3032, 3233, 5770, 5771, 5772, 10948, 11930, 11931, 11932, 14850, 14851, 21287, 21288, 21289, 29215, 29216, 29217, 32426, 32427, 32428};
  51.  
  52. int Gold_ID[] = {5768, 5769, 9720, 9722, 10574, 10575, 10576, 11183, 11184, 11185, 11943, 15576, 15577, 15578, 32432, 32433, 32434, 45067, 45068};
  53.  
  54. int Mithril_ID[] = {2102, 2103, 3041, 3280, 5784, 5785, 5786, 11942, 11943, 11944, 21278, 21279, 21280, 32438, 32439, 32440};
  55.  
  56. int Adamant_ID[] = {3040, 3273, 5782, 5783, 11939, 11941, 21275, 21276, 21277, 29233, 29235, 32425, 32436, 32437};
  57.  
  58. int Rune_ID[] = {14859, 33078, 33079, 45069, 45070};
  59.  
  60. int Ore;
  61. //Mining ID
  62. int MiningID = 624;
  63.  
  64. //RockVaild
  65. RSTile RockTile = null;
  66.  
  67. //Banking
  68. int boothID = 11402;
  69.  
  70. //GUI Stuff
  71. int[]RMine;
  72. boolean guiwait = true;
  73. PowerMiner_GUI q;
  74. boolean m1d1;
  75. boolean Max;
  76.  
  77. //AntiBan&Paint
  78. String Status = "Starting up!";
  79. int OresMined;
  80. int ExpGained;
  81. String MineR;
  82. int StartExp;
  83. long StartTime;
  84. long Hours;
  85. long Minutes;
  86. long Seconds;
  87. String R = "";
  88. private final Color color1 = new Color(0, 255, 255);
  89.  
  90. private final BasicStroke stroke1 = new BasicStroke(4);
  91.  
  92. private final Font font1 = new Font("Times New Roman", 1, 16);
  93. private final Font font2 = new Font("Times New Roman", 1, 14);
  94. private final Font font3 = new Font("Times New Roman", 1, 13);
  95.  
  96. int Clevel;
  97. int LVLG;
  98. int Slevel;
  99. long Millis;
  100. long Hour;
  101. long Second;
  102. int ExpPh;
  103. int OrePh;
  104. int ExpLvl;
  105. double Percent;
  106. double Num;
  107.  
  108. public boolean onStart() {
  109. while (!game.isLoggedIn()) {
  110. game.login();
  111. sleep(2000);
  112. }
  113. java.awt.EventQueue.invokeLater(new Runnable() {
  114. @Override
  115. public void run() {
  116. q = new PowerMiner_GUI();
  117. q.setVisible(true);
  118. q.setAlwaysOnTop(true);
  119. }
  120. });
  121.  
  122. while (guiwait) sleep (500);
  123. log("You are going to Mine "+R);
  124. StartTime = System.currentTimeMillis();
  125. StartExp = skills.getCurrentExp(Skills.MINING);
  126. Slevel = skills.getCurrentLevel(skills.MINING);
  127. return true;
  128. }
  129.  
  130. boolean MineOres() {
  131. final RSObject rock = objects.getNearest(RMine);
  132. if (rock != null) {
  133. if(Max) {
  134. if (rock != null && calc.distanceTo(rock) <5) {
  135. if (rock.isOnScreen()) {
  136. if (rock.interact("Mine")) {
  137. RockTile = tiles.getTileUnderMouse();
  138. sleep(1000);
  139. while(getMyPlayer().isMoving()) {
  140. sleep(50);
  141. }
  142. return true;
  143. }
  144. } else {
  145. return walking.walkTileMM(rock.getLocation(), 1, 1);
  146. }
  147. }
  148. } else {
  149. if (rock.isOnScreen()) {
  150. if (rock.interact("Mine")) {
  151. RockTile = tiles.getTileUnderMouse();
  152. sleep(1000);
  153. while(getMyPlayer().isMoving()) {
  154. sleep(50);
  155. }
  156. return true;
  157. }
  158. } else {
  159. return walking.walkTileMM(rock.getLocation(), 1, 1);
  160. }
  161. }
  162. }
  163. return false;
  164. }
  165.  
  166. boolean RockValid() {
  167. for (int i = 0; i < RMine.length; i++) {
  168. if (RockTile != null) {
  169. final RSObject ob = objects.getTopAt(RockTile);
  170. if (ob != null) {
  171. if (ob.getID() == RMine[i]) {
  172. return true;
  173. }
  174. }
  175. }
  176. }
  177. return false;
  178. }
  179.  
  180. @Override
  181. public int loop() {
  182. if(StartExp == 0) {
  183. StartExp = skills.getCurrentExp(skills.getCurrentExp(Skills.MINING));
  184. Slevel = skills.getCurrentLevel(skills.getCurrentLevel(Skills.MINING));
  185. }
  186. if(m1d1) {
  187. if(inventory.contains(Ore)) {
  188. inventory.dropAllExcept(AllPic);
  189. } else {
  190. if (getMyPlayer().getAnimation() == -1 || !RockValid()) {
  191. MineOres();
  192. AntiBan();
  193. }
  194. }
  195. } else {
  196. if (inventory.isFull()) {
  197. inventory.dropAllExcept(AllPic);
  198. } else {
  199. if (getMyPlayer().getAnimation() == -1 || !RockValid()) {
  200. MineOres();
  201. AntiBan();
  202. }
  203. }
  204.  
  205. }
  206. return random(750, 1000);
  207. }
  208.  
  209.  
  210.  
  211.  
  212.  
  213. public void onFinish() {
  214. log("Thankyou for using Whipz_man PowerMiner!");
  215. log("You Mined "+OresMined+ " " +R);
  216. stopScript();
  217. }
  218.  
  219. @SuppressWarnings("serial")
  220. class PowerMiner_GUI extends JFrame {
  221. public PowerMiner_GUI() {
  222. super();
  223. initComponents();
  224. }
  225.  
  226. private void StartActionPerformed(ActionEvent e) {
  227. String MRock = Rock.getSelectedItem().toString();
  228. if(MRock.equals("Tin")) {
  229. RMine = Tin_ID;
  230. R = "Tin Ores";
  231. MineR = "Tin";
  232. Ore = 438;
  233. }else if(MRock.equals("Copper")) {
  234. RMine = Copper_ID;
  235. R = "Copper Ores";
  236. MineR = "Copper";
  237. Ore = 436;
  238. }else if(MRock.equals("Iron")) {
  239. RMine = Iron_ID;
  240. R = "Iron Ores";
  241. MineR = "Iron";
  242. Ore = 440;
  243. }else if(MRock.equals("Silver")) {
  244. RMine = Silver_ID;
  245. R = "Silver Ores";
  246. MineR = "Silver";
  247. Ore = 442;
  248. }else if(MRock.equals("Coal")) {
  249. RMine = Coal_ID;
  250. R = "Coal";
  251. MineR = "Coal";
  252. Ore = 453;
  253. }else if(MRock.equals("Gold")) {
  254. RMine = Gold_ID;
  255. R = "Gold Ores";
  256. MineR = "Gold";
  257. Ore = 444;
  258. }else if(MRock.equals("Mithril")) {
  259. RMine = Mithril_ID;
  260. R = "Mithril Ores";
  261. MineR = "Mithril";
  262. Ore = 447;
  263. }else if(MRock.equals("Adamant")) {
  264. RMine = Adamant_ID;
  265. R = "Adamant Ores";
  266. MineR = "Adamant";
  267. Ore = 449;
  268. }else {
  269. RMine = Rune_ID;
  270. R = "Runite Ores";
  271. MineR = "Rune";
  272. Ore = 451;
  273. }
  274. if(M1D1.isSelected()) {
  275. m1d1 = true;
  276. log("We are going to M1D1");
  277. } else {
  278. m1d1 = false;
  279. log("We are going to mine a full invent then drop");
  280. }
  281. if(MaxDistance.isSelected()) {
  282. Max = true;
  283. log("We arent going to far away from where we are!");
  284. } else {
  285. Max = false;
  286. log("Mining all "+R+" on Mini Map!");
  287. }
  288.  
  289. guiwait = false;
  290. q.dispose();
  291. }
  292.  
  293. private void initComponents() {
  294.  
  295. label1 = new JLabel();
  296. label2 = new JLabel();
  297. Rock = new JComboBox();
  298. Start = new JButton();
  299. M1D1 = new JRadioButton();
  300. MaxDistance = new JRadioButton();
  301.  
  302.  
  303. Container contentPane = getContentPane();
  304.  
  305. //---- label1 ----
  306. label1.setText("Whipz_man PowerMiner");
  307. label1.setFont(new Font("Times New Roman", Font.BOLD, 18));
  308. label1.setForeground(Color.red);
  309.  
  310. //---- label2 ----
  311. label2.setText("What would you like to mine?");
  312. label2.setForeground(Color.red);
  313. label2.setFont(new Font("Times New Roman", Font.BOLD, 12));
  314.  
  315. //---- Rock ----
  316. Rock.setModel(new DefaultComboBoxModel(new String[] {
  317. "Tin",
  318. "Copper",
  319. "Iron",
  320. "Silver",
  321. "Coal",
  322. "Gold",
  323. "Mithril",
  324. "Adamant",
  325. "Rune"
  326. }));
  327. Rock.setForeground(Color.red);
  328. Rock.setFont(new Font("Times New Roman", Font.BOLD, 12));
  329.  
  330. //---- Start ----
  331. Start.setText("Start");
  332. Start.setForeground(Color.red);
  333. Start.addActionListener(new ActionListener() {
  334. @Override
  335. public void actionPerformed(ActionEvent e) {
  336. StartActionPerformed(e);
  337. }
  338. });
  339.  
  340. //---- M1D1 ----
  341. M1D1.setText("M1D1");
  342. M1D1.setFont(new Font("Times New Roman", Font.BOLD, 11));
  343. M1D1.setForeground(Color.red);
  344.  
  345. //---- MaxDistance ----
  346. MaxDistance.setText("Max Distance Set");
  347. MaxDistance.setForeground(Color.red);
  348. MaxDistance.setFont(new Font("Times New Roman", Font.BOLD, 11));
  349.  
  350. GroupLayout contentPaneLayout = new GroupLayout(contentPane);
  351. contentPane.setLayout(contentPaneLayout);
  352. contentPaneLayout.setHorizontalGroup(
  353. contentPaneLayout.createParallelGroup()
  354. .addGroup(GroupLayout.Alignment.TRAILING, contentPaneLayout.createSequentialGroup()
  355. .addContainerGap(182, Short.MAX_VALUE)
  356. .addComponent(Start)
  357. .addContainerGap())
  358. .addGroup(contentPaneLayout.createSequentialGroup()
  359. .addGap(22, 22, 22)
  360. .addComponent(label1, GroupLayout.PREFERRED_SIZE, 202, GroupLayout.PREFERRED_SIZE)
  361. .addContainerGap(25, Short.MAX_VALUE))
  362. .addGroup(GroupLayout.Alignment.TRAILING, contentPaneLayout.createSequentialGroup()
  363. .addContainerGap(47, Short.MAX_VALUE)
  364. .addComponent(label2, GroupLayout.PREFERRED_SIZE, 166, GroupLayout.PREFERRED_SIZE)
  365. .addGap(36, 36, 36))
  366. .addGroup(contentPaneLayout.createSequentialGroup()
  367. .addGap(76, 76, 76)
  368. .addGroup(contentPaneLayout.createParallelGroup()
  369. .addComponent(Rock, GroupLayout.PREFERRED_SIZE, 83, GroupLayout.PREFERRED_SIZE)
  370. .addGroup(contentPaneLayout.createSequentialGroup()
  371. .addGap(10, 10, 10)
  372. .addGroup(contentPaneLayout.createParallelGroup()
  373. .addComponent(MaxDistance)
  374. .addComponent(M1D1))))
  375. .addContainerGap(48, Short.MAX_VALUE))
  376. );
  377. contentPaneLayout.setVerticalGroup(
  378. contentPaneLayout.createParallelGroup()
  379. .addGroup(contentPaneLayout.createSequentialGroup()
  380. .addContainerGap()
  381. .addComponent(label1)
  382. .addGap(1, 1, 1)
  383. .addComponent(label2, GroupLayout.PREFERRED_SIZE, 26, GroupLayout.PREFERRED_SIZE)
  384. .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
  385. .addComponent(Rock, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
  386. .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
  387. .addComponent(M1D1)
  388. .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
  389. .addComponent(MaxDistance)
  390. .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 32, Short.MAX_VALUE)
  391. .addComponent(Start)
  392. .addContainerGap())
  393. );
  394. pack();
  395. setLocationRelativeTo(getOwner());
  396. }
  397.  
  398.  
  399. private JLabel label1;
  400. private JLabel label2;
  401. private JComboBox Rock;
  402. private JButton Start;
  403. private JRadioButton M1D1;
  404. private JRadioButton MaxDistance;
  405.  
  406. }
  407.  
  408.  
  409.  
  410. private int AntiBan() {
  411. Status = "Performing AntiBan";
  412. int random = random(1, 12);
  413. switch (random) {
  414. case 1:
  415. mouse.moveSlightly();
  416. sleep(500,600);
  417. break;
  418. case 2:
  419. mouse.moveRandomly(10, 50);
  420. break;
  421.  
  422. case 3:
  423. mouse.moveOffScreen();
  424. break;
  425. case 4:
  426. camera.moveRandomly(random(250, 1500));
  427. break;
  428. case 6:
  429. if (random(0, 18) == 3) {
  430. game.openTab(Tab.STATS);
  431. skills.doHover(Skills.INTERFACE_MINING);
  432. sleep(random(2000, 2400));
  433. }
  434. break;
  435. case 8:
  436. if (random(0, 13) == 2) {
  437. camera.setAngle(random(30, 70));
  438. sleep(400, 1200);
  439.  
  440. }
  441. break;
  442.  
  443.  
  444.  
  445. }
  446. return random(1000, 5000);
  447. }
  448.  
  449. public void messageReceived(MessageEvent e) {
  450. String msg = e.getMessage();
  451. if (msg.contains("manage to mine two")) {
  452. OresMined += 2;
  453. } else if (msg.contains("manage to")) {
  454. OresMined++;
  455. }
  456. }
  457.  
  458.  
  459. @Override
  460. public void onRepaint(Graphics g1) {
  461. Graphics2D g = (Graphics2D)g1;
  462. g.setFont(font1);
  463. g.setColor(color1);
  464. g.drawString("Whipz_man's PowerMiner", 336, 197);
  465. g.setFont(font2);
  466. g.drawString("The Ultimate PowerMiner", 345, 211);
  467. g.setFont(font3);
  468. g.drawString("Runtime:", 345, 228);
  469. g.drawString("Exp Gained:", 345, 243);
  470. g.drawString("Exp p/h:", 345, 258);
  471. g.drawString("Ores Mined:", 345, 273);
  472. g.drawString("Ores p/h:", 345, 288);
  473. g.drawString("Lvls Gained:", 345, 303);
  474. g.drawString("Ore being Mined:", 345, 318);
  475. g.setStroke(stroke1);
  476. g.drawRoundRect(331, 179, 184, 157, 16, 16);
  477. g.drawString(""+OresMined, 448, 273);
  478. g.drawString(""+ExpGained, 448, 243);
  479. g.drawString(""+OrePh, 448, 288);
  480. g.drawString(""+ExpPh, 448, 258);
  481. g.drawString(""+Hour+":"+Minutes+":"+Seconds, 448, 228);
  482. g.drawString(""+LVLG, 448, 303);
  483. g.drawString(""+R, 448, 318);
  484.  
  485. ExpGained = skills.getCurrentExp(Skills.MINING) - StartExp;
  486.  
  487. java.text.DecimalFormat df = new java.text.DecimalFormat("##.##");
  488. Clevel = skills.getCurrentLevel(Skills.MINING);
  489. LVLG = Clevel - Slevel;
  490. ExpGained = skills.getCurrentExp(Skills.MINING) - StartExp;
  491. Millis = System.currentTimeMillis() - StartTime;
  492. Num = ((3600000.0 / (double) Millis));
  493. ExpPh = (int) (Num * ExpGained);
  494. OrePh = (int) (Num * OresMined);
  495. Hour = Millis / (1000 * 60 * 60);
  496. Millis -= Hour * (1000 * 60 * 60);
  497. Minutes = Millis / (1000 * 60);
  498. Millis -= Minutes * (1000 * 60);
  499. Seconds = Millis / 1000;
  500.  
  501.  
  502. }
  503.  
  504. }import java.awt.BasicStroke;
  505. import java.awt.Color;
  506. import java.awt.Container;
  507. import java.awt.Font;
  508. import java.awt.Graphics;
  509. import java.awt.Graphics2D;
  510. import java.awt.event.ActionEvent;
  511. import java.awt.event.ActionListener;
  512.  
  513. import javax.swing.DefaultComboBoxModel;
  514. import javax.swing.GroupLayout;
  515. import javax.swing.JButton;
  516. import javax.swing.JComboBox;
  517. import javax.swing.JFrame;
  518. import javax.swing.JLabel;
  519. import javax.swing.JRadioButton;
  520. import javax.swing.LayoutStyle;
  521.  
  522. import com.rarebot.event.events.MessageEvent;
  523. import com.rarebot.event.listeners.MessageListener;
  524. import com.rarebot.event.listeners.PaintListener;
  525. import com.rarebot.script.Script;
  526. import com.rarebot.script.ScriptManifest;
  527. import com.rarebot.script.methods.Game.Tab;
  528. import com.rarebot.script.methods.Skills;
  529. import com.rarebot.script.wrappers.RSObject;
  530. import com.rarebot.script.wrappers.RSTile;
  531.  
  532. @ScriptManifest(
  533. authors = {"Whipz_man"},
  534. version = 1.1,
  535. description = "The Ultimate in PowerMining V1.3",
  536. name = "Whipz_PowerMiner"
  537. )
  538.  
  539. public class Whipz_PowerMiner extends Script implements PaintListener, MessageListener{
  540.  
  541. //Pic
  542. int AllPic[] = {1265, 1267, 1269, 1271, 1273, 1275, 14099, 14107, 15259, 15261};
  543.  
  544. //Rock
  545. int Tin_ID[] = {2094, 2095, 3038, 3245, 5776, 5777, 5778, 9714, 9716, 11933, 11934, 11935, 11957, 11958, 11959, 14902, 14903, 21293, 21294, 21295} ;
  546.  
  547. int Copper_ID[] = {2090, 2091, 2097, 3027, 3229, 5779, 5780, 5781, 9708, 9709, 9710, 11936, 11937, 11938, 11960, 11961, 11962, 14906, 14907, 21284, 21285, 21286};
  548.  
  549. int Iron_ID[] = {2092, 2093, 5773, 5774, 5775, 9717, 9718, 9719, 11954, 11955, 11956, 14099, 14107, 14913, 14914, 21281, 21282, 21283, 37307, 37308, 37309 };
  550.  
  551. int Silver_ID[] = {2311, 11186, 11187, 11188, 11948, 11949, 11950, 15580, 15581, 29224, 29225, 29226, 32444, 32445, 32446, 37304, 37305, 37306};
  552.  
  553. int Coal_ID[] = {2096, 2097, 3032, 3233, 5770, 5771, 5772, 10948, 11930, 11931, 11932, 14850, 14851, 21287, 21288, 21289, 29215, 29216, 29217, 32426, 32427, 32428};
  554.  
  555. int Gold_ID[] = {5768, 5769, 9720, 9722, 10574, 10575, 10576, 11183, 11184, 11185, 11943, 15576, 15577, 15578, 32432, 32433, 32434, 45067, 45068};
  556.  
  557. int Mithril_ID[] = {2102, 2103, 3041, 3280, 5784, 5785, 5786, 11942, 11943, 11944, 21278, 21279, 21280, 32438, 32439, 32440};
  558.  
  559. int Adamant_ID[] = {3040, 3273, 5782, 5783, 11939, 11941, 21275, 21276, 21277, 29233, 29235, 32425, 32436, 32437};
  560.  
  561. int Rune_ID[] = {14859, 33078, 33079, 45069, 45070};
  562.  
  563. int Ore;
  564. //Mining ID
  565. int MiningID = 624;
  566.  
  567. //RockVaild
  568. RSTile RockTile = null;
  569.  
  570. //Banking
  571. int boothID = 11402;
  572.  
  573. //GUI Stuff
  574. int[]RMine;
  575. boolean guiwait = true;
  576. PowerMiner_GUI q;
  577. boolean m1d1;
  578. boolean Max;
  579.  
  580. //AntiBan&Paint
  581. String Status = "Starting up!";
  582. int OresMined;
  583. int ExpGained;
  584. String MineR;
  585. int StartExp;
  586. long StartTime;
  587. long Hours;
  588. long Minutes;
  589. long Seconds;
  590. String R = "";
  591. private final Color color1 = new Color(0, 255, 255);
  592.  
  593. private final BasicStroke stroke1 = new BasicStroke(4);
  594.  
  595. private final Font font1 = new Font("Times New Roman", 1, 16);
  596. private final Font font2 = new Font("Times New Roman", 1, 14);
  597. private final Font font3 = new Font("Times New Roman", 1, 13);
  598.  
  599. int Clevel;
  600. int LVLG;
  601. int Slevel;
  602. long Millis;
  603. long Hour;
  604. long Second;
  605. int ExpPh;
  606. int OrePh;
  607. int ExpLvl;
  608. double Percent;
  609. double Num;
  610.  
  611. public boolean onStart() {
  612. while (!game.isLoggedIn()) {
  613. game.login();
  614. sleep(2000);
  615. }
  616. java.awt.EventQueue.invokeLater(new Runnable() {
  617. @Override
  618. public void run() {
  619. q = new PowerMiner_GUI();
  620. q.setVisible(true);
  621. q.setAlwaysOnTop(true);
  622. }
  623. });
  624.  
  625. while (guiwait) sleep (500);
  626. log("You are going to Mine "+R);
  627. StartTime = System.currentTimeMillis();
  628. StartExp = skills.getCurrentExp(Skills.MINING);
  629. Slevel = skills.getCurrentLevel(skills.MINING);
  630. return true;
  631. }
  632.  
  633. boolean MineOres() {
  634. final RSObject rock = objects.getNearest(RMine);
  635. if (rock != null) {
  636. if(Max) {
  637. if (rock != null && calc.distanceTo(rock) <5) {
  638. if (rock.isOnScreen()) {
  639. if (rock.interact("Mine")) {
  640. RockTile = tiles.getTileUnderMouse();
  641. sleep(1000);
  642. while(getMyPlayer().isMoving()) {
  643. sleep(50);
  644. }
  645. return true;
  646. }
  647. } else {
  648. return walking.walkTileMM(rock.getLocation(), 1, 1);
  649. }
  650. }
  651. } else {
  652. if (rock.isOnScreen()) {
  653. if (rock.interact("Mine")) {
  654. RockTile = tiles.getTileUnderMouse();
  655. sleep(1000);
  656. while(getMyPlayer().isMoving()) {
  657. sleep(50);
  658. }
  659. return true;
  660. }
  661. } else {
  662. return walking.walkTileMM(rock.getLocation(), 1, 1);
  663. }
  664. }
  665. }
  666. return false;
  667. }
  668.  
  669. boolean RockValid() {
  670. for (int i = 0; i < RMine.length; i++) {
  671. if (RockTile != null) {
  672. final RSObject ob = objects.getTopAt(RockTile);
  673. if (ob != null) {
  674. if (ob.getID() == RMine[i]) {
  675. return true;
  676. }
  677. }
  678. }
  679. }
  680. return false;
  681. }
  682.  
  683. @Override
  684. public int loop() {
  685. if(StartExp == 0) {
  686. StartExp = skills.getCurrentExp(skills.getCurrentExp(Skills.MINING));
  687. Slevel = skills.getCurrentLevel(skills.getCurrentLevel(Skills.MINING));
  688. }
  689. if(m1d1) {
  690. if(inventory.contains(Ore)) {
  691. inventory.dropAllExcept(AllPic);
  692. } else {
  693. if (getMyPlayer().getAnimation() == -1 || !RockValid()) {
  694. MineOres();
  695. AntiBan();
  696. }
  697. }
  698. } else {
  699. if (inventory.isFull()) {
  700. inventory.dropAllExcept(AllPic);
  701. } else {
  702. if (getMyPlayer().getAnimation() == -1 || !RockValid()) {
  703. MineOres();
  704. AntiBan();
  705. }
  706. }
  707.  
  708. }
  709. return random(750, 1000);
  710. }
  711.  
  712.  
  713.  
  714.  
  715.  
  716. public void onFinish() {
  717. log("Thankyou for using Whipz_man PowerMiner!");
  718. log("You Mined "+OresMined+ " " +R);
  719. stopScript();
  720. }
  721.  
  722. @SuppressWarnings("serial")
  723. class PowerMiner_GUI extends JFrame {
  724. public PowerMiner_GUI() {
  725. super();
  726. initComponents();
  727. }
  728.  
  729. private void StartActionPerformed(ActionEvent e) {
  730. String MRock = Rock.getSelectedItem().toString();
  731. if(MRock.equals("Tin")) {
  732. RMine = Tin_ID;
  733. R = "Tin Ores";
  734. MineR = "Tin";
  735. Ore = 438;
  736. }else if(MRock.equals("Copper")) {
  737. RMine = Copper_ID;
  738. R = "Copper Ores";
  739. MineR = "Copper";
  740. Ore = 436;
  741. }else if(MRock.equals("Iron")) {
  742. RMine = Iron_ID;
  743. R = "Iron Ores";
  744. MineR = "Iron";
  745. Ore = 440;
  746. }else if(MRock.equals("Silver")) {
  747. RMine = Silver_ID;
  748. R = "Silver Ores";
  749. MineR = "Silver";
  750. Ore = 442;
  751. }else if(MRock.equals("Coal")) {
  752. RMine = Coal_ID;
  753. R = "Coal";
  754. MineR = "Coal";
  755. Ore = 453;
  756. }else if(MRock.equals("Gold")) {
  757. RMine = Gold_ID;
  758. R = "Gold Ores";
  759. MineR = "Gold";
  760. Ore = 444;
  761. }else if(MRock.equals("Mithril")) {
  762. RMine = Mithril_ID;
  763. R = "Mithril Ores";
  764. MineR = "Mithril";
  765. Ore = 447;
  766. }else if(MRock.equals("Adamant")) {
  767. RMine = Adamant_ID;
  768. R = "Adamant Ores";
  769. MineR = "Adamant";
  770. Ore = 449;
  771. }else {
  772. RMine = Rune_ID;
  773. R = "Runite Ores";
  774. MineR = "Rune";
  775. Ore = 451;
  776. }
  777. if(M1D1.isSelected()) {
  778. m1d1 = true;
  779. log("We are going to M1D1");
  780. } else {
  781. m1d1 = false;
  782. log("We are going to mine a full invent then drop");
  783. }
  784. if(MaxDistance.isSelected()) {
  785. Max = true;
  786. log("We arent going to far away from where we are!");
  787. } else {
  788. Max = false;
  789. log("Mining all "+R+" on Mini Map!");
  790. }
  791.  
  792. guiwait = false;
  793. q.dispose();
  794. }
  795.  
  796. private void initComponents() {
  797.  
  798. label1 = new JLabel();
  799. label2 = new JLabel();
  800. Rock = new JComboBox();
  801. Start = new JButton();
  802. M1D1 = new JRadioButton();
  803. MaxDistance = new JRadioButton();
  804.  
  805.  
  806. Container contentPane = getContentPane();
  807.  
  808. //---- label1 ----
  809. label1.setText("Whipz_man PowerMiner");
  810. label1.setFont(new Font("Times New Roman", Font.BOLD, 18));
  811. label1.setForeground(Color.red);
  812.  
  813. //---- label2 ----
  814. label2.setText("What would you like to mine?");
  815. label2.setForeground(Color.red);
  816. label2.setFont(new Font("Times New Roman", Font.BOLD, 12));
  817.  
  818. //---- Rock ----
  819. Rock.setModel(new DefaultComboBoxModel(new String[] {
  820. "Tin",
  821. "Copper",
  822. "Iron",
  823. "Silver",
  824. "Coal",
  825. "Gold",
  826. "Mithril",
  827. "Adamant",
  828. "Rune"
  829. }));
  830. Rock.setForeground(Color.red);
  831. Rock.setFont(new Font("Times New Roman", Font.BOLD, 12));
  832.  
  833. //---- Start ----
  834. Start.setText("Start");
  835. Start.setForeground(Color.red);
  836. Start.addActionListener(new ActionListener() {
  837. @Override
  838. public void actionPerformed(ActionEvent e) {
  839. StartActionPerformed(e);
  840. }
  841. });
  842.  
  843. //---- M1D1 ----
  844. M1D1.setText("M1D1");
  845. M1D1.setFont(new Font("Times New Roman", Font.BOLD, 11));
  846. M1D1.setForeground(Color.red);
  847.  
  848. //---- MaxDistance ----
  849. MaxDistance.setText("Max Distance Set");
  850. MaxDistance.setForeground(Color.red);
  851. MaxDistance.setFont(new Font("Times New Roman", Font.BOLD, 11));
  852.  
  853. GroupLayout contentPaneLayout = new GroupLayout(contentPane);
  854. contentPane.setLayout(contentPaneLayout);
  855. contentPaneLayout.setHorizontalGroup(
  856. contentPaneLayout.createParallelGroup()
  857. .addGroup(GroupLayout.Alignment.TRAILING, contentPaneLayout.createSequentialGroup()
  858. .addContainerGap(182, Short.MAX_VALUE)
  859. .addComponent(Start)
  860. .addContainerGap())
  861. .addGroup(contentPaneLayout.createSequentialGroup()
  862. .addGap(22, 22, 22)
  863. .addComponent(label1, GroupLayout.PREFERRED_SIZE, 202, GroupLayout.PREFERRED_SIZE)
  864. .addContainerGap(25, Short.MAX_VALUE))
  865. .addGroup(GroupLayout.Alignment.TRAILING, contentPaneLayout.createSequentialGroup()
  866. .addContainerGap(47, Short.MAX_VALUE)
  867. .addComponent(label2, GroupLayout.PREFERRED_SIZE, 166, GroupLayout.PREFERRED_SIZE)
  868. .addGap(36, 36, 36))
  869. .addGroup(contentPaneLayout.createSequentialGroup()
  870. .addGap(76, 76, 76)
  871. .addGroup(contentPaneLayout.createParallelGroup()
  872. .addComponent(Rock, GroupLayout.PREFERRED_SIZE, 83, GroupLayout.PREFERRED_SIZE)
  873. .addGroup(contentPaneLayout.createSequentialGroup()
  874. .addGap(10, 10, 10)
  875. .addGroup(contentPaneLayout.createParallelGroup()
  876. .addComponent(MaxDistance)
  877. .addComponent(M1D1))))
  878. .addContainerGap(48, Short.MAX_VALUE))
  879. );
  880. contentPaneLayout.setVerticalGroup(
  881. contentPaneLayout.createParallelGroup()
  882. .addGroup(contentPaneLayout.createSequentialGroup()
  883. .addContainerGap()
  884. .addComponent(label1)
  885. .addGap(1, 1, 1)
  886. .addComponent(label2, GroupLayout.PREFERRED_SIZE, 26, GroupLayout.PREFERRED_SIZE)
  887. .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
  888. .addComponent(Rock, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
  889. .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
  890. .addComponent(M1D1)
  891. .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
  892. .addComponent(MaxDistance)
  893. .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 32, Short.MAX_VALUE)
  894. .addComponent(Start)
  895. .addContainerGap())
  896. );
  897. pack();
  898. setLocationRelativeTo(getOwner());
  899. }
  900.  
  901.  
  902. private JLabel label1;
  903. private JLabel label2;
  904. private JComboBox Rock;
  905. private JButton Start;
  906. private JRadioButton M1D1;
  907. private JRadioButton MaxDistance;
  908.  
  909. }
  910.  
  911.  
  912.  
  913. private int AntiBan() {
  914. Status = "Performing AntiBan";
  915. int random = random(1, 12);
  916. switch (random) {
  917. case 1:
  918. mouse.moveSlightly();
  919. sleep(500,600);
  920. break;
  921. case 2:
  922. mouse.moveRandomly(10, 50);
  923. break;
  924.  
  925. case 3:
  926. mouse.moveOffScreen();
  927. break;
  928. case 4:
  929. camera.moveRandomly(random(250, 1500));
  930. break;
  931. case 6:
  932. if (random(0, 18) == 3) {
  933. game.openTab(Tab.STATS);
  934. skills.doHover(Skills.INTERFACE_MINING);
  935. sleep(random(2000, 2400));
  936. }
  937. break;
  938. case 8:
  939. if (random(0, 13) == 2) {
  940. camera.setAngle(random(30, 70));
  941. sleep(400, 1200);
  942.  
  943. }
  944. break;
  945.  
  946.  
  947.  
  948. }
  949. return random(1000, 5000);
  950. }
  951.  
  952. public void messageReceived(MessageEvent e) {
  953. String msg = e.getMessage();
  954. if (msg.contains("manage to mine two")) {
  955. OresMined += 2;
  956. } else if (msg.contains("manage to")) {
  957. OresMined++;
  958. }
  959. }
  960.  
  961.  
  962. @Override
  963. public void onRepaint(Graphics g1) {
  964. Graphics2D g = (Graphics2D)g1;
  965. g.setFont(font1);
  966. g.setColor(color1);
  967. g.drawString("Whipz_man's PowerMiner", 336, 197);
  968. g.setFont(font2);
  969. g.drawString("The Ultimate PowerMiner", 345, 211);
  970. g.setFont(font3);
  971. g.drawString("Runtime:", 345, 228);
  972. g.drawString("Exp Gained:", 345, 243);
  973. g.drawString("Exp p/h:", 345, 258);
  974. g.drawString("Ores Mined:", 345, 273);
  975. g.drawString("Ores p/h:", 345, 288);
  976. g.drawString("Lvls Gained:", 345, 303);
  977. g.drawString("Ore being Mined:", 345, 318);
  978. g.setStroke(stroke1);
  979. g.drawRoundRect(331, 179, 184, 157, 16, 16);
  980. g.drawString(""+OresMined, 448, 273);
  981. g.drawString(""+ExpGained, 448, 243);
  982. g.drawString(""+OrePh, 448, 288);
  983. g.drawString(""+ExpPh, 448, 258);
  984. g.drawString(""+Hour+":"+Minutes+":"+Seconds, 448, 228);
  985. g.drawString(""+LVLG, 448, 303);
  986. g.drawString(""+R, 448, 318);
  987.  
  988. ExpGained = skills.getCurrentExp(Skills.MINING) - StartExp;
  989.  
  990. java.text.DecimalFormat df = new java.text.DecimalFormat("##.##");
  991. Clevel = skills.getCurrentLevel(Skills.MINING);
  992. LVLG = Clevel - Slevel;
  993. ExpGained = skills.getCurrentExp(Skills.MINING) - StartExp;
  994. Millis = System.currentTimeMillis() - StartTime;
  995. Num = ((3600000.0 / (double) Millis));
  996. ExpPh = (int) (Num * ExpGained);
  997. OrePh = (int) (Num * OresMined);
  998. Hour = Millis / (1000 * 60 * 60);
  999. Millis -= Hour * (1000 * 60 * 60);
  1000. Minutes = Millis / (1000 * 60);
  1001. Millis -= Minutes * (1000 * 60);
  1002. Seconds = Millis / 1000;
  1003.  
  1004.  
  1005. }
  1006.  
  1007. }import java.awt.BasicStroke;
  1008. import java.awt.Color;
  1009. import java.awt.Container;
  1010. import java.awt.Font;
  1011. import java.awt.Graphics;
  1012. import java.awt.Graphics2D;
  1013. import java.awt.event.ActionEvent;
  1014. import java.awt.event.ActionListener;
  1015.  
  1016. import javax.swing.DefaultComboBoxModel;
  1017. import javax.swing.GroupLayout;
  1018. import javax.swing.JButton;
  1019. import javax.swing.JComboBox;
  1020. import javax.swing.JFrame;
  1021. import javax.swing.JLabel;
  1022. import javax.swing.JRadioButton;
  1023. import javax.swing.LayoutStyle;
  1024.  
  1025. import com.rarebot.event.events.MessageEvent;
  1026. import com.rarebot.event.listeners.MessageListener;
  1027. import com.rarebot.event.listeners.PaintListener;
  1028. import com.rarebot.script.Script;
  1029. import com.rarebot.script.ScriptManifest;
  1030. import com.rarebot.script.methods.Game.Tab;
  1031. import com.rarebot.script.methods.Skills;
  1032. import com.rarebot.script.wrappers.RSObject;
  1033. import com.rarebot.script.wrappers.RSTile;
  1034.  
  1035. @ScriptManifest(
  1036. authors = {"Whipz_man"},
  1037. version = 1.1,
  1038. description = "The Ultimate in PowerMining V1.3",
  1039. name = "Whipz_PowerMiner"
  1040. )
  1041.  
  1042. public class Whipz_PowerMiner extends Script implements PaintListener, MessageListener{
  1043.  
  1044. //Pic
  1045. int AllPic[] = {1265, 1267, 1269, 1271, 1273, 1275, 14099, 14107, 15259, 15261};
  1046.  
  1047. //Rock
  1048. int Tin_ID[] = {2094, 2095, 3038, 3245, 5776, 5777, 5778, 9714, 9716, 11933, 11934, 11935, 11957, 11958, 11959, 14902, 14903, 21293, 21294, 21295} ;
  1049.  
  1050. int Copper_ID[] = {2090, 2091, 2097, 3027, 3229, 5779, 5780, 5781, 9708, 9709, 9710, 11936, 11937, 11938, 11960, 11961, 11962, 14906, 14907, 21284, 21285, 21286};
  1051.  
  1052. int Iron_ID[] = {2092, 2093, 5773, 5774, 5775, 9717, 9718, 9719, 11954, 11955, 11956, 14099, 14107, 14913, 14914, 21281, 21282, 21283, 37307, 37308, 37309 };
  1053.  
  1054. int Silver_ID[] = {2311, 11186, 11187, 11188, 11948, 11949, 11950, 15580, 15581, 29224, 29225, 29226, 32444, 32445, 32446, 37304, 37305, 37306};
  1055.  
  1056. int Coal_ID[] = {2096, 2097, 3032, 3233, 5770, 5771, 5772, 10948, 11930, 11931, 11932, 14850, 14851, 21287, 21288, 21289, 29215, 29216, 29217, 32426, 32427, 32428};
  1057.  
  1058. int Gold_ID[] = {5768, 5769, 9720, 9722, 10574, 10575, 10576, 11183, 11184, 11185, 11943, 15576, 15577, 15578, 32432, 32433, 32434, 45067, 45068};
  1059.  
  1060. int Mithril_ID[] = {2102, 2103, 3041, 3280, 5784, 5785, 5786, 11942, 11943, 11944, 21278, 21279, 21280, 32438, 32439, 32440};
  1061.  
  1062. int Adamant_ID[] = {3040, 3273, 5782, 5783, 11939, 11941, 21275, 21276, 21277, 29233, 29235, 32425, 32436, 32437};
  1063.  
  1064. int Rune_ID[] = {14859, 33078, 33079, 45069, 45070};
  1065.  
  1066. int Ore;
  1067. //Mining ID
  1068. int MiningID = 624;
  1069.  
  1070. //RockVaild
  1071. RSTile RockTile = null;
  1072.  
  1073. //Banking
  1074. int boothID = 11402;
  1075.  
  1076. //GUI Stuff
  1077. int[]RMine;
  1078. boolean guiwait = true;
  1079. PowerMiner_GUI q;
  1080. boolean m1d1;
  1081. boolean Max;
  1082.  
  1083. //AntiBan&Paint
  1084. String Status = "Starting up!";
  1085. int OresMined;
  1086. int ExpGained;
  1087. String MineR;
  1088. int StartExp;
  1089. long StartTime;
  1090. long Hours;
  1091. long Minutes;
  1092. long Seconds;
  1093. String R = "";
  1094. private final Color color1 = new Color(0, 255, 255);
  1095.  
  1096. private final BasicStroke stroke1 = new BasicStroke(4);
  1097.  
  1098. private final Font font1 = new Font("Times New Roman", 1, 16);
  1099. private final Font font2 = new Font("Times New Roman", 1, 14);
  1100. private final Font font3 = new Font("Times New Roman", 1, 13);
  1101.  
  1102. int Clevel;
  1103. int LVLG;
  1104. int Slevel;
  1105. long Millis;
  1106. long Hour;
  1107. long Second;
  1108. int ExpPh;
  1109. int OrePh;
  1110. int ExpLvl;
  1111. double Percent;
  1112. double Num;
  1113.  
  1114. public boolean onStart() {
  1115. while (!game.isLoggedIn()) {
  1116. game.login();
  1117. sleep(2000);
  1118. }
  1119. java.awt.EventQueue.invokeLater(new Runnable() {
  1120. @Override
  1121. public void run() {
  1122. q = new PowerMiner_GUI();
  1123. q.setVisible(true);
  1124. q.setAlwaysOnTop(true);
  1125. }
  1126. });
  1127.  
  1128. while (guiwait) sleep (500);
  1129. log("You are going to Mine "+R);
  1130. StartTime = System.currentTimeMillis();
  1131. StartExp = skills.getCurrentExp(Skills.MINING);
  1132. Slevel = skills.getCurrentLevel(skills.MINING);
  1133. return true;
  1134. }
  1135.  
  1136. boolean MineOres() {
  1137. final RSObject rock = objects.getNearest(RMine);
  1138. if (rock != null) {
  1139. if(Max) {
  1140. if (rock != null && calc.distanceTo(rock) <5) {
  1141. if (rock.isOnScreen()) {
  1142. if (rock.interact("Mine")) {
  1143. RockTile = tiles.getTileUnderMouse();
  1144. sleep(1000);
  1145. while(getMyPlayer().isMoving()) {
  1146. sleep(50);
  1147. }
  1148. return true;
  1149. }
  1150. } else {
  1151. return walking.walkTileMM(rock.getLocation(), 1, 1);
  1152. }
  1153. }
  1154. } else {
  1155. if (rock.isOnScreen()) {
  1156. if (rock.interact("Mine")) {
  1157. RockTile = tiles.getTileUnderMouse();
  1158. sleep(1000);
  1159. while(getMyPlayer().isMoving()) {
  1160. sleep(50);
  1161. }
  1162. return true;
  1163. }
  1164. } else {
  1165. return walking.walkTileMM(rock.getLocation(), 1, 1);
  1166. }
  1167. }
  1168. }
  1169. return false;
  1170. }
  1171.  
  1172. boolean RockValid() {
  1173. for (int i = 0; i < RMine.length; i++) {
  1174. if (RockTile != null) {
  1175. final RSObject ob = objects.getTopAt(RockTile);
  1176. if (ob != null) {
  1177. if (ob.getID() == RMine[i]) {
  1178. return true;
  1179. }
  1180. }
  1181. }
  1182. }
  1183. return false;
  1184. }
  1185.  
  1186. @Override
  1187. public int loop() {
  1188. if(StartExp == 0) {
  1189. StartExp = skills.getCurrentExp(skills.getCurrentExp(Skills.MINING));
  1190. Slevel = skills.getCurrentLevel(skills.getCurrentLevel(Skills.MINING));
  1191. }
  1192. if(m1d1) {
  1193. if(inventory.contains(Ore)) {
  1194. inventory.dropAllExcept(AllPic);
  1195. } else {
  1196. if (getMyPlayer().getAnimation() == -1 || !RockValid()) {
  1197. MineOres();
  1198. AntiBan();
  1199. }
  1200. }
  1201. } else {
  1202. if (inventory.isFull()) {
  1203. inventory.dropAllExcept(AllPic);
  1204. } else {
  1205. if (getMyPlayer().getAnimation() == -1 || !RockValid()) {
  1206. MineOres();
  1207. AntiBan();
  1208. }
  1209. }
  1210.  
  1211. }
  1212. return random(750, 1000);
  1213. }
  1214.  
  1215.  
  1216.  
  1217.  
  1218.  
  1219. public void onFinish() {
  1220. log("Thankyou for using Whipz_man PowerMiner!");
  1221. log("You Mined "+OresMined+ " " +R);
  1222. stopScript();
  1223. }
  1224.  
  1225. @SuppressWarnings("serial")
  1226. class PowerMiner_GUI extends JFrame {
  1227. public PowerMiner_GUI() {
  1228. super();
  1229. initComponents();
  1230. }
  1231.  
  1232. private void StartActionPerformed(ActionEvent e) {
  1233. String MRock = Rock.getSelectedItem().toString();
  1234. if(MRock.equals("Tin")) {
  1235. RMine = Tin_ID;
  1236. R = "Tin Ores";
  1237. MineR = "Tin";
  1238. Ore = 438;
  1239. }else if(MRock.equals("Copper")) {
  1240. RMine = Copper_ID;
  1241. R = "Copper Ores";
  1242. MineR = "Copper";
  1243. Ore = 436;
  1244. }else if(MRock.equals("Iron")) {
  1245. RMine = Iron_ID;
  1246. R = "Iron Ores";
  1247. MineR = "Iron";
  1248. Ore = 440;
  1249. }else if(MRock.equals("Silver")) {
  1250. RMine = Silver_ID;
  1251. R = "Silver Ores";
  1252. MineR = "Silver";
  1253. Ore = 442;
  1254. }else if(MRock.equals("Coal")) {
  1255. RMine = Coal_ID;
  1256. R = "Coal";
  1257. MineR = "Coal";
  1258. Ore = 453;
  1259. }else if(MRock.equals("Gold")) {
  1260. RMine = Gold_ID;
  1261. R = "Gold Ores";
  1262. MineR = "Gold";
  1263. Ore = 444;
  1264. }else if(MRock.equals("Mithril")) {
  1265. RMine = Mithril_ID;
  1266. R = "Mithril Ores";
  1267. MineR = "Mithril";
  1268. Ore = 447;
  1269. }else if(MRock.equals("Adamant")) {
  1270. RMine = Adamant_ID;
  1271. R = "Adamant Ores";
  1272. MineR = "Adamant";
  1273. Ore = 449;
  1274. }else {
  1275. RMine = Rune_ID;
  1276. R = "Runite Ores";
  1277. MineR = "Rune";
  1278. Ore = 451;
  1279. }
  1280. if(M1D1.isSelected()) {
  1281. m1d1 = true;
  1282. log("We are going to M1D1");
  1283. } else {
  1284. m1d1 = false;
  1285. log("We are going to mine a full invent then drop");
  1286. }
  1287. if(MaxDistance.isSelected()) {
  1288. Max = true;
  1289. log("We arent going to far away from where we are!");
  1290. } else {
  1291. Max = false;
  1292. log("Mining all "+R+" on Mini Map!");
  1293. }
  1294.  
  1295. guiwait = false;
  1296. q.dispose();
  1297. }
  1298.  
  1299. private void initComponents() {
  1300.  
  1301. label1 = new JLabel();
  1302. label2 = new JLabel();
  1303. Rock = new JComboBox();
  1304. Start = new JButton();
  1305. M1D1 = new JRadioButton();
  1306. MaxDistance = new JRadioButton();
  1307.  
  1308.  
  1309. Container contentPane = getContentPane();
  1310.  
  1311. //---- label1 ----
  1312. label1.setText("Whipz_man PowerMiner");
  1313. label1.setFont(new Font("Times New Roman", Font.BOLD, 18));
  1314. label1.setForeground(Color.red);
  1315.  
  1316. //---- label2 ----
  1317. label2.setText("What would you like to mine?");
  1318. label2.setForeground(Color.red);
  1319. label2.setFont(new Font("Times New Roman", Font.BOLD, 12));
  1320.  
  1321. //---- Rock ----
  1322. Rock.setModel(new DefaultComboBoxModel(new String[] {
  1323. "Tin",
  1324. "Copper",
  1325. "Iron",
  1326. "Silver",
  1327. "Coal",
  1328. "Gold",
  1329. "Mithril",
  1330. "Adamant",
  1331. "Rune"
  1332. }));
  1333. Rock.setForeground(Color.red);
  1334. Rock.setFont(new Font("Times New Roman", Font.BOLD, 12));
  1335.  
  1336. //---- Start ----
  1337. Start.setText("Start");
  1338. Start.setForeground(Color.red);
  1339. Start.addActionListener(new ActionListener() {
  1340. @Override
  1341. public void actionPerformed(ActionEvent e) {
  1342. StartActionPerformed(e);
  1343. }
  1344. });
  1345.  
  1346. //---- M1D1 ----
  1347. M1D1.setText("M1D1");
  1348. M1D1.setFont(new Font("Times New Roman", Font.BOLD, 11));
  1349. M1D1.setForeground(Color.red);
  1350.  
  1351. //---- MaxDistance ----
  1352. MaxDistance.setText("Max Distance Set");
  1353. MaxDistance.setForeground(Color.red);
  1354. MaxDistance.setFont(new Font("Times New Roman", Font.BOLD, 11));
  1355.  
  1356. GroupLayout contentPaneLayout = new GroupLayout(contentPane);
  1357. contentPane.setLayout(contentPaneLayout);
  1358. contentPaneLayout.setHorizontalGroup(
  1359. contentPaneLayout.createParallelGroup()
  1360. .addGroup(GroupLayout.Alignment.TRAILING, contentPaneLayout.createSequentialGroup()
  1361. .addContainerGap(182, Short.MAX_VALUE)
  1362. .addComponent(Start)
  1363. .addContainerGap())
  1364. .addGroup(contentPaneLayout.createSequentialGroup()
  1365. .addGap(22, 22, 22)
  1366. .addComponent(label1, GroupLayout.PREFERRED_SIZE, 202, GroupLayout.PREFERRED_SIZE)
  1367. .addContainerGap(25, Short.MAX_VALUE))
  1368. .addGroup(GroupLayout.Alignment.TRAILING, contentPaneLayout.createSequentialGroup()
  1369. .addContainerGap(47, Short.MAX_VALUE)
  1370. .addComponent(label2, GroupLayout.PREFERRED_SIZE, 166, GroupLayout.PREFERRED_SIZE)
  1371. .addGap(36, 36, 36))
  1372. .addGroup(contentPaneLayout.createSequentialGroup()
  1373. .addGap(76, 76, 76)
  1374. .addGroup(contentPaneLayout.createParallelGroup()
  1375. .addComponent(Rock, GroupLayout.PREFERRED_SIZE, 83, GroupLayout.PREFERRED_SIZE)
  1376. .addGroup(contentPaneLayout.createSequentialGroup()
  1377. .addGap(10, 10, 10)
  1378. .addGroup(contentPaneLayout.createParallelGroup()
  1379. .addComponent(MaxDistance)
  1380. .addComponent(M1D1))))
  1381. .addContainerGap(48, Short.MAX_VALUE))
  1382. );
  1383. contentPaneLayout.setVerticalGroup(
  1384. contentPaneLayout.createParallelGroup()
  1385. .addGroup(contentPaneLayout.createSequentialGroup()
  1386. .addContainerGap()
  1387. .addComponent(label1)
  1388. .addGap(1, 1, 1)
  1389. .addComponent(label2, GroupLayout.PREFERRED_SIZE, 26, GroupLayout.PREFERRED_SIZE)
  1390. .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
  1391. .addComponent(Rock, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
  1392. .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
  1393. .addComponent(M1D1)
  1394. .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
  1395. .addComponent(MaxDistance)
  1396. .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 32, Short.MAX_VALUE)
  1397. .addComponent(Start)
  1398. .addContainerGap())
  1399. );
  1400. pack();
  1401. setLocationRelativeTo(getOwner());
  1402. }
  1403.  
  1404.  
  1405. private JLabel label1;
  1406. private JLabel label2;
  1407. private JComboBox Rock;
  1408. private JButton Start;
  1409. private JRadioButton M1D1;
  1410. private JRadioButton MaxDistance;
  1411.  
  1412. }
  1413.  
  1414.  
  1415.  
  1416. private int AntiBan() {
  1417. Status = "Performing AntiBan";
  1418. int random = random(1, 12);
  1419. switch (random) {
  1420. case 1:
  1421. mouse.moveSlightly();
  1422. sleep(500,600);
  1423. break;
  1424. case 2:
  1425. mouse.moveRandomly(10, 50);
  1426. break;
  1427.  
  1428. case 3:
  1429. mouse.moveOffScreen();
  1430. break;
  1431. case 4:
  1432. camera.moveRandomly(random(250, 1500));
  1433. break;
  1434. case 6:
  1435. if (random(0, 18) == 3) {
  1436. game.openTab(Tab.STATS);
  1437. skills.doHover(Skills.INTERFACE_MINING);
  1438. sleep(random(2000, 2400));
  1439. }
  1440. break;
  1441. case 8:
  1442. if (random(0, 13) == 2) {
  1443. camera.setAngle(random(30, 70));
  1444. sleep(400, 1200);
  1445.  
  1446. }
  1447. break;
  1448.  
  1449.  
  1450.  
  1451. }
  1452. return random(1000, 5000);
  1453. }
  1454.  
  1455. public void messageReceived(MessageEvent e) {
  1456. String msg = e.getMessage();
  1457. if (msg.contains("manage to mine two")) {
  1458. OresMined += 2;
  1459. } else if (msg.contains("manage to")) {
  1460. OresMined++;
  1461. }
  1462. }
  1463.  
  1464.  
  1465. @Override
  1466. public void onRepaint(Graphics g1) {
  1467. Graphics2D g = (Graphics2D)g1;
  1468. g.setFont(font1);
  1469. g.setColor(color1);
  1470. g.drawString("Whipz_man's PowerMiner", 336, 197);
  1471. g.setFont(font2);
  1472. g.drawString("The Ultimate PowerMiner", 345, 211);
  1473. g.setFont(font3);
  1474. g.drawString("Runtime:", 345, 228);
  1475. g.drawString("Exp Gained:", 345, 243);
  1476. g.drawString("Exp p/h:", 345, 258);
  1477. g.drawString("Ores Mined:", 345, 273);
  1478. g.drawString("Ores p/h:", 345, 288);
  1479. g.drawString("Lvls Gained:", 345, 303);
  1480. g.drawString("Ore being Mined:", 345, 318);
  1481. g.setStroke(stroke1);
  1482. g.drawRoundRect(331, 179, 184, 157, 16, 16);
  1483. g.drawString(""+OresMined, 448, 273);
  1484. g.drawString(""+ExpGained, 448, 243);
  1485. g.drawString(""+OrePh, 448, 288);
  1486. g.drawString(""+ExpPh, 448, 258);
  1487. g.drawString(""+Hour+":"+Minutes+":"+Seconds, 448, 228);
  1488. g.drawString(""+LVLG, 448, 303);
  1489. g.drawString(""+R, 448, 318);
  1490.  
  1491. ExpGained = skills.getCurrentExp(Skills.MINING) - StartExp;
  1492.  
  1493. java.text.DecimalFormat df = new java.text.DecimalFormat("##.##");
  1494. Clevel = skills.getCurrentLevel(Skills.MINING);
  1495. LVLG = Clevel - Slevel;
  1496. ExpGained = skills.getCurrentExp(Skills.MINING) - StartExp;
  1497. Millis = System.currentTimeMillis() - StartTime;
  1498. Num = ((3600000.0 / (double) Millis));
  1499. ExpPh = (int) (Num * ExpGained);
  1500. OrePh = (int) (Num * OresMined);
  1501. Hour = Millis / (1000 * 60 * 60);
  1502. Millis -= Hour * (1000 * 60 * 60);
  1503. Minutes = Millis / (1000 * 60);
  1504. Millis -= Minutes * (1000 * 60);
  1505. Seconds = Millis / 1000;
  1506.  
  1507.  
  1508. }
  1509.  
  1510. }import java.awt.BasicStroke;
  1511. import java.awt.Color;
  1512. import java.awt.Container;
  1513. import java.awt.Font;
  1514. import java.awt.Graphics;
  1515. import java.awt.Graphics2D;
  1516. import java.awt.event.ActionEvent;
  1517. import java.awt.event.ActionListener;
  1518.  
  1519. import javax.swing.DefaultComboBoxModel;
  1520. import javax.swing.GroupLayout;
  1521. import javax.swing.JButton;
  1522. import javax.swing.JComboBox;
  1523. import javax.swing.JFrame;
  1524. import javax.swing.JLabel;
  1525. import javax.swing.JRadioButton;
  1526. import javax.swing.LayoutStyle;
  1527.  
  1528. import com.rarebot.event.events.MessageEvent;
  1529. import com.rarebot.event.listeners.MessageListener;
  1530. import com.rarebot.event.listeners.PaintListener;
  1531. import com.rarebot.script.Script;
  1532. import com.rarebot.script.ScriptManifest;
  1533. import com.rarebot.script.methods.Game.Tab;
  1534. import com.rarebot.script.methods.Skills;
  1535. import com.rarebot.script.wrappers.RSObject;
  1536. import com.rarebot.script.wrappers.RSTile;
  1537.  
  1538. @ScriptManifest(
  1539. authors = {"Whipz_man"},
  1540. version = 1.1,
  1541. description = "The Ultimate in PowerMining V1.3",
  1542. name = "Whipz_PowerMiner"
  1543. )
  1544.  
  1545. public class Whipz_PowerMiner extends Script implements PaintListener, MessageListener{
  1546.  
  1547. //Pic
  1548. int AllPic[] = {1265, 1267, 1269, 1271, 1273, 1275, 14099, 14107, 15259, 15261};
  1549.  
  1550. //Rock
  1551. int Tin_ID[] = {2094, 2095, 3038, 3245, 5776, 5777, 5778, 9714, 9716, 11933, 11934, 11935, 11957, 11958, 11959, 14902, 14903, 21293, 21294, 21295} ;
  1552.  
  1553. int Copper_ID[] = {2090, 2091, 2097, 3027, 3229, 5779, 5780, 5781, 9708, 9709, 9710, 11936, 11937, 11938, 11960, 11961, 11962, 14906, 14907, 21284, 21285, 21286};
  1554.  
  1555. int Iron_ID[] = {2092, 2093, 5773, 5774, 5775, 9717, 9718, 9719, 11954, 11955, 11956, 14099, 14107, 14913, 14914, 21281, 21282, 21283, 37307, 37308, 37309 };
  1556.  
  1557. int Silver_ID[] = {2311, 11186, 11187, 11188, 11948, 11949, 11950, 15580, 15581, 29224, 29225, 29226, 32444, 32445, 32446, 37304, 37305, 37306};
  1558.  
  1559. int Coal_ID[] = {2096, 2097, 3032, 3233, 5770, 5771, 5772, 10948, 11930, 11931, 11932, 14850, 14851, 21287, 21288, 21289, 29215, 29216, 29217, 32426, 32427, 32428};
  1560.  
  1561. int Gold_ID[] = {5768, 5769, 9720, 9722, 10574, 10575, 10576, 11183, 11184, 11185, 11943, 15576, 15577, 15578, 32432, 32433, 32434, 45067, 45068};
  1562.  
  1563. int Mithril_ID[] = {2102, 2103, 3041, 3280, 5784, 5785, 5786, 11942, 11943, 11944, 21278, 21279, 21280, 32438, 32439, 32440};
  1564.  
  1565. int Adamant_ID[] = {3040, 3273, 5782, 5783, 11939, 11941, 21275, 21276, 21277, 29233, 29235, 32425, 32436, 32437};
  1566.  
  1567. int Rune_ID[] = {14859, 33078, 33079, 45069, 45070};
  1568.  
  1569. int Ore;
  1570. //Mining ID
  1571. int MiningID = 624;
  1572.  
  1573. //RockVaild
  1574. RSTile RockTile = null;
  1575.  
  1576. //Banking
  1577. int boothID = 11402;
  1578.  
  1579. //GUI Stuff
  1580. int[]RMine;
  1581. boolean guiwait = true;
  1582. PowerMiner_GUI q;
  1583. boolean m1d1;
  1584. boolean Max;
  1585.  
  1586. //AntiBan&Paint
  1587. String Status = "Starting up!";
  1588. int OresMined;
  1589. int ExpGained;
  1590. String MineR;
  1591. int StartExp;
  1592. long StartTime;
  1593. long Hours;
  1594. long Minutes;
  1595. long Seconds;
  1596. String R = "";
  1597. private final Color color1 = new Color(0, 255, 255);
  1598.  
  1599. private final BasicStroke stroke1 = new BasicStroke(4);
  1600.  
  1601. private final Font font1 = new Font("Times New Roman", 1, 16);
  1602. private final Font font2 = new Font("Times New Roman", 1, 14);
  1603. private final Font font3 = new Font("Times New Roman", 1, 13);
  1604.  
  1605. int Clevel;
  1606. int LVLG;
  1607. int Slevel;
  1608. long Millis;
  1609. long Hour;
  1610. long Second;
  1611. int ExpPh;
  1612. int OrePh;
  1613. int ExpLvl;
  1614. double Percent;
  1615. double Num;
  1616.  
  1617. public boolean onStart() {
  1618. while (!game.isLoggedIn()) {
  1619. game.login();
  1620. sleep(2000);
  1621. }
  1622. java.awt.EventQueue.invokeLater(new Runnable() {
  1623. @Override
  1624. public void run() {
  1625. q = new PowerMiner_GUI();
  1626. q.setVisible(true);
  1627. q.setAlwaysOnTop(true);
  1628. }
  1629. });
  1630.  
  1631. while (guiwait) sleep (500);
  1632. log("You are going to Mine "+R);
  1633. StartTime = System.currentTimeMillis();
  1634. StartExp = skills.getCurrentExp(Skills.MINING);
  1635. Slevel = skills.getCurrentLevel(skills.MINING);
  1636. return true;
  1637. }
  1638.  
  1639. boolean MineOres() {
  1640. final RSObject rock = objects.getNearest(RMine);
  1641. if (rock != null) {
  1642. if(Max) {
  1643. if (rock != null && calc.distanceTo(rock) <5) {
  1644. if (rock.isOnScreen()) {
  1645. if (rock.interact("Mine")) {
  1646. RockTile = tiles.getTileUnderMouse();
  1647. sleep(1000);
  1648. while(getMyPlayer().isMoving()) {
  1649. sleep(50);
  1650. }
  1651. return true;
  1652. }
  1653. } else {
  1654. return walking.walkTileMM(rock.getLocation(), 1, 1);
  1655. }
  1656. }
  1657. } else {
  1658. if (rock.isOnScreen()) {
  1659. if (rock.interact("Mine")) {
  1660. RockTile = tiles.getTileUnderMouse();
  1661. sleep(1000);
  1662. while(getMyPlayer().isMoving()) {
  1663. sleep(50);
  1664. }
  1665. return true;
  1666. }
  1667. } else {
  1668. return walking.walkTileMM(rock.getLocation(), 1, 1);
  1669. }
  1670. }
  1671. }
  1672. return false;
  1673. }
  1674.  
  1675. boolean RockValid() {
  1676. for (int i = 0; i < RMine.length; i++) {
  1677. if (RockTile != null) {
  1678. final RSObject ob = objects.getTopAt(RockTile);
  1679. if (ob != null) {
  1680. if (ob.getID() == RMine[i]) {
  1681. return true;
  1682. }
  1683. }
  1684. }
  1685. }
  1686. return false;
  1687. }
  1688.  
  1689. @Override
  1690. public int loop() {
  1691. if(StartExp == 0) {
  1692. StartExp = skills.getCurrentExp(skills.getCurrentExp(Skills.MINING));
  1693. Slevel = skills.getCurrentLevel(skills.getCurrentLevel(Skills.MINING));
  1694. }
  1695. if(m1d1) {
  1696. if(inventory.contains(Ore)) {
  1697. inventory.dropAllExcept(AllPic);
  1698. } else {
  1699. if (getMyPlayer().getAnimation() == -1 || !RockValid()) {
  1700. MineOres();
  1701. AntiBan();
  1702. }
  1703. }
  1704. } else {
  1705. if (inventory.isFull()) {
  1706. inventory.dropAllExcept(AllPic);
  1707. } else {
  1708. if (getMyPlayer().getAnimation() == -1 || !RockValid()) {
  1709. MineOres();
  1710. AntiBan();
  1711. }
  1712. }
  1713.  
  1714. }
  1715. return random(750, 1000);
  1716. }
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722. public void onFinish() {
  1723. log("Thankyou for using Whipz_man PowerMiner!");
  1724. log("You Mined "+OresMined+ " " +R);
  1725. stopScript();
  1726. }
  1727.  
  1728. @SuppressWarnings("serial")
  1729. class PowerMiner_GUI extends JFrame {
  1730. public PowerMiner_GUI() {
  1731. super();
  1732. initComponents();
  1733. }
  1734.  
  1735. private void StartActionPerformed(ActionEvent e) {
  1736. String MRock = Rock.getSelectedItem().toString();
  1737. if(MRock.equals("Tin")) {
  1738. RMine = Tin_ID;
  1739. R = "Tin Ores";
  1740. MineR = "Tin";
  1741. Ore = 438;
  1742. }else if(MRock.equals("Copper")) {
  1743. RMine = Copper_ID;
  1744. R = "Copper Ores";
  1745. MineR = "Copper";
  1746. Ore = 436;
  1747. }else if(MRock.equals("Iron")) {
  1748. RMine = Iron_ID;
  1749. R = "Iron Ores";
  1750. MineR = "Iron";
  1751. Ore = 440;
  1752. }else if(MRock.equals("Silver")) {
  1753. RMine = Silver_ID;
  1754. R = "Silver Ores";
  1755. MineR = "Silver";
  1756. Ore = 442;
  1757. }else if(MRock.equals("Coal")) {
  1758. RMine = Coal_ID;
  1759. R = "Coal";
  1760. MineR = "Coal";
  1761. Ore = 453;
  1762. }else if(MRock.equals("Gold")) {
  1763. RMine = Gold_ID;
  1764. R = "Gold Ores";
  1765. MineR = "Gold";
  1766. Ore = 444;
  1767. }else if(MRock.equals("Mithril")) {
  1768. RMine = Mithril_ID;
  1769. R = "Mithril Ores";
  1770. MineR = "Mithril";
  1771. Ore = 447;
  1772. }else if(MRock.equals("Adamant")) {
  1773. RMine = Adamant_ID;
  1774. R = "Adamant Ores";
  1775. MineR = "Adamant";
  1776. Ore = 449;
  1777. }else {
  1778. RMine = Rune_ID;
  1779. R = "Runite Ores";
  1780. MineR = "Rune";
  1781. Ore = 451;
  1782. }
  1783. if(M1D1.isSelected()) {
  1784. m1d1 = true;
  1785. log("We are going to M1D1");
  1786. } else {
  1787. m1d1 = false;
  1788. log("We are going to mine a full invent then drop");
  1789. }
  1790. if(MaxDistance.isSelected()) {
  1791. Max = true;
  1792. log("We arent going to far away from where we are!");
  1793. } else {
  1794. Max = false;
  1795. log("Mining all "+R+" on Mini Map!");
  1796. }
  1797.  
  1798. guiwait = false;
  1799. q.dispose();
  1800. }
  1801.  
  1802. private void initComponents() {
  1803.  
  1804. label1 = new JLabel();
  1805. label2 = new JLabel();
  1806. Rock = new JComboBox();
  1807. Start = new JButton();
  1808. M1D1 = new JRadioButton();
  1809. MaxDistance = new JRadioButton();
  1810.  
  1811.  
  1812. Container contentPane = getContentPane();
  1813.  
  1814. //---- label1 ----
  1815. label1.setText("Whipz_man PowerMiner");
  1816. label1.setFont(new Font("Times New Roman", Font.BOLD, 18));
  1817. label1.setForeground(Color.red);
  1818.  
  1819. //---- label2 ----
  1820. label2.setText("What would you like to mine?");
  1821. label2.setForeground(Color.red);
  1822. label2.setFont(new Font("Times New Roman", Font.BOLD, 12));
  1823.  
  1824. //---- Rock ----
  1825. Rock.setModel(new DefaultComboBoxModel(new String[] {
  1826. "Tin",
  1827. "Copper",
  1828. "Iron",
  1829. "Silver",
  1830. "Coal",
  1831. "Gold",
  1832. "Mithril",
  1833. "Adamant",
  1834. "Rune"
  1835. }));
  1836. Rock.setForeground(Color.red);
  1837. Rock.setFont(new Font("Times New Roman", Font.BOLD, 12));
  1838.  
  1839. //---- Start ----
  1840. Start.setText("Start");
  1841. Start.setForeground(Color.red);
  1842. Start.addActionListener(new ActionListener() {
  1843. @Override
  1844. public void actionPerformed(ActionEvent e) {
  1845. StartActionPerformed(e);
  1846. }
  1847. });
  1848.  
  1849. //---- M1D1 ----
  1850. M1D1.setText("M1D1");
  1851. M1D1.setFont(new Font("Times New Roman", Font.BOLD, 11));
  1852. M1D1.setForeground(Color.red);
  1853.  
  1854. //---- MaxDistance ----
  1855. MaxDistance.setText("Max Distance Set");
  1856. MaxDistance.setForeground(Color.red);
  1857. MaxDistance.setFont(new Font("Times New Roman", Font.BOLD, 11));
  1858.  
  1859. GroupLayout contentPaneLayout = new GroupLayout(contentPane);
  1860. contentPane.setLayout(contentPaneLayout);
  1861. contentPaneLayout.setHorizontalGroup(
  1862. contentPaneLayout.createParallelGroup()
  1863. .addGroup(GroupLayout.Alignment.TRAILING, contentPaneLayout.createSequentialGroup()
  1864. .addContainerGap(182, Short.MAX_VALUE)
  1865. .addComponent(Start)
  1866. .addContainerGap())
  1867. .addGroup(contentPaneLayout.createSequentialGroup()
  1868. .addGap(22, 22, 22)
  1869. .addComponent(label1, GroupLayout.PREFERRED_SIZE, 202, GroupLayout.PREFERRED_SIZE)
  1870. .addContainerGap(25, Short.MAX_VALUE))
  1871. .addGroup(GroupLayout.Alignment.TRAILING, contentPaneLayout.createSequentialGroup()
  1872. .addContainerGap(47, Short.MAX_VALUE)
  1873. .addComponent(label2, GroupLayout.PREFERRED_SIZE, 166, GroupLayout.PREFERRED_SIZE)
  1874. .addGap(36, 36, 36))
  1875. .addGroup(contentPaneLayout.createSequentialGroup()
  1876. .addGap(76, 76, 76)
  1877. .addGroup(contentPaneLayout.createParallelGroup()
  1878. .addComponent(Rock, GroupLayout.PREFERRED_SIZE, 83, GroupLayout.PREFERRED_SIZE)
  1879. .addGroup(contentPaneLayout.createSequentialGroup()
  1880. .addGap(10, 10, 10)
  1881. .addGroup(contentPaneLayout.createParallelGroup()
  1882. .addComponent(MaxDistance)
  1883. .addComponent(M1D1))))
  1884. .addContainerGap(48, Short.MAX_VALUE))
  1885. );
  1886. contentPaneLayout.setVerticalGroup(
  1887. contentPaneLayout.createParallelGroup()
  1888. .addGroup(contentPaneLayout.createSequentialGroup()
  1889. .addContainerGap()
  1890. .addComponent(label1)
  1891. .addGap(1, 1, 1)
  1892. .addComponent(label2, GroupLayout.PREFERRED_SIZE, 26, GroupLayout.PREFERRED_SIZE)
  1893. .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
  1894. .addComponent(Rock, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
  1895. .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
  1896. .addComponent(M1D1)
  1897. .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
  1898. .addComponent(MaxDistance)
  1899. .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 32, Short.MAX_VALUE)
  1900. .addComponent(Start)
  1901. .addContainerGap())
  1902. );
  1903. pack();
  1904. setLocationRelativeTo(getOwner());
  1905. }
  1906.  
  1907.  
  1908. private JLabel label1;
  1909. private JLabel label2;
  1910. private JComboBox Rock;
  1911. private JButton Start;
  1912. private JRadioButton M1D1;
  1913. private JRadioButton MaxDistance;
  1914.  
  1915. }
  1916.  
  1917.  
  1918.  
  1919. private int AntiBan() {
  1920. Status = "Performing AntiBan";
  1921. int random = random(1, 12);
  1922. switch (random) {
  1923. case 1:
  1924. mouse.moveSlightly();
  1925. sleep(500,600);
  1926. break;
  1927. case 2:
  1928. mouse.moveRandomly(10, 50);
  1929. break;
  1930.  
  1931. case 3:
  1932. mouse.moveOffScreen();
  1933. break;
  1934. case 4:
  1935. camera.moveRandomly(random(250, 1500));
  1936. break;
  1937. case 6:
  1938. if (random(0, 18) == 3) {
  1939. game.openTab(Tab.STATS);
  1940. skills.doHover(Skills.INTERFACE_MINING);
  1941. sleep(random(2000, 2400));
  1942. }
  1943. break;
  1944. case 8:
  1945. if (random(0, 13) == 2) {
  1946. camera.setAngle(random(30, 70));
  1947. sleep(400, 1200);
  1948.  
  1949. }
  1950. break;
  1951.  
  1952.  
  1953.  
  1954. }
  1955. return random(1000, 5000);
  1956. }
  1957.  
  1958. public void messageReceived(MessageEvent e) {
  1959. String msg = e.getMessage();
  1960. if (msg.contains("manage to mine two")) {
  1961. OresMined += 2;
  1962. } else if (msg.contains("manage to")) {
  1963. OresMined++;
  1964. }
  1965. }
  1966.  
  1967.  
  1968. @Override
  1969. public void onRepaint(Graphics g1) {
  1970. Graphics2D g = (Graphics2D)g1;
  1971. g.setFont(font1);
  1972. g.setColor(color1);
  1973. g.drawString("Whipz_man's PowerMiner", 336, 197);
  1974. g.setFont(font2);
  1975. g.drawString("The Ultimate PowerMiner", 345, 211);
  1976. g.setFont(font3);
  1977. g.drawString("Runtime:", 345, 228);
  1978. g.drawString("Exp Gained:", 345, 243);
  1979. g.drawString("Exp p/h:", 345, 258);
  1980. g.drawString("Ores Mined:", 345, 273);
  1981. g.drawString("Ores p/h:", 345, 288);
  1982. g.drawString("Lvls Gained:", 345, 303);
  1983. g.drawString("Ore being Mined:", 345, 318);
  1984. g.setStroke(stroke1);
  1985. g.drawRoundRect(331, 179, 184, 157, 16, 16);
  1986. g.drawString(""+OresMined, 448, 273);
  1987. g.drawString(""+ExpGained, 448, 243);
  1988. g.drawString(""+OrePh, 448, 288);
  1989. g.drawString(""+ExpPh, 448, 258);
  1990. g.drawString(""+Hour+":"+Minutes+":"+Seconds, 448, 228);
  1991. g.drawString(""+LVLG, 448, 303);
  1992. g.drawString(""+R, 448, 318);
  1993.  
  1994. ExpGained = skills.getCurrentExp(Skills.MINING) - StartExp;
  1995.  
  1996. java.text.DecimalFormat df = new java.text.DecimalFormat("##.##");
  1997. Clevel = skills.getCurrentLevel(Skills.MINING);
  1998. LVLG = Clevel - Slevel;
  1999. ExpGained = skills.getCurrentExp(Skills.MINING) - StartExp;
  2000. Millis = System.currentTimeMillis() - StartTime;
  2001. Num = ((3600000.0 / (double) Millis));
  2002. ExpPh = (int) (Num * ExpGained);
  2003. OrePh = (int) (Num * OresMined);
  2004. Hour = Millis / (1000 * 60 * 60);
  2005. Millis -= Hour * (1000 * 60 * 60);
  2006. Minutes = Millis / (1000 * 60);
  2007. Millis -= Minutes * (1000 * 60);
  2008. Seconds = Millis / 1000;
  2009.  
  2010.  
  2011. }
  2012.  
  2013. }
Advertisement
Add Comment
Please, Sign In to add comment