Add option for seaweed spore pickup
This commit is contained in:
parent
01a71ba399
commit
9ec09e42d5
@ -39,6 +39,14 @@ public interface Config extends net.runelite.client.config.Config {
|
|||||||
)
|
)
|
||||||
default Product targetProduct() { return Product.LANTERN_LENS; }
|
default Product targetProduct() { return Product.LANTERN_LENS; }
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
keyName = "farmSeaweedSpores",
|
||||||
|
name = "Farm seaweed spores",
|
||||||
|
description = "Go underwater at the Fossil Island to farm seaweed spores.",
|
||||||
|
position = 1
|
||||||
|
)
|
||||||
|
default boolean farmSeaweedSpores() { return true; }
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "startButton",
|
keyName = "startButton",
|
||||||
name = "Start/Stop",
|
name = "Start/Stop",
|
||||||
|
@ -32,7 +32,7 @@ public class Blow extends Task {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
if (game.localPlayer().position().regionID() == Glassblower.FOSSIL_ISLAND_SMALL_ISLAND_REGION) {
|
if (config.farmSeaweedSpores() && game.localPlayer().position().regionID() == Glassblower.FOSSIL_ISLAND_SMALL_ISLAND_REGION) {
|
||||||
iObject rowboat = game.objects().withName("Rowboat").nearest();
|
iObject rowboat = game.objects().withName("Rowboat").nearest();
|
||||||
if (rowboat == null) return;
|
if (rowboat == null) return;
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ public class Blow extends Task {
|
|||||||
game.tick();
|
game.tick();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (game.groundItems().withId(ItemID.SEAWEED_SPORE).exists()) return;
|
if (config.farmSeaweedSpores() && game.groundItems().withId(ItemID.SEAWEED_SPORE).exists()) return;
|
||||||
|
|
||||||
InventoryItem pipe = game.inventory().withId(ItemID.GLASSBLOWING_PIPE).first();
|
InventoryItem pipe = game.inventory().withId(ItemID.GLASSBLOWING_PIPE).first();
|
||||||
InventoryItem moltenGlass = game.inventory().withId(ItemID.MOLTEN_GLASS).first();
|
InventoryItem moltenGlass = game.inventory().withId(ItemID.MOLTEN_GLASS).first();
|
||||||
|
@ -1,14 +1,17 @@
|
|||||||
package io.reisub.openosrs.glassblower.tasks;
|
package io.reisub.openosrs.glassblower.tasks;
|
||||||
|
|
||||||
|
import io.reisub.openosrs.glassblower.Config;
|
||||||
import io.reisub.openosrs.glassblower.Glassblower;
|
import io.reisub.openosrs.glassblower.Glassblower;
|
||||||
import io.reisub.openosrs.util.Task;
|
import io.reisub.openosrs.util.Task;
|
||||||
|
import io.reisub.openosrs.util.tasks.BankTask;
|
||||||
import net.runelite.api.ItemID;
|
import net.runelite.api.ItemID;
|
||||||
import net.runelite.client.plugins.iutils.game.iObject;
|
import net.runelite.client.plugins.iutils.game.iObject;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
import java.time.Duration;
|
import java.time.Duration;
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
|
|
||||||
public class HandleBank extends Task {
|
public class HandleBank extends BankTask {
|
||||||
private Instant lastBanking = Instant.EPOCH;
|
private Instant lastBanking = Instant.EPOCH;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -39,13 +42,7 @@ public class HandleBank extends Task {
|
|||||||
game.tick();
|
game.tick();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!bank.isOpen()) {
|
openBank(5);
|
||||||
iObject bankObj = game.objects().withName("Bank chest", "Bank booth", "Bank Chest-wreck").nearest();
|
|
||||||
if (bankObj == null) return;
|
|
||||||
|
|
||||||
bankObj.interact(0);
|
|
||||||
game.waitUntil(() -> bank.isOpen(), 15);
|
|
||||||
}
|
|
||||||
|
|
||||||
bank.depositExcept(false, ItemID.GLASSBLOWING_PIPE, ItemID.SEAWEED_SPORE);
|
bank.depositExcept(false, ItemID.GLASSBLOWING_PIPE, ItemID.SEAWEED_SPORE);
|
||||||
// bank.depositAll(false, ItemID.BEER_GLASS,
|
// bank.depositAll(false, ItemID.BEER_GLASS,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user