diff --git a/archive/autoclickillumine/autoclickillumine.gradle.kts b/archive/autoclickillumine/autoclickillumine.gradle.kts index 285d4867..5b744f10 100644 --- a/archive/autoclickillumine/autoclickillumine.gradle.kts +++ b/archive/autoclickillumine/autoclickillumine.gradle.kts @@ -30,7 +30,7 @@ project.extra["PluginName"] = "AutoClickIllumine" project.extra["PluginDescription"] = "What more is there to say?" dependencies { - compileOnly(project(":ibotutils")) + compileOnly(project(":iutils")) } tasks { @@ -40,7 +40,7 @@ tasks { "Plugin-Version" to project.version, "Plugin-Id" to nameToId(project.extra["PluginName"] as String), "Plugin-Provider" to project.extra["PluginProvider"], - "Plugin-Dependencies" to nameToId("ibotutils"), + "Plugin-Dependencies" to nameToId("iutils"), "Plugin-Description" to project.extra["PluginDescription"], "Plugin-License" to project.extra["PluginLicense"] )) diff --git a/archive/autoclickillumine/src/main/java/net/runelite/client/plugins/autoclickillumine/AutoClickIllumine.java b/archive/autoclickillumine/src/main/java/net/runelite/client/plugins/autoclickillumine/AutoClickIllumine.java index 89b0c6fa..f490da1a 100644 --- a/archive/autoclickillumine/src/main/java/net/runelite/client/plugins/autoclickillumine/AutoClickIllumine.java +++ b/archive/autoclickillumine/src/main/java/net/runelite/client/plugins/autoclickillumine/AutoClickIllumine.java @@ -31,13 +31,13 @@ import net.runelite.client.plugins.Plugin; import net.runelite.client.plugins.PluginDependency; import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginType; -import net.runelite.client.plugins.ibotutils.iBotUtils; +import net.runelite.client.plugins.iutils.iUtils; import net.runelite.client.ui.overlay.OverlayManager; import net.runelite.client.util.HotkeyListener; import org.pf4j.Extension; @Extension -@PluginDependency(iBotUtils.class) +@PluginDependency(iUtils.class) @PluginDescriptor( name = "Auto Clicker Illumine", enabledByDefault = false, @@ -62,7 +62,7 @@ public class AutoClickIllumine extends Plugin private KeyManager keyManager; @Inject - private iBotUtils extUtils; + private iUtils extUtils; private ExecutorService executorService; private Point point; diff --git a/archive/blackjackillumine/blackjackillumine.gradle.kts b/archive/blackjackillumine/blackjackillumine.gradle.kts index 33718f56..c4d50e32 100644 --- a/archive/blackjackillumine/blackjackillumine.gradle.kts +++ b/archive/blackjackillumine/blackjackillumine.gradle.kts @@ -29,7 +29,7 @@ project.extra["PluginName"] = "BlackjackIllumine" project.extra["PluginDescription"] = "Allows for one-click blackjacking, both knocking out and pickpocketing" dependencies { - compileOnly(project(":ibotutils")) + compileOnly(project(":iutils")) } tasks { @@ -39,7 +39,7 @@ tasks { "Plugin-Version" to project.version, "Plugin-Id" to nameToId(project.extra["PluginName"] as String), "Plugin-Provider" to project.extra["PluginProvider"], - "Plugin-Dependencies" to nameToId("ibotutils"), + "Plugin-Dependencies" to nameToId("iutils"), "Plugin-Description" to project.extra["PluginDescription"], "Plugin-License" to project.extra["PluginLicense"] )) diff --git a/archive/blackjackillumine/src/main/java/net/runelite/client/plugins/blackjackillumine/BlackjackIllumine.java b/archive/blackjackillumine/src/main/java/net/runelite/client/plugins/blackjackillumine/BlackjackIllumine.java index 310c1a5d..24cbe022 100644 --- a/archive/blackjackillumine/src/main/java/net/runelite/client/plugins/blackjackillumine/BlackjackIllumine.java +++ b/archive/blackjackillumine/src/main/java/net/runelite/client/plugins/blackjackillumine/BlackjackIllumine.java @@ -50,7 +50,7 @@ import net.runelite.client.plugins.Plugin; import net.runelite.client.plugins.PluginDependency; import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginType; -import net.runelite.client.plugins.ibotutils.iBotUtils; +import net.runelite.client.plugins.iutils.iUtils; import net.runelite.client.util.HotkeyListener; import org.apache.commons.lang3.RandomUtils; import org.pf4j.Extension; @@ -59,7 +59,7 @@ import org.pf4j.Extension; * Authors gazivodag longstreet */ @Extension -@PluginDependency(iBotUtils.class) +@PluginDependency(iUtils.class) @PluginDescriptor( name = "BlackjackIllumine", enabledByDefault = false, @@ -103,7 +103,7 @@ public class BlackjackIllumine extends Plugin private KeyManager keyManager; @Inject - private iBotUtils extUtils; + private iUtils extUtils; @Inject private Notifier notifier; diff --git a/archive/blastfurnacebot/blastfurnacebot.gradle.kts b/archive/blastfurnacebot/blastfurnacebot.gradle.kts index 0abc26e8..8e86c77b 100644 --- a/archive/blastfurnacebot/blastfurnacebot.gradle.kts +++ b/archive/blastfurnacebot/blastfurnacebot.gradle.kts @@ -29,7 +29,7 @@ project.extra["PluginName"] = "Blast Furnace - Illumine" project.extra["PluginDescription"] = "Illumine bot for Blast Furnace minigame" dependencies { - compileOnly(project(":ibotutils")) + compileOnly(project(":iutils")) } tasks { @@ -39,7 +39,7 @@ tasks { "Plugin-Version" to project.version, "Plugin-Id" to nameToId(project.extra["PluginName"] as String), "Plugin-Provider" to project.extra["PluginProvider"], - "Plugin-Dependencies" to nameToId("iBotUtils"), + "Plugin-Dependencies" to nameToId("iUtils"), "Plugin-Description" to project.extra["PluginDescription"], "Plugin-License" to project.extra["PluginLicense"] )) diff --git a/archive/blastfurnacebot/src/main/java/net/runelite/client/plugins/blastfurnacebot/BlastFurnaceBotPlugin.java b/archive/blastfurnacebot/src/main/java/net/runelite/client/plugins/blastfurnacebot/BlastFurnaceBotPlugin.java index f09da7ce..eef531e3 100644 --- a/archive/blastfurnacebot/src/main/java/net/runelite/client/plugins/blastfurnacebot/BlastFurnaceBotPlugin.java +++ b/archive/blastfurnacebot/src/main/java/net/runelite/client/plugins/blastfurnacebot/BlastFurnaceBotPlugin.java @@ -53,13 +53,13 @@ import net.runelite.client.plugins.PluginDependency; import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginType; import static net.runelite.client.plugins.blastfurnacebot.BlastFurnaceState.*; -import net.runelite.client.plugins.ibotutils.iBotUtils; +import net.runelite.client.plugins.iutils.iUtils; import net.runelite.client.ui.overlay.OverlayManager; import net.runelite.client.ui.overlay.infobox.InfoBoxManager; import org.pf4j.Extension; @Extension -@PluginDependency(iBotUtils.class) +@PluginDependency(iUtils.class) @PluginDescriptor( name = "Blast Furnace - Illumine", description = "Illumine bot for Blast Furnace minigame", @@ -105,7 +105,7 @@ public class BlastFurnaceBotPlugin extends Plugin private BlastFurnaceBotConfig config; @Inject - private iBotUtils utils; + private iUtils utils; BlastFurnaceState state; MenuEntry targetMenu; @@ -401,7 +401,7 @@ public class BlastFurnaceBotPlugin extends Plugin return FILL_COFFER; } playerUtils.handleRun(20, 20); - if(inventory.inventoryContains(bar.getItemID())) //TODO: update ibotutils to take a String contains, so can search if inventory has any Bars + if(inventory.inventoryContains(bar.getItemID())) //TODO: update iutils to take a String contains, so can search if inventory has any Bars { //INVENTORY CONTAINS BARS openBank(); return OPENING_BANK; diff --git a/archive/motherlodebot/motherlodebot.gradle.kts b/archive/motherlodebot/motherlodebot.gradle.kts index c0e90487..cd1f85dc 100644 --- a/archive/motherlodebot/motherlodebot.gradle.kts +++ b/archive/motherlodebot/motherlodebot.gradle.kts @@ -29,7 +29,7 @@ project.extra["PluginName"] = "Motherlode Mine Bot" project.extra["PluginDescription"] = "Illumine Motherlode Mine bot plugin" dependencies { - compileOnly(project(":ibotutils")) + compileOnly(project(":iutils")) } tasks { @@ -39,7 +39,7 @@ tasks { "Plugin-Version" to project.version, "Plugin-Id" to nameToId(project.extra["PluginName"] as String), "Plugin-Provider" to project.extra["PluginProvider"], - "Plugin-Dependencies" to nameToId("iBotUtils"), + "Plugin-Dependencies" to nameToId("iUtils"), "Plugin-Description" to project.extra["PluginDescription"], "Plugin-License" to project.extra["PluginLicense"] )) diff --git a/archive/motherlodebot/src/main/java/net/runelite/client/plugins/motherlodebot/MotherlodeBotPlugin.java b/archive/motherlodebot/src/main/java/net/runelite/client/plugins/motherlodebot/MotherlodeBotPlugin.java index 6d39205b..1cd44b14 100644 --- a/archive/motherlodebot/src/main/java/net/runelite/client/plugins/motherlodebot/MotherlodeBotPlugin.java +++ b/archive/motherlodebot/src/main/java/net/runelite/client/plugins/motherlodebot/MotherlodeBotPlugin.java @@ -49,13 +49,13 @@ import net.runelite.client.plugins.Plugin; import net.runelite.client.plugins.PluginDependency; import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginType; -import net.runelite.client.plugins.ibotutils.iBotUtils; +import net.runelite.client.plugins.iutils.iUtils; import static net.runelite.client.plugins.motherlodebot.MotherlodeBotState.*; import org.pf4j.Extension; @Extension -@PluginDependency(iBotUtils.class) +@PluginDependency(iUtils.class) @PluginDescriptor( name = "Motherlode Mine Bot", enabledByDefault = false, @@ -73,7 +73,7 @@ public class MotherlodeBotPlugin extends Plugin private MotherlodeBotConfiguration config; @Inject - private iBotUtils utils; + private iUtils utils; @Inject private ConfigManager configManager; diff --git a/archive/powerskiller/powerskiller.gradle.kts b/archive/powerskiller/powerskiller.gradle.kts index c1e2d3bf..72a8a954 100644 --- a/archive/powerskiller/powerskiller.gradle.kts +++ b/archive/powerskiller/powerskiller.gradle.kts @@ -29,7 +29,7 @@ project.extra["PluginName"] = "Power Skiller" project.extra["PluginDescription"] = "Illumine auto power skiller plugin" dependencies { - compileOnly(project(":ibotutils")) + compileOnly(project(":iutils")) } tasks { @@ -39,7 +39,7 @@ tasks { "Plugin-Version" to project.version, "Plugin-Id" to nameToId(project.extra["PluginName"] as String), "Plugin-Provider" to project.extra["PluginProvider"], - "Plugin-Dependencies" to nameToId("iBotUtils"), + "Plugin-Dependencies" to nameToId("iUtils"), "Plugin-Description" to project.extra["PluginDescription"], "Plugin-License" to project.extra["PluginLicense"] )) diff --git a/archive/powerskiller/src/main/java/net/runelite/client/plugins/powerskiller/PowerSkillerPlugin.java b/archive/powerskiller/src/main/java/net/runelite/client/plugins/powerskiller/PowerSkillerPlugin.java index b9a3f5ea..4f6953c2 100644 --- a/archive/powerskiller/src/main/java/net/runelite/client/plugins/powerskiller/PowerSkillerPlugin.java +++ b/archive/powerskiller/src/main/java/net/runelite/client/plugins/powerskiller/PowerSkillerPlugin.java @@ -43,13 +43,13 @@ import net.runelite.client.plugins.Plugin; import net.runelite.client.plugins.PluginDependency; import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginType; -import net.runelite.client.plugins.ibotutils.iBotUtils; +import net.runelite.client.plugins.iutils.iUtils; import static net.runelite.client.plugins.powerskiller.PowerSkillerState.*; import org.pf4j.Extension; @Extension -@PluginDependency(iBotUtils.class) +@PluginDependency(iUtils.class) @PluginDescriptor( name = "Power Skiller", enabledByDefault = false, @@ -67,7 +67,7 @@ public class PowerSkillerPlugin extends Plugin private PowerSkillerConfiguration config; @Inject - private iBotUtils utils; + private iUtils utils; @Inject private ConfigManager configManager; diff --git a/archive/randomhandler/randomhandler.gradle.kts b/archive/randomhandler/randomhandler.gradle.kts index 4ec74db9..4677c72e 100644 --- a/archive/randomhandler/randomhandler.gradle.kts +++ b/archive/randomhandler/randomhandler.gradle.kts @@ -29,7 +29,7 @@ project.extra["PluginName"] = "Random Handler" project.extra["PluginDescription"] = "Auto dismiss random events (illumine edit), notify when random events appear, remove talk/dismiss options on events that aren't yours" dependencies { - compileOnly(project(":ibotutils")); + compileOnly(project(":iutils")); } tasks { @@ -39,7 +39,7 @@ tasks { "Plugin-Version" to project.version, "Plugin-Id" to nameToId(project.extra["PluginName"] as String), "Plugin-Provider" to project.extra["PluginProvider"], - "Plugin-Dependencies" to nameToId("ibotutils"), + "Plugin-Dependencies" to nameToId("iutils"), "Plugin-Description" to project.extra["PluginDescription"], "Plugin-License" to project.extra["PluginLicense"] )) diff --git a/archive/randomhandler/src/main/java/net/runelite/client/plugins/randomhandler/RandomHandlerPlugin.java b/archive/randomhandler/src/main/java/net/runelite/client/plugins/randomhandler/RandomHandlerPlugin.java index 632c8b28..f1b3e0d7 100644 --- a/archive/randomhandler/src/main/java/net/runelite/client/plugins/randomhandler/RandomHandlerPlugin.java +++ b/archive/randomhandler/src/main/java/net/runelite/client/plugins/randomhandler/RandomHandlerPlugin.java @@ -41,11 +41,11 @@ import net.runelite.client.plugins.Plugin; import net.runelite.client.plugins.PluginDependency; import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginType; -import net.runelite.client.plugins.ibotutils.iBotUtils; +import net.runelite.client.plugins.iutils.iUtils; import org.pf4j.Extension; @Extension -@PluginDependency(iBotUtils.class) +@PluginDependency(iUtils.class) @PluginDescriptor( name = "Random Handler", enabledByDefault = false, @@ -99,7 +99,7 @@ public class RandomHandlerPlugin extends Plugin private RandomHandlerConfig config; @Inject - private iBotUtils utils; + private iUtils utils; @Provides RandomHandlerConfig getConfig(ConfigManager configManager) diff --git a/archive/test/src/main/java/net/runelite/client/plugins/test/TestPlugin.java b/archive/test/src/main/java/net/runelite/client/plugins/test/TestPlugin.java index 3e6abfdc..dce3460e 100644 --- a/archive/test/src/main/java/net/runelite/client/plugins/test/TestPlugin.java +++ b/archive/test/src/main/java/net/runelite/client/plugins/test/TestPlugin.java @@ -51,7 +51,7 @@ import net.runelite.client.plugins.PluginDependency; import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginManager; import net.runelite.client.plugins.PluginType; -import net.runelite.client.plugins.ibotutils.iBotUtils; +import net.runelite.client.plugins.iutils.iUtils; import net.runelite.client.ui.overlay.infobox.InfoBoxManager; import org.pf4j.Extension; @@ -64,7 +64,7 @@ import net.runelite.client.rsb.botLauncher.*;*/ @Extension -@PluginDependency(iBotUtils.class) +@PluginDependency(iUtils.class) @PluginDescriptor( name = "Test", enabledByDefault = false, @@ -82,7 +82,7 @@ public class TestPlugin extends Plugin private TestPluginConfiguration config; @Inject - private iBotUtils utils; + private iUtils utils; @Inject private ItemManager itemManager; diff --git a/archive/test/test.gradle.kts b/archive/test/test.gradle.kts index a3a5009e..c3cc6ca5 100644 --- a/archive/test/test.gradle.kts +++ b/archive/test/test.gradle.kts @@ -29,7 +29,7 @@ project.extra["PluginName"] = "Test" project.extra["PluginDescription"] = "Illumine test plugin" dependencies { - compileOnly(project(":ibotutils")) + compileOnly(project(":iutils")) } tasks { @@ -39,7 +39,7 @@ tasks { "Plugin-Version" to project.version, "Plugin-Id" to nameToId(project.extra["PluginName"] as String), "Plugin-Provider" to project.extra["PluginProvider"], - "Plugin-Dependencies" to nameToId("ibotutils"), + "Plugin-Dependencies" to nameToId("iutils"), "Plugin-Description" to project.extra["PluginDescription"], "Plugin-License" to project.extra["PluginLicense"] )) @@ -60,7 +60,7 @@ tasks { "Plugin-Version" to project.version, "Plugin-Id" to nameToId(project.extra["PluginName"] as String), "Plugin-Provider" to project.extra["PluginProvider"], - "Plugin-Dependencies" to nameToId("ibotutils"), + "Plugin-Dependencies" to nameToId("iutils"), "Plugin-Description" to project.extra["PluginDescription"], "Plugin-License" to project.extra["PluginLicense"] )) diff --git a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/GrandExchangeUtils.java b/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/GrandExchangeUtils.java deleted file mode 100644 index 86c7d0e2..00000000 --- a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/GrandExchangeUtils.java +++ /dev/null @@ -1,50 +0,0 @@ -package net.runelite.client.plugins.ibotutils; - -import javax.inject.Singleton; -import lombok.extern.slf4j.Slf4j; - -@Slf4j -@Singleton -public class GrandExchangeUtils -{ - /*@Inject - private OSBGrandExchangeClient osbGrandExchangeClient; - - private OSBGrandExchangeResult osbGrandExchangeResult; - - @Provides - OSBGrandExchangeClient provideOsbGrandExchangeClient(OkHttpClient okHttpClient) - { - return new OSBGrandExchangeClient(okHttpClient); - } - - @Provides - GrandExchangeClient provideGrandExchangeClient(OkHttpClient okHttpClient) - { - return new GrandExchangeClient(okHttpClient); - } - - public OSBGrandExchangeResult getOSBItem(int itemId) - { - log.debug("Looking up OSB item price {}", itemId); - osbGrandExchangeClient.lookupItem(itemId) - .subscribe( - (osbresult) -> - { - if (osbresult != null && osbresult.getOverall_average() > 0) - { - osbGrandExchangeResult = osbresult; - } - }, - (e) -> log.debug("Error getting price of item {}", itemId, e) - ); - if (osbGrandExchangeResult != null) - { - return osbGrandExchangeResult; - } - else - { - return null; - } - }*/ -} diff --git a/icombinationrunecrafter/icombinationrunecrafter.gradle.kts b/icombinationrunecrafter/icombinationrunecrafter.gradle.kts index c4fff29e..918012c0 100644 --- a/icombinationrunecrafter/icombinationrunecrafter.gradle.kts +++ b/icombinationrunecrafter/icombinationrunecrafter.gradle.kts @@ -29,7 +29,7 @@ project.extra["PluginName"] = "iCombination Runecrafter Plugin" project.extra["PluginDescription"] = "Illumine - Combination Runecrafting plugin" dependencies { - compileOnly(project(":ibotutils")) + compileOnly(project(":iutils")) compileOnly(group = "com.owain.externals", name = "chinbreakhandler", version = "0.0.13+") } @@ -42,7 +42,7 @@ tasks { "Plugin-Provider" to project.extra["PluginProvider"], "Plugin-Dependencies" to arrayOf( - nameToId("iBotUtils"), + nameToId("iUtils"), "chinbreakhandler-plugin" ).joinToString(), "Plugin-Description" to project.extra["PluginDescription"], diff --git a/icombinationrunecrafter/src/main/java/net/runelite/client/plugins/icombinationrunecrafter/iCombinationRunecrafterPlugin.java b/icombinationrunecrafter/src/main/java/net/runelite/client/plugins/icombinationrunecrafter/iCombinationRunecrafterPlugin.java index da382c92..942f89c1 100644 --- a/icombinationrunecrafter/src/main/java/net/runelite/client/plugins/icombinationrunecrafter/iCombinationRunecrafterPlugin.java +++ b/icombinationrunecrafter/src/main/java/net/runelite/client/plugins/icombinationrunecrafter/iCombinationRunecrafterPlugin.java @@ -58,24 +58,23 @@ import net.runelite.client.plugins.Plugin; import net.runelite.client.plugins.PluginDependency; import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginType; -import net.runelite.client.plugins.ibotutils.BankUtils; -import net.runelite.client.plugins.ibotutils.CalculationUtils; -import net.runelite.client.plugins.ibotutils.GrandExchangeUtils; -import net.runelite.client.plugins.ibotutils.InterfaceUtils; -import net.runelite.client.plugins.ibotutils.InventoryUtils; -import net.runelite.client.plugins.ibotutils.MenuUtils; -import net.runelite.client.plugins.ibotutils.MouseUtils; -import net.runelite.client.plugins.ibotutils.ObjectUtils; -import net.runelite.client.plugins.ibotutils.PlayerUtils; -import net.runelite.client.plugins.ibotutils.iBotUtils; -import static net.runelite.client.plugins.ibotutils.iBotUtils.iterating; +import net.runelite.client.plugins.iutils.BankUtils; +import net.runelite.client.plugins.iutils.CalculationUtils; +import net.runelite.client.plugins.iutils.InterfaceUtils; +import net.runelite.client.plugins.iutils.InventoryUtils; +import net.runelite.client.plugins.iutils.MenuUtils; +import net.runelite.client.plugins.iutils.MouseUtils; +import net.runelite.client.plugins.iutils.ObjectUtils; +import net.runelite.client.plugins.iutils.PlayerUtils; +import net.runelite.client.plugins.iutils.iUtils; +import static net.runelite.client.plugins.iutils.iUtils.iterating; import static net.runelite.client.plugins.icombinationrunecrafter.iCombinationRunecrafterState.*; import net.runelite.client.ui.overlay.OverlayManager; import org.pf4j.Extension; @Extension -@PluginDependency(iBotUtils.class) +@PluginDependency(iUtils.class) @PluginDescriptor( name = "iCombination Runecrafter Plugin", enabledByDefault = false, @@ -93,7 +92,7 @@ public class iCombinationRunecrafterPlugin extends Plugin private iCombinationRunecrafterConfig config; @Inject - private iBotUtils utils; + private iUtils utils; @Inject private MouseUtils mouse; @@ -119,9 +118,6 @@ public class iCombinationRunecrafterPlugin extends Plugin @Inject private ObjectUtils object; - @Inject - private GrandExchangeUtils grandExchange; - @Inject private ConfigManager configManager; diff --git a/imagiccaster/imagiccaster.gradle.kts b/imagiccaster/imagiccaster.gradle.kts index bc3424d7..eb71995d 100644 --- a/imagiccaster/imagiccaster.gradle.kts +++ b/imagiccaster/imagiccaster.gradle.kts @@ -29,7 +29,7 @@ project.extra["PluginName"] = "iMagic Caster" project.extra["PluginDescription"] = "Illumine automated magic caster" dependencies { - compileOnly(project(":ibotutils")) + compileOnly(project(":iutils")) compileOnly(group = "com.owain.externals", name = "chinbreakhandler", version = "0.0.13+") } @@ -42,7 +42,7 @@ tasks { "Plugin-Provider" to project.extra["PluginProvider"], "Plugin-Dependencies" to arrayOf( - nameToId("iBotUtils"), + nameToId("iUtils"), "chinbreakhandler-plugin" ).joinToString(), "Plugin-Description" to project.extra["PluginDescription"], diff --git a/imagiccaster/src/main/java/net/runelite/client/plugins/imagiccaster/iMagicCasterPlugin.java b/imagiccaster/src/main/java/net/runelite/client/plugins/imagiccaster/iMagicCasterPlugin.java index 443e0422..adcb5a4d 100644 --- a/imagiccaster/src/main/java/net/runelite/client/plugins/imagiccaster/iMagicCasterPlugin.java +++ b/imagiccaster/src/main/java/net/runelite/client/plugins/imagiccaster/iMagicCasterPlugin.java @@ -55,13 +55,13 @@ import net.runelite.client.plugins.PluginDependency; import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginManager; import net.runelite.client.plugins.PluginType; -import net.runelite.client.plugins.ibotutils.CalculationUtils; -import net.runelite.client.plugins.ibotutils.InterfaceUtils; -import net.runelite.client.plugins.ibotutils.InventoryUtils; -import net.runelite.client.plugins.ibotutils.MenuUtils; -import net.runelite.client.plugins.ibotutils.MouseUtils; -import net.runelite.client.plugins.ibotutils.PlayerUtils; -import net.runelite.client.plugins.ibotutils.iBotUtils; +import net.runelite.client.plugins.iutils.CalculationUtils; +import net.runelite.client.plugins.iutils.InterfaceUtils; +import net.runelite.client.plugins.iutils.InventoryUtils; +import net.runelite.client.plugins.iutils.MenuUtils; +import net.runelite.client.plugins.iutils.MouseUtils; +import net.runelite.client.plugins.iutils.PlayerUtils; +import net.runelite.client.plugins.iutils.iUtils; import static net.runelite.client.plugins.imagiccaster.iMagicCasterState.FIND_ITEM; import static net.runelite.client.plugins.imagiccaster.iMagicCasterState.FIND_NPC; import static net.runelite.client.plugins.imagiccaster.iMagicCasterState.HANDLE_BREAK; @@ -74,7 +74,7 @@ import org.pf4j.Extension; @Extension -@PluginDependency(iBotUtils.class) +@PluginDependency(iUtils.class) @PluginDescriptor( name = "iMagic Caster", enabledByDefault = false, @@ -89,7 +89,7 @@ public class iMagicCasterPlugin extends Plugin private Client client; @Inject - private iBotUtils utils; + private iUtils utils; @Inject private MouseUtils mouse; diff --git a/imenudebugger/imenudebugger.gradle.kts b/imenudebugger/imenudebugger.gradle.kts index 286cd8ea..8a9ed308 100644 --- a/imenudebugger/imenudebugger.gradle.kts +++ b/imenudebugger/imenudebugger.gradle.kts @@ -29,7 +29,7 @@ project.extra["PluginName"] = "iMenu Debugger Plugin" project.extra["PluginDescription"] = "Illumine - Menu Debugger plugin" dependencies { - compileOnly(project(":ibotutils")) + compileOnly(project(":iutils")) } tasks { @@ -39,7 +39,7 @@ tasks { "Plugin-Version" to project.version, "Plugin-Id" to nameToId(project.extra["PluginName"] as String), "Plugin-Provider" to project.extra["PluginProvider"], - "Plugin-Dependencies" to nameToId("iBotUtils"), + "Plugin-Dependencies" to nameToId("iUtils"), "Plugin-Description" to project.extra["PluginDescription"], "Plugin-License" to project.extra["PluginLicense"] )) diff --git a/imenudebugger/src/main/java/net/runelite/client/plugins/imenudebugger/iMenuDebuggerPlugin.java b/imenudebugger/src/main/java/net/runelite/client/plugins/imenudebugger/iMenuDebuggerPlugin.java index 222fc1da..93049797 100644 --- a/imenudebugger/src/main/java/net/runelite/client/plugins/imenudebugger/iMenuDebuggerPlugin.java +++ b/imenudebugger/src/main/java/net/runelite/client/plugins/imenudebugger/iMenuDebuggerPlugin.java @@ -49,14 +49,14 @@ import net.runelite.client.plugins.Plugin; import net.runelite.client.plugins.PluginDependency; import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginType; -import net.runelite.client.plugins.ibotutils.PlayerUtils; -import net.runelite.client.plugins.ibotutils.iBotUtils; -import static net.runelite.client.plugins.ibotutils.iBotUtils.iterating; +import net.runelite.client.plugins.iutils.PlayerUtils; +import net.runelite.client.plugins.iutils.iUtils; +import static net.runelite.client.plugins.iutils.iUtils.iterating; import org.pf4j.Extension; @Extension -@PluginDependency(iBotUtils.class) +@PluginDependency(iUtils.class) @PluginDescriptor( name = "iMenu Debugger Plugin", enabledByDefault = false, @@ -74,7 +74,7 @@ public class iMenuDebuggerPlugin extends Plugin private iMenuDebuggerConfig config; @Inject - private iBotUtils utils; + private iUtils utils; @Inject private PlayerUtils playerUtils; diff --git a/ipowerfighter/ipowerfighter.gradle.kts b/ipowerfighter/ipowerfighter.gradle.kts index df4b41dc..f4fa6a17 100644 --- a/ipowerfighter/ipowerfighter.gradle.kts +++ b/ipowerfighter/ipowerfighter.gradle.kts @@ -29,7 +29,7 @@ project.extra["PluginName"] = "iPowerfighter Plugin" project.extra["PluginDescription"] = "Illumine - Powerfighter plugin" dependencies { - compileOnly(project(":ibotutils")) + compileOnly(project(":iutils")) compileOnly(group = "com.owain.externals", name = "chinbreakhandler", version = "0.0.13+") } @@ -42,7 +42,7 @@ tasks { "Plugin-Provider" to project.extra["PluginProvider"], "Plugin-Dependencies" to arrayOf( - nameToId("iBotUtils"), + nameToId("iUtils"), "chinbreakhandler-plugin" ).joinToString(), "Plugin-Description" to project.extra["PluginDescription"], diff --git a/ipowerfighter/src/main/java/net/runelite/client/plugins/ipowerfighter/iPowerFighterPlugin.java b/ipowerfighter/src/main/java/net/runelite/client/plugins/ipowerfighter/iPowerFighterPlugin.java index 94846b5b..d1585f62 100644 --- a/ipowerfighter/src/main/java/net/runelite/client/plugins/ipowerfighter/iPowerFighterPlugin.java +++ b/ipowerfighter/src/main/java/net/runelite/client/plugins/ipowerfighter/iPowerFighterPlugin.java @@ -71,24 +71,24 @@ import net.runelite.client.plugins.Plugin; import net.runelite.client.plugins.PluginDependency; import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginType; -import net.runelite.client.plugins.ibotutils.CalculationUtils; -import net.runelite.client.plugins.ibotutils.InterfaceUtils; -import net.runelite.client.plugins.ibotutils.InventoryUtils; -import net.runelite.client.plugins.ibotutils.MenuUtils; -import net.runelite.client.plugins.ibotutils.MouseUtils; -import net.runelite.client.plugins.ibotutils.NPCUtils; -import net.runelite.client.plugins.ibotutils.PlayerUtils; -import net.runelite.client.plugins.ibotutils.WalkUtils; -import net.runelite.client.plugins.ibotutils.iBotUtils; -import static net.runelite.client.plugins.ibotutils.iBotUtils.iterating; -import static net.runelite.client.plugins.ibotutils.iBotUtils.sleep; +import net.runelite.client.plugins.iutils.CalculationUtils; +import net.runelite.client.plugins.iutils.InterfaceUtils; +import net.runelite.client.plugins.iutils.InventoryUtils; +import net.runelite.client.plugins.iutils.MenuUtils; +import net.runelite.client.plugins.iutils.MouseUtils; +import net.runelite.client.plugins.iutils.NPCUtils; +import net.runelite.client.plugins.iutils.PlayerUtils; +import net.runelite.client.plugins.iutils.WalkUtils; +import net.runelite.client.plugins.iutils.iUtils; +import static net.runelite.client.plugins.iutils.iUtils.iterating; +import static net.runelite.client.plugins.iutils.iUtils.sleep; import net.runelite.client.ui.overlay.OverlayManager; import net.runelite.http.api.osbuddy.OSBGrandExchangeResult; import org.pf4j.Extension; @Extension -@PluginDependency(iBotUtils.class) +@PluginDependency(iUtils.class) @PluginDescriptor( name = "iPower Fighter", enabledByDefault = false, @@ -112,7 +112,7 @@ public class iPowerFighterPlugin extends Plugin private iPowerFighterOverlay overlay; @Inject - private iBotUtils utils; + private iUtils utils; @Inject private MouseUtils mouse; diff --git a/ipowerskiller/ipowerskiller.gradle.kts b/ipowerskiller/ipowerskiller.gradle.kts index 78c18967..ee80d713 100644 --- a/ipowerskiller/ipowerskiller.gradle.kts +++ b/ipowerskiller/ipowerskiller.gradle.kts @@ -29,7 +29,7 @@ project.extra["PluginName"] = "iPower Skiller" project.extra["PluginDescription"] = "Illumine auto power skiller plugin" dependencies { - compileOnly(project(":ibotutils")) + compileOnly(project(":iutils")) compileOnly(group = "com.owain.externals", name = "chinbreakhandler", version = "0.0.13+") } @@ -42,7 +42,7 @@ tasks { "Plugin-Provider" to project.extra["PluginProvider"], "Plugin-Dependencies" to arrayOf( - nameToId("iBotUtils"), + nameToId("iUtils"), "chinbreakhandler-plugin" ).joinToString(), "Plugin-Description" to project.extra["PluginDescription"], diff --git a/ipowerskiller/src/main/java/net/runelite/client/plugins/ipowerskiller/iPowerSkillerPlugin.java b/ipowerskiller/src/main/java/net/runelite/client/plugins/ipowerskiller/iPowerSkillerPlugin.java index 203d5e2a..3023d700 100644 --- a/ipowerskiller/src/main/java/net/runelite/client/plugins/ipowerskiller/iPowerSkillerPlugin.java +++ b/ipowerskiller/src/main/java/net/runelite/client/plugins/ipowerskiller/iPowerSkillerPlugin.java @@ -55,6 +55,7 @@ import net.runelite.api.events.ItemContainerChanged; import net.runelite.api.events.MenuOptionClicked; import net.runelite.api.events.NpcDefinitionChanged; import net.runelite.api.widgets.Widget; +import net.runelite.api.widgets.WidgetInfo; import net.runelite.client.config.ConfigManager; import net.runelite.client.eventbus.Subscribe; import net.runelite.client.events.ConfigChanged; @@ -63,25 +64,25 @@ import net.runelite.client.plugins.PluginDependency; import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginManager; import net.runelite.client.plugins.PluginType; -import net.runelite.client.plugins.ibotutils.BankUtils; -import net.runelite.client.plugins.ibotutils.CalculationUtils; -import net.runelite.client.plugins.ibotutils.InterfaceUtils; -import net.runelite.client.plugins.ibotutils.InventoryUtils; -import net.runelite.client.plugins.ibotutils.MenuUtils; -import net.runelite.client.plugins.ibotutils.MouseUtils; -import net.runelite.client.plugins.ibotutils.NPCUtils; -import net.runelite.client.plugins.ibotutils.ObjectUtils; -import net.runelite.client.plugins.ibotutils.PlayerUtils; -import net.runelite.client.plugins.ibotutils.WalkUtils; -import net.runelite.client.plugins.ibotutils.iBotUtils; -import static net.runelite.client.plugins.ibotutils.iBotUtils.iterating; +import net.runelite.client.plugins.iutils.BankUtils; +import net.runelite.client.plugins.iutils.CalculationUtils; +import net.runelite.client.plugins.iutils.InterfaceUtils; +import net.runelite.client.plugins.iutils.InventoryUtils; +import net.runelite.client.plugins.iutils.MenuUtils; +import net.runelite.client.plugins.iutils.MouseUtils; +import net.runelite.client.plugins.iutils.NPCUtils; +import net.runelite.client.plugins.iutils.ObjectUtils; +import net.runelite.client.plugins.iutils.PlayerUtils; +import net.runelite.client.plugins.iutils.WalkUtils; +import net.runelite.client.plugins.iutils.iUtils; +import static net.runelite.client.plugins.iutils.iUtils.iterating; import static net.runelite.client.plugins.ipowerskiller.iPowerSkillerState.*; import net.runelite.client.ui.overlay.OverlayManager; import org.pf4j.Extension; @Extension -@PluginDependency(iBotUtils.class) +@PluginDependency(iUtils.class) @PluginDescriptor( name = "iPower Skiller", enabledByDefault = false, @@ -99,7 +100,7 @@ public class iPowerSkillerPlugin extends Plugin private iPowerSkillerConfiguration config; @Inject - private iBotUtils utils; + private iUtils utils; @Inject private MouseUtils mouse; @@ -561,6 +562,11 @@ public class iPowerSkillerPlugin extends Plugin startPowerSkiller = false; return; } + if (client.getWidget(WidgetInfo.BANK_PIN_CONTAINER) != null) { + log.info("Enter bank pin manually"); + utils.sendGameMessage("Enter bank pin manually"); + return; + } state = getState(); beforeLoc = player.getLocalLocation(); switch (state) diff --git a/iquickeater/iquickeater.gradle.kts b/iquickeater/iquickeater.gradle.kts index ea6c5d8f..618532aa 100644 --- a/iquickeater/iquickeater.gradle.kts +++ b/iquickeater/iquickeater.gradle.kts @@ -29,7 +29,7 @@ project.extra["PluginName"] = "iQuick Eater" project.extra["PluginDescription"] = "Illumine - auto eat food, consume potions and equip items" dependencies { - compileOnly(project(":ibotutils")) + compileOnly(project(":iutils")) } tasks { @@ -39,7 +39,7 @@ tasks { "Plugin-Version" to project.version, "Plugin-Id" to nameToId(project.extra["PluginName"] as String), "Plugin-Provider" to project.extra["PluginProvider"], - "Plugin-Dependencies" to nameToId("iBotUtils"), + "Plugin-Dependencies" to nameToId("iUtils"), "Plugin-Description" to project.extra["PluginDescription"], "Plugin-License" to project.extra["PluginLicense"] )) diff --git a/iquickeater/src/main/java/net/runelite/client/plugins/iquickeater/iQuickEaterPlugin.java b/iquickeater/src/main/java/net/runelite/client/plugins/iquickeater/iQuickEaterPlugin.java index 00a4762b..001382b1 100644 --- a/iquickeater/src/main/java/net/runelite/client/plugins/iquickeater/iQuickEaterPlugin.java +++ b/iquickeater/src/main/java/net/runelite/client/plugins/iquickeater/iQuickEaterPlugin.java @@ -31,6 +31,7 @@ import javax.inject.Inject; import lombok.extern.slf4j.Slf4j; import net.runelite.api.Client; import net.runelite.api.GameState; +import net.runelite.api.InventoryID; import net.runelite.api.ItemID; import net.runelite.api.MenuEntry; import net.runelite.api.MenuOpcode; @@ -51,17 +52,17 @@ import net.runelite.client.plugins.Plugin; import net.runelite.client.plugins.PluginDependency; import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginType; -import net.runelite.client.plugins.ibotutils.CalculationUtils; -import net.runelite.client.plugins.ibotutils.InventoryUtils; -import net.runelite.client.plugins.ibotutils.MenuUtils; -import net.runelite.client.plugins.ibotutils.MouseUtils; -import net.runelite.client.plugins.ibotutils.PlayerUtils; -import net.runelite.client.plugins.ibotutils.iBotUtils; +import net.runelite.client.plugins.iutils.CalculationUtils; +import net.runelite.client.plugins.iutils.InventoryUtils; +import net.runelite.client.plugins.iutils.MenuUtils; +import net.runelite.client.plugins.iutils.MouseUtils; +import net.runelite.client.plugins.iutils.PlayerUtils; +import net.runelite.client.plugins.iutils.iUtils; import org.pf4j.Extension; @Extension -@PluginDependency(iBotUtils.class) +@PluginDependency(iUtils.class) @PluginDescriptor( name = "iQuick Eater", enabledByDefault = false, @@ -79,7 +80,7 @@ public class iQuickEaterPlugin extends Plugin private iQuickEaterConfiguration config; @Inject - private iBotUtils utils; + private iUtils utils; @Inject private MouseUtils mouse; @@ -211,6 +212,9 @@ public class iQuickEaterPlugin extends Plugin timeout--; return; } + if (client.getItemContainer(InventoryID.BANK) != null) { + return; + } if (client.getBoostedSkillLevel(Skill.HITPOINTS) <= nextEatHP) { WidgetItem eatItem = inventory.getItemMenu(itemManager, "Eat", 33, diff --git a/irandomhandler/irandomhandler.gradle.kts b/irandomhandler/irandomhandler.gradle.kts index fd66924e..241e44d1 100644 --- a/irandomhandler/irandomhandler.gradle.kts +++ b/irandomhandler/irandomhandler.gradle.kts @@ -29,7 +29,7 @@ project.extra["PluginName"] = "iRandom Handler" project.extra["PluginDescription"] = "illumine - Dismiss random events and handle genie" dependencies { - compileOnly(project(":ibotutils")) + compileOnly(project(":iutils")) } tasks { @@ -39,7 +39,7 @@ tasks { "Plugin-Version" to project.version, "Plugin-Id" to nameToId(project.extra["PluginName"] as String), "Plugin-Provider" to project.extra["PluginProvider"], - "Plugin-Dependencies" to nameToId("iBotUtils"), + "Plugin-Dependencies" to nameToId("iUtils"), "Plugin-Description" to project.extra["PluginDescription"], "Plugin-License" to project.extra["PluginLicense"] )) diff --git a/irandomhandler/src/main/java/net/runelite/client/plugins/irandomhandler/iRandomHandlerPlugin.java b/irandomhandler/src/main/java/net/runelite/client/plugins/irandomhandler/iRandomHandlerPlugin.java index 1bc6644c..b144c6f4 100644 --- a/irandomhandler/src/main/java/net/runelite/client/plugins/irandomhandler/iRandomHandlerPlugin.java +++ b/irandomhandler/src/main/java/net/runelite/client/plugins/irandomhandler/iRandomHandlerPlugin.java @@ -47,13 +47,13 @@ import net.runelite.client.plugins.Plugin; import net.runelite.client.plugins.PluginDependency; import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginType; -import net.runelite.client.plugins.ibotutils.CalculationUtils; -import net.runelite.client.plugins.ibotutils.MenuUtils; -import net.runelite.client.plugins.ibotutils.MouseUtils; -import net.runelite.client.plugins.ibotutils.iBotUtils; +import net.runelite.client.plugins.iutils.CalculationUtils; +import net.runelite.client.plugins.iutils.MenuUtils; +import net.runelite.client.plugins.iutils.MouseUtils; +import net.runelite.client.plugins.iutils.iUtils; import org.pf4j.Extension; -@PluginDependency(iBotUtils.class) +@PluginDependency(iUtils.class) @Extension @PluginDescriptor( name = "iRandom Handler", @@ -107,7 +107,7 @@ public class iRandomHandlerPlugin extends Plugin private Client client; @Inject - private iBotUtils utils; + private iUtils utils; @Inject private MouseUtils mouse; diff --git a/irooftopagility/irooftopagility.gradle.kts b/irooftopagility/irooftopagility.gradle.kts index 3d0edf5d..6524001e 100644 --- a/irooftopagility/irooftopagility.gradle.kts +++ b/irooftopagility/irooftopagility.gradle.kts @@ -29,7 +29,7 @@ project.extra["PluginName"] = "iRooftop Agility" project.extra["PluginDescription"] = "Illumine automated rooftop agility plugin" dependencies { - compileOnly(project(":ibotutils")) + compileOnly(project(":iutils")) compileOnly(group = "com.owain.externals", name = "chinbreakhandler", version = "0.0.13+") } @@ -42,7 +42,7 @@ tasks { "Plugin-Provider" to project.extra["PluginProvider"], "Plugin-Dependencies" to arrayOf( - nameToId("iBotUtils"), + nameToId("iUtils"), "chinbreakhandler-plugin" ).joinToString(), "Plugin-Description" to project.extra["PluginDescription"], diff --git a/irooftopagility/src/main/java/net/runelite/client/plugins/irooftopagility/iRooftopAgilityPlugin.java b/irooftopagility/src/main/java/net/runelite/client/plugins/irooftopagility/iRooftopAgilityPlugin.java index 82aa5609..b368377b 100644 --- a/irooftopagility/src/main/java/net/runelite/client/plugins/irooftopagility/iRooftopAgilityPlugin.java +++ b/irooftopagility/src/main/java/net/runelite/client/plugins/irooftopagility/iRooftopAgilityPlugin.java @@ -69,21 +69,21 @@ import net.runelite.client.plugins.PluginDependency; import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginManager; import net.runelite.client.plugins.PluginType; -import net.runelite.client.plugins.ibotutils.BankUtils; -import net.runelite.client.plugins.ibotutils.CalculationUtils; -import net.runelite.client.plugins.ibotutils.InventoryUtils; -import net.runelite.client.plugins.ibotutils.MenuUtils; -import net.runelite.client.plugins.ibotutils.MouseUtils; -import net.runelite.client.plugins.ibotutils.ObjectUtils; -import net.runelite.client.plugins.ibotutils.PlayerUtils; -import net.runelite.client.plugins.ibotutils.iBotUtils; +import net.runelite.client.plugins.iutils.BankUtils; +import net.runelite.client.plugins.iutils.CalculationUtils; +import net.runelite.client.plugins.iutils.InventoryUtils; +import net.runelite.client.plugins.iutils.MenuUtils; +import net.runelite.client.plugins.iutils.MouseUtils; +import net.runelite.client.plugins.iutils.ObjectUtils; +import net.runelite.client.plugins.iutils.PlayerUtils; +import net.runelite.client.plugins.iutils.iUtils; import static net.runelite.client.plugins.irooftopagility.iRooftopAgilityState.*; import net.runelite.client.ui.overlay.OverlayManager; import org.pf4j.Extension; @Extension -@PluginDependency(iBotUtils.class) +@PluginDependency(iUtils.class) @PluginDescriptor( name = "iRooftop Agility", enabledByDefault = false, @@ -97,7 +97,7 @@ public class iRooftopAgilityPlugin extends Plugin { private Client client; @Inject - private iBotUtils utils; + private iUtils utils; @Inject private MouseUtils mouse; diff --git a/ibotutils/ibotutils.gradle.kts b/iutils/iutils.gradle.kts similarity index 97% rename from ibotutils/ibotutils.gradle.kts rename to iutils/iutils.gradle.kts index daeb052b..a0eeb686 100644 --- a/ibotutils/ibotutils.gradle.kts +++ b/iutils/iutils.gradle.kts @@ -25,7 +25,7 @@ version = "0.9.0" -project.extra["PluginName"] = "iBot Utils" +project.extra["PluginName"] = "iUtils" project.extra["PluginDescription"] = "Illumine - Utils required for plugins to function with added automation" tasks { diff --git a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/BankUtils.java b/iutils/src/main/java/net/runelite/client/plugins/iutils/BankUtils.java similarity index 97% rename from ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/BankUtils.java rename to iutils/src/main/java/net/runelite/client/plugins/iutils/BankUtils.java index c664a1da..7507f125 100644 --- a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/BankUtils.java +++ b/iutils/src/main/java/net/runelite/client/plugins/iutils/BankUtils.java @@ -1,4 +1,4 @@ -package net.runelite.client.plugins.ibotutils; +package net.runelite.client.plugins.iutils; import static java.awt.event.KeyEvent.VK_ENTER; import java.util.ArrayList; @@ -21,8 +21,10 @@ import net.runelite.api.widgets.WidgetInfo; import net.runelite.api.widgets.WidgetItem; import net.runelite.client.callback.ClientThread; import net.runelite.client.game.ItemManager; -import static net.runelite.client.plugins.ibotutils.iBotUtils.iterating; -import static net.runelite.client.plugins.ibotutils.iBotUtils.sleep; +import net.runelite.client.plugins.iutils.InventoryUtils; +import net.runelite.client.plugins.iutils.MenuUtils; +import static net.runelite.client.plugins.iutils.iUtils.iterating; +import static net.runelite.client.plugins.iutils.iUtils.sleep; @Slf4j @Singleton diff --git a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/Banks.java b/iutils/src/main/java/net/runelite/client/plugins/iutils/Banks.java similarity index 99% rename from ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/Banks.java rename to iutils/src/main/java/net/runelite/client/plugins/iutils/Banks.java index 71558b55..17937126 100644 --- a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/Banks.java +++ b/iutils/src/main/java/net/runelite/client/plugins/iutils/Banks.java @@ -1,4 +1,4 @@ -package net.runelite.client.plugins.ibotutils; +package net.runelite.client.plugins.iutils; import com.google.common.collect.ImmutableSet; import java.util.Set; diff --git a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/CalculationUtils.java b/iutils/src/main/java/net/runelite/client/plugins/iutils/CalculationUtils.java similarity index 98% rename from ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/CalculationUtils.java rename to iutils/src/main/java/net/runelite/client/plugins/iutils/CalculationUtils.java index 4403261e..14669999 100644 --- a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/CalculationUtils.java +++ b/iutils/src/main/java/net/runelite/client/plugins/iutils/CalculationUtils.java @@ -1,4 +1,4 @@ -package net.runelite.client.plugins.ibotutils; +package net.runelite.client.plugins.iutils; import java.util.concurrent.ThreadLocalRandom; diff --git a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/ContainerUtils.java b/iutils/src/main/java/net/runelite/client/plugins/iutils/ContainerUtils.java similarity index 99% rename from ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/ContainerUtils.java rename to iutils/src/main/java/net/runelite/client/plugins/iutils/ContainerUtils.java index 61a1a36b..c0eef230 100644 --- a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/ContainerUtils.java +++ b/iutils/src/main/java/net/runelite/client/plugins/iutils/ContainerUtils.java @@ -1,4 +1,4 @@ -package net.runelite.client.plugins.ibotutils; +package net.runelite.client.plugins.iutils; import java.awt.Rectangle; import java.util.ArrayList; diff --git a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/InterfaceUtils.java b/iutils/src/main/java/net/runelite/client/plugins/iutils/InterfaceUtils.java similarity index 98% rename from ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/InterfaceUtils.java rename to iutils/src/main/java/net/runelite/client/plugins/iutils/InterfaceUtils.java index 0ac3e492..0a726247 100644 --- a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/InterfaceUtils.java +++ b/iutils/src/main/java/net/runelite/client/plugins/iutils/InterfaceUtils.java @@ -1,4 +1,4 @@ -package net.runelite.client.plugins.ibotutils; +package net.runelite.client.plugins.iutils; import java.lang.reflect.Method; import javax.inject.Inject; diff --git a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/InventoryUtils.java b/iutils/src/main/java/net/runelite/client/plugins/iutils/InventoryUtils.java similarity index 98% rename from ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/InventoryUtils.java rename to iutils/src/main/java/net/runelite/client/plugins/iutils/InventoryUtils.java index 27241caf..4ddd744c 100644 --- a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/InventoryUtils.java +++ b/iutils/src/main/java/net/runelite/client/plugins/iutils/InventoryUtils.java @@ -1,4 +1,4 @@ -package net.runelite.client.plugins.ibotutils; +package net.runelite.client.plugins.iutils; import java.util.ArrayList; import java.util.Arrays; @@ -26,8 +26,8 @@ import net.runelite.api.widgets.Widget; import net.runelite.api.widgets.WidgetInfo; import net.runelite.api.widgets.WidgetItem; import net.runelite.client.game.ItemManager; -import static net.runelite.client.plugins.ibotutils.iBotUtils.iterating; -import static net.runelite.client.plugins.ibotutils.iBotUtils.sleep; +import static net.runelite.client.plugins.iutils.iUtils.iterating; +import static net.runelite.client.plugins.iutils.iUtils.sleep; @Slf4j @Singleton diff --git a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/KeyboardUtils.java b/iutils/src/main/java/net/runelite/client/plugins/iutils/KeyboardUtils.java similarity index 96% rename from ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/KeyboardUtils.java rename to iutils/src/main/java/net/runelite/client/plugins/iutils/KeyboardUtils.java index 846bb7a3..a16325be 100644 --- a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/KeyboardUtils.java +++ b/iutils/src/main/java/net/runelite/client/plugins/iutils/KeyboardUtils.java @@ -1,4 +1,4 @@ -package net.runelite.client.plugins.ibotutils; +package net.runelite.client.plugins.iutils; import com.google.inject.Inject; import java.awt.event.KeyEvent; diff --git a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/MenuUtils.java b/iutils/src/main/java/net/runelite/client/plugins/iutils/MenuUtils.java similarity index 96% rename from ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/MenuUtils.java rename to iutils/src/main/java/net/runelite/client/plugins/iutils/MenuUtils.java index 647e14d1..bbdaa476 100644 --- a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/MenuUtils.java +++ b/iutils/src/main/java/net/runelite/client/plugins/iutils/MenuUtils.java @@ -1,4 +1,4 @@ -package net.runelite.client.plugins.ibotutils; +package net.runelite.client.plugins.iutils; import javax.inject.Inject; import javax.inject.Singleton; diff --git a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/Mouse.java b/iutils/src/main/java/net/runelite/client/plugins/iutils/MouseType.java similarity index 64% rename from ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/Mouse.java rename to iutils/src/main/java/net/runelite/client/plugins/iutils/MouseType.java index e0dce598..c3a05903 100644 --- a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/Mouse.java +++ b/iutils/src/main/java/net/runelite/client/plugins/iutils/MouseType.java @@ -1,6 +1,6 @@ -package net.runelite.client.plugins.ibotutils; +package net.runelite.client.plugins.iutils; -public enum Mouse +public enum MouseType { ZERO_MOUSE("0x,0y mouse"), NO_MOVE("No move data"), @@ -9,7 +9,7 @@ public enum Mouse public final String name; - Mouse(String name) + MouseType(String name) { this.name = name; } diff --git a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/MouseUtils.java b/iutils/src/main/java/net/runelite/client/plugins/iutils/MouseUtils.java similarity index 77% rename from ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/MouseUtils.java rename to iutils/src/main/java/net/runelite/client/plugins/iutils/MouseUtils.java index d1f6c768..f8da19ca 100644 --- a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/MouseUtils.java +++ b/iutils/src/main/java/net/runelite/client/plugins/iutils/MouseUtils.java @@ -1,4 +1,4 @@ -package net.runelite.client.plugins.ibotutils; +package net.runelite.client.plugins.iutils; import java.awt.Dimension; import java.awt.Rectangle; @@ -10,7 +10,7 @@ import lombok.extern.slf4j.Slf4j; import net.runelite.api.Client; import net.runelite.api.Point; import net.runelite.client.callback.ClientThread; -import static net.runelite.client.plugins.ibotutils.iBotUtils.sleep; +import static net.runelite.client.plugins.iutils.iUtils.sleep; import org.jetbrains.annotations.NotNull; @Slf4j @@ -22,7 +22,7 @@ public class MouseUtils private Client client; @Inject - private iBotUtilsConfig config; + private iUtilsConfig config; @Inject private CalculationUtils calc; @@ -59,7 +59,6 @@ public class MouseUtils public void click(Point p) { assert !client.isClientThread(); - if (client.isStretchedEnabled()) { final Dimension stretched = client.getStretchedDimensions(); @@ -160,43 +159,64 @@ public class MouseUtils }); } - /* - * - * if given Point is in the viewport, click on the Point otherwise click a random point in the centre of the screen - * + /** + * Ensures click is performed off the client thread and uses the mouse method selected in config + *If given Point is in the viewport, click on the Point otherwise click a random point in the centre of the screen * */ public void handleMouseClick(Point point) { - assert !client.isClientThread(); + //assert !client.isClientThread(); final int viewportHeight = client.getViewportHeight(); final int viewportWidth = client.getViewportWidth(); log.debug("Performing mouse click: {}", config.getMouse()); - - switch(config.getMouse()) + switch (config.getMouse()) { - case ZERO_MOUSE: - click(new Point(0, 0)); - return; case MOVE: if (point.getX() > viewportWidth || point.getY() > viewportHeight || point.getX() < 0 || point.getY() < 0) { - clickRandomPointCenter(-100, 100); - return; + point = new Point(client.getCenterX() + calc.getRandomIntBetweenRange(-100, 100), + client.getCenterY() + calc.getRandomIntBetweenRange(-100, 100)); } - moveClick(point); - return; + break; + case ZERO_MOUSE: + point = new Point(0,0); + break; case NO_MOVE: if (point.getX() > viewportWidth || point.getY() > viewportHeight || point.getX() < 0 || point.getY() < 0) { - Point rectPoint = new Point(client.getCenterX() + calc.getRandomIntBetweenRange(-100, 100), client.getCenterY() + calc.getRandomIntBetweenRange(-100, 100)); - click(rectPoint); - return; + point = new Point(client.getCenterX() + calc.getRandomIntBetweenRange(-100, 100), + client.getCenterY() + calc.getRandomIntBetweenRange(-100, 100)); + break; } - click(point); - return; case RECTANGLE: - Point rectPoint = new Point(client.getCenterX() + calc.getRandomIntBetweenRange(-100, 100), client.getCenterY() + calc.getRandomIntBetweenRange(-100, 100)); - click(rectPoint); + point = new Point(client.getCenterX() + calc.getRandomIntBetweenRange(-100, 100), + client.getCenterY() + calc.getRandomIntBetweenRange(-100, 100)); + break; + } + log.debug("Clicking at Point: {}", point); + if (!client.isClientThread()) + { + if (config.getMouse().equals(MouseType.MOVE)) + { + moveClick(point); + } + else + { + click(point); + } + } + else + { + Point finalClickPoint = point; + log.info("Clicking on new thread"); + if (config.getMouse().equals(MouseType.MOVE)) + { + executorService.submit(() -> moveClick(finalClickPoint)); + } + else + { + executorService.submit(() -> click(finalClickPoint)); + } } } @@ -205,7 +225,7 @@ public class MouseUtils assert !client.isClientThread(); Point point = getClickPoint(rectangle); - moveClick(point); + handleMouseClick(point); } public void delayMouseClick(Point point, long delay) @@ -229,5 +249,4 @@ public class MouseUtils Point point = getClickPoint(rectangle); delayMouseClick(point, delay); } - } diff --git a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/NPCUtils.java b/iutils/src/main/java/net/runelite/client/plugins/iutils/NPCUtils.java similarity index 98% rename from ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/NPCUtils.java rename to iutils/src/main/java/net/runelite/client/plugins/iutils/NPCUtils.java index e0d20203..36f4da8b 100644 --- a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/NPCUtils.java +++ b/iutils/src/main/java/net/runelite/client/plugins/iutils/NPCUtils.java @@ -1,4 +1,4 @@ -package net.runelite.client.plugins.ibotutils; +package net.runelite.client.plugins.iutils; import java.util.ArrayList; import java.util.Collection; diff --git a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/ObjectUtils.java b/iutils/src/main/java/net/runelite/client/plugins/iutils/ObjectUtils.java similarity index 98% rename from ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/ObjectUtils.java rename to iutils/src/main/java/net/runelite/client/plugins/iutils/ObjectUtils.java index 3cb2a0d0..e748d89a 100644 --- a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/ObjectUtils.java +++ b/iutils/src/main/java/net/runelite/client/plugins/iutils/ObjectUtils.java @@ -1,4 +1,4 @@ -package net.runelite.client.plugins.ibotutils; +package net.runelite.client.plugins.iutils; import java.util.ArrayList; import java.util.Collection; @@ -21,7 +21,7 @@ import net.runelite.api.queries.GameObjectQuery; import net.runelite.api.queries.GroundObjectQuery; import net.runelite.api.queries.TileQuery; import net.runelite.api.queries.WallObjectQuery; -import static net.runelite.client.plugins.ibotutils.Banks.ALL_BANKS; +import static net.runelite.client.plugins.iutils.Banks.ALL_BANKS; @Slf4j @Singleton diff --git a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/Outer.java b/iutils/src/main/java/net/runelite/client/plugins/iutils/Outer.java similarity index 70% rename from ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/Outer.java rename to iutils/src/main/java/net/runelite/client/plugins/iutils/Outer.java index 1225f4a8..fe09f3a8 100644 --- a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/Outer.java +++ b/iutils/src/main/java/net/runelite/client/plugins/iutils/Outer.java @@ -1,4 +1,4 @@ -package net.runelite.client.plugins.ibotutils; +package net.runelite.client.plugins.iutils; import java.util.List; import net.runelite.api.coords.WorldPoint; diff --git a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/Path.java b/iutils/src/main/java/net/runelite/client/plugins/iutils/Path.java similarity index 86% rename from ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/Path.java rename to iutils/src/main/java/net/runelite/client/plugins/iutils/Path.java index 42c99692..38762a7a 100644 --- a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/Path.java +++ b/iutils/src/main/java/net/runelite/client/plugins/iutils/Path.java @@ -1,4 +1,4 @@ -package net.runelite.client.plugins.ibotutils; +package net.runelite.client.plugins.iutils; import net.runelite.api.Player; import net.runelite.api.coords.WorldPoint; diff --git a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/PlayerUtils.java b/iutils/src/main/java/net/runelite/client/plugins/iutils/PlayerUtils.java similarity index 97% rename from ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/PlayerUtils.java rename to iutils/src/main/java/net/runelite/client/plugins/iutils/PlayerUtils.java index 50aaca24..e54c3ea3 100644 --- a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/PlayerUtils.java +++ b/iutils/src/main/java/net/runelite/client/plugins/iutils/PlayerUtils.java @@ -1,4 +1,4 @@ -package net.runelite.client.plugins.ibotutils; +package net.runelite.client.plugins.iutils; import java.awt.Rectangle; import java.util.ArrayList; @@ -20,7 +20,7 @@ import net.runelite.api.coords.LocalPoint; import net.runelite.api.widgets.Widget; import net.runelite.api.widgets.WidgetInfo; import net.runelite.api.widgets.WidgetItem; -import static net.runelite.client.plugins.ibotutils.iBotUtils.sleep; +import static net.runelite.client.plugins.iutils.iUtils.sleep; @Slf4j @Singleton diff --git a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/PrayerMap.java b/iutils/src/main/java/net/runelite/client/plugins/iutils/PrayerMap.java similarity index 98% rename from ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/PrayerMap.java rename to iutils/src/main/java/net/runelite/client/plugins/iutils/PrayerMap.java index 976c31fa..b6ce03a3 100644 --- a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/PrayerMap.java +++ b/iutils/src/main/java/net/runelite/client/plugins/iutils/PrayerMap.java @@ -3,7 +3,7 @@ * All rights reserved. * Licensed under GPL3, see LICENSE for the full scope. */ -package net.runelite.client.plugins.ibotutils; +package net.runelite.client.plugins.iutils; import com.google.common.collect.ImmutableMap; import java.util.Map; diff --git a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/Runes.java b/iutils/src/main/java/net/runelite/client/plugins/iutils/Runes.java similarity index 98% rename from ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/Runes.java rename to iutils/src/main/java/net/runelite/client/plugins/iutils/Runes.java index f8fa701d..0f737d2d 100644 --- a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/Runes.java +++ b/iutils/src/main/java/net/runelite/client/plugins/iutils/Runes.java @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -package net.runelite.client.plugins.ibotutils; +package net.runelite.client.plugins.iutils; import com.google.common.collect.ImmutableMap; import java.awt.image.BufferedImage; diff --git a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/Spells.java b/iutils/src/main/java/net/runelite/client/plugins/iutils/Spells.java similarity index 99% rename from ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/Spells.java rename to iutils/src/main/java/net/runelite/client/plugins/iutils/Spells.java index 75f75cd6..b705d5c8 100644 --- a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/Spells.java +++ b/iutils/src/main/java/net/runelite/client/plugins/iutils/Spells.java @@ -3,7 +3,7 @@ * All rights reserved. * Licensed under GPL3, see LICENSE for the full scope. */ -package net.runelite.client.plugins.ibotutils; +package net.runelite.client.plugins.iutils; import com.google.common.collect.ImmutableMap; import java.util.Map; diff --git a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/Tab.java b/iutils/src/main/java/net/runelite/client/plugins/iutils/Tab.java similarity index 91% rename from ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/Tab.java rename to iutils/src/main/java/net/runelite/client/plugins/iutils/Tab.java index d8e3daf7..95b54bc4 100644 --- a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/Tab.java +++ b/iutils/src/main/java/net/runelite/client/plugins/iutils/Tab.java @@ -3,7 +3,7 @@ * All rights reserved. * Licensed under GPL3, see LICENSE for the full scope. */ -package net.runelite.client.plugins.ibotutils; +package net.runelite.client.plugins.iutils; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/WalkUtils.java b/iutils/src/main/java/net/runelite/client/plugins/iutils/WalkUtils.java similarity index 99% rename from ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/WalkUtils.java rename to iutils/src/main/java/net/runelite/client/plugins/iutils/WalkUtils.java index cd955b87..8a36cdcf 100644 --- a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/WalkUtils.java +++ b/iutils/src/main/java/net/runelite/client/plugins/iutils/WalkUtils.java @@ -1,4 +1,4 @@ -package net.runelite.client.plugins.ibotutils; +package net.runelite.client.plugins.iutils; import com.google.gson.Gson; import java.io.IOException; diff --git a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/iBotUtils.java b/iutils/src/main/java/net/runelite/client/plugins/iutils/iUtils.java similarity index 96% rename from ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/iBotUtils.java rename to iutils/src/main/java/net/runelite/client/plugins/iutils/iUtils.java index 7ac0ef09..1b070557 100644 --- a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/iBotUtils.java +++ b/iutils/src/main/java/net/runelite/client/plugins/iutils/iUtils.java @@ -3,7 +3,7 @@ * All rights reserved. * Licensed under GPL3, see LICENSE for the full scope. */ -package net.runelite.client.plugins.ibotutils; +package net.runelite.client.plugins.iutils; import com.google.inject.Provides; import java.awt.Rectangle; @@ -43,20 +43,20 @@ import org.pf4j.Extension; */ @Extension @PluginDescriptor( - name = "iBot Utils", + name = "iUtils", type = PluginType.UTILITY, - description = "Illumine bot utilities", + description = "Illumine plugin utilities", hidden = false ) @Slf4j @SuppressWarnings("unused") @Singleton -public class iBotUtils extends Plugin { +public class iUtils extends Plugin { @Inject private Client client; @Inject - private iBotUtilsConfig config; + private iUtilsConfig config; @Inject private MouseUtils mouse; @@ -97,8 +97,8 @@ public class iBotUtils extends Plugin { } @Provides - iBotUtilsConfig provideConfig(ConfigManager configManager) { - return configManager.getConfig(iBotUtilsConfig.class); + iUtilsConfig provideConfig(ConfigManager configManager) { + return configManager.getConfig(iUtilsConfig.class); } @Override @@ -111,6 +111,8 @@ public class iBotUtils extends Plugin { executorService.shutdown(); } + + public void oneClickCastSpell(WidgetInfo spellWidget, MenuEntry targetMenu, long sleepLength) { menu.setEntry(targetMenu, true); mouse.delayMouseClick(new Rectangle(0, 0, 100, 100), sleepLength); diff --git a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/iBotUtilsConfig.java b/iutils/src/main/java/net/runelite/client/plugins/iutils/iUtilsConfig.java similarity index 90% rename from ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/iBotUtilsConfig.java rename to iutils/src/main/java/net/runelite/client/plugins/iutils/iUtilsConfig.java index 87e8f5cb..13d8d965 100644 --- a/ibotutils/src/main/java/net/runelite/client/plugins/ibotutils/iBotUtilsConfig.java +++ b/iutils/src/main/java/net/runelite/client/plugins/iutils/iUtilsConfig.java @@ -23,15 +23,15 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -package net.runelite.client.plugins.ibotutils; +package net.runelite.client.plugins.iutils; import net.runelite.client.config.Config; import net.runelite.client.config.ConfigGroup; import net.runelite.client.config.ConfigItem; -@ConfigGroup("iBotUtils") -public interface iBotUtilsConfig extends Config +@ConfigGroup("iUtils") +public interface iUtilsConfig extends Config { @ConfigItem( keyName = "getMouse", @@ -39,8 +39,8 @@ public interface iBotUtilsConfig extends Config description = "Choose a mouse movement style", position = 0 ) - default Mouse getMouse() + default MouseType getMouse() { - return Mouse.NO_MOVE; + return MouseType.NO_MOVE; } } diff --git a/iworldwalker/iworldwalker.gradle.kts b/iworldwalker/iworldwalker.gradle.kts index 880fe7b5..f5a9abed 100644 --- a/iworldwalker/iworldwalker.gradle.kts +++ b/iworldwalker/iworldwalker.gradle.kts @@ -29,7 +29,7 @@ project.extra["PluginName"] = "iWorld Walker Plugin" project.extra["PluginDescription"] = "Illumine - World Walker plugin" dependencies { - compileOnly(project(":ibotutils")) + compileOnly(project(":iutils")) } tasks { @@ -39,7 +39,7 @@ tasks { "Plugin-Version" to project.version, "Plugin-Id" to nameToId(project.extra["PluginName"] as String), "Plugin-Provider" to project.extra["PluginProvider"], - "Plugin-Dependencies" to nameToId("iBotUtils"), + "Plugin-Dependencies" to nameToId("iUtils"), "Plugin-Description" to project.extra["PluginDescription"], "Plugin-License" to project.extra["PluginLicense"] )) diff --git a/iworldwalker/src/main/java/net/runelite/client/plugins/iworldwalker/iWorldWalkerPlugin.java b/iworldwalker/src/main/java/net/runelite/client/plugins/iworldwalker/iWorldWalkerPlugin.java index afc4f3e8..8d2fe753 100644 --- a/iworldwalker/src/main/java/net/runelite/client/plugins/iworldwalker/iWorldWalkerPlugin.java +++ b/iworldwalker/src/main/java/net/runelite/client/plugins/iworldwalker/iWorldWalkerPlugin.java @@ -43,16 +43,16 @@ import net.runelite.client.plugins.Plugin; import net.runelite.client.plugins.PluginDependency; import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginType; -import net.runelite.client.plugins.ibotutils.CalculationUtils; -import net.runelite.client.plugins.ibotutils.PlayerUtils; -import net.runelite.client.plugins.ibotutils.WalkUtils; -import net.runelite.client.plugins.ibotutils.iBotUtils; +import net.runelite.client.plugins.iutils.CalculationUtils; +import net.runelite.client.plugins.iutils.PlayerUtils; +import net.runelite.client.plugins.iutils.WalkUtils; +import net.runelite.client.plugins.iutils.iUtils; import net.runelite.client.ui.overlay.OverlayManager; import org.pf4j.Extension; @Extension -@PluginDependency(iBotUtils.class) +@PluginDependency(iUtils.class) @PluginDescriptor( name = "iWorld Walker Plugin", enabledByDefault = false, @@ -76,7 +76,7 @@ public class iWorldWalkerPlugin extends Plugin private iWorldWalkerOverlay overlay; @Inject - private iBotUtils utils; + private iUtils utils; @Inject private WalkUtils walk; diff --git a/settings.gradle.kts b/settings.gradle.kts index 95ae7a72..f413a167 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -26,7 +26,7 @@ rootProject.name = "Illumine Plugins" include(":botutils") -include(":ibotutils") +include(":iutils") include(":icombinationrunecrafter") include(":imagiccaster") include(":imenudebugger") @@ -36,6 +36,7 @@ include(":iquickeater") include(":irandomhandler") include(":irooftopagility") include(":iworldwalker") +include("testplugin") for (project in rootProject.children) { project.apply { diff --git a/testplugin/src/main/java/net/runelite/client/plugins/testplugin/TestConfig.java b/testplugin/src/main/java/net/runelite/client/plugins/testplugin/TestConfig.java new file mode 100644 index 00000000..1b170111 --- /dev/null +++ b/testplugin/src/main/java/net/runelite/client/plugins/testplugin/TestConfig.java @@ -0,0 +1,250 @@ +/* + * Copyright (c) 2018, SomeoneWithAnInternetConnection + * Copyright (c) 2018, oplosthee + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.runelite.client.plugins.testplugin; + +import java.time.Instant; +import java.util.function.Consumer; +import net.runelite.client.config.Button; +import net.runelite.client.config.Config; +import net.runelite.client.config.ConfigGroup; +import net.runelite.client.config.ConfigItem; +import net.runelite.client.config.ConfigSection; +import net.runelite.client.config.ConfigTitleSection; +import net.runelite.client.config.Range; +import net.runelite.client.config.Title; + +@ConfigGroup("Test") +public interface TestConfig extends Config +{ + + @ConfigSection( + keyName = "delayConfig", + name = "Sleep Delay Configuration", + description = "Configure how the bot handles sleep delays", + position = 0 + ) + default boolean delayConfig() + { + return false; + } + + @Range( + min = 0, + max = 550 + ) + @ConfigItem( + keyName = "sleepMin", + name = "Sleep Min", + description = "", + position = 1, + section = "delayConfig" + ) + default int sleepMin() + { + return 60; + } + + @Range( + min = 0, + max = 550 + ) + @ConfigItem( + keyName = "sleepMax", + name = "Sleep Max", + description = "", + position = 2, + section = "delayConfig" + ) + default int sleepMax() + { + return 350; + } + + @Range( + min = 0, + max = 550 + ) + @ConfigItem( + keyName = "sleepTarget", + name = "Sleep Target", + description = "", + position = 3, + section = "delayConfig" + ) + default int sleepTarget() + { + return 100; + } + + @Range( + min = 0, + max = 550 + ) + @ConfigItem( + keyName = "sleepDeviation", + name = "Sleep Deviation", + description = "", + position = 4, + section = "delayConfig" + ) + default int sleepDeviation() + { + return 10; + } + + @ConfigItem( + keyName = "sleepWeightedDistribution", + name = "Sleep Weighted Distribution", + description = "Shifts the random distribution towards the lower end at the target, otherwise it will be an even distribution", + position = 5, + section = "delayConfig" + ) + default boolean sleepWeightedDistribution() + { + return false; + } + + @ConfigSection( + keyName = "delayTickConfig", + name = "Game Tick Configuration", + description = "Configure how the bot handles game tick delays, 1 game tick equates to roughly 600ms", + position = 10 + ) + default boolean delayTickConfig() + { + return false; + } + + @Range( + min = 0, + max = 10 + ) + @ConfigItem( + keyName = "tickDelayMin", + name = "Game Tick Min", + description = "", + position = 11, + section = "delayTickConfig" + ) + default int tickDelayMin() + { + return 1; + } + + @Range( + min = 0, + max = 10 + ) + @ConfigItem( + keyName = "tickDelayMax", + name = "Game Tick Max", + description = "", + position = 12, + section = "delayTickConfig" + ) + default int tickDelayMax() + { + return 3; + } + + @Range( + min = 0, + max = 10 + ) + @ConfigItem( + keyName = "tickDelayTarget", + name = "Game Tick Target", + description = "", + position = 13, + section = "delayTickConfig" + ) + default int tickDelayTarget() + { + return 2; + } + + @Range( + min = 0, + max = 10 + ) + @ConfigItem( + keyName = "tickDelayDeviation", + name = "Game Tick Deviation", + description = "", + position = 14, + section = "delayTickConfig" + ) + default int tickDelayDeviation() + { + return 1; + } + + @ConfigItem( + keyName = "tickDelayWeightedDistribution", + name = "Game Tick Weighted Distribution", + description = "Shifts the random distribution towards the lower end at the target, otherwise it will be an even distribution", + position = 15, + section = "delayTickConfig" + ) + default boolean tickDelayWeightedDistribution() + { + return false; + } + + @ConfigItem( + keyName = "testID", + name = "Test ID", + description = "", + position = 30 + ) + default int testID() + { + return 0; + } + + @ConfigItem( + keyName = "enableUI", + name = "Enable UI", + description = "Enable to turn on in game UI", + position = 100 + ) + default boolean enableUI() + { + return true; + } + + @ConfigItem( + keyName = "startButton", + name = "Start/Stop", + description = "Test button that changes variable value", + position = 110 + ) + default Button startButton() + { + return new Button(); + } + +} diff --git a/testplugin/src/main/java/net/runelite/client/plugins/testplugin/TestPlugin.java b/testplugin/src/main/java/net/runelite/client/plugins/testplugin/TestPlugin.java new file mode 100644 index 00000000..1e57fb80 --- /dev/null +++ b/testplugin/src/main/java/net/runelite/client/plugins/testplugin/TestPlugin.java @@ -0,0 +1,164 @@ +/* + * Copyright (c) 2018, SomeoneWithAnInternetConnection + * Copyright (c) 2018, oplosthee + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.runelite.client.plugins.testplugin; + +import com.google.inject.Provides; +import java.util.*; +import java.util.concurrent.*; +import javax.inject.Inject; +import lombok.extern.slf4j.Slf4j; +import net.runelite.api.*; +import net.runelite.api.coords.LocalPoint; +import net.runelite.api.events.ConfigButtonClicked; +import net.runelite.api.events.GameTick; +import net.runelite.api.events.MenuOptionClicked; +import net.runelite.client.config.ConfigManager; +import net.runelite.client.eventbus.Subscribe; +import net.runelite.client.game.ItemManager; +import net.runelite.client.plugins.Plugin; +import net.runelite.client.plugins.PluginDependency; +import net.runelite.client.plugins.PluginDescriptor; +import net.runelite.client.plugins.PluginType; +import net.runelite.client.plugins.iutils.MouseUtils; +import net.runelite.client.plugins.iutils.iUtils; +import org.pf4j.Extension; + + +@Extension +@PluginDependency(iUtils.class) +@PluginDescriptor( + name = "Test Plugin", + enabledByDefault = false, + description = "Illumine - Test plugin", + tags = {"illumine", "test", "bot"}, + type = PluginType.UTILITY +) +@Slf4j +public class TestPlugin extends Plugin +{ + @Inject + private Client client; + + @Inject + private TestConfig config; + + @Inject + private iUtils utils; + + @Inject + private MouseUtils mouse; + + @Inject + private ConfigManager configManager; + + MenuEntry testMenu; + MenuEntry testMenu2; + Player player; + GameObject testGameObject; + LocalPoint beforeLoc; + + int timeout; + Timer timer; + + @Provides + TestConfig provideConfig(ConfigManager configManager) + { + return configManager.getConfig(TestConfig.class); + } + + @Override + protected void startUp() + { + + } + + @Override + protected void shutDown() + { + + } + + @Subscribe + public void onGameTick(GameTick event) + { + player = client.getLocalPlayer(); + if (client != null && player != null && client.getGameState() == GameState.LOGGED_IN) + { + if (timeout > 0) + { + timeout--; + return; + } + if (!iUtils.iterating) + { + mouse.handleMouseClick(new Point(client.getCenterX(), client.getCenterY())); + timeout = 10; + } + beforeLoc = player.getLocalLocation(); + } + } + + @Subscribe + private void onConfigButtonPressed(ConfigButtonClicked configButtonClicked) + { + if (!configButtonClicked.getGroup().equalsIgnoreCase("Test")) + { + return; + } + log.debug("button {} pressed!", configButtonClicked.getKey()); + switch (configButtonClicked.getKey()) + { + case "startButton": + log.info("button clicked"); + } + } + + /*@Subscribe + public void onChatMessage(ChatMessage event) + { + log.info("message type {}, message {}", event.getType(), event.getMessage()); + }*/ + + @Subscribe + public void onMenuOptionClicked(MenuOptionClicked event) + { + log.info("Menu Entry before override: {}", event.toString()); + if (testMenu == null) + { + return; + } + if (utils.getRandomEvent()) //for random events + { + log.debug("Test plugin not overriding due to random event"); + return; + } + else + { + event.setMenuEntry(testMenu); + testMenu = null; //this allow the player to interact with the client without their clicks being overridden + } + } +} \ No newline at end of file diff --git a/testplugin/testplugin.gradle.kts b/testplugin/testplugin.gradle.kts new file mode 100644 index 00000000..d935eb68 --- /dev/null +++ b/testplugin/testplugin.gradle.kts @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2019 Owain van Brakel + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +version = "0.0.2" + +project.extra["PluginName"] = "Test Plugin" +project.extra["PluginDescription"] = "Illumine - test plugin" + +dependencies { + compileOnly(project(":iutils")) +} + +tasks { + jar { + manifest { + attributes(mapOf( + "Plugin-Version" to project.version, + "Plugin-Id" to nameToId(project.extra["PluginName"] as String), + "Plugin-Provider" to project.extra["PluginProvider"], + "Plugin-Dependencies" to nameToId("iUtils"), + "Plugin-Description" to project.extra["PluginDescription"], + "Plugin-License" to project.extra["PluginLicense"] + )) + } + } +} \ No newline at end of file