iutils: plugin rename - all plugins updated accordingly

handleMouseClick now executes click on a separate thread if it's running on clientThread
This commit is contained in:
illumineawake 2020-10-11 21:29:39 +11:00
parent 84248fffc8
commit 1887cebe76
60 changed files with 702 additions and 260 deletions

View File

@ -30,7 +30,7 @@ project.extra["PluginName"] = "AutoClickIllumine"
project.extra["PluginDescription"] = "What more is there to say?" project.extra["PluginDescription"] = "What more is there to say?"
dependencies { dependencies {
compileOnly(project(":ibotutils")) compileOnly(project(":iutils"))
} }
tasks { tasks {
@ -40,7 +40,7 @@ tasks {
"Plugin-Version" to project.version, "Plugin-Version" to project.version,
"Plugin-Id" to nameToId(project.extra["PluginName"] as String), "Plugin-Id" to nameToId(project.extra["PluginName"] as String),
"Plugin-Provider" to project.extra["PluginProvider"], "Plugin-Provider" to project.extra["PluginProvider"],
"Plugin-Dependencies" to nameToId("ibotutils"), "Plugin-Dependencies" to nameToId("iutils"),
"Plugin-Description" to project.extra["PluginDescription"], "Plugin-Description" to project.extra["PluginDescription"],
"Plugin-License" to project.extra["PluginLicense"] "Plugin-License" to project.extra["PluginLicense"]
)) ))

View File

@ -31,13 +31,13 @@ import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDependency; import net.runelite.client.plugins.PluginDependency;
import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.plugins.PluginType; 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.ui.overlay.OverlayManager;
import net.runelite.client.util.HotkeyListener; import net.runelite.client.util.HotkeyListener;
import org.pf4j.Extension; import org.pf4j.Extension;
@Extension @Extension
@PluginDependency(iBotUtils.class) @PluginDependency(iUtils.class)
@PluginDescriptor( @PluginDescriptor(
name = "Auto Clicker Illumine", name = "Auto Clicker Illumine",
enabledByDefault = false, enabledByDefault = false,
@ -62,7 +62,7 @@ public class AutoClickIllumine extends Plugin
private KeyManager keyManager; private KeyManager keyManager;
@Inject @Inject
private iBotUtils extUtils; private iUtils extUtils;
private ExecutorService executorService; private ExecutorService executorService;
private Point point; private Point point;

View File

@ -29,7 +29,7 @@ project.extra["PluginName"] = "BlackjackIllumine"
project.extra["PluginDescription"] = "Allows for one-click blackjacking, both knocking out and pickpocketing" project.extra["PluginDescription"] = "Allows for one-click blackjacking, both knocking out and pickpocketing"
dependencies { dependencies {
compileOnly(project(":ibotutils")) compileOnly(project(":iutils"))
} }
tasks { tasks {
@ -39,7 +39,7 @@ tasks {
"Plugin-Version" to project.version, "Plugin-Version" to project.version,
"Plugin-Id" to nameToId(project.extra["PluginName"] as String), "Plugin-Id" to nameToId(project.extra["PluginName"] as String),
"Plugin-Provider" to project.extra["PluginProvider"], "Plugin-Provider" to project.extra["PluginProvider"],
"Plugin-Dependencies" to nameToId("ibotutils"), "Plugin-Dependencies" to nameToId("iutils"),
"Plugin-Description" to project.extra["PluginDescription"], "Plugin-Description" to project.extra["PluginDescription"],
"Plugin-License" to project.extra["PluginLicense"] "Plugin-License" to project.extra["PluginLicense"]
)) ))

View File

@ -50,7 +50,7 @@ import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDependency; import net.runelite.client.plugins.PluginDependency;
import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.plugins.PluginType; 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 net.runelite.client.util.HotkeyListener;
import org.apache.commons.lang3.RandomUtils; import org.apache.commons.lang3.RandomUtils;
import org.pf4j.Extension; import org.pf4j.Extension;
@ -59,7 +59,7 @@ import org.pf4j.Extension;
* Authors gazivodag longstreet * Authors gazivodag longstreet
*/ */
@Extension @Extension
@PluginDependency(iBotUtils.class) @PluginDependency(iUtils.class)
@PluginDescriptor( @PluginDescriptor(
name = "BlackjackIllumine", name = "BlackjackIllumine",
enabledByDefault = false, enabledByDefault = false,
@ -103,7 +103,7 @@ public class BlackjackIllumine extends Plugin
private KeyManager keyManager; private KeyManager keyManager;
@Inject @Inject
private iBotUtils extUtils; private iUtils extUtils;
@Inject @Inject
private Notifier notifier; private Notifier notifier;

View File

@ -29,7 +29,7 @@ project.extra["PluginName"] = "Blast Furnace - Illumine"
project.extra["PluginDescription"] = "Illumine bot for Blast Furnace minigame" project.extra["PluginDescription"] = "Illumine bot for Blast Furnace minigame"
dependencies { dependencies {
compileOnly(project(":ibotutils")) compileOnly(project(":iutils"))
} }
tasks { tasks {
@ -39,7 +39,7 @@ tasks {
"Plugin-Version" to project.version, "Plugin-Version" to project.version,
"Plugin-Id" to nameToId(project.extra["PluginName"] as String), "Plugin-Id" to nameToId(project.extra["PluginName"] as String),
"Plugin-Provider" to project.extra["PluginProvider"], "Plugin-Provider" to project.extra["PluginProvider"],
"Plugin-Dependencies" to nameToId("iBotUtils"), "Plugin-Dependencies" to nameToId("iUtils"),
"Plugin-Description" to project.extra["PluginDescription"], "Plugin-Description" to project.extra["PluginDescription"],
"Plugin-License" to project.extra["PluginLicense"] "Plugin-License" to project.extra["PluginLicense"]
)) ))

View File

@ -53,13 +53,13 @@ import net.runelite.client.plugins.PluginDependency;
import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.plugins.PluginType; import net.runelite.client.plugins.PluginType;
import static net.runelite.client.plugins.blastfurnacebot.BlastFurnaceState.*; 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.OverlayManager;
import net.runelite.client.ui.overlay.infobox.InfoBoxManager; import net.runelite.client.ui.overlay.infobox.InfoBoxManager;
import org.pf4j.Extension; import org.pf4j.Extension;
@Extension @Extension
@PluginDependency(iBotUtils.class) @PluginDependency(iUtils.class)
@PluginDescriptor( @PluginDescriptor(
name = "Blast Furnace - Illumine", name = "Blast Furnace - Illumine",
description = "Illumine bot for Blast Furnace minigame", description = "Illumine bot for Blast Furnace minigame",
@ -105,7 +105,7 @@ public class BlastFurnaceBotPlugin extends Plugin
private BlastFurnaceBotConfig config; private BlastFurnaceBotConfig config;
@Inject @Inject
private iBotUtils utils; private iUtils utils;
BlastFurnaceState state; BlastFurnaceState state;
MenuEntry targetMenu; MenuEntry targetMenu;
@ -401,7 +401,7 @@ public class BlastFurnaceBotPlugin extends Plugin
return FILL_COFFER; return FILL_COFFER;
} }
playerUtils.handleRun(20, 20); 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 { //INVENTORY CONTAINS BARS
openBank(); openBank();
return OPENING_BANK; return OPENING_BANK;

View File

@ -29,7 +29,7 @@ project.extra["PluginName"] = "Motherlode Mine Bot"
project.extra["PluginDescription"] = "Illumine Motherlode Mine bot plugin" project.extra["PluginDescription"] = "Illumine Motherlode Mine bot plugin"
dependencies { dependencies {
compileOnly(project(":ibotutils")) compileOnly(project(":iutils"))
} }
tasks { tasks {
@ -39,7 +39,7 @@ tasks {
"Plugin-Version" to project.version, "Plugin-Version" to project.version,
"Plugin-Id" to nameToId(project.extra["PluginName"] as String), "Plugin-Id" to nameToId(project.extra["PluginName"] as String),
"Plugin-Provider" to project.extra["PluginProvider"], "Plugin-Provider" to project.extra["PluginProvider"],
"Plugin-Dependencies" to nameToId("iBotUtils"), "Plugin-Dependencies" to nameToId("iUtils"),
"Plugin-Description" to project.extra["PluginDescription"], "Plugin-Description" to project.extra["PluginDescription"],
"Plugin-License" to project.extra["PluginLicense"] "Plugin-License" to project.extra["PluginLicense"]
)) ))

View File

@ -49,13 +49,13 @@ import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDependency; import net.runelite.client.plugins.PluginDependency;
import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.plugins.PluginType; 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 static net.runelite.client.plugins.motherlodebot.MotherlodeBotState.*;
import org.pf4j.Extension; import org.pf4j.Extension;
@Extension @Extension
@PluginDependency(iBotUtils.class) @PluginDependency(iUtils.class)
@PluginDescriptor( @PluginDescriptor(
name = "Motherlode Mine Bot", name = "Motherlode Mine Bot",
enabledByDefault = false, enabledByDefault = false,
@ -73,7 +73,7 @@ public class MotherlodeBotPlugin extends Plugin
private MotherlodeBotConfiguration config; private MotherlodeBotConfiguration config;
@Inject @Inject
private iBotUtils utils; private iUtils utils;
@Inject @Inject
private ConfigManager configManager; private ConfigManager configManager;

View File

@ -29,7 +29,7 @@ project.extra["PluginName"] = "Power Skiller"
project.extra["PluginDescription"] = "Illumine auto power skiller plugin" project.extra["PluginDescription"] = "Illumine auto power skiller plugin"
dependencies { dependencies {
compileOnly(project(":ibotutils")) compileOnly(project(":iutils"))
} }
tasks { tasks {
@ -39,7 +39,7 @@ tasks {
"Plugin-Version" to project.version, "Plugin-Version" to project.version,
"Plugin-Id" to nameToId(project.extra["PluginName"] as String), "Plugin-Id" to nameToId(project.extra["PluginName"] as String),
"Plugin-Provider" to project.extra["PluginProvider"], "Plugin-Provider" to project.extra["PluginProvider"],
"Plugin-Dependencies" to nameToId("iBotUtils"), "Plugin-Dependencies" to nameToId("iUtils"),
"Plugin-Description" to project.extra["PluginDescription"], "Plugin-Description" to project.extra["PluginDescription"],
"Plugin-License" to project.extra["PluginLicense"] "Plugin-License" to project.extra["PluginLicense"]
)) ))

View File

@ -43,13 +43,13 @@ import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDependency; import net.runelite.client.plugins.PluginDependency;
import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.plugins.PluginType; 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 static net.runelite.client.plugins.powerskiller.PowerSkillerState.*;
import org.pf4j.Extension; import org.pf4j.Extension;
@Extension @Extension
@PluginDependency(iBotUtils.class) @PluginDependency(iUtils.class)
@PluginDescriptor( @PluginDescriptor(
name = "Power Skiller", name = "Power Skiller",
enabledByDefault = false, enabledByDefault = false,
@ -67,7 +67,7 @@ public class PowerSkillerPlugin extends Plugin
private PowerSkillerConfiguration config; private PowerSkillerConfiguration config;
@Inject @Inject
private iBotUtils utils; private iUtils utils;
@Inject @Inject
private ConfigManager configManager; private ConfigManager configManager;

View File

@ -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" 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 { dependencies {
compileOnly(project(":ibotutils")); compileOnly(project(":iutils"));
} }
tasks { tasks {
@ -39,7 +39,7 @@ tasks {
"Plugin-Version" to project.version, "Plugin-Version" to project.version,
"Plugin-Id" to nameToId(project.extra["PluginName"] as String), "Plugin-Id" to nameToId(project.extra["PluginName"] as String),
"Plugin-Provider" to project.extra["PluginProvider"], "Plugin-Provider" to project.extra["PluginProvider"],
"Plugin-Dependencies" to nameToId("ibotutils"), "Plugin-Dependencies" to nameToId("iutils"),
"Plugin-Description" to project.extra["PluginDescription"], "Plugin-Description" to project.extra["PluginDescription"],
"Plugin-License" to project.extra["PluginLicense"] "Plugin-License" to project.extra["PluginLicense"]
)) ))

View File

@ -41,11 +41,11 @@ import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDependency; import net.runelite.client.plugins.PluginDependency;
import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.plugins.PluginType; import net.runelite.client.plugins.PluginType;
import net.runelite.client.plugins.ibotutils.iBotUtils; import net.runelite.client.plugins.iutils.iUtils;
import org.pf4j.Extension; import org.pf4j.Extension;
@Extension @Extension
@PluginDependency(iBotUtils.class) @PluginDependency(iUtils.class)
@PluginDescriptor( @PluginDescriptor(
name = "Random Handler", name = "Random Handler",
enabledByDefault = false, enabledByDefault = false,
@ -99,7 +99,7 @@ public class RandomHandlerPlugin extends Plugin
private RandomHandlerConfig config; private RandomHandlerConfig config;
@Inject @Inject
private iBotUtils utils; private iUtils utils;
@Provides @Provides
RandomHandlerConfig getConfig(ConfigManager configManager) RandomHandlerConfig getConfig(ConfigManager configManager)

View File

@ -51,7 +51,7 @@ import net.runelite.client.plugins.PluginDependency;
import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.plugins.PluginManager; import net.runelite.client.plugins.PluginManager;
import net.runelite.client.plugins.PluginType; 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 net.runelite.client.ui.overlay.infobox.InfoBoxManager;
import org.pf4j.Extension; import org.pf4j.Extension;
@ -64,7 +64,7 @@ import net.runelite.client.rsb.botLauncher.*;*/
@Extension @Extension
@PluginDependency(iBotUtils.class) @PluginDependency(iUtils.class)
@PluginDescriptor( @PluginDescriptor(
name = "Test", name = "Test",
enabledByDefault = false, enabledByDefault = false,
@ -82,7 +82,7 @@ public class TestPlugin extends Plugin
private TestPluginConfiguration config; private TestPluginConfiguration config;
@Inject @Inject
private iBotUtils utils; private iUtils utils;
@Inject @Inject
private ItemManager itemManager; private ItemManager itemManager;

View File

@ -29,7 +29,7 @@ project.extra["PluginName"] = "Test"
project.extra["PluginDescription"] = "Illumine test plugin" project.extra["PluginDescription"] = "Illumine test plugin"
dependencies { dependencies {
compileOnly(project(":ibotutils")) compileOnly(project(":iutils"))
} }
tasks { tasks {
@ -39,7 +39,7 @@ tasks {
"Plugin-Version" to project.version, "Plugin-Version" to project.version,
"Plugin-Id" to nameToId(project.extra["PluginName"] as String), "Plugin-Id" to nameToId(project.extra["PluginName"] as String),
"Plugin-Provider" to project.extra["PluginProvider"], "Plugin-Provider" to project.extra["PluginProvider"],
"Plugin-Dependencies" to nameToId("ibotutils"), "Plugin-Dependencies" to nameToId("iutils"),
"Plugin-Description" to project.extra["PluginDescription"], "Plugin-Description" to project.extra["PluginDescription"],
"Plugin-License" to project.extra["PluginLicense"] "Plugin-License" to project.extra["PluginLicense"]
)) ))
@ -60,7 +60,7 @@ tasks {
"Plugin-Version" to project.version, "Plugin-Version" to project.version,
"Plugin-Id" to nameToId(project.extra["PluginName"] as String), "Plugin-Id" to nameToId(project.extra["PluginName"] as String),
"Plugin-Provider" to project.extra["PluginProvider"], "Plugin-Provider" to project.extra["PluginProvider"],
"Plugin-Dependencies" to nameToId("ibotutils"), "Plugin-Dependencies" to nameToId("iutils"),
"Plugin-Description" to project.extra["PluginDescription"], "Plugin-Description" to project.extra["PluginDescription"],
"Plugin-License" to project.extra["PluginLicense"] "Plugin-License" to project.extra["PluginLicense"]
)) ))

View File

@ -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;
}
}*/
}

