Updates and rework to use CScript

This commit is contained in:
2022-01-19 12:35:50 +01:00
parent 78786709eb
commit 7efda7494a
79 changed files with 1295 additions and 818 deletions

View File

@ -4,9 +4,9 @@ import com.google.inject.Provides;
import io.reisub.openosrs.glassblower.tasks.Blow;
import io.reisub.openosrs.glassblower.tasks.HandleBank;
import io.reisub.openosrs.glassblower.tasks.PickupSeed;
import io.reisub.openosrs.util.enums.Activity;
import io.reisub.openosrs.util.CScript;
import io.reisub.openosrs.util.Util;
import io.reisub.openosrs.util.enums.Activity;
import lombok.extern.slf4j.Slf4j;
import net.runelite.api.AnimationID;
import net.runelite.api.GameState;

View File

@ -2,8 +2,8 @@ package io.reisub.openosrs.glassblower.tasks;
import io.reisub.openosrs.glassblower.Config;
import io.reisub.openosrs.glassblower.Glassblower;
import io.reisub.openosrs.util.enums.Activity;
import io.reisub.openosrs.util.Task;
import io.reisub.openosrs.util.enums.Activity;
import net.runelite.api.ItemID;
import net.runelite.client.plugins.iutils.game.InventoryItem;
import net.runelite.client.plugins.iutils.game.iObject;
@ -47,6 +47,8 @@ public class Blow extends Task {
game.tick();
}
if (game.groundItems().withId(ItemID.SEAWEED_SPORE).exists()) return;
InventoryItem pipe = game.inventory().withId(ItemID.GLASSBLOWING_PIPE).first();
InventoryItem moltenGlass = game.inventory().withId(ItemID.MOLTEN_GLASS).first();
if (pipe == null || moltenGlass == null) return;

View File

@ -1,5 +1,6 @@
package io.reisub.openosrs.glassblower.tasks;
import io.reisub.openosrs.glassblower.Glassblower;
import io.reisub.openosrs.util.Task;
import net.runelite.api.ItemID;
import net.runelite.client.plugins.iutils.game.iGroundItem;
@ -23,6 +24,7 @@ public class PickupSeed extends Task {
int quantity = game.inventory().withId(ItemID.SEAWEED_SPORE).quantity();
item.interact("Take");
game.waitUntil(() -> game.inventory().withId(ItemID.SEAWEED_SPORE).quantity() > quantity, 30);
game.waitUntil(() -> game.inventory().withId(ItemID.SEAWEED_SPORE).quantity() > quantity
|| (game.localPlayer() != null && game.localPlayer().position().regionID() == Glassblower.FOSSIL_ISLAND_SMALL_ISLAND_REGION), 30);
}
}