This commit is contained in:
2025-10-12 22:49:30 +03:00
parent 128173339e
commit e3e7de9108
20 changed files with 117 additions and 116 deletions

View File

@@ -40,7 +40,7 @@ tasks.register('shadowJar', Jar) {
dependsOn configurations.testRuntimeClasspath dependsOn configurations.testRuntimeClasspath
manifest { manifest {
attributes('Main-Class': attributes('Main-Class':
'ee.futur.easygiantsfoundry.EasyGiantsFoundryPluginTest', 'ee.futur.K4rliPluginsTest',
'Multi-Release': true) 'Multi-Release': true)
} }
@@ -69,6 +69,6 @@ task runClient(type: JavaExec) {
group = 'application' group = 'application'
description = 'Run the PluginTester main class to launch RuneLite with plugins' description = 'Run the PluginTester main class to launch RuneLite with plugins'
classpath = sourceSets.test.runtimeClasspath classpath = sourceSets.test.runtimeClasspath
mainClass = 'ee.futur.easygiantsfoundry.EasyGiantsFoundryPluginTest' mainClass = 'ee.futur.K4rliPluginsTest'
jvmArgs '-ea' jvmArgs '-ea'
} }

View File

@@ -1,6 +1,6 @@
displayName=Easy Giants' Foundry displayName=Example
author=Toofifty author=Nobody
support=https://github.com/Toofifty/easy-giantsfoundry support=
description=Helpful overlays for the Giants' Foundry minigame description=An example greeter plugin
tags=smithing,giant,foundry,giantsfoundry,minigame,ez,easy,smith tags=
plugins=ee.futur.easygiantsfoundry.EasyGiantsFoundryPlugin plugins=com.example.ExamplePlugin

View File

@@ -36,7 +36,7 @@ import java.util.stream.Collectors;
import static net.runelite.api.Varbits.QUICK_PRAYER; import static net.runelite.api.Varbits.QUICK_PRAYER;
@PluginDescriptor( @PluginDescriptor(
name = "BaseApiPlugin", name = "<html><font color=\"#FF9DF9\">[k4rli]</font> BaseApiPlugin</html>",
description = "", description = "",
tags = {"base-api", "k4rli"}, tags = {"base-api", "k4rli"},
hidden = false hidden = false

View File

@@ -99,7 +99,7 @@ public class PacketUtilsPlugin extends Plugin {
SwingUtilities.invokeLater(() -> SwingUtilities.invokeLater(() ->
{ {
for (Plugin plugin : pluginManager.getPlugins()) { for (Plugin plugin : pluginManager.getPlugins()) {
if (plugin.getName().equals("BaseApiPlugin")) { if (plugin.getName().contains("BaseApiPlugin")) {
if (pluginManager.isPluginEnabled(plugin)) { if (pluginManager.isPluginEnabled(plugin)) {
continue; continue;
} }

View File

@@ -35,7 +35,7 @@ import java.util.Set;
@Slf4j @Slf4j
@PluginDescriptor( @PluginDescriptor(
name = "Easy Giants' Foundry", name = "<html><font color=\"#FF9DF9\">[k4rli]</font> Giants' Foundry</html>",
description = "Helpful overlays for the Giants' Foundry minigame" description = "Helpful overlays for the Giants' Foundry minigame"
) )
public class EasyGiantsFoundryPlugin extends Plugin public class EasyGiantsFoundryPlugin extends Plugin

View File

@@ -1,9 +1,9 @@
package ee.futur.gotr; package ee.futur.easygotr;
import net.runelite.client.config.*; import net.runelite.client.config.*;
@ConfigGroup("AutoRifts") @ConfigGroup("EasyGOTR")
public interface AutoRiftsConfig extends Config { public interface EasyGOTRConfig extends Config {
@ConfigItem( @ConfigItem(
keyName = "Toggle", keyName = "Toggle",
name = "Toggle", name = "Toggle",
@@ -15,19 +15,19 @@ public interface AutoRiftsConfig extends Config {
} }
@ConfigSection( @ConfigSection(
name = "Auto Rifts Configuration", name = "Easy GOTR Configuration",
description = "Configure your settings for the AutoRifts plugin", description = "Configure your settings for the Easy GOTR plugin",
position = 1, position = 1,
closedByDefault = true closedByDefault = true
) )
String autoRiftsConfig = "autoRiftsConfig"; String easyGOTRConfig = "easyGOTRConfig";
@ConfigItem( @ConfigItem(
keyName = "prioritizeBloodDeath", keyName = "prioritizeBloodDeath",
name = "Always use blood/death altars", name = "Always use blood/death altars",
description = "Will ignore point balance for these altars and always use them if available.", description = "Will ignore point balance for these altars and always use them if available.",
position = 2, position = 2,
section = autoRiftsConfig section = easyGOTRConfig
) )
default boolean prioritizeBloodDeath() { default boolean prioritizeBloodDeath() {
return true; return true;
@@ -38,7 +38,7 @@ public interface AutoRiftsConfig extends Config {
name = "Drop Runes", name = "Drop Runes",
description = "Drop Runes instead of depositing (kek uim)", description = "Drop Runes instead of depositing (kek uim)",
position = 3, position = 3,
section = autoRiftsConfig section = easyGOTRConfig
) )
default boolean dropRunes() { default boolean dropRunes() {
return false; return false;
@@ -49,7 +49,7 @@ public interface AutoRiftsConfig extends Config {
name = "Drop Runes Filter", name = "Drop Runes Filter",
description = "If Drop Runes is not enabled and this has runes entered, the type of rune entered here will still get dropped, others will get deposited (ex: air, Mind, Body). Add runes with full name, air rune, mind rune , cosmic rune, etc... and split with comma ','", description = "If Drop Runes is not enabled and this has runes entered, the type of rune entered here will still get dropped, others will get deposited (ex: air, Mind, Body). Add runes with full name, air rune, mind rune , cosmic rune, etc... and split with comma ','",
position = 5, position = 5,
section = autoRiftsConfig section = easyGOTRConfig
) )
default String dropRunesFilter() { default String dropRunesFilter() {
return ""; return "";
@@ -60,7 +60,7 @@ public interface AutoRiftsConfig extends Config {
name = "Use Essence Pouches?", name = "Use Essence Pouches?",
description = "Requires NPC Contact runes in Rune Pouch or Redwood lit Lantern", description = "Requires NPC Contact runes in Rune Pouch or Redwood lit Lantern",
position = 6, position = 6,
section = autoRiftsConfig section = easyGOTRConfig
) )
default boolean usePouches() { default boolean usePouches() {
return false; return false;
@@ -71,7 +71,7 @@ public interface AutoRiftsConfig extends Config {
name = "Abyssal Book in bank? (IMPORTANT FOR NPC CONTACT)", name = "Abyssal Book in bank? (IMPORTANT FOR NPC CONTACT)",
description = "IMPORTANT TO USE NPC CONTACT", description = "IMPORTANT TO USE NPC CONTACT",
position = 7, position = 7,
section = autoRiftsConfig section = easyGOTRConfig
) )
default boolean hasBook() { default boolean hasBook() {
return true; return true;
@@ -82,7 +82,7 @@ public interface AutoRiftsConfig extends Config {
name = "Starting Fragments (0 to wait for first portal)", name = "Starting Fragments (0 to wait for first portal)",
description = "How many fragments you should get before leaving the starting zone", description = "How many fragments you should get before leaving the starting zone",
position = 8, position = 8,
section = autoRiftsConfig section = easyGOTRConfig
) )
default int startingFrags() { default int startingFrags() {
return 0; return 0;

View File

@@ -1,4 +1,4 @@
package ee.futur.gotr; package ee.futur.easygotr;
import net.runelite.api.Client; import net.runelite.api.Client;
import net.runelite.client.ui.overlay.OverlayPanel; import net.runelite.client.ui.overlay.OverlayPanel;
@@ -11,14 +11,14 @@ import java.awt.*;
import static org.apache.commons.lang3.time.DurationFormatUtils.formatDuration; import static org.apache.commons.lang3.time.DurationFormatUtils.formatDuration;
public class AutoRiftsOverlay extends OverlayPanel { public class EasyGOTROverlay extends OverlayPanel {
private final Client client; private final Client client;
private final AutoRiftsPlugin plugin; private final EasyGOTRPlugin plugin;
public String overlayState = ""; public String overlayState = "";
@Inject @Inject
private AutoRiftsOverlay(Client client, AutoRiftsPlugin plugin) { private EasyGOTROverlay(Client client, EasyGOTRPlugin plugin) {
this.client = client; this.client = client;
this.plugin = plugin; this.plugin = plugin;
setPosition(OverlayPosition.BOTTOM_LEFT); setPosition(OverlayPosition.BOTTOM_LEFT);
@@ -28,7 +28,7 @@ public class AutoRiftsOverlay extends OverlayPanel {
public Dimension render(Graphics2D graphics) { public Dimension render(Graphics2D graphics) {
String timeFormat = (plugin.runningDuration.toHours() < 1) ? "mm:ss" : "HH:mm:ss"; String timeFormat = (plugin.runningDuration.toHours() < 1) ? "mm:ss" : "HH:mm:ss";
panelComponent.getChildren().add(TitleComponent.builder() panelComponent.getChildren().add(TitleComponent.builder()
.text("AutoRifts") .text("EasyGOTR")
.color(plugin.started ? Color.GREEN : Color.RED) .color(plugin.started ? Color.GREEN : Color.RED)
.build()); .build());

View File

@@ -1,4 +1,4 @@
package ee.futur.gotr; package ee.futur.easygotr;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSet;
@@ -7,8 +7,8 @@ import com.google.inject.Provides;
import ee.futur.baseapi.collections.*; import ee.futur.baseapi.collections.*;
import ee.futur.baseapi.collections.query.TileObjectQuery; import ee.futur.baseapi.collections.query.TileObjectQuery;
import ee.futur.baseapi.BaseApiPlugin; import ee.futur.baseapi.BaseApiPlugin;
import ee.futur.gotr.data.CellMapper; import ee.futur.easygotr.data.CellMapper;
import ee.futur.gotr.data.Constants; import ee.futur.easygotr.data.Constants;
import ee.futur.utils.InventoryUtil; import ee.futur.utils.InventoryUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.runelite.api.*; import net.runelite.api.*;
@@ -31,19 +31,19 @@ import java.util.*;
import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.ThreadLocalRandom;
@PluginDescriptor( @PluginDescriptor(
name = "<html><font color=\"#FF9DF9\">[PP]</font> GOTR Helper</html>", name = "<html><font color=\"#FF9DF9\">[k4rli]</font> GOTR Helper</html>",
description = "Guardians of the Rift", description = "Guardians of the Rift",
enabledByDefault = false, enabledByDefault = false,
tags = {"gotr", "helper", "k4rli"} tags = {"gotr", "helper", "k4rli"}
) )
@Slf4j @Slf4j
public class AutoRiftsPlugin extends Plugin { public class EasyGOTRPlugin extends Plugin {
@Inject @Inject
private Client client; private Client client;
@Inject @Inject
private AutoRiftsConfig config; private EasyGOTRConfig config;
@Inject @Inject
private AutoRiftsOverlay overlay; private EasyGOTROverlay overlay;
@Inject @Inject
private KeyManager keyManager; private KeyManager keyManager;
@Inject @Inject
@@ -111,8 +111,8 @@ public class AutoRiftsPlugin extends Plugin {
private boolean canEnterBarrier = false; private boolean canEnterBarrier = false;
@Provides @Provides
private AutoRiftsConfig getConfig(ConfigManager configManager) { private EasyGOTRConfig getConfig(ConfigManager configManager) {
return configManager.getConfig(AutoRiftsConfig.class); return configManager.getConfig(EasyGOTRConfig.class);
} }
@Override @Override
@@ -175,7 +175,7 @@ public class AutoRiftsPlugin extends Plugin {
return; return;
} }
AutoRiftsState state = getState(); EasyGOTRState state = getState();
overlay.overlayState = state.toString(); overlay.overlayState = state.toString();
if (BaseApiPlugin.isMoving()) { if (BaseApiPlugin.isMoving()) {
@@ -199,7 +199,7 @@ public class AutoRiftsPlugin extends Plugin {
dropRunes(); dropRunes();
//Handle moving to the altar differently (allow for re-tasking) //Handle moving to the altar differently (allow for re-tasking)
if (state != AutoRiftsState.ENTER_ALTAR) { if (state != EasyGOTRState.ENTER_ALTAR) {
return; return;
} }
} }
@@ -265,7 +265,7 @@ public class AutoRiftsPlugin extends Plugin {
} }
} }
private AutoRiftsState getState() { private EasyGOTRState getState() {
if (config.startingFrags() > 0 && getFragmentCount() > config.startingFrags()) { if (config.startingFrags() > 0 && getFragmentCount() > config.startingFrags()) {
needsMoreStartingFragments = false; needsMoreStartingFragments = false;
} else if (config.startingFrags() == 0) { } else if (config.startingFrags() == 0) {
@@ -273,21 +273,21 @@ public class AutoRiftsPlugin extends Plugin {
} }
if (!riftState.isGameStarted() && !riftState.isInAltar()) { if (!riftState.isGameStarted() && !riftState.isInAltar()) {
return AutoRiftsState.BREAK; return EasyGOTRState.BREAK;
} }
if (riftState.isGameBusy()) { if (riftState.isGameBusy()) {
return AutoRiftsState.GAME_BUSY; return EasyGOTRState.GAME_BUSY;
} }
if (riftState.isOutsideBarrier()) { if (riftState.isOutsideBarrier()) {
return AutoRiftsState.ENTER_GAME; return EasyGOTRState.ENTER_GAME;
} else { } else {
canEnterBarrier = false; canEnterBarrier = false;
} }
if (pouchManager.hasDegradedPouches()) { if (pouchManager.hasDegradedPouches()) {
return AutoRiftsState.REPAIR_POUCH; return EasyGOTRState.REPAIR_POUCH;
} }
if (!riftState.isGameStarted()) { if (!riftState.isGameStarted()) {
@@ -304,122 +304,122 @@ public class AutoRiftsPlugin extends Plugin {
//After the first portal has spawned, we should always be leaving the east mine //After the first portal has spawned, we should always be leaving the east mine
if (riftState.isInLargeMine()) { if (riftState.isInLargeMine()) {
return AutoRiftsState.LEAVE_EAST_MINE; return EasyGOTRState.LEAVE_EAST_MINE;
} }
//If we're in the huge mine, we should mine until inventory is full and then leave //If we're in the huge mine, we should mine until inventory is full and then leave
if (riftState.isInHugeMine()) { if (riftState.isInHugeMine()) {
if (Inventory.full()) { if (Inventory.full()) {
return AutoRiftsState.ENTER_PORTAL; return EasyGOTRState.ENTER_PORTAL;
} }
if (isMining()) { if (isMining()) {
return AutoRiftsState.MINING; return EasyGOTRState.MINING;
} }
return AutoRiftsState.MINE_HUGE_GUARDIANS; return EasyGOTRState.MINE_HUGE_GUARDIANS;
} }
if (riftState.isInAltar()) { if (riftState.isInAltar()) {
startingRun = false; startingRun = false;
if (Inventory.getItemAmount(ItemID.GUARDIAN_ESSENCE) > 0 || pouchManager.hasFullPouch()) { if (Inventory.getItemAmount(ItemID.GUARDIAN_ESSENCE) > 0 || pouchManager.hasFullPouch()) {
return AutoRiftsState.CRAFT_RUNES; return EasyGOTRState.CRAFT_RUNES;
} }
return AutoRiftsState.LEAVE_ALTAR; return EasyGOTRState.LEAVE_ALTAR;
} }
//If we're here, were in the game area //If we're here, were in the game area
if (riftState.isPortalSpawned() && (pouchManager.hasEmptyPouches() || Inventory.getEmptySlots() > 15)) { if (riftState.isPortalSpawned() && (pouchManager.hasEmptyPouches() || Inventory.getEmptySlots() > 15)) {
return AutoRiftsState.ENTER_PORTAL; return EasyGOTRState.ENTER_PORTAL;
} }
if (Inventory.full() || startingRun) { if (Inventory.full() || startingRun) {
startingRun = true; startingRun = true;
if (hasPowerEssence()) { if (hasPowerEssence()) {
return AutoRiftsState.POWER_GUARDIAN; return EasyGOTRState.POWER_GUARDIAN;
} }
if (hasPowerCell()) { if (hasPowerCell()) {
return AutoRiftsState.USE_CELL; return EasyGOTRState.USE_CELL;
} }
return AutoRiftsState.ENTER_ALTAR; return EasyGOTRState.ENTER_ALTAR;
} }
if (client.getLocalPlayer().getAnimation() == 9365) { if (client.getLocalPlayer().getAnimation() == 9365) {
return AutoRiftsState.CRAFTING_ESSENCE; return EasyGOTRState.CRAFTING_ESSENCE;
} }
if (getCellCount() == 0) { if (getCellCount() == 0) {
return AutoRiftsState.GET_CELLS; return EasyGOTRState.GET_CELLS;
} }
if (getInventoryRunes().isPresent() && !config.dropRunes() && getDroppableRunes().isEmpty()) { if (getInventoryRunes().isPresent() && !config.dropRunes() && getDroppableRunes().isEmpty()) {
return AutoRiftsState.DEPOSIT_RUNES; return EasyGOTRState.DEPOSIT_RUNES;
} }
if (getFragmentCount() < neededFrags()) { if (getFragmentCount() < neededFrags()) {
if (isMining()) { if (isMining()) {
return AutoRiftsState.MINING; return EasyGOTRState.MINING;
} }
return AutoRiftsState.MINE_REGULAR_GUARDIANS; return EasyGOTRState.MINE_REGULAR_GUARDIANS;
} }
return AutoRiftsState.CRAFT_ESSENCE; return EasyGOTRState.CRAFT_ESSENCE;
} }
private AutoRiftsState getGameEndingState() { private EasyGOTRState getGameEndingState() {
if (riftState.isInAltar()) { if (riftState.isInAltar()) {
if (pouchManager.getEssenceInPouches() > 0 || Inventory.getItemAmount(ItemID.GUARDIAN_ESSENCE) > 0) { if (pouchManager.getEssenceInPouches() > 0 || Inventory.getItemAmount(ItemID.GUARDIAN_ESSENCE) > 0) {
return AutoRiftsState.CRAFT_RUNES; return EasyGOTRState.CRAFT_RUNES;
} }
return AutoRiftsState.LEAVE_ALTAR; return EasyGOTRState.LEAVE_ALTAR;
} }
if (riftState.isInHugeMine()) { if (riftState.isInHugeMine()) {
return AutoRiftsState.ENTER_PORTAL; return EasyGOTRState.ENTER_PORTAL;
} }
if (hasPowerEssence()) { if (hasPowerEssence()) {
return AutoRiftsState.POWER_GUARDIAN; return EasyGOTRState.POWER_GUARDIAN;
} }
if (hasPowerCell()) { if (hasPowerCell()) {
return AutoRiftsState.USE_CELL; return EasyGOTRState.USE_CELL;
} }
int essence = pouchManager.getEssenceInPouches() + Inventory.getItemAmount(ItemID.GUARDIAN_ESSENCE); int essence = pouchManager.getEssenceInPouches() + Inventory.getItemAmount(ItemID.GUARDIAN_ESSENCE);
if (essence > 20) { if (essence > 20) {
return AutoRiftsState.ENTER_ALTAR; return EasyGOTRState.ENTER_ALTAR;
} }
if (getInventoryRunes().isPresent()) { if (getInventoryRunes().isPresent()) {
return AutoRiftsState.DEPOSIT_RUNES; return EasyGOTRState.DEPOSIT_RUNES;
} }
return AutoRiftsState.CRAFT_ESSENCE; return EasyGOTRState.CRAFT_ESSENCE;
} }
private AutoRiftsState getPreFirstPortalState() { private EasyGOTRState getPreFirstPortalState() {
//Safety //Safety
if (riftState.isInAltar()) { if (riftState.isInAltar()) {
return AutoRiftsState.LEAVE_ALTAR; return EasyGOTRState.LEAVE_ALTAR;
} }
//We're starting the game in the portal area //We're starting the game in the portal area
if (riftState.isInHugeMine()) { if (riftState.isInHugeMine()) {
if (Inventory.full()) { if (Inventory.full()) {
return AutoRiftsState.ENTER_PORTAL; return EasyGOTRState.ENTER_PORTAL;
} }
if (isMining()) { if (isMining()) {
return AutoRiftsState.MINING; return EasyGOTRState.MINING;
} }
return AutoRiftsState.MINE_HUGE_GUARDIANS; return EasyGOTRState.MINE_HUGE_GUARDIANS;
} }
if (riftState.isInLargeMine()) { if (riftState.isInLargeMine()) {
@@ -429,49 +429,49 @@ public class AutoRiftsPlugin extends Plugin {
}); });
} }
if (isMining()) { if (isMining()) {
return AutoRiftsState.MINING; return EasyGOTRState.MINING;
} }
return AutoRiftsState.MINE_LARGE_GUARDIANS; return EasyGOTRState.MINE_LARGE_GUARDIANS;
} }
//If we get here, we're probably walking to east from the portal. //If we get here, we're probably walking to east from the portal.
//Make a quick stop at cells if we need too //Make a quick stop at cells if we need too
if (getCellCount() < 10) { if (getCellCount() < 10) {
return AutoRiftsState.GET_CELLS; return EasyGOTRState.GET_CELLS;
} }
return AutoRiftsState.MOVE_TO_EAST_MINE; return EasyGOTRState.MOVE_TO_EAST_MINE;
} }
private AutoRiftsState getPregameState() { private EasyGOTRState getPregameState() {
if (config.startingFrags() > 0) { if (config.startingFrags() > 0) {
needsMoreStartingFragments = true; needsMoreStartingFragments = true;
} }
if (riftState.isInHugeMine()) { if (riftState.isInHugeMine()) {
return AutoRiftsState.ENTER_PORTAL; return EasyGOTRState.ENTER_PORTAL;
} }
if (riftState.isInLargeMine()) { if (riftState.isInLargeMine()) {
return AutoRiftsState.WAITING_FOR_GAME; return EasyGOTRState.WAITING_FOR_GAME;
} }
if (riftState.isInAltar()) { if (riftState.isInAltar()) {
if (pouchManager.getEssenceInPouches() > 0 || Inventory.getItemAmount(ItemID.GUARDIAN_ESSENCE) > 0) { if (pouchManager.getEssenceInPouches() > 0 || Inventory.getItemAmount(ItemID.GUARDIAN_ESSENCE) > 0) {
return AutoRiftsState.CRAFT_RUNES; return EasyGOTRState.CRAFT_RUNES;
} }
return AutoRiftsState.LEAVE_ALTAR; return EasyGOTRState.LEAVE_ALTAR;
} }
if (getInventoryRunes().isPresent()) { if (getInventoryRunes().isPresent()) {
return AutoRiftsState.DEPOSIT_RUNES; return EasyGOTRState.DEPOSIT_RUNES;
} }
if (getCellCount() < 10) { if (getCellCount() < 10) {
return AutoRiftsState.GET_CELLS; return EasyGOTRState.GET_CELLS;
} }
return AutoRiftsState.MOVE_TO_EAST_MINE; return EasyGOTRState.MOVE_TO_EAST_MINE;
} }
private int getCellCount() { private int getCellCount() {

View File

@@ -1,6 +1,6 @@
package ee.futur.gotr; package ee.futur.easygotr;
public enum AutoRiftsState { public enum EasyGOTRState {
GET_CELLS, GET_CELLS,
MOVE_TO_EAST_MINE, MOVE_TO_EAST_MINE,
WAITING_FOR_GAME, WAITING_FOR_GAME,

View File

@@ -1,12 +1,12 @@
package ee.futur.gotr; package ee.futur.easygotr;
import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSet;
import com.google.inject.Inject; import com.google.inject.Inject;
import ee.futur.baseapi.collections.Inventory; import ee.futur.baseapi.collections.Inventory;
import ee.futur.baseapi.collections.TileObjects; import ee.futur.baseapi.collections.TileObjects;
import ee.futur.baseapi.collections.Widgets; import ee.futur.baseapi.collections.Widgets;
import ee.futur.gotr.data.Constants; import ee.futur.easygotr.data.Constants;
import ee.futur.gotr.data.Utility; import ee.futur.easygotr.data.Utility;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@@ -50,7 +50,7 @@ public class GOTRState {
@Inject @Inject
private Client client; private Client client;
private final EventBus eventBus; private final EventBus eventBus;
private final AutoRiftsConfig config; private final EasyGOTRConfig config;
private static final String CHECK_POINT_REGEX = "You have (\\d+) catalytic energy and (\\d+) elemental energy"; private static final String CHECK_POINT_REGEX = "You have (\\d+) catalytic energy and (\\d+) elemental energy";
private static final Pattern CHECK_POINT_PATTERN = Pattern.compile(CHECK_POINT_REGEX); private static final Pattern CHECK_POINT_PATTERN = Pattern.compile(CHECK_POINT_REGEX);
private static final String REWARD_POINT_REGEX = "Total elemental energy:[^>]+>([\\d,]+).*Total catalytic energy:[^>]+>([\\d,]+)."; private static final String REWARD_POINT_REGEX = "Total elemental energy:[^>]+>([\\d,]+).*Total catalytic energy:[^>]+>([\\d,]+).";
@@ -64,7 +64,7 @@ public class GOTRState {
public boolean isGameEnding = false; public boolean isGameEnding = false;
@Inject @Inject
public GOTRState(EventBus eventBus, AutoRiftsConfig config) { public GOTRState(EventBus eventBus, EasyGOTRConfig config) {
eventBus.register(this); eventBus.register(this);
this.eventBus = eventBus; this.eventBus = eventBus;
this.config = config; this.config = config;
@@ -146,7 +146,7 @@ public class GOTRState {
return; return;
} }
if (event.getMessage().contains(ee.futur.gotr.data.Constants.GAME_STARTED)) { if (event.getMessage().contains(ee.futur.easygotr.data.Constants.GAME_STARTED)) {
gameStarted = true; gameStarted = true;
} }
@@ -182,7 +182,7 @@ public class GOTRState {
} }
private boolean isWidgetVisible() { private boolean isWidgetVisible() {
Optional<Widget> widget = Widgets.search().withId(ee.futur.gotr.data.Constants.PARENT_WIDGET).first(); Optional<Widget> widget = Widgets.search().withId(ee.futur.easygotr.data.Constants.PARENT_WIDGET).first();
return widget.isPresent() && !widget.get().isHidden(); return widget.isPresent() && !widget.get().isHidden();
} }
@@ -197,15 +197,15 @@ public class GOTRState {
} }
public boolean isOutsideBarrier() { public boolean isOutsideBarrier() {
return client.getLocalPlayer().getWorldLocation().getY() <= ee.futur.gotr.data.Constants.OUTSIDE_BARRIER_Y && !isInAltar(); return client.getLocalPlayer().getWorldLocation().getY() <= ee.futur.easygotr.data.Constants.OUTSIDE_BARRIER_Y && !isInAltar();
} }
public boolean isInLargeMine() { public boolean isInLargeMine() {
return !isInAltar() && client.getLocalPlayer().getWorldLocation().getX() >= ee.futur.gotr.data.Constants.LARGE_MINE_X; return !isInAltar() && client.getLocalPlayer().getWorldLocation().getX() >= ee.futur.easygotr.data.Constants.LARGE_MINE_X;
} }
public boolean isInHugeMine() { public boolean isInHugeMine() {
return !isInAltar() && client.getLocalPlayer().getWorldLocation().getX() <= ee.futur.gotr.data.Constants.HUGE_MINE_X; return !isInAltar() && client.getLocalPlayer().getWorldLocation().getX() <= ee.futur.easygotr.data.Constants.HUGE_MINE_X;
} }
public boolean isGameBusy() { public boolean isGameBusy() {

View File

@@ -1,11 +1,11 @@
package ee.futur.gotr; package ee.futur.easygotr;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import com.google.inject.Inject; import com.google.inject.Inject;
import com.google.inject.Singleton; import com.google.inject.Singleton;
import ee.futur.baseapi.collections.Inventory; import ee.futur.baseapi.collections.Inventory;
import ee.futur.gotr.data.Constants; import ee.futur.easygotr.data.Constants;
import ee.futur.gotr.data.Pouch; import ee.futur.easygotr.data.Pouch;
import lombok.Setter; import lombok.Setter;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.runelite.api.*; import net.runelite.api.*;
@@ -97,11 +97,11 @@ public class PouchManager {
return; return;
} }
if (event.getMessage().contains(ee.futur.gotr.data.Constants.GAME_STARTED)) { if (event.getMessage().contains(ee.futur.easygotr.data.Constants.GAME_STARTED)) {
setEssenceInPouches(0); setEssenceInPouches(0);
} }
if (event.getMessage().contains(ee.futur.gotr.data.Constants.GAME_WIN)) { if (event.getMessage().contains(ee.futur.easygotr.data.Constants.GAME_WIN)) {
setEssenceInPouches(0); setEssenceInPouches(0);
} }

View File

@@ -1,11 +1,11 @@
AutoRifts EasyGOTR
Automation plugins for runelite Automation plugins for runelite
# Discord # Discord
https://discord.gg/kwYBYEg4uu https://discord.gg/kwYBYEg4uu
# [PP]AutoRifts # [PP] EasyGOTR
**How to setup**: **How to setup**:

View File

@@ -1,4 +1,4 @@
package ee.futur.gotr.data; package ee.futur.easygotr.data;
import lombok.Getter; import lombok.Getter;

View File

@@ -1,4 +1,4 @@
package ee.futur.gotr.data; package ee.futur.easygotr.data;
import net.runelite.api.ItemID; import net.runelite.api.ItemID;
import net.runelite.api.ObjectID; import net.runelite.api.ObjectID;

View File

@@ -1,4 +1,4 @@
package ee.futur.gotr.data; package ee.futur.easygotr.data;
public class Constants { public class Constants {
//Locations //Locations

View File

@@ -1,4 +1,4 @@
package ee.futur.gotr.data; package ee.futur.easygotr.data;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;

View File

@@ -1,4 +1,4 @@
package ee.futur.gotr.data; package ee.futur.easygotr.data;
/** /**
* Taken from marcojacobsNL * Taken from marcojacobsNL

View File

@@ -1,4 +1,4 @@
package ee.futur.gotr.data; package ee.futur.easygotr.data;
import net.runelite.api.QuestState; import net.runelite.api.QuestState;

View File

@@ -5,7 +5,7 @@ import ee.futur.baseapi.collections.Inventory;
import ee.futur.baseapi.collections.query.ItemQuery; import ee.futur.baseapi.collections.query.ItemQuery;
import ee.futur.baseapi.BaseApiPlugin; import ee.futur.baseapi.BaseApiPlugin;
import ee.futur.gotr.data.Runes; import ee.futur.easygotr.data.Runes;
import net.runelite.api.Varbits; import net.runelite.api.Varbits;
import net.runelite.api.widgets.Widget; import net.runelite.api.widgets.Widget;

View File

@@ -1,7 +1,8 @@
package ee.futur.easygiantsfoundry; package ee.futur;
import ee.futur.baseapi.BaseApiPlugin; import ee.futur.baseapi.BaseApiPlugin;
import ee.futur.gotr.AutoRiftsPlugin; import ee.futur.easygiantsfoundry.EasyGiantsFoundryPlugin;
import ee.futur.easygotr.EasyGOTRPlugin;
import net.runelite.client.RuneLite; import net.runelite.client.RuneLite;
import net.runelite.client.externalplugins.ExternalPluginManager; import net.runelite.client.externalplugins.ExternalPluginManager;
@@ -11,7 +12,7 @@ public class K4rliPluginsTest {
BaseApiPlugin.class, BaseApiPlugin.class,
//PacketUtilsPlugin.class, //PacketUtilsPlugin.class,
EasyGiantsFoundryPlugin.class, EasyGiantsFoundryPlugin.class,
AutoRiftsPlugin.class EasyGOTRPlugin.class
); );
RuneLite.main(args); RuneLite.main(args);
} }