Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package osbotOS;
- import java.util.ArrayList;
- import java.util.Collections;
- import org.osbot.rs07.script.Script;
- import org.osbot.rs07.script.ScriptManifest;
- import Methods.Core;
- //imports omitted
- @ScriptManifest(author = "Elliott", info = "shitty fire crafter", name = "Freaky Fast Abyss", version = 1.0, logo = "")
- public class MainCrafter extends Script {
- public ArrayList<Node> nodes = new ArrayList<>();
- public Core coreMethods = new Core();
- public ActivityInBank inBankNode;
- public ActivityOutOfBank outOfBankNode;
- @Override
- public void onStart() {
- int eatAt = 60;
- boolean[] pouchesInUse = new boolean[] { true, true, true, false };
- int foodID = 7946; //monk
- int tabAmount = 10;
- int foodHeals = 16;
- boolean usingGlories = false;
- boolean usingPrayer = true;
- boolean usingStam = true;
- boolean usingTabs = true;
- this.inBankNode = new ActivityInBank(this);
- this.outOfBankNode = new ActivityOutOfBank(this);
- this.setSettings(eatAt, pouchesInUse, usingTabs, usingGlories,
- tabAmount, usingPrayer, usingStam, foodID, foodHeals);
- Collections.addAll(this.nodes, this.inBankNode, this.outOfBankNode); //add all nodes to the ArrayList
- }
- private void setSettings(int eatAt, boolean[] pouchesInUse,
- boolean usingGlories, boolean usingTabs, int tabAmount,
- boolean usingPrayer, boolean usingStam, int foodID, int foodHeals) {
- this.inBankNode.eatAt = eatAt; //user defined from UI eventually;
- this.inBankNode.usingGlory = usingGlories;
- this.inBankNode.usingTabs = usingTabs;
- this.inBankNode.tabAmount = tabAmount;
- this.inBankNode.usingStam = usingStam;
- this.inBankNode.foodID = foodID;
- this.inBankNode.foodHeals = foodHeals;
- this.outOfBankNode.pouchesInUse[0] = pouchesInUse[0];
- this.outOfBankNode.pouchesInUse[1] = pouchesInUse[1];
- this.outOfBankNode.pouchesInUse[2] = pouchesInUse[2];
- this.outOfBankNode.pouchesInUse[3] = pouchesInUse[3];
- }
- @Override
- public int onLoop() throws InterruptedException {
- for (final Node node : this.nodes) { //loop through the nodes
- if (node.validate()) { //validate each node
- node.execute(); //execute
- this.coreMethods.waitTime(this.coreMethods.rand(10, 50)); //prevents us from going through the logic as fast as we possibly can
- }
- }
- return this.coreMethods.rand(50, 100);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement