Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import org.osbot.rs07.api.map.Area;
- import org.osbot.rs07.api.model.RS2Object;
- import org.osbot.rs07.utility.ConditionalSleep;
- import javax.swing.text.html.parser.Entity;
- public class MakeMoneyHandler extends main{
- int itemsPrice = main.itemPrice;
- int[] rockIDs = {7485, }; //tin,iron,coal,mith,addy,rune
- int[] oreIDs = {};
- public boolean canAfford = false;
- Area lumbyMinigArea = new Area(3228, 3150, 3223,3145);
- Area LumbridgeBank = new Area(3210, 3218, 3207, 3220);
- public void fishing(){
- }
- public void Mining(int area) throws InterruptedException{
- log("Got here");
- while(!canAfford){
- int price = PriceHandler.getPrice(438);
- int totalPriceToPay;
- switch (area){
- case 0:
- if(!lumbyMinigArea.contains(myPlayer())){
- walkToDArea(lumbyMinigArea);
- }
- /* RS2Object rock = objects.closest(rockIDs[0]);
- if (rock !=null && rock.isVisible() && !inventory.isFull()) {
- if (!myPlayer().isAnimating() && !myPlayer().isMoving()) {
- new ConditionalSleep(1000, 100) {
- @Override
- public boolean condition() throws InterruptedException {
- return rock.interact("Mine");
- }
- }.sleep();
- }
- getCamera().toEntity(rock);
- } */
- if(inventory.isFull()){
- walkToDArea(LumbridgeBank);
- sleep(random(1000,1500));
- }
- if(LumbridgeBank.contains(myPlayer())){
- if(getBank().isOpen()){
- new ConditionalSleep(2000, 100) {
- @Override
- public boolean condition() throws InterruptedException {
- return bank.open();
- }
- }.sleep();
- new ConditionalSleep(1000, 100) {
- @Override
- public boolean condition() throws InterruptedException {
- return bank.depositAll();
- }
- }.sleep();
- totalPriceToPay = (int)bank.getAmount(438);
- if((price * totalPriceToPay) > main.itemPrice){
- canAfford = true;
- break;
- }
- }
- }
- }
- }
- }
- public void woodcutting(){
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement