Advertisement
Guest User

kek

a guest
Dec 12th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.93 KB | None | 0 0
  1. import org.osbot.rs07.api.map.Area;
  2. import org.osbot.rs07.api.model.RS2Object;
  3. import org.osbot.rs07.utility.ConditionalSleep;
  4.  
  5. import javax.swing.text.html.parser.Entity;
  6.  
  7. public class MakeMoneyHandler extends main{
  8. int itemsPrice = main.itemPrice;
  9. int[] rockIDs = {7485, }; //tin,iron,coal,mith,addy,rune
  10. int[] oreIDs = {};
  11. public boolean canAfford = false;
  12. Area lumbyMinigArea = new Area(3228, 3150, 3223,3145);
  13. Area LumbridgeBank = new Area(3210, 3218, 3207, 3220);
  14.  
  15. public void fishing(){
  16.  
  17.  
  18. }
  19.  
  20.  
  21. public void Mining(int area) throws InterruptedException{
  22. log("Got here");
  23. while(!canAfford){
  24.  
  25. int price = PriceHandler.getPrice(438);
  26. int totalPriceToPay;
  27.  
  28. switch (area){
  29. case 0:
  30. if(!lumbyMinigArea.contains(myPlayer())){
  31. walkToDArea(lumbyMinigArea);
  32. }
  33. /* RS2Object rock = objects.closest(rockIDs[0]);
  34. if (rock !=null && rock.isVisible() && !inventory.isFull()) {
  35. if (!myPlayer().isAnimating() && !myPlayer().isMoving()) {
  36. new ConditionalSleep(1000, 100) {
  37. @Override
  38. public boolean condition() throws InterruptedException {
  39. return rock.interact("Mine");
  40. }
  41. }.sleep();
  42. }
  43. getCamera().toEntity(rock);
  44. } */
  45.  
  46. if(inventory.isFull()){
  47. walkToDArea(LumbridgeBank);
  48. sleep(random(1000,1500));
  49. }
  50.  
  51. if(LumbridgeBank.contains(myPlayer())){
  52. if(getBank().isOpen()){
  53. new ConditionalSleep(2000, 100) {
  54. @Override
  55. public boolean condition() throws InterruptedException {
  56. return bank.open();
  57. }
  58. }.sleep();
  59.  
  60.  
  61. new ConditionalSleep(1000, 100) {
  62. @Override
  63. public boolean condition() throws InterruptedException {
  64. return bank.depositAll();
  65. }
  66. }.sleep();
  67.  
  68. totalPriceToPay = (int)bank.getAmount(438);
  69.  
  70. if((price * totalPriceToPay) > main.itemPrice){
  71. canAfford = true;
  72. break;
  73. }
  74. }
  75. }
  76. }
  77.  
  78. }
  79.  
  80. }
  81.  
  82. public void woodcutting(){
  83.  
  84. }
  85.  
  86.  
  87. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement