diff --git a/botutils/botutils.gradle.kts b/botutils/botutils.gradle.kts index bb593f20..ffc26a90 100644 --- a/botutils/botutils.gradle.kts +++ b/botutils/botutils.gradle.kts @@ -25,7 +25,7 @@ import ProjectVersions.openosrsVersion * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -version = "2.9.0" +version = "2.9.1" project.extra["PluginName"] = "BotUtils" project.extra["PluginDescription"] = "Illumine - Utils required for plugins to function with added automation" diff --git a/botutils/src/main/java/net/runelite/client/plugins/botutils/Banks.java b/botutils/src/main/java/net/runelite/client/plugins/botutils/Banks.java index e4bd7783..a204243b 100644 --- a/botutils/src/main/java/net/runelite/client/plugins/botutils/Banks.java +++ b/botutils/src/main/java/net/runelite/client/plugins/botutils/Banks.java @@ -15,8 +15,6 @@ public class Banks ObjectID.BANK_BOOTH_10357, ObjectID.BANK_BOOTH_10517, ObjectID.BANK_BOOTH_10527, - ObjectID.BANK_DEPOSIT_BOX, - ObjectID.BANK_DEPOSIT_CHEST, ObjectID.BANK_CHEST_10562, ObjectID.BANK_BOOTH_10583, ObjectID.BANK_BOOTH_10584, @@ -48,8 +46,6 @@ public class Banks ObjectID.BANK_BOOTH_24101, ObjectID.BANK_BOOTH_24347, ObjectID.BANK_BOOTH_25808, - ObjectID.BANK_DEPOSIT_BOX_25937, - ObjectID.BANK_DEPOSIT_BOX_26254, ObjectID.BANK_CHEST_26707, ObjectID.BANK_CHEST_26711, ObjectID.BANK_BOOTH_27254, @@ -75,31 +71,19 @@ public class Banks ObjectID.BANK_CHEST_28595, ObjectID.BANK_CHEST_28816, ObjectID.BANK_CHEST_28861, - ObjectID.BANK_DEPOSIT_BOX_29103, - ObjectID.BANK_DEPOSIT_BOX_29104, - ObjectID.BANK_DEPOSIT_BOX_29105, - ObjectID.BANK_DEPOSIT_BOX_29106, - ObjectID.BANK_DEPOSIT_POT, ObjectID.BANK_CHEST_29321, - ObjectID.BANK_DEPOSIT_BOX_29327, ObjectID.BANK_CHEST_30087, ObjectID.BANK_CHEST_30267, - ObjectID.BANK_DEPOSIT_BOX_30268, ObjectID.BANK_CHEST_30926, ObjectID.BANK_CHEST_30989, - ObjectID.BANK_DEPOSIT_BOX_31726, ObjectID.BANK_BOX, ObjectID.BANK_BOX_31949, - ObjectID.BANK_DEPOSIT_BOX_32665, ObjectID.BANK_BOOTH_32666, ObjectID.CLOSED_BANK_BOOTH_32667, ObjectID.BANK_CHEST_34343, - ObjectID.BANK_DEPOSIT_BOX_34344, - ObjectID.BANK_DEPOSIT_BOX_36086, ObjectID.BANK_BOOTH_36559, ObjectID.CLOSED_BANK_BOOTH_36560, ObjectID.BANK_BOOTH_37959, - ObjectID.BANK_BOOTH_39238, - ObjectID.BANK_DEPOSIT_BOX_39239 + ObjectID.BANK_BOOTH_39238 ); } diff --git a/botutils/src/main/java/net/runelite/client/plugins/botutils/BotUtils.java b/botutils/src/main/java/net/runelite/client/plugins/botutils/BotUtils.java index 1e531b33..20d58704 100644 --- a/botutils/src/main/java/net/runelite/client/plugins/botutils/BotUtils.java +++ b/botutils/src/main/java/net/runelite/client/plugins/botutils/BotUtils.java @@ -755,14 +755,8 @@ public class BotUtils extends Plugin if (client.getEnergy() > (minEnergy + getRandomIntBetweenRange(0, randMax)) || client.getVar(Varbits.RUN_SLOWED_DEPLETION_ACTIVE) != 0) { - - WidgetItem staminaPotion = shouldStamPot(); - if (staminaPotion != null) + if (drinkStamPot()) { - log.info("using stamina potion"); - targetMenu = new MenuEntry("", "", staminaPotion.getId(), MenuOpcode.ITEM_FIRST_OPTION.getId(), staminaPotion.getIndex(), 9764864, false); - clickRandomPointCenter(-100, 100); - sleep(10, 50); return; } if (!isRunEnabled()) @@ -793,6 +787,19 @@ public class BotUtils extends Plugin } } + public boolean drinkStamPot() + { + WidgetItem staminaPotion = shouldStamPot(); + if (staminaPotion != null) + { + log.info("using stamina potion"); + targetMenu = new MenuEntry("", "", staminaPotion.getId(), MenuOpcode.ITEM_FIRST_OPTION.getId(), staminaPotion.getIndex(), 9764864, false); + clickRandomPointCenter(-100, 100); + return true; + } + return false; + } + public void logout() { targetMenu = new MenuEntry("", "", 1, MenuOpcode.CC_OP.getId(), -1, 11927560, false); diff --git a/combinationrunecrafter/combinationrunecrafter.gradle.kts b/combinationrunecrafter/combinationrunecrafter.gradle.kts index e300fcd8..bed8ec7a 100644 --- a/combinationrunecrafter/combinationrunecrafter.gradle.kts +++ b/combinationrunecrafter/combinationrunecrafter.gradle.kts @@ -23,7 +23,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -version = "1.0.1" +version = "1.0.2" project.extra["PluginName"] = "Combination Runecrafter Plugin" project.extra["PluginDescription"] = "Illumine - Combination Runecrafting plugin" diff --git a/combinationrunecrafter/src/main/java/net/runelite/client/plugins/combinationrunecrafter/CombinationRunecrafterConfig.java b/combinationrunecrafter/src/main/java/net/runelite/client/plugins/combinationrunecrafter/CombinationRunecrafterConfig.java index cae2f7fe..924737c6 100644 --- a/combinationrunecrafter/src/main/java/net/runelite/client/plugins/combinationrunecrafter/CombinationRunecrafterConfig.java +++ b/combinationrunecrafter/src/main/java/net/runelite/client/plugins/combinationrunecrafter/CombinationRunecrafterConfig.java @@ -239,7 +239,7 @@ public interface CombinationRunecrafterConfig extends Config @ConfigItem( keyName = "getRunecraftingType", name = "Rune Type", - description = "Choose your essence type", + description = "Choose which combination rune to craft", position = 24 ) diff --git a/plugins.json b/plugins.json index 1eaeab7b..a9c66378 100644 --- a/plugins.json +++ b/plugins.json @@ -1 +1 @@ -[{"projectUrl":"https://discord.gg/YUHHsE","provider":"illumine","name":"BotUtils","description":"Illumine - Utils required for plugins to function with added automation","id":"botutils-plugin","releases":[{"date":"2020-07-22","sha512sum":"0ED1238294D1B46055A87EBC4BCEF29609A46D76AFD97B49CA1C90730DF82CF3B25C30BA40869D42675B9D3537A68918C3CC22C48DB9752A6DA344A38E8DAE4D","version":"2.9.0","url":"https://github.com/illumineawake/illu-plugins/blob/master/release/botutils-2.9.0.jar?raw=true","requires":"0.0.1"}]}, {"projectUrl":"https://discord.gg/YUHHsE","provider":"illumine","name":"Combination Runecrafter Plugin","description":"Illumine - Combination Runecrafting plugin","id":"combinationrunecrafterplugin-plugin","releases":[{"date":"2020-07-22","sha512sum":"21A41E8B101F34BCF497A73325922142151C4B5A8987FB964ABD5BB89F7CCF0F74A7C5493B03C15DA49BAB57F3648DB7FE27B2919E6E16DE708A15EE01169657","version":"1.0.1","url":"https://github.com/illumineawake/illu-plugins/blob/master/release/combinationrunecrafter-1.0.1.jar?raw=true","requires":"0.0.1"}]}, {"projectUrl":"https://discord.gg/YUHHsE","provider":"illumine","name":"Magic Splasher","description":"Illumine automated magic splasher","id":"magicsplasher-plugin","releases":[{"date":"2020-07-22","sha512sum":"7159B20AD740A3580E7DE5A518DE0E6394258C8185C91F346BD78F47DDE5CBB153A33754B7B9EAD7585FB4A1F98E1F759B4409057EE12EBD9431085621F337FF","version":"1.9.3","url":"https://github.com/illumineawake/illu-plugins/blob/master/release/magicsplasher-1.9.3.jar?raw=true","requires":"0.0.1"}]}, {"projectUrl":"https://discord.gg/YUHHsE","provider":"illumine","name":"Power Skiller","description":"Illumine auto power skiller plugin","id":"powerskiller-plugin","releases":[{"date":"2020-07-22","sha512sum":"1C830D6EF55F2D43F317F6DB9632FB073E367D7DD1A166C918C198422634856D6200EC8986078290D573CD3DCA2AF194B78302491E40941E8814EEC8200B2246","version":"3.0.0","url":"https://github.com/illumineawake/illu-plugins/blob/master/release/powerskiller-3.0.0.jar?raw=true","requires":"0.0.1"}]}, {"projectUrl":"https://discord.gg/YUHHsE","provider":"illumine","name":"Quick Eater","description":"Illumine - auto eat food below configured HP","id":"quickeater-plugin","releases":[{"date":"2020-07-22","sha512sum":"34DA31BF52B36CAB44AA0C6DC0BFA243EC9D3B1D335CCE652DAEBCD4337D622C85CDF23C162F118A264095682CE727F0F379682C57FC9A1B4910C10A49941A80","version":"1.8.1","url":"https://github.com/illumineawake/illu-plugins/blob/master/release/quickeater-1.8.1.jar?raw=true","requires":"0.0.1"}]}, {"projectUrl":"https://discord.gg/YUHHsE","provider":"illumine","name":"Rooftop Agility","description":"Illumine automated rooftop agility plugin","id":"rooftopagility-plugin","releases":[{"date":"2020-07-22","sha512sum":"D3454D07E055B6115200D36ADB22202B30BB245080B674E0AB2CF365B40A3B2B207413367C1EEFC11C1B37FCD36494D609DD59B50776437300F5DD2E17A2FAF2","version":"2.6.4","url":"https://github.com/illumineawake/illu-plugins/blob/master/release/rooftopagility-2.6.4.jar?raw=true","requires":"0.0.1"}]}] +[{"projectUrl":"https://discord.gg/YUHHsE","provider":"illumine","name":"BotUtils","description":"Illumine - Utils required for plugins to function with added automation","id":"botutils-plugin","releases":[{"date":"2020-07-23","sha512sum":"360732C63F532E84AE8C7F3CB1E58E779CD9216001712590178ACF247B36F6F0C436C8CDBEF753AE1D648CF71843EF176F13757E124A392F75D1AE98EF3E8BBA","version":"2.9.1","url":"https://github.com/illumineawake/illu-plugins/blob/master/release/botutils-2.9.1.jar?raw=true","requires":"0.0.1"}]}, {"projectUrl":"https://discord.gg/YUHHsE","provider":"illumine","name":"Combination Runecrafter Plugin","description":"Illumine - Combination Runecrafting plugin","id":"combinationrunecrafterplugin-plugin","releases":[{"date":"2020-07-23","sha512sum":"FE02CF050C4F5C37984EC99AF3ECB5457728F2101E27A067450DF5B38F4021E32342CFE31346BFA2E54140AEA3579D3A48585AA06D94BE41BF3574058C0AE72A","version":"1.0.2","url":"https://github.com/illumineawake/illu-plugins/blob/master/release/combinationrunecrafter-1.0.2.jar?raw=true","requires":"0.0.1"}]}, {"projectUrl":"https://discord.gg/YUHHsE","provider":"illumine","name":"Magic Splasher","description":"Illumine automated magic splasher","id":"magicsplasher-plugin","releases":[{"date":"2020-07-23","sha512sum":"7159B20AD740A3580E7DE5A518DE0E6394258C8185C91F346BD78F47DDE5CBB153A33754B7B9EAD7585FB4A1F98E1F759B4409057EE12EBD9431085621F337FF","version":"1.9.3","url":"https://github.com/illumineawake/illu-plugins/blob/master/release/magicsplasher-1.9.3.jar?raw=true","requires":"0.0.1"}]}, {"projectUrl":"https://discord.gg/YUHHsE","provider":"illumine","name":"Power Skiller","description":"Illumine auto power skiller plugin","id":"powerskiller-plugin","releases":[{"date":"2020-07-23","sha512sum":"1C830D6EF55F2D43F317F6DB9632FB073E367D7DD1A166C918C198422634856D6200EC8986078290D573CD3DCA2AF194B78302491E40941E8814EEC8200B2246","version":"3.0.0","url":"https://github.com/illumineawake/illu-plugins/blob/master/release/powerskiller-3.0.0.jar?raw=true","requires":"0.0.1"}]}, {"projectUrl":"https://discord.gg/YUHHsE","provider":"illumine","name":"Quick Eater","description":"Illumine - auto eat food below configured HP","id":"quickeater-plugin","releases":[{"date":"2020-07-23","sha512sum":"A13C2B4EF80BD5E48D202566F6C1E44E41C2540D315F6CE3372AF09024975427C4F2615A3B437CC5A57F438919E2969264E796DF7391978CFED3EB6874D2BE4E","version":"1.9.0","url":"https://github.com/illumineawake/illu-plugins/blob/master/release/quickeater-1.9.0.jar?raw=true","requires":"0.0.1"}]}, {"projectUrl":"https://discord.gg/YUHHsE","provider":"illumine","name":"Rooftop Agility","description":"Illumine automated rooftop agility plugin","id":"rooftopagility-plugin","releases":[{"date":"2020-07-23","sha512sum":"D3454D07E055B6115200D36ADB22202B30BB245080B674E0AB2CF365B40A3B2B207413367C1EEFC11C1B37FCD36494D609DD59B50776437300F5DD2E17A2FAF2","version":"2.6.4","url":"https://github.com/illumineawake/illu-plugins/blob/master/release/rooftopagility-2.6.4.jar?raw=true","requires":"0.0.1"}]}] diff --git a/quickeater/quickeater.gradle.kts b/quickeater/quickeater.gradle.kts index 999f8c7f..a6fce1d4 100644 --- a/quickeater/quickeater.gradle.kts +++ b/quickeater/quickeater.gradle.kts @@ -23,7 +23,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -version = "1.8.1" +version = "1.9.0" project.extra["PluginName"] = "Quick Eater" project.extra["PluginDescription"] = "Illumine - auto eat food below configured HP" diff --git a/quickeater/src/main/java/net/runelite/client/plugins/quickeater/QuickEaterConfiguration.java b/quickeater/src/main/java/net/runelite/client/plugins/quickeater/QuickEaterConfiguration.java index d8427546..32091d8c 100644 --- a/quickeater/src/main/java/net/runelite/client/plugins/quickeater/QuickEaterConfiguration.java +++ b/quickeater/src/main/java/net/runelite/client/plugins/quickeater/QuickEaterConfiguration.java @@ -40,4 +40,33 @@ public interface QuickEaterConfiguration extends Config position = 0 ) default int eatHP() { return 10; } + + @ConfigItem( + keyName = "drinkStamina", + name = "Drink Stamina Potions", + description = "Enable to drink Stamina Potions below given energy level", + position = 1 + ) + default boolean drinkStamina() { return false; } + + @ConfigItem( + keyName = "maxDrinkEnergy", + name = "Drink stamina below energy", + description = "This is the maximum energy amount", + position = 2, + hidden = true, + unhide = "drinkStamina" + ) + default int maxDrinkEnergy() { return 60; } + + @ConfigItem( + keyName = "randEnergy", + name = "random variation for drink energy (subtracted from max)", + description = "A random value that is subtracted from max drink energy. E.g. a random value of '20' with a max drink energy of 60 would " + + "cause stamina pot to be drunk at a random value between 40 and 60", + position = 3, + hidden = true, + unhide = "drinkStamina" + ) + default int randEnergy() { return 20; } } diff --git a/quickeater/src/main/java/net/runelite/client/plugins/quickeater/QuickEaterPlugin.java b/quickeater/src/main/java/net/runelite/client/plugins/quickeater/QuickEaterPlugin.java index 5e90d224..7807e5a9 100644 --- a/quickeater/src/main/java/net/runelite/client/plugins/quickeater/QuickEaterPlugin.java +++ b/quickeater/src/main/java/net/runelite/client/plugins/quickeater/QuickEaterPlugin.java @@ -31,11 +31,14 @@ import java.util.Set; import javax.inject.Inject; import lombok.extern.slf4j.Slf4j; import net.runelite.api.Client; +import net.runelite.api.GameState; import net.runelite.api.ItemID; import net.runelite.api.MenuEntry; import net.runelite.api.MenuOpcode; +import net.runelite.api.Player; import net.runelite.api.Skill; import net.runelite.api.TileObject; +import net.runelite.api.events.GameTick; import net.runelite.api.events.HitsplatApplied; import net.runelite.api.events.MenuOptionClicked; import net.runelite.api.queries.GameObjectQuery; @@ -79,10 +82,14 @@ public class QuickEaterPlugin extends Plugin private ItemManager itemManager; MenuEntry targetMenu; + Player player; private Set DRINK_SET = Set.of(ItemID.JUG_OF_WINE, ItemID.SARADOMIN_BREW1, ItemID.SARADOMIN_BREW2, ItemID.SARADOMIN_BREW3, ItemID.SARADOMIN_BREW4); + private int timeout; + private int drinkEnergy; + @Provides QuickEaterConfiguration provideConfig(ConfigManager configManager) { @@ -101,6 +108,32 @@ public class QuickEaterPlugin extends Plugin } + @Subscribe + private void onGameTick(GameTick event) + { + if (!config.drinkStamina()) + { + return; + } + player = client.getLocalPlayer(); + if (client != null && player != null && client.getGameState() == GameState.LOGGED_IN) + { + if (timeout > 0) + { + timeout--; + return; + } + if (drinkEnergy == 0) + { + drinkEnergy = utils.getRandomIntBetweenRange(config.maxDrinkEnergy() - config.randEnergy(), config.maxDrinkEnergy()); + } + if (client.getEnergy() < drinkEnergy) + { + utils.drinkStamPot(); + } + } + } + @Subscribe private void onHitsplatApplied(HitsplatApplied event) diff --git a/release/botutils-2.9.0.jar b/release/botutils-2.9.0.jar deleted file mode 100644 index 764622ac..00000000 Binary files a/release/botutils-2.9.0.jar and /dev/null differ diff --git a/release/botutils-2.9.1.jar b/release/botutils-2.9.1.jar new file mode 100644 index 00000000..9c1d60fd Binary files /dev/null and b/release/botutils-2.9.1.jar differ diff --git a/release/combinationrunecrafter-1.0.1.jar b/release/combinationrunecrafter-1.0.2.jar similarity index 85% rename from release/combinationrunecrafter-1.0.1.jar rename to release/combinationrunecrafter-1.0.2.jar index 8dc132c1..32896fd6 100644 Binary files a/release/combinationrunecrafter-1.0.1.jar and b/release/combinationrunecrafter-1.0.2.jar differ diff --git a/release/quickeater-1.8.1.jar b/release/quickeater-1.8.1.jar deleted file mode 100644 index 83d41c54..00000000 Binary files a/release/quickeater-1.8.1.jar and /dev/null differ diff --git a/release/quickeater-1.9.0.jar b/release/quickeater-1.9.0.jar new file mode 100644 index 00000000..ab8cbc21 Binary files /dev/null and b/release/quickeater-1.9.0.jar differ