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
manifest {
attributes('Main-Class':
'ee.futur.easygiantsfoundry.EasyGiantsFoundryPluginTest',
'ee.futur.K4rliPluginsTest',
'Multi-Release': true)
}
@@ -69,6 +69,6 @@ task runClient(type: JavaExec) {
group = 'application'
description = 'Run the PluginTester main class to launch RuneLite with plugins'
classpath = sourceSets.test.runtimeClasspath
mainClass = 'ee.futur.easygiantsfoundry.EasyGiantsFoundryPluginTest'
mainClass = 'ee.futur.K4rliPluginsTest'
jvmArgs '-ea'
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,4 +1,4 @@
package ee.futur.gotr;
package ee.futur.easygotr;
import net.runelite.api.Client;
import net.runelite.client.ui.overlay.OverlayPanel;
@@ -11,14 +11,14 @@ import java.awt.*;
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 AutoRiftsPlugin plugin;
private final EasyGOTRPlugin plugin;
public String overlayState = "";
@Inject
private AutoRiftsOverlay(Client client, AutoRiftsPlugin plugin) {
private EasyGOTROverlay(Client client, EasyGOTRPlugin plugin) {
this.client = client;
this.plugin = plugin;
setPosition(OverlayPosition.BOTTOM_LEFT);
@@ -28,7 +28,7 @@ public class AutoRiftsOverlay extends OverlayPanel {
public Dimension render(Graphics2D graphics) {
String timeFormat = (plugin.runningDuration.toHours() < 1) ? "mm:ss" : "HH:mm:ss";
panelComponent.getChildren().add(TitleComponent.builder()
.text("AutoRifts")
.text("EasyGOTR")
.color(plugin.started ? Color.GREEN : Color.RED)
.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.ImmutableSet;
@@ -7,8 +7,8 @@ import com.google.inject.Provides;
import ee.futur.baseapi.collections.*;
import ee.futur.baseapi.collections.query.TileObjectQuery;
import ee.futur.baseapi.BaseApiPlugin;
import ee.futur.gotr.data.CellMapper;
import ee.futur.gotr.data.Constants;
import ee.futur.easygotr.data.CellMapper;
import ee.futur.easygotr.data.Constants;
import ee.futur.utils.InventoryUtil;
import lombok.extern.slf4j.Slf4j;
import net.runelite.api.*;
@@ -31,19 +31,19 @@ import java.util.*;
import java.util.concurrent.ThreadLocalRandom;
@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",
enabledByDefault = false,
tags = {"gotr", "helper", "k4rli"}
)
@Slf4j
public class AutoRiftsPlugin extends Plugin {
public class EasyGOTRPlugin extends Plugin {
@Inject
private Client client;
@Inject
private AutoRiftsConfig config;
private EasyGOTRConfig config;
@Inject
private AutoRiftsOverlay overlay;
private EasyGOTROverlay overlay;
@Inject
private KeyManager keyManager;
@Inject
@@ -111,8 +111,8 @@ public class AutoRiftsPlugin extends Plugin {
private boolean canEnterBarrier = false;
@Provides
private AutoRiftsConfig getConfig(ConfigManager configManager) {
return configManager.getConfig(AutoRiftsConfig.class);
private EasyGOTRConfig getConfig(ConfigManager configManager) {
return configManager.getConfig(EasyGOTRConfig.class);
}
@Override
@@ -175,7 +175,7 @@ public class AutoRiftsPlugin extends Plugin {
return;
}
AutoRiftsState state = getState();
EasyGOTRState state = getState();
overlay.overlayState = state.toString();
if (BaseApiPlugin.isMoving()) {
@@ -199,7 +199,7 @@ public class AutoRiftsPlugin extends Plugin {
dropRunes();
//Handle moving to the altar differently (allow for re-tasking)
if (state != AutoRiftsState.ENTER_ALTAR) {
if (state != EasyGOTRState.ENTER_ALTAR) {
return;
}
}
@@ -265,7 +265,7 @@ public class AutoRiftsPlugin extends Plugin {
}
}
private AutoRiftsState getState() {
private EasyGOTRState getState() {
if (config.startingFrags() > 0 && getFragmentCount() > config.startingFrags()) {
needsMoreStartingFragments = false;
} else if (config.startingFrags() == 0) {
@@ -273,21 +273,21 @@ public class AutoRiftsPlugin extends Plugin {
}
if (!riftState.isGameStarted() && !riftState.isInAltar()) {
return AutoRiftsState.BREAK;
return EasyGOTRState.BREAK;
}
if (riftState.isGameBusy()) {
return AutoRiftsState.GAME_BUSY;
return EasyGOTRState.GAME_BUSY;
}
if (riftState.isOutsideBarrier()) {
return AutoRiftsState.ENTER_GAME;
return EasyGOTRState.ENTER_GAME;
} else {
canEnterBarrier = false;
}
if (pouchManager.hasDegradedPouches()) {
return AutoRiftsState.REPAIR_POUCH;
return EasyGOTRState.REPAIR_POUCH;
}
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
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 (riftState.isInHugeMine()) {
if (Inventory.full()) {
return AutoRiftsState.ENTER_PORTAL;
return EasyGOTRState.ENTER_PORTAL;
}
if (isMining()) {
return AutoRiftsState.MINING;
return EasyGOTRState.MINING;
}
return AutoRiftsState.MINE_HUGE_GUARDIANS;
return EasyGOTRState.MINE_HUGE_GUARDIANS;
}
if (riftState.isInAltar()) {
startingRun = false;
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 (riftState.isPortalSpawned() && (pouchManager.hasEmptyPouches() || Inventory.getEmptySlots() > 15)) {
return AutoRiftsState.ENTER_PORTAL;
return EasyGOTRState.ENTER_PORTAL;
}
if (Inventory.full() || startingRun) {
startingRun = true;
if (hasPowerEssence()) {
return AutoRiftsState.POWER_GUARDIAN;
return EasyGOTRState.POWER_GUARDIAN;
}
if (hasPowerCell()) {
return AutoRiftsState.USE_CELL;
return EasyGOTRState.USE_CELL;
}
return AutoRiftsState.ENTER_ALTAR;
return EasyGOTRState.ENTER_ALTAR;
}
if (client.getLocalPlayer().getAnimation() == 9365) {
return AutoRiftsState.CRAFTING_ESSENCE;
return EasyGOTRState.CRAFTING_ESSENCE;
}
if (getCellCount() == 0) {
return AutoRiftsState.GET_CELLS;
return EasyGOTRState.GET_CELLS;
}
if (getInventoryRunes().isPresent() && !config.dropRunes() && getDroppableRunes().isEmpty()) {
return AutoRiftsState.DEPOSIT_RUNES;
return EasyGOTRState.DEPOSIT_RUNES;
}
if (getFragmentCount() < neededFrags()) {
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 (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()) {
return AutoRiftsState.ENTER_PORTAL;
return EasyGOTRState.ENTER_PORTAL;
}
if (hasPowerEssence()) {
return AutoRiftsState.POWER_GUARDIAN;
return EasyGOTRState.POWER_GUARDIAN;
}
if (hasPowerCell()) {
return AutoRiftsState.USE_CELL;
return EasyGOTRState.USE_CELL;
}
int essence = pouchManager.getEssenceInPouches() + Inventory.getItemAmount(ItemID.GUARDIAN_ESSENCE);
if (essence > 20) {
return AutoRiftsState.ENTER_ALTAR;
return EasyGOTRState.ENTER_ALTAR;
}
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
if (riftState.isInAltar()) {
return AutoRiftsState.LEAVE_ALTAR;
return EasyGOTRState.LEAVE_ALTAR;
}
//We're starting the game in the portal area
if (riftState.isInHugeMine()) {
if (Inventory.full()) {
return AutoRiftsState.ENTER_PORTAL;
return EasyGOTRState.ENTER_PORTAL;
}
if (isMining()) {
return AutoRiftsState.MINING;
return EasyGOTRState.MINING;
}
return AutoRiftsState.MINE_HUGE_GUARDIANS;
return EasyGOTRState.MINE_HUGE_GUARDIANS;
}
if (riftState.isInLargeMine()) {
@@ -429,49 +429,49 @@ public class AutoRiftsPlugin extends Plugin {
});
}
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.
//Make a quick stop at cells if we need too
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) {
needsMoreStartingFragments = true;
}
if (riftState.isInHugeMine()) {
return AutoRiftsState.ENTER_PORTAL;
return EasyGOTRState.ENTER_PORTAL;
}
if (riftState.isInLargeMine()) {
return AutoRiftsState.WAITING_FOR_GAME;
return EasyGOTRState.WAITING_FOR_GAME;
}
if (riftState.isInAltar()) {
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()) {
return AutoRiftsState.DEPOSIT_RUNES;
return EasyGOTRState.DEPOSIT_RUNES;
}
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() {

View File

@@ -1,6 +1,6 @@
package ee.futur.gotr;
package ee.futur.easygotr;
public enum AutoRiftsState {
public enum EasyGOTRState {
GET_CELLS,
MOVE_TO_EAST_MINE,
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.inject.Inject;
import ee.futur.baseapi.collections.Inventory;
import ee.futur.baseapi.collections.TileObjects;
import ee.futur.baseapi.collections.Widgets;
import ee.futur.gotr.data.Constants;
import ee.futur.gotr.data.Utility;
import ee.futur.easygotr.data.Constants;
import ee.futur.easygotr.data.Utility;
import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
@@ -50,7 +50,7 @@ public class GOTRState {
@Inject
private Client client;
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 Pattern CHECK_POINT_PATTERN = Pattern.compile(CHECK_POINT_REGEX);
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;
@Inject
public GOTRState(EventBus eventBus, AutoRiftsConfig config) {
public GOTRState(EventBus eventBus, EasyGOTRConfig config) {
eventBus.register(this);
this.eventBus = eventBus;
this.config = config;
@@ -146,7 +146,7 @@ public class GOTRState {
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;
}
@@ -182,7 +182,7 @@ public class GOTRState {
}
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();
}
@@ -197,15 +197,15 @@ public class GOTRState {
}
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() {
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() {
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() {

View File

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

View File

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

View File

@@ -1,4 +1,4 @@
package ee.futur.gotr.data;
package ee.futur.easygotr.data;
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.ObjectID;

View File

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

View File

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

View File

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

View File

@@ -1,4 +1,4 @@
package ee.futur.gotr.data;
package ee.futur.easygotr.data;
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.BaseApiPlugin;
import ee.futur.gotr.data.Runes;
import ee.futur.easygotr.data.Runes;
import net.runelite.api.Varbits;
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.gotr.AutoRiftsPlugin;
import ee.futur.easygiantsfoundry.EasyGiantsFoundryPlugin;
import ee.futur.easygotr.EasyGOTRPlugin;
import net.runelite.client.RuneLite;
import net.runelite.client.externalplugins.ExternalPluginManager;
@@ -11,7 +12,7 @@ public class K4rliPluginsTest {
BaseApiPlugin.class,
//PacketUtilsPlugin.class,
EasyGiantsFoundryPlugin.class,
AutoRiftsPlugin.class
EasyGOTRPlugin.class
);
RuneLite.main(args);
}