Compare commits
2 Commits
1122205220
...
d7f98826b1
Author | SHA1 | Date | |
---|---|---|---|
d7f98826b1
|
|||
8623509eb4
|
@ -36,8 +36,7 @@ public class GoToSawmill extends TaskNode {
|
||||
|
||||
Filter<Item> ringFilter = item -> item.getName().startsWith("Ring of dueling");
|
||||
if (Inventory.contains(ringFilter)) {
|
||||
Item ring = Inventory.get(ringFilter);
|
||||
ring.interact();
|
||||
Inventory.interact(ringFilter, "Wear");
|
||||
MethodProvider.sleepUntil(() -> !Inventory.contains(ringFilter), Calculations.random(2000, 3000));
|
||||
}
|
||||
|
||||
@ -60,6 +59,7 @@ public class GoToSawmill extends TaskNode {
|
||||
if (w != null && w.isVisible()) {
|
||||
w.interact();
|
||||
MethodProvider.sleepUntil(() -> NEAR_BALLOON.distance() > 50, Calculations.random(5000, 5500));
|
||||
MethodProvider.sleep(800, 1200);
|
||||
}
|
||||
|
||||
return Calculations.random(250, 400);
|
||||
|
@ -5,8 +5,10 @@ import org.dreambot.api.methods.Calculations;
|
||||
import org.dreambot.api.methods.MethodProvider;
|
||||
import org.dreambot.api.methods.container.impl.Inventory;
|
||||
import org.dreambot.api.methods.container.impl.bank.Bank;
|
||||
import org.dreambot.api.methods.interactive.GameObjects;
|
||||
import org.dreambot.api.methods.interactive.NPCs;
|
||||
import org.dreambot.api.script.TaskNode;
|
||||
import org.dreambot.api.wrappers.interactive.GameObject;
|
||||
|
||||
public class OpenBank extends TaskNode {
|
||||
@Override
|
||||
@ -18,7 +20,10 @@ public class OpenBank extends TaskNode {
|
||||
|
||||
@Override
|
||||
public int execute() {
|
||||
Bank.openClosest();
|
||||
GameObject bank = GameObjects.closest("Bank chest");
|
||||
if (bank == null) return Calculations.random(250, 400);
|
||||
|
||||
bank.interactForceLeft("Use");
|
||||
if (!Util.sleepUntilMoving()) return Calculations.random(250, 400);
|
||||
|
||||
MethodProvider.sleepUntil(Bank::isOpen, Calculations.random(4000, 4500));
|
||||
|
Reference in New Issue
Block a user