Jump to content

[Open Source] Blast Furnace Pumper


Recommended Posts

Made this on request for those who want to run a private blast furnace world. This script will pump the furnace 24/7 in order to keep the furnace at a constant high temperature (Maximizing profits for the whole world). DOES NOT MAKE ANY BARS.

 

Make sure you have food. Script should be able to support all foods.

 

 

REPO: https://tribot.org/repository/script/id/1049

 

 

Source

 

package scripts.blast_furnace_pumper;import org.tribot.api.Clicking;import org.tribot.api.General;import org.tribot.api.Timing;import org.tribot.api.types.generic.Condition;import org.tribot.api.types.generic.Filter;import org.tribot.api.util.ABCUtil;import org.tribot.api2007.*;import org.tribot.api2007.types.*;import org.tribot.api2007.util.ThreadSettings;import org.tribot.script.Script;import org.tribot.script.ScriptManifest;@ScriptManifest(category = "Mini Games", name = "Blast Furnace Pumper", authors = "daxmagex", version = 1.00)public class Main extends Script {    private static final int[] FOOD_LIST = {            315, 319, 325, 329, 333, 347, 351, 361, 365, 373, 379, 385, 391, 391, 397, 1881, 1883, 1891,1893,            1895, 1897, 1899, 1901,1969, 1971, 1973, 2140, 2142, 2142, 2309, 4293, 4608, 6685, 6687, 6689, 6691,            6883,6962, 6965, 7060, 7944, 7946};    private static final RSTile PUMP_TILE = new RSTile(1950, 4961, 0);    private ABCUtil abcUtil = new ABCUtil();    @Override    public void run(){        ThreadSettings.get().setClickingAPIUseDynamic(true);        while (true){            if (Combat.getHPRatio() < abcUtil.INT_TRACKER.NEXT_EAT_AT.next()){                eat();            }            if (Inventory.getCount(FOOD_LIST) <= 0){                bank();            } else {                if (pumpAvailable() && Player.getAnimation() == -1){                    pump();                } else {                    abcUtil.performTimedActions(Skills.SKILLS.STRENGTH);                    sleep(500);                }            }            sleep(100);        }    }    private void eat(){        RSItem food = getFood();        if (food != null){            food.click("Eat");            sleep(abcUtil.DELAY_TRACKER.ITEM_INTERACTION.next());        }    }    private void pump(){        RSObject pump = getPump();        if (pump != null){            if (pump.isOnScreen()){                if (Clicking.click("Operate", pump)) {                    Timing.waitCondition(unavailablePump(), General.random(3000,5000));                }            } else {                Walking.blindWalkTo(pump);                General.sleep(1000,2000);            }        }    }    private void bank(){        if (Banking.isBankScreenOpen()){            Banking.depositAll();            Banking.withdraw(20, FOOD_LIST);            Timing.waitCondition(inventoryItem(FOOD_LIST), General.random(2000, 3000));            Banking.close();        } else {            if (Banking.openBank()){                Timing.waitCondition(bankScreen(), General.random(5000,6000));            }        }    }    private RSObject getPump(){        RSObject[] objects = Objects.getAt(PUMP_TILE);        return objects.length > 0 ? objects[0] : null;    }    private RSItem getFood(){        RSItem[] items = Inventory.find(FOOD_LIST);        return items.length > 0 ? items[0] : null;    }    private boolean pumpAvailable(){        RSPlayer[] players = Players.find(filterByTile(PUMP_TILE));        for (RSPlayer player : players){            if (player.getAnimation() > 0)                println("Pump is already taken");                return false;        }        println("Pump is available!");        return true;    }    private Condition bankScreen(){        return new Condition() {            @Override            public boolean active() {                General.sleep(100, 300);                return Banking.isBankScreenOpen();            }        };    }    private Condition inventoryItem(final int... ids){        return new Condition() {            @Override            public boolean active() {                General.sleep(100,300);                return Inventory.getCount(ids) > 0;            }        };    }    private Condition unavailablePump(){        return new Condition() {            @Override            public boolean active() {                General.sleep(100,300);                return !pumpAvailable();            }        };    }    private Filter<RSPlayer> filterByTile(final RSTile tile){        return new Filter<RSPlayer>() {            @Override            public boolean accept(RSPlayer rsPlayer) {                return rsPlayer.getPosition().equals(tile);            }        };    }}

 

 

You can get the script that makes bars over here: https://tribot.org/forums/topic/43325-499-daxblastfurnace-abcl10-all-jobs-low-reqs-400khr/

Edited by daxmagex
  • Like 1
Link to post
Share on other sites
  • 5 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Our picks

    • Support for the gradle launcher is being dropped. Read more about the new launcher here.
      • 8 replies
    • What to expect from TRiBot moving forward.
      • 11 replies
    • TRiBot 12 Release Candidate

      The TRiBot team has been hard at work creating the last major version of TRiBot before the TRiBot X release. We've noticed many problems with TRiBot 11 with a lot of users preferring TRiBot 10 over 11. We've heard you, so we took TRiBot 10, added the new features introduced with 11, introduced some other new things, and created TRiBot 12. So without further adieu, here's TRiBot 12.
      • 40 replies
    • Gradle is a build tool used to accelerate developer productivity.

      We recently setup a Maven repository (TRiBot Central) to make it easier for scripters to create scripts. Check it out here: https://gitlab.com/trilez-software/tribot/tribot-central/-/packages

      Furthermore, we've released a simple Gradle project to make it easy to run TRiBot and develop scripts for it. Check it out here: https://gitlab.com/trilez-software/tribot/tribot-gradle-launcher

      The goals of TRiBot Central are to:

      Deliver updates to TRiBot faster


      Better organize TRiBot's dependencies (AKA dependancies)


      Make it easier to develop scripts for TRiBot


      Make it easier to use and run TRiBot


      Note: TRiBot won't be able to run scripts from within this project until TRiBot's next release.
      • 13 replies
    • Hi everyone,

      I'd like to thank everyone for their patience in this transition period. Since last week, we've worked out the remaining bugs with this integration.

      Some users have still been having issues with connecting their forums account to their Auth0 account. To resolve this, we've imported all forums accounts into Auth0.

      Unfortunately, the accounts which were imported today were using an unsupported password hashing algorithm. Hence, random passwords were set during the import.

      What does this mean for me?

      If you've previously linked your forums account to your Auth0 account, you don't have to do anything. Nothing changes for you.


      If you haven't logged in via our new login yet,

      Try logging in with your forums email address and the last password you used


      If you are unable to login, please use the "Forgot password" tool on the login page:
      Follow the instructions to reset your password
       
      • 17 replies
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...