View File

@ -29,7 +29,7 @@ project.extra["PluginName"] = "iCombination Runecrafter Plugin"
project.extra["PluginDescription"] = "Illumine - Combination Runecrafting plugin" project.extra["PluginDescription"] = "Illumine - Combination Runecrafting plugin"
dependencies { dependencies {
compileOnly(project(":ibotutils")) compileOnly(project(":iutils"))
compileOnly(group = "com.owain.externals", name = "chinbreakhandler", version = "0.0.13+") compileOnly(group = "com.owain.externals", name = "chinbreakhandler", version = "0.0.13+")
} }
@ -42,7 +42,7 @@ tasks {
"Plugin-Provider" to project.extra["PluginProvider"], "Plugin-Provider" to project.extra["PluginProvider"],
"Plugin-Dependencies" to "Plugin-Dependencies" to
arrayOf( arrayOf(
nameToId("iBotUtils"), nameToId("iUtils"),
"chinbreakhandler-plugin" "chinbreakhandler-plugin"
).joinToString(), ).joinToString(),
"Plugin-Description" to project.extra["PluginDescription"], "Plugin-Description" to project.extra["PluginDescription"],

View File

@ -58,24 +58,23 @@ import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDependency; import net.runelite.client.plugins.PluginDependency;
import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.plugins.PluginType; import net.runelite.client.plugins.PluginType;
import net.runelite.client.plugins.ibotutils.BankUtils; import net.runelite.client.plugins.iutils.BankUtils;
import net.runelite.client.plugins.ibotutils.CalculationUtils; import net.runelite.client.plugins.iutils.CalculationUtils;
import net.runelite.client.plugins.ibotutils.GrandExchangeUtils; import net.runelite.client.plugins.iutils.InterfaceUtils;
import net.runelite.client.plugins.ibotutils.InterfaceUtils; import net.runelite.client.plugins.iutils.InventoryUtils;
import net.runelite.client.plugins.ibotutils.InventoryUtils; import net.runelite.client.plugins.iutils.MenuUtils;
import net.runelite.client.plugins.ibotutils.MenuUtils; import net.runelite.client.plugins.iutils.MouseUtils;
import net.runelite.client.plugins.ibotutils.MouseUtils; import net.runelite.client.plugins.iutils.ObjectUtils;
import net.runelite.client.plugins.ibotutils.ObjectUtils; import net.runelite.client.plugins.iutils.PlayerUtils;
import net.runelite.client.plugins.ibotutils.PlayerUtils; import net.runelite.client.plugins.iutils.iUtils;
import net.runelite.client.plugins.ibotutils.iBotUtils; import static net.runelite.client.plugins.iutils.iUtils.iterating;
import static net.runelite.client.plugins.ibotutils.iBotUtils.iterating;
import static net.runelite.client.plugins.icombinationrunecrafter.iCombinationRunecrafterState.*; import static net.runelite.client.plugins.icombinationrunecrafter.iCombinationRunecrafterState.*;
import net.runelite.client.ui.overlay.OverlayManager; import net.runelite.client.ui.overlay.OverlayManager;
import org.pf4j.Extension; import org.pf4j.Extension;
@Extension @Extension
@PluginDependency(iBotUtils.class) @PluginDependency(iUtils.class)
@PluginDescriptor( @PluginDescriptor(
name = "iCombination Runecrafter Plugin", name = "iCombination Runecrafter Plugin",
enabledByDefault = false, enabledByDefault = false,
@ -93,7 +92,7 @@ public class iCombinationRunecrafterPlugin extends Plugin
private iCombinationRunecrafterConfig config; private iCombinationRunecrafterConfig config;
@Inject @Inject
private iBotUtils utils; private iUtils utils;
@Inject @Inject
private MouseUtils mouse; private MouseUtils mouse;
@ -119,9 +118,6 @@ public class iCombinationRunecrafterPlugin extends Plugin
@Inject @Inject
private ObjectUtils object; private ObjectUtils object;
@Inject
private GrandExchangeUtils grandExchange;
@Inject @Inject
private ConfigManager configManager; private ConfigManager configManager;

View File

@ -29,7 +29,7 @@ project.extra["PluginName"] = "iMagic Caster"
project.extra["PluginDescription"] = "Illumine automated magic caster" project.extra["PluginDescription"] = "Illumine automated magic caster"
dependencies { dependencies {
compileOnly(project(":ibotutils")) compileOnly(project(":iutils"))
compileOnly(group = "com.owain.externals", name = "chinbreakhandler", version = "0.0.13+") compileOnly(group = "com.owain.externals", name = "chinbreakhandler", version = "0.0.13+")
} }
@ -42,7 +42,7 @@ tasks {
"Plugin-Provider" to project.extra["PluginProvider"], "Plugin-Provider" to project.extra["PluginProvider"],
"Plugin-Dependencies" to "Plugin-Dependencies" to
arrayOf( arrayOf(
nameToId("iBotUtils"), nameToId("iUtils"),
"chinbreakhandler-plugin" "chinbreakhandler-plugin"
).joinToString(), ).joinToString(),
"Plugin-Description" to project.extra["PluginDescription"], "Plugin-Description" to project.extra["PluginDescription"],

View File

@ -55,13 +55,13 @@ import net.runelite.client.plugins.PluginDependency;
import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.plugins.PluginManager; import net.runelite.client.plugins.PluginManager;
import net.runelite.client.plugins.PluginType; import net.runelite.client.plugins.PluginType;
import net.runelite.client.plugins.ibotutils.CalculationUtils; import net.runelite.client.plugins.iutils.CalculationUtils;
import net.runelite.client.plugins.ibotutils.InterfaceUtils; import net.runelite.client.plugins.iutils.InterfaceUtils;
import net.runelite.client.plugins.ibotutils.InventoryUtils; import net.runelite.client.plugins.iutils.InventoryUtils;
import net.runelite.client.plugins.ibotutils.MenuUtils; import net.runelite.client.plugins.iutils.MenuUtils;
import net.runelite.client.plugins.ibotutils.MouseUtils; import net.runelite.client.plugins.iutils.MouseUtils;
import net.runelite.client.plugins.ibotutils.PlayerUtils; import net.runelite.client.plugins.iutils.PlayerUtils;
import net.runelite.client.plugins.ibotutils.iBotUtils; 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_ITEM;
import static net.runelite.client.plugins.imagiccaster.iMagicCasterState.FIND_NPC; import static net.runelite.client.plugins.imagiccaster.iMagicCasterState.FIND_NPC;
import static net.runelite.client.plugins.imagiccaster.iMagicCasterState.HANDLE_BREAK; import static net.runelite.client.plugins.imagiccaster.iMagicCasterState.HANDLE_BREAK;
@ -74,7 +74,7 @@ import org.pf4j.Extension;
@Extension @Extension
@PluginDependency(iBotUtils.class) @PluginDependency(iUtils.class)
@PluginDescriptor( @PluginDescriptor(
name = "iMagic Caster", name = "iMagic Caster",
enabledByDefault = false, enabledByDefault = false,
@ -89,7 +89,7 @@ public class iMagicCasterPlugin extends Plugin
private Client client; private Client client;
@Inject @Inject
private iBotUtils utils; private iUtils utils;
@Inject @Inject
private MouseUtils mouse; private MouseUtils mouse;

View File

@ -29,7 +29,7 @@ project.extra["PluginName"] = "iMenu Debugger Plugin"
project.extra["PluginDescription"] = "Illumine - Menu Debugger plugin" project.extra["PluginDescription"] = "Illumine - Menu Debugger plugin"
dependencies { dependencies {
compileOnly(project(":ibotutils")) compileOnly(project(":iutils"))
} }
tasks { tasks {
@ -39,7 +39,7 @@ tasks {
"Plugin-Version" to project.version, "Plugin-Version" to project.version,
"Plugin-Id" to nameToId(project.extra["PluginName"] as String), "Plugin-Id" to nameToId(project.extra["PluginName"] as String),
"Plugin-Provider" to project.extra["PluginProvider"], "Plugin-Provider" to project.extra["PluginProvider"],
"Plugin-Dependencies" to nameToId("iBotUtils"), "Plugin-Dependencies" to nameToId("iUtils"),
"Plugin-Description" to project.extra["PluginDescription"], "Plugin-Description" to project.extra["PluginDescription"],
"Plugin-License" to project.extra["PluginLicense"] "Plugin-License" to project.extra["PluginLicense"]
)) ))

View File

@ -49,14 +49,14 @@ import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDependency; import net.runelite.client.plugins.PluginDependency;
import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.plugins.PluginType; import net.runelite.client.plugins.PluginType;
import net.runelite.client.plugins.ibotutils.PlayerUtils; import net.runelite.client.plugins.iutils.PlayerUtils;
import net.runelite.client.plugins.ibotutils.iBotUtils; import net.runelite.client.plugins.iutils.iUtils;
import static net.runelite.client.plugins.ibotutils.iBotUtils.iterating; import static net.runelite.client.plugins.iutils.iUtils.iterating;
import org.pf4j.Extension; import org.pf4j.Extension;
@Extension @Extension
@PluginDependency(iBotUtils.class) @PluginDependency(iUtils.class)
@PluginDescriptor( @PluginDescriptor(
name = "iMenu Debugger Plugin", name = "iMenu Debugger Plugin",
enabledByDefault = false, enabledByDefault = false,
@ -74,7 +74,7 @@ public class iMenuDebuggerPlugin extends Plugin
private iMenuDebuggerConfig config; private iMenuDebuggerConfig config;
@Inject @Inject
private iBotUtils utils; private iUtils utils;
@Inject @Inject
private PlayerUtils playerUtils; private PlayerUtils playerUtils;

View File

@ -29,7 +29,7 @@ project.extra["PluginName"] = "iPowerfighter Plugin"
project.extra["PluginDescription"] = "Illumine - Powerfighter plugin" project.extra["PluginDescription"] = "Illumine - Powerfighter plugin"
dependencies { dependencies {
compileOnly(project(":ibotutils")) compileOnly(project(":iutils"))
compileOnly(group = "com.owain.externals", name = "chinbreakhandler", version = "0.0.13+") compileOnly(group = "com.owain.externals", name = "chinbreakhandler", version = "0.0.13+")
} }
@ -42,7 +42,7 @@ tasks {
"Plugin-Provider" to project.extra["PluginProvider"], "Plugin-Provider" to project.extra["PluginProvider"],
"Plugin-Dependencies" to "Plugin-Dependencies" to
arrayOf( arrayOf(
nameToId("iBotUtils"), nameToId("iUtils"),
"chinbreakhandler-plugin" "chinbreakhandler-plugin"
).joinToString(), ).joinToString(),
"Plugin-Description" to project.extra["PluginDescription"], "Plugin-Description" to project.extra["PluginDescription"],

View File

@ -71,24 +71,24 @@ import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDependency; import net.runelite.client.plugins.PluginDependency;
import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.plugins.PluginType; import net.runelite.client.plugins.PluginType;
import net.runelite.client.plugins.ibotutils.CalculationUtils; import net.runelite.client.plugins.iutils.CalculationUtils;
import net.runelite.client.plugins.ibotutils.InterfaceUtils; import net.runelite.client.plugins.iutils.InterfaceUtils;
import net.runelite.client.plugins.ibotutils.InventoryUtils; import net.runelite.client.plugins.iutils.InventoryUtils;
import net.runelite.client.plugins.ibotutils.MenuUtils; import net.runelite.client.plugins.iutils.MenuUtils;
import net.runelite.client.plugins.ibotutils.MouseUtils; import net.runelite.client.plugins.iutils.MouseUtils;
import net.runelite.client.plugins.ibotutils.NPCUtils; import net.runelite.client.plugins.iutils.NPCUtils;
import net.runelite.client.plugins.ibotutils.PlayerUtils; import net.runelite.client.plugins.iutils.PlayerUtils;
import net.runelite.client.plugins.ibotutils.WalkUtils; import net.runelite.client.plugins.iutils.WalkUtils;
import net.runelite.client.plugins.ibotutils.iBotUtils; import net.runelite.client.plugins.iutils.iUtils;
import static net.runelite.client.plugins.ibotutils.iBotUtils.iterating; import static net.runelite.client.plugins.iutils.iUtils.iterating;
import static net.runelite.client.plugins.ibotutils.iBotUtils.sleep; import static net.runelite.client.plugins.iutils.iUtils.sleep;
import net.runelite.client.ui.overlay.OverlayManager; import net.runelite.client.ui.overlay.OverlayManager;
import net.runelite.http.api.osbuddy.OSBGrandExchangeResult; import net.runelite.http.api.osbuddy.OSBGrandExchangeResult;
import org.pf4j.Extension; import org.pf4j.Extension;
@Extension @Extension
@PluginDependency(iBotUtils.class) @PluginDependency(iUtils.class)
@PluginDescriptor( @PluginDescriptor(
name = "iPower Fighter", name = "iPower Fighter",
enabledByDefault = false, enabledByDefault = false,
@ -112,7 +112,7 @@ public class iPowerFighterPlugin extends Plugin
private iPowerFighterOverlay overlay; private iPowerFighterOverlay overlay;
@Inject @Inject
private iBotUtils utils; private iUtils utils;
@Inject @Inject
private MouseUtils mouse; private MouseUtils mouse;

View File

@ -29,7 +29,7 @@ project.extra["PluginName"] = "iPower Skiller"
project.extra["PluginDescription"] = "Illumine auto power skiller plugin" project.extra["PluginDescription"] = "Illumine auto power skiller plugin"
dependencies { dependencies {
compileOnly(project(":ibotutils")) compileOnly(project(":iutils"))
compileOnly(group = "com.owain.externals", name = "chinbreakhandler", version = "0.0.13+") compileOnly(group = "com.owain.externals", name = "chinbreakhandler", version = "0.0.13+")
} }
@ -42,7 +42,7 @@ tasks {
"Plugin-Provider" to project.extra["PluginProvider"], "Plugin-Provider" to project.extra["PluginProvider"],
"Plugin-Dependencies" to "Plugin-Dependencies" to
arrayOf( arrayOf(
nameToId("iBotUtils"), nameToId("iUtils"),
"chinbreakhandler-plugin" "chinbreakhandler-plugin"
).joinToString(), ).joinToString(),
"Plugin-Description" to project.extra["PluginDescription"], "Plugin-Description" to project.extra["PluginDescription"],

View File

@ -55,6 +55,7 @@ import net.runelite.api.events.ItemContainerChanged;
import net.runelite.api.events.MenuOptionClicked; import net.runelite.api.events.MenuOptionClicked;
import net.runelite.api.events.NpcDefinitionChanged; import net.runelite.api.events.NpcDefinitionChanged;
import net.runelite.api.widgets.Widget; import net.runelite.api.widgets.Widget;
import net.runelite.api.widgets.WidgetInfo;
import net.runelite.client.config.ConfigManager; import net.runelite.client.config.ConfigManager;
import net.runelite.client.eventbus.Subscribe; import net.runelite.client.eventbus.Subscribe;
import net.runelite.client.events.ConfigChanged; 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.PluginDescriptor;
import net.runelite.client.plugins.PluginManager; import net.runelite.client.plugins.PluginManager;
import net.runelite.client.plugins.PluginType; import net.runelite.client.plugins.PluginType;
import net.runelite.client.plugins.ibotutils.BankUtils; import net.runelite.client.plugins.iutils.BankUtils;
import net.runelite.client.plugins.ibotutils.CalculationUtils; import net.runelite.client.plugins.iutils.CalculationUtils;
import net.runelite.client.plugins.ibotutils.InterfaceUtils; import net.runelite.client.plugins.iutils.InterfaceUtils;
import net.runelite.client.plugins.ibotutils.InventoryUtils; import net.runelite.client.plugins.iutils.InventoryUtils;
import net.runelite.client.plugins.ibotutils.MenuUtils; import net.runelite.client.plugins.iutils.MenuUtils;
import net.runelite.client.plugins.ibotutils.MouseUtils; import net.runelite.client.plugins.iutils.MouseUtils;
import net.runelite.client.plugins.ibotutils.NPCUtils; import net.runelite.client.plugins.iutils.NPCUtils;
import net.runelite.client.plugins.ibotutils.ObjectUtils; import net.runelite.client.plugins.iutils.ObjectUtils;
import net.runelite.client.plugins.ibotutils.PlayerUtils; import net.runelite.client.plugins.iutils.PlayerUtils;
import net.runelite.client.plugins.ibotutils.WalkUtils; import net.runelite.client.plugins.iutils.WalkUtils;
import net.runelite.client.plugins.ibotutils.iBotUtils; import net.runelite.client.plugins.iutils.iUtils;
import static net.runelite.client.plugins.ibotutils.iBotUtils.iterating; import static net.runelite.client.plugins.iutils.iUtils.iterating;
import static net.runelite.client.plugins.ipowerskiller.iPowerSkillerState.*; import static net.runelite.client.plugins.ipowerskiller.iPowerSkillerState.*;
import net.runelite.client.ui.overlay.OverlayManager; import net.runelite.client.ui.overlay.OverlayManager;
import org.pf4j.Extension; import org.pf4j.Extension;
@Extension @Extension
@PluginDependency(iBotUtils.class) @PluginDependency(iUtils.class)
@PluginDescriptor( @PluginDescriptor(
name = "iPower Skiller", name = "iPower Skiller",
enabledByDefault = false, enabledByDefault = false,
@ -99,7 +100,7 @@ public class iPowerSkillerPlugin extends Plugin
private iPowerSkillerConfiguration config; private iPowerSkillerConfiguration config;
@Inject @Inject
private iBotUtils utils; private iUtils utils;
@Inject @Inject
private MouseUtils mouse; private MouseUtils mouse;
@ -561,6 +562,11 @@ public class iPowerSkillerPlugin extends Plugin
startPowerSkiller = false; startPowerSkiller = false;
return; return;
} }
if (client.getWidget(WidgetInfo.BANK_PIN_CONTAINER) != null) {
log.info("Enter bank pin manually");
utils.sendGameMessage("Enter bank pin manually");
return;
}
state = getState(); state = getState();
beforeLoc = player.getLocalLocation(); beforeLoc = player.getLocalLocation();
switch (state) switch (state)

View File

@ -29,7 +29,7 @@ project.extra["PluginName"] = "iQuick Eater"
project.extra["PluginDescription"] = "Illumine - auto eat food, consume potions and equip items" project.extra["PluginDescription"] = "Illumine - auto eat food, consume potions and equip items"
dependencies { dependencies {
compileOnly(project(":ibotutils")) compileOnly(project(":iutils"))
} }
tasks { tasks {
@ -39,7 +39,7 @@ tasks {
"Plugin-Version" to project.version, "Plugin-Version" to project.version,
"Plugin-Id" to nameToId(project.extra["PluginName"] as String), "Plugin-Id" to nameToId(project.extra["PluginName"] as String),
"Plugin-Provider" to project.extra["PluginProvider"], "Plugin-Provider" to project.extra["PluginProvider"],
"Plugin-Dependencies" to nameToId("iBotUtils"), "Plugin-Dependencies" to nameToId("iUtils"),
"Plugin-Description" to project.extra["PluginDescription"], "Plugin-Description" to project.extra["PluginDescription"],
"Plugin-License" to project.extra["PluginLicense"] "Plugin-License" to project.extra["PluginLicense"]
)) ))

View File

@ -31,6 +31,7 @@ import javax.inject.Inject;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.runelite.api.Client; import net.runelite.api.Client;
import net.runelite.api.GameState; import net.runelite.api.GameState;
import net.runelite.api.InventoryID;
import net.runelite.api.ItemID; import net.runelite.api.ItemID;
import net.runelite.api.MenuEntry; import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode; 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.PluginDependency;
import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.plugins.PluginType; import net.runelite.client.plugins.PluginType;
import net.runelite.client.plugins.ibotutils.CalculationUtils; import net.runelite.client.plugins.iutils.CalculationUtils;
import net.runelite.client.plugins.ibotutils.InventoryUtils; import net.runelite.client.plugins.iutils.InventoryUtils;
import net.runelite.client.plugins.ibotutils.MenuUtils; import net.runelite.client.plugins.iutils.MenuUtils;
import net.runelite.client.plugins.ibotutils.MouseUtils; import net.runelite.client.plugins.iutils.MouseUtils;
import net.runelite.client.plugins.ibotutils.PlayerUtils; import net.runelite.client.plugins.iutils.PlayerUtils;
import net.runelite.client.plugins.ibotutils.iBotUtils; import net.runelite.client.plugins.iutils.iUtils;
import org.pf4j.Extension; import org.pf4j.Extension;
@Extension @Extension
@PluginDependency(iBotUtils.class) @PluginDependency(iUtils.class)
@PluginDescriptor( @PluginDescriptor(
name = "iQuick Eater", name = "iQuick Eater",
enabledByDefault = false, enabledByDefault = false,
@ -79,7 +80,7 @@ public class iQuickEaterPlugin extends Plugin
private iQuickEaterConfiguration config; private iQuickEaterConfiguration config;
@Inject @Inject
private iBotUtils utils; private iUtils utils;
@Inject @Inject
private MouseUtils mouse; private MouseUtils mouse;
@ -211,6 +212,9 @@ public class iQuickEaterPlugin extends Plugin
timeout--; timeout--;
return; return;
} }
if (client.getItemContainer(InventoryID.BANK) != null) {
return;
}
if (client.getBoostedSkillLevel(Skill.HITPOINTS) <= nextEatHP) if (client.getBoostedSkillLevel(Skill.HITPOINTS) <= nextEatHP)
{ {
WidgetItem eatItem = inventory.getItemMenu(itemManager, "Eat", 33, WidgetItem eatItem = inventory.getItemMenu(itemManager, "Eat", 33,

View File

@ -29,7 +29,7 @@ project.extra["PluginName"] = "iRandom Handler"
project.extra["PluginDescription"] = "illumine - Dismiss random events and handle genie" project.extra["PluginDescription"] = "illumine - Dismiss random events and handle genie"
dependencies { dependencies {
compileOnly(project(":ibotutils")) compileOnly(project(":iutils"))
} }
tasks { tasks {
@ -39,7 +39,7 @@ tasks {
"Plugin-Version" to project.version, "Plugin-Version" to project.version,
"Plugin-Id" to nameToId(project.extra["PluginName"] as String), "Plugin-Id" to nameToId(project.extra["PluginName"] as String),
"Plugin-Provider" to project.extra["PluginProvider"], "Plugin-Provider" to project.extra["PluginProvider"],
"Plugin-Dependencies" to nameToId("iBotUtils"), "Plugin-Dependencies" to nameToId("iUtils"),
"Plugin-Description" to project.extra["PluginDescription"], "Plugin-Description" to project.extra["PluginDescription"],
"Plugin-License" to project.extra["PluginLicense"] "Plugin-License" to project.extra["PluginLicense"]
)) ))

View File

@ -47,13 +47,13 @@ import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDependency; import net.runelite.client.plugins.PluginDependency;
import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.plugins.PluginType; import net.runelite.client.plugins.PluginType;
import net.runelite.client.plugins.ibotutils.CalculationUtils; import net.runelite.client.plugins.iutils.CalculationUtils;
import net.runelite.client.plugins.ibotutils.MenuUtils; import net.runelite.client.plugins.iutils.MenuUtils;
import net.runelite.client.plugins.ibotutils.MouseUtils; import net.runelite.client.plugins.iutils.MouseUtils;
import net.runelite.client.plugins.ibotutils.iBotUtils; import net.runelite.client.plugins.iutils.iUtils;
import org.pf4j.Extension; import org.pf4j.Extension;
@PluginDependency(iBotUtils.class) @PluginDependency(iUtils.class)
@Extension @Extension
@PluginDescriptor( @PluginDescriptor(
name = "iRandom Handler", name = "iRandom Handler",
@ -107,7 +107,7 @@ public class iRandomHandlerPlugin extends Plugin
private Client client; private Client client;
@Inject @Inject
private iBotUtils utils; private iUtils utils;
@Inject @Inject
private MouseUtils mouse; private MouseUtils mouse;

View File

@ -29,7 +29,7 @@ project.extra["PluginName"] = "iRooftop Agility"
project.extra["PluginDescription"] = "Illumine automated rooftop agility plugin" project.extra["PluginDescription"] = "Illumine automated rooftop agility plugin"
dependencies { dependencies {
compileOnly(project(":ibotutils")) compileOnly(project(":iutils"))
compileOnly(group = "com.owain.externals", name = "chinbreakhandler", version = "0.0.13+") compileOnly(group = "com.owain.externals", name = "chinbreakhandler", version = "0.0.13+")
} }
@ -42,7 +42,7 @@ tasks {
"Plugin-Provider" to project.extra["PluginProvider"], "Plugin-Provider" to project.extra["PluginProvider"],
"Plugin-Dependencies" to "Plugin-Dependencies" to
arrayOf( arrayOf(
nameToId("iBotUtils"), nameToId("iUtils"),
"chinbreakhandler-plugin" "chinbreakhandler-plugin"
).joinToString(), ).joinToString(),
"Plugin-Description" to project.extra["PluginDescription"], "Plugin-Description" to project.extra["PluginDescription"],

View File

@ -69,21 +69,21 @@ import net.runelite.client.plugins.PluginDependency;
import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.plugins.PluginManager; import net.runelite.client.plugins.PluginManager;
import net.runelite.client.plugins.PluginType; import net.runelite.client.plugins.PluginType;
import net.runelite.client.plugins.ibotutils.BankUtils; import net.runelite.client.plugins.iutils.BankUtils;
import net.runelite.client.plugins.ibotutils.CalculationUtils; import net.runelite.client.plugins.iutils.CalculationUtils;
import net.runelite.client.plugins.ibotutils.InventoryUtils; import net.runelite.client.plugins.iutils.InventoryUtils;
import net.runelite.client.plugins.ibotutils.MenuUtils; import net.runelite.client.plugins.iutils.MenuUtils;
import net.runelite.client.plugins.ibotutils.MouseUtils; import net.runelite.client.plugins.iutils.MouseUtils;
import net.runelite.client.plugins.ibotutils.ObjectUtils; import net.runelite.client.plugins.iutils.ObjectUtils;
import net.runelite.client.plugins.ibotutils.PlayerUtils; import net.runelite.client.plugins.iutils.PlayerUtils;
import net.runelite.client.plugins.ibotutils.iBotUtils; import net.runelite.client.plugins.iutils.iUtils;
import static net.runelite.client.plugins.irooftopagility.iRooftopAgilityState.*; import static net.runelite.client.plugins.irooftopagility.iRooftopAgilityState.*;
import net.runelite.client.ui.overlay.OverlayManager; import net.runelite.client.ui.overlay.OverlayManager;
import org.pf4j.Extension; import org.pf4j.Extension;
@Extension @Extension
@PluginDependency(iBotUtils.class) @PluginDependency(iUtils.class)
@PluginDescriptor( @PluginDescriptor(
name = "iRooftop Agility", name = "iRooftop Agility",
enabledByDefault = false, enabledByDefault = false,
@ -97,7 +97,7 @@ public class iRooftopAgilityPlugin extends Plugin {
private Client client; private Client client;
@Inject @Inject
private iBotUtils utils; private iUtils utils;
@Inject @Inject
private MouseUtils mouse; private MouseUtils mouse;

View File

@ -25,7 +25,7 @@
version = "0.9.0" 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" project.extra["PluginDescription"] = "Illumine - Utils required for plugins to function with added automation"
tasks { tasks {

View File

@ -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 static java.awt.event.KeyEvent.VK_ENTER;
import java.util.ArrayList; import java.util.ArrayList;
@ -21,8 +21,10 @@ import net.runelite.api.widgets.WidgetInfo;
import net.runelite.api.widgets.WidgetItem; import net.runelite.api.widgets.WidgetItem;
import net.runelite.client.callback.ClientThread; import net.runelite.client.callback.ClientThread;
import net.runelite.client.game.ItemManager; import net.runelite.client.game.ItemManager;
import static net.runelite.client.plugins.ibotutils.iBotUtils.iterating; import net.runelite.client.plugins.iutils.InventoryUtils;
import static net.runelite.client.plugins.ibotutils.iBotUtils.sleep; 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 @Slf4j
@Singleton @Singleton

View File

@ -1,4 +1,4 @@
package net.runelite.client.plugins.ibotutils; package net.runelite.client.plugins.iutils;
import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSet;
import java.util.Set; import java.util.Set;

View File

@ -1,4 +1,4 @@
package net.runelite.client.plugins.ibotutils; package net.runelite.client.plugins.iutils;
import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.ThreadLocalRandom;

View File

@ -1,4 +1,4 @@
package net.runelite.client.plugins.ibotutils; package net.runelite.client.plugins.iutils;
import java.awt.Rectangle; import java.awt.Rectangle;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -1,4 +1,4 @@
package net.runelite.client.plugins.ibotutils; package net.runelite.client.plugins.iutils;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import javax.inject.Inject; import javax.inject.Inject;

View File

@ -1,4 +1,4 @@
package net.runelite.client.plugins.ibotutils; package net.runelite.client.plugins.iutils;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; 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.WidgetInfo;
import net.runelite.api.widgets.WidgetItem; import net.runelite.api.widgets.WidgetItem;
import net.runelite.client.game.ItemManager; import net.runelite.client.game.ItemManager;
import static net.runelite.client.plugins.ibotutils.iBotUtils.iterating; import static net.runelite.client.plugins.iutils.iUtils.iterating;
import static net.runelite.client.plugins.ibotutils.iBotUtils.sleep; import static net.runelite.client.plugins.iutils.iUtils.sleep;
@Slf4j @Slf4j
@Singleton @Singleton

View File

@ -1,4 +1,4 @@
package net.runelite.client.plugins.ibotutils; package net.runelite.client.plugins.iutils;
import com.google.inject.Inject; import com.google.inject.Inject;
import java.awt.event.KeyEvent; import java.awt.event.KeyEvent;

View File

@ -1,4 +1,4 @@
package net.runelite.client.plugins.ibotutils; package net.runelite.client.plugins.iutils;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;

View File

@ -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"), ZERO_MOUSE("0x,0y mouse"),
NO_MOVE("No move data"), NO_MOVE("No move data"),
@ -9,7 +9,7 @@ public enum Mouse
public final String name; public final String name;
Mouse(String name) MouseType(String name)
{ {
this.name = name; this.name = name;
} }

View File

@ -1,4 +1,4 @@
package net.runelite.client.plugins.ibotutils; package net.runelite.client.plugins.iutils;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.Rectangle; import java.awt.Rectangle;
@ -10,7 +10,7 @@ import lombok.extern.slf4j.Slf4j;
import net.runelite.api.Client; import net.runelite.api.Client;
import net.runelite.api.Point; import net.runelite.api.Point;
import net.runelite.client.callback.ClientThread; 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; import org.jetbrains.annotations.NotNull;
@Slf4j @Slf4j
@ -22,7 +22,7 @@ public class MouseUtils
private Client client; private Client client;
@Inject @Inject
private iBotUtilsConfig config; private iUtilsConfig config;
@Inject @Inject
private CalculationUtils calc; private CalculationUtils calc;
@ -59,7 +59,6 @@ public class MouseUtils
public void click(Point p) public void click(Point p)
{ {
assert !client.isClientThread(); assert !client.isClientThread();
if (client.isStretchedEnabled()) if (client.isStretchedEnabled())
{ {
final Dimension stretched = client.getStretchedDimensions(); final Dimension stretched = client.getStretchedDimensions();
@ -160,43 +159,64 @@ public class MouseUtils
}); });
} }
/* /**
* * 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 *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) public void handleMouseClick(Point point)
{ {
assert !client.isClientThread(); //assert !client.isClientThread();
final int viewportHeight = client.getViewportHeight(); final int viewportHeight = client.getViewportHeight();
final int viewportWidth = client.getViewportWidth(); final int viewportWidth = client.getViewportWidth();
log.debug("Performing mouse click: {}", config.getMouse()); log.debug("Performing mouse click: {}", config.getMouse());
switch (config.getMouse()) switch (config.getMouse())
{ {
case ZERO_MOUSE:
click(new Point(0, 0));
return;
case MOVE: case MOVE:
if (point.getX() > viewportWidth || point.getY() > viewportHeight || point.getX() < 0 || point.getY() < 0) if (point.getX() > viewportWidth || point.getY() > viewportHeight || point.getX() < 0 || point.getY() < 0)
{ {
clickRandomPointCenter(-100, 100); point = new Point(client.getCenterX() + calc.getRandomIntBetweenRange(-100, 100),
return; client.getCenterY() + calc.getRandomIntBetweenRange(-100, 100));
} }
moveClick(point); break;
return; case ZERO_MOUSE:
point = new Point(0,0);
break;
case NO_MOVE: case NO_MOVE:
if (point.getX() > viewportWidth || point.getY() > viewportHeight || point.getX() < 0 || point.getY() < 0) 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)); point = new Point(client.getCenterX() + calc.getRandomIntBetweenRange(-100, 100),
click(rectPoint); client.getCenterY() + calc.getRandomIntBetweenRange(-100, 100));
return; break;
} }
click(point);
return;
case RECTANGLE: case RECTANGLE:
Point rectPoint = new Point(client.getCenterX() + calc.getRandomIntBetweenRange(-100, 100), client.getCenterY() + calc.getRandomIntBetweenRange(-100, 100)); point = new Point(client.getCenterX() + calc.getRandomIntBetweenRange(-100, 100),
click(rectPoint); 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(); assert !client.isClientThread();
Point point = getClickPoint(rectangle); Point point = getClickPoint(rectangle);
moveClick(point); handleMouseClick(point);
} }
public void delayMouseClick(Point point, long delay) public void delayMouseClick(Point point, long delay)
@ -229,5 +249,4 @@ public class MouseUtils
Point point = getClickPoint(rectangle); Point point = getClickPoint(rectangle);
delayMouseClick(point, delay); delayMouseClick(point, delay);
} }
} }

View File

@ -1,4 +1,4 @@
package net.runelite.client.plugins.ibotutils; package net.runelite.client.plugins.iutils;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;

View File

@ -1,4 +1,4 @@
package net.runelite.client.plugins.ibotutils; package net.runelite.client.plugins.iutils;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; 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.GroundObjectQuery;
import net.runelite.api.queries.TileQuery; import net.runelite.api.queries.TileQuery;
import net.runelite.api.queries.WallObjectQuery; 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 @Slf4j
@Singleton @Singleton

View File

@ -1,4 +1,4 @@
package net.runelite.client.plugins.ibotutils; package net.runelite.client.plugins.iutils;
import java.util.List; import java.util.List;
import net.runelite.api.coords.WorldPoint; import net.runelite.api.coords.WorldPoint;

View File

@ -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.Player;
import net.runelite.api.coords.WorldPoint; import net.runelite.api.coords.WorldPoint;

View File

@ -1,4 +1,4 @@
package net.runelite.client.plugins.ibotutils; package net.runelite.client.plugins.iutils;
import java.awt.Rectangle; import java.awt.Rectangle;
import java.util.ArrayList; 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.Widget;
import net.runelite.api.widgets.WidgetInfo; import net.runelite.api.widgets.WidgetInfo;
import net.runelite.api.widgets.WidgetItem; 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 @Slf4j
@Singleton @Singleton

View File

@ -3,7 +3,7 @@
* All rights reserved. * All rights reserved.
* Licensed under GPL3, see LICENSE for the full scope. * 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 com.google.common.collect.ImmutableMap;
import java.util.Map; import java.util.Map;

View File

@ -22,7 +22,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * 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 com.google.common.collect.ImmutableMap;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;

View File

@ -3,7 +3,7 @@
* All rights reserved. * All rights reserved.
* Licensed under GPL3, see LICENSE for the full scope. * 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 com.google.common.collect.ImmutableMap;
import java.util.Map; import java.util.Map;

View File

@ -3,7 +3,7 @@
* All rights reserved. * All rights reserved.
* Licensed under GPL3, see LICENSE for the full scope. * 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.AllArgsConstructor;
import lombok.Getter; import lombok.Getter;

View File

@ -1,4 +1,4 @@
package net.runelite.client.plugins.ibotutils; package net.runelite.client.plugins.iutils;
import com.google.gson.Gson; import com.google.gson.Gson;
import java.io.IOException; import java.io.IOException;

View File

@ -3,7 +3,7 @@
* All rights reserved. * All rights reserved.
* Licensed under GPL3, see LICENSE for the full scope. * 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 com.google.inject.Provides;
import java.awt.Rectangle; import java.awt.Rectangle;
@ -43,20 +43,20 @@ import org.pf4j.Extension;
*/ */
@Extension @Extension
@PluginDescriptor( @PluginDescriptor(
name = "iBot Utils", name = "iUtils",
type = PluginType.UTILITY, type = PluginType.UTILITY,
description = "Illumine bot utilities", description = "Illumine plugin utilities",
hidden = false hidden = false
) )
@Slf4j @Slf4j
@SuppressWarnings("unused") @SuppressWarnings("unused")
@Singleton @Singleton
public class iBotUtils extends Plugin { public class iUtils extends Plugin {
@Inject @Inject
private Client client; private Client client;
@Inject @Inject
private iBotUtilsConfig config; private iUtilsConfig config;
@Inject @Inject
private MouseUtils mouse; private MouseUtils mouse;
@ -97,8 +97,8 @@ public class iBotUtils extends Plugin {
} }
@Provides @Provides
iBotUtilsConfig provideConfig(ConfigManager configManager) { iUtilsConfig provideConfig(ConfigManager configManager) {
return configManager.getConfig(iBotUtilsConfig.class); return configManager.getConfig(iUtilsConfig.class);
} }
@Override @Override
@ -111,6 +111,8 @@ public class iBotUtils extends Plugin {
executorService.shutdown(); executorService.shutdown();
} }
public void oneClickCastSpell(WidgetInfo spellWidget, MenuEntry targetMenu, long sleepLength) { public void oneClickCastSpell(WidgetInfo spellWidget, MenuEntry targetMenu, long sleepLength) {
menu.setEntry(targetMenu, true); menu.setEntry(targetMenu, true);
mouse.delayMouseClick(new Rectangle(0, 0, 100, 100), sleepLength); mouse.delayMouseClick(new Rectangle(0, 0, 100, 100), sleepLength);

View File

@ -23,15 +23,15 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * 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.Config;
import net.runelite.client.config.ConfigGroup; import net.runelite.client.config.ConfigGroup;
import net.runelite.client.config.ConfigItem; import net.runelite.client.config.ConfigItem;
@ConfigGroup("iBotUtils") @ConfigGroup("iUtils")
public interface iBotUtilsConfig extends Config public interface iUtilsConfig extends Config
{ {
@ConfigItem( @ConfigItem(
keyName = "getMouse", keyName = "getMouse",
@ -39,8 +39,8 @@ public interface iBotUtilsConfig extends Config
description = "Choose a mouse movement style", description = "Choose a mouse movement style",
position = 0 position = 0
) )
default Mouse getMouse() default MouseType getMouse()
{ {
return Mouse.NO_MOVE; return MouseType.NO_MOVE;
} }
} }

View File

@ -29,7 +29,7 @@ project.extra["PluginName"] = "iWorld Walker Plugin"
project.extra["PluginDescription"] = "Illumine - World Walker plugin" project.extra["PluginDescription"] = "Illumine - World Walker plugin"
dependencies { dependencies {
compileOnly(project(":ibotutils")) compileOnly(project(":iutils"))
} }
tasks { tasks {
@ -39,7 +39,7 @@ tasks {
"Plugin-Version" to project.version, "Plugin-Version" to project.version,
"Plugin-Id" to nameToId(project.extra["PluginName"] as String), "Plugin-Id" to nameToId(project.extra["PluginName"] as String),
"Plugin-Provider" to project.extra["PluginProvider"], "Plugin-Provider" to project.extra["PluginProvider"],
"Plugin-Dependencies" to nameToId("iBotUtils"), "Plugin-Dependencies" to nameToId("iUtils"),
"Plugin-Description" to project.extra["PluginDescription"], "Plugin-Description" to project.extra["PluginDescription"],
"Plugin-License" to project.extra["PluginLicense"] "Plugin-License" to project.extra["PluginLicense"]
)) ))

View File

@ -43,16 +43,16 @@ import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDependency; import net.runelite.client.plugins.PluginDependency;
import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.plugins.PluginType; import net.runelite.client.plugins.PluginType;
import net.runelite.client.plugins.ibotutils.CalculationUtils; import net.runelite.client.plugins.iutils.CalculationUtils;
import net.runelite.client.plugins.ibotutils.PlayerUtils; import net.runelite.client.plugins.iutils.PlayerUtils;
import net.runelite.client.plugins.ibotutils.WalkUtils; import net.runelite.client.plugins.iutils.WalkUtils;
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.OverlayManager;
import org.pf4j.Extension; import org.pf4j.Extension;
@Extension @Extension
@PluginDependency(iBotUtils.class) @PluginDependency(iUtils.class)
@PluginDescriptor( @PluginDescriptor(
name = "iWorld Walker Plugin", name = "iWorld Walker Plugin",
enabledByDefault = false, enabledByDefault = false,
@ -76,7 +76,7 @@ public class iWorldWalkerPlugin extends Plugin
private iWorldWalkerOverlay overlay; private iWorldWalkerOverlay overlay;
@Inject @Inject
private iBotUtils utils; private iUtils utils;
@Inject @Inject
private WalkUtils walk; private WalkUtils walk;

View File

@ -26,7 +26,7 @@
rootProject.name = "Illumine Plugins" rootProject.name = "Illumine Plugins"
include(":botutils") include(":botutils")
include(":ibotutils") include(":iutils")
include(":icombinationrunecrafter") include(":icombinationrunecrafter")
include(":imagiccaster") include(":imagiccaster")
include(":imenudebugger") include(":imenudebugger")
@ -36,6 +36,7 @@ include(":iquickeater")
include(":irandomhandler") include(":irandomhandler")
include(":irooftopagility") include(":irooftopagility")
include(":iworldwalker") include(":iworldwalker")
include("testplugin")
for (project in rootProject.children) { for (project in rootProject.children) {
project.apply { project.apply {

View File

@ -0,0 +1,250 @@
/*
* Copyright (c) 2018, SomeoneWithAnInternetConnection
* Copyright (c) 2018, oplosthee <https://github.com/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();
}
}

View File

@ -0,0 +1,164 @@
/*
* Copyright (c) 2018, SomeoneWithAnInternetConnection
* Copyright (c) 2018, oplosthee <https://github.com/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
}
}
}

View File

@ -0,0 +1,48 @@
/*
* Copyright (c) 2019 Owain van Brakel <https://github.com/Owain94>
* 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"]
))
}
}
}