Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import org.dreambot.api.script.AbstractScript;
- import org.dreambot.api.wrappers.interactive.GameObject;
- import org.dreambot.api.script.Category;
- import org.dreambot.api.script.ScriptManifest;
- import org.dreambot.api.methods.Calculations;
- import org.dreambot.api.methods.map.Area;
- @ScriptManifest(category = Category.MONEYMAKING, name = "Shafter", author = "LemonCamel", version = 1)
- public class ShaftMaker extends AbstractScript {
- public Area treeArea = new Area(3219, 3310, 3223, 3300,0);
- public Area fletchArea = new Area(3224,3303, 3226, 3308, 0);
- public int onLoop(){
- GameObject willow = getGameObjects().closest("Willow");
- if (treeArea.contains(getLocalPlayer()) && (getLocalPlayer().getAnimation() != 2846) && !getInventory().isFull() && (getLocalPlayer().getAnimation() != 1248)){
- getCamera().mouseRotateToEntity(willow);
- sleep(Calculations.random(100, 300));
- willow.interact("Chop down");
- sleepUntil(() -> !getLocalPlayer().isAnimating(), 1000000);
- }
- if (!treeArea.contains(getLocalPlayer())){
- getWalking().walk(treeArea.getRandomTile());
- }
- if (getInventory().isFull()){
- sleep(Calculations.random(5000,8000));
- getInventory().get(946).useOn(1519);
- sleep(Calculations.random(500,1000));
- if (getWidgets().getWidget(305).getChild(9) !=null){
- sleep(Calculations.random(300, 700));
- getWidgets().getWidget(305).getChild(9).interact("Make X");
- sleep(Calculations.random(1000,2000));
- getKeyboard().type(28);
- sleepUntil(() -> !getLocalPlayer().isAnimating(), 1000000);
- sleepUntil(()->getInventory().count(52) == 0,1000);}
- }
- if (getInventory().count(52)>= 1080 && getInventory().count(1519)== 0){
- getWalking().walk(fletchArea.getRandomTile());
- sleepUntil(()->getLocalPlayer().isStandingStill(), 1000);
- getInventory().get(314).useOn(52);
- sleep(Calculations.random(1000, 3000));
- }
- if (getWidgets().getWidget(582).getChild(5) !=null && fletchArea.contains(getLocalPlayer())){
- sleep(Calculations.random(1000, 2000));
- getWidgets().getWidget(582).getChild(5).interact("Make 10 sets");
- sleepUntil(()->getInventory().count(52)== 0, 10000);
- }
- return 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement