Merge branch 'master' into venom

This commit is contained in:
illumineawake 2021-03-03 09:17:23 +11:00 committed by GitHub
commit cb10000ef2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
93 changed files with 439 additions and 571 deletions

View File

@ -23,7 +23,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
version = "4.9.3" version = "5.1.0"
project.extra["PluginName"] = "BotUtils" project.extra["PluginName"] = "BotUtils"
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"

View File

@ -38,8 +38,8 @@ import net.runelite.api.InventoryID;
import net.runelite.api.Item; import net.runelite.api.Item;
import net.runelite.api.ItemContainer; import net.runelite.api.ItemContainer;
import net.runelite.api.ItemID; import net.runelite.api.ItemID;
import net.runelite.api.MenuAction;
import net.runelite.api.MenuEntry; import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode;
import net.runelite.api.NPC; import net.runelite.api.NPC;
import net.runelite.api.Player; import net.runelite.api.Player;
import net.runelite.api.Point; import net.runelite.api.Point;
@ -75,7 +75,6 @@ import net.runelite.client.eventbus.Subscribe;
import net.runelite.client.game.ItemManager; import net.runelite.client.game.ItemManager;
import net.runelite.client.plugins.Plugin; import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.plugins.PluginType;
import static net.runelite.client.plugins.botutils.Banks.ALL_BANKS; import static net.runelite.client.plugins.botutils.Banks.ALL_BANKS;
import net.runelite.http.api.ge.GrandExchangeClient; import net.runelite.http.api.ge.GrandExchangeClient;
import net.runelite.http.api.osbuddy.OSBGrandExchangeClient; import net.runelite.http.api.osbuddy.OSBGrandExchangeClient;
@ -95,7 +94,6 @@ import org.pf4j.Extension;
@Extension @Extension
@PluginDescriptor( @PluginDescriptor(
name = "BotUtils", name = "BotUtils",
type = PluginType.UTILITY,
description = "Illumine bot utilities", description = "Illumine bot utilities",
hidden = false hidden = false
) )
@ -1061,7 +1059,7 @@ public class BotUtils extends Plugin
coordX = localPoint.getSceneX() + getRandomIntBetweenRange(-Math.abs(rand), Math.abs(rand)); coordX = localPoint.getSceneX() + getRandomIntBetweenRange(-Math.abs(rand), Math.abs(rand));
coordY = localPoint.getSceneY() + getRandomIntBetweenRange(-Math.abs(rand), Math.abs(rand)); coordY = localPoint.getSceneY() + getRandomIntBetweenRange(-Math.abs(rand), Math.abs(rand));
walkAction = true; walkAction = true;
targetMenu = new MenuEntry("Walk here", "", 0, MenuOpcode.WALK.getId(), targetMenu = new MenuEntry("Walk here", "", 0, MenuAction.WALK.getId(),
0, 0, false); 0, 0, false);
delayMouseClick(new Point(0, 0), delay); delayMouseClick(new Point(0, 0), delay);
} }
@ -1074,7 +1072,7 @@ public class BotUtils extends Plugin
coordX = localPoint.getSceneX() + getRandomIntBetweenRange(-Math.abs(rand), Math.abs(rand)); coordX = localPoint.getSceneX() + getRandomIntBetweenRange(-Math.abs(rand), Math.abs(rand));
coordY = localPoint.getSceneY() + getRandomIntBetweenRange(-Math.abs(rand), Math.abs(rand)); coordY = localPoint.getSceneY() + getRandomIntBetweenRange(-Math.abs(rand), Math.abs(rand));
walkAction = true; walkAction = true;
targetMenu = new MenuEntry("Walk here", "", 0, MenuOpcode.WALK.getId(), targetMenu = new MenuEntry("Walk here", "", 0, MenuAction.WALK.getId(),
0, 0, false); 0, 0, false);
delayMouseClick(new Point(0, 0), delay); delayMouseClick(new Point(0, 0), delay);
} }
@ -1310,7 +1308,7 @@ public class BotUtils extends Plugin
if (staminaPotion != null) if (staminaPotion != null)
{ {
log.info("using stamina potion"); log.info("using stamina potion");
targetMenu = new MenuEntry("", "", staminaPotion.getId(), MenuOpcode.ITEM_FIRST_OPTION.getId(), staminaPotion.getIndex(), 9764864, false); targetMenu = new MenuEntry("", "", staminaPotion.getId(), MenuAction.ITEM_FIRST_OPTION.getId(), staminaPotion.getIndex(), 9764864, false);
delayMouseClick(staminaPotion.getCanvasBounds(), getRandomIntBetweenRange(5, 200)); delayMouseClick(staminaPotion.getCanvasBounds(), getRandomIntBetweenRange(5, 200));
return true; return true;
} }
@ -1320,7 +1318,7 @@ public class BotUtils extends Plugin
public void logout() public void logout()
{ {
int param1 = (client.getWidget(WidgetInfo.LOGOUT_BUTTON) != null) ? 11927560 : 4522007; int param1 = (client.getWidget(WidgetInfo.LOGOUT_BUTTON) != null) ? 11927560 : 4522007;
targetMenu = new MenuEntry("", "", 1, MenuOpcode.CC_OP.getId(), -1, param1, false); targetMenu = new MenuEntry("", "", 1, MenuAction.CC_OP.getId(), -1, param1, false);
Widget logoutWidget = client.getWidget(WidgetInfo.LOGOUT_BUTTON); Widget logoutWidget = client.getWidget(WidgetInfo.LOGOUT_BUTTON);
if (logoutWidget != null) if (logoutWidget != null)
{ {
@ -1494,7 +1492,7 @@ public class BotUtils extends Plugin
{ {
continue; continue;
} }
String[] menuActions = itemManager.getItemDefinition(item.getId()).getInventoryActions(); String[] menuActions = itemManager.getItemComposition(item.getId()).getInventoryActions();
for (String action : menuActions) for (String action : menuActions)
{ {
if (action != null && action.equals(menuOption)) if (action != null && action.equals(menuOption))
@ -1515,7 +1513,7 @@ public class BotUtils extends Plugin
Collection<WidgetItem> items = inventoryWidget.getWidgetItems(); Collection<WidgetItem> items = inventoryWidget.getWidgetItems();
for (WidgetItem item : items) for (WidgetItem item : items)
{ {
String[] menuActions = itemManager.getItemDefinition(item.getId()).getInventoryActions(); String[] menuActions = itemManager.getItemComposition(item.getId()).getInventoryActions();
for (String action : menuActions) for (String action : menuActions)
{ {
if (action != null && menuOptions.contains(action)) if (action != null && menuOptions.contains(action))
@ -1536,7 +1534,7 @@ public class BotUtils extends Plugin
Collection<WidgetItem> items = inventoryWidget.getWidgetItems(); Collection<WidgetItem> items = inventoryWidget.getWidgetItems();
for (WidgetItem item : items) for (WidgetItem item : items)
{ {
String[] menuActions = itemManager.getItemDefinition(item.getId()).getInventoryActions(); String[] menuActions = itemManager.getItemComposition(item.getId()).getInventoryActions();
for (String action : menuActions) for (String action : menuActions)
{ {
if (action != null && action.equals(menuOption)) if (action != null && action.equals(menuOption))
@ -1736,7 +1734,7 @@ public class BotUtils extends Plugin
{ {
assert !client.isClientThread(); assert !client.isClientThread();
targetMenu = new MenuEntry("", "", item.getId(), MenuOpcode.ITEM_DROP.getId(), item.getIndex(), 9764864, false); targetMenu = new MenuEntry("", "", item.getId(), MenuAction.ITEM_FIFTH_OPTION.getId(), item.getIndex(), 9764864, false);
click(item.getCanvasBounds()); click(item.getCanvasBounds());
} }
@ -1878,7 +1876,7 @@ public class BotUtils extends Plugin
log.info("interacting inventory item: {}", item.getId()); log.info("interacting inventory item: {}", item.getId());
sleep(minDelayBetween, maxDelayBetween); sleep(minDelayBetween, maxDelayBetween);
setModifiedMenuEntry(new MenuEntry("", "", item1.getId(), opcode, item1.getIndex(), WidgetInfo.INVENTORY.getId(), setModifiedMenuEntry(new MenuEntry("", "", item1.getId(), opcode, item1.getIndex(), WidgetInfo.INVENTORY.getId(),
false), item.getId(), item.getIndex(), MenuOpcode.ITEM_USE_ON_WIDGET_ITEM.getId()); false), item.getId(), item.getIndex(), MenuAction.ITEM_USE_ON_WIDGET_ITEM.getId());
click(item1.getCanvasBounds()); click(item1.getCanvasBounds());
if (!interactAll) if (!interactAll)
{ {
@ -1975,7 +1973,7 @@ public class BotUtils extends Plugin
{ {
return; return;
} }
targetMenu = new MenuEntry("", "", 1, MenuOpcode.CC_OP.getId(), 11, 786434, false); //close bank targetMenu = new MenuEntry("", "", 1, MenuAction.CC_OP.getId(), 11, 786434, false); //close bank
Widget bankCloseWidget = client.getWidget(WidgetInfo.BANK_PIN_EXIT_BUTTON); Widget bankCloseWidget = client.getWidget(WidgetInfo.BANK_PIN_EXIT_BUTTON);
if (bankCloseWidget != null) if (bankCloseWidget != null)
{ {
@ -1987,8 +1985,8 @@ public class BotUtils extends Plugin
public int getBankMenuOpcode(int bankID) public int getBankMenuOpcode(int bankID)
{ {
return Banks.BANK_CHECK_BOX.contains(bankID) ? MenuOpcode.GAME_OBJECT_FIRST_OPTION.getId() : return Banks.BANK_CHECK_BOX.contains(bankID) ? MenuAction.GAME_OBJECT_FIRST_OPTION.getId() :
MenuOpcode.GAME_OBJECT_SECOND_OPTION.getId(); MenuAction.GAME_OBJECT_SECOND_OPTION.getId();
} }
//doesn't NPE //doesn't NPE
@ -2000,7 +1998,7 @@ public class BotUtils extends Plugin
for (Item item : bankItemContainer.getItems()) for (Item item : bankItemContainer.getItems())
{ {
if (itemManager.getItemDefinition(item.getId()).getName().equalsIgnoreCase(itemName)) if (itemManager.getItemComposition(item.getId()).getName().equalsIgnoreCase(itemName))
{ {
return true; return true;
} }
@ -2047,7 +2045,7 @@ public class BotUtils extends Plugin
for (Item item : bankItemContainer.getItems()) for (Item item : bankItemContainer.getItems())
{ {
if (itemManager.getItemDefinition(item.getId()).getName().equalsIgnoreCase(itemName) && item.getQuantity() >= minStackAmount) if (itemManager.getItemComposition(item.getId()).getName().equalsIgnoreCase(itemName) && item.getQuantity() >= minStackAmount)
{ {
return true; return true;
} }
@ -2165,11 +2163,11 @@ public class BotUtils extends Plugin
Widget depositInventoryWidget = client.getWidget(WidgetInfo.BANK_DEPOSIT_INVENTORY); Widget depositInventoryWidget = client.getWidget(WidgetInfo.BANK_DEPOSIT_INVENTORY);
if (isDepositBoxOpen()) if (isDepositBoxOpen())
{ {
targetMenu = new MenuEntry("", "", 1, MenuOpcode.CC_OP.getId(), -1, 12582916, false); //deposit all in bank interface targetMenu = new MenuEntry("", "", 1, MenuAction.CC_OP.getId(), -1, 12582916, false); //deposit all in bank interface
} }
else else
{ {
targetMenu = new MenuEntry("", "", 1, MenuOpcode.CC_OP.getId(), -1, 786473, false); //deposit all in bank interface targetMenu = new MenuEntry("", "", 1, MenuAction.CC_OP.getId(), -1, 786473, false); //deposit all in bank interface
} }
if ((depositInventoryWidget != null)) if ((depositInventoryWidget != null))
{ {
@ -2225,7 +2223,7 @@ public class BotUtils extends Plugin
return; return;
} }
boolean depositBox = isDepositBoxOpen(); boolean depositBox = isDepositBoxOpen();
targetMenu = new MenuEntry("", "", (depositBox) ? 1 : 8, MenuOpcode.CC_OP.getId(), item.getIndex(), targetMenu = new MenuEntry("", "", (depositBox) ? 1 : 8, MenuAction.CC_OP.getId(), item.getIndex(),
(depositBox) ? 12582914 : 983043, false); (depositBox) ? 12582914 : 983043, false);
click(item.getCanvasBounds()); click(item.getCanvasBounds());
} }
@ -2281,7 +2279,7 @@ public class BotUtils extends Plugin
} }
boolean depositBox = isDepositBoxOpen(); boolean depositBox = isDepositBoxOpen();
targetMenu = new MenuEntry("", "", (client.getVarbitValue(6590) == 0) ? 2 : 3, MenuOpcode.CC_OP.getId(), item.getIndex(), targetMenu = new MenuEntry("", "", (client.getVarbitValue(6590) == 0) ? 2 : 3, MenuAction.CC_OP.getId(), item.getIndex(),
(depositBox) ? 12582914 : 983043, false); (depositBox) ? 12582914 : 983043, false);
delayMouseClick(item.getCanvasBounds(), getRandomIntBetweenRange(0, 50)); delayMouseClick(item.getCanvasBounds(), getRandomIntBetweenRange(0, 50));
} }
@ -2299,7 +2297,7 @@ public class BotUtils extends Plugin
{ {
executorService.submit(() -> executorService.submit(() ->
{ {
targetMenu = new MenuEntry("Withdraw-All", "", 7, MenuOpcode.CC_OP.getId(), bankItemWidget.getIndex(), 786444, false); targetMenu = new MenuEntry("Withdraw-All", "", 7, MenuAction.CC_OP.getId(), bankItemWidget.getIndex(), 786444, false);
clickRandomPointCenter(-200, 200); clickRandomPointCenter(-200, 200);
}); });
} }
@ -2321,7 +2319,7 @@ public class BotUtils extends Plugin
{ {
executorService.submit(() -> executorService.submit(() ->
{ {
targetMenu = new MenuEntry("", "", (client.getVarbitValue(6590) == 0) ? 1 : 2, MenuOpcode.CC_OP.getId(), bankItemWidget.getIndex(), 786444, false); targetMenu = new MenuEntry("", "", (client.getVarbitValue(6590) == 0) ? 1 : 2, MenuAction.CC_OP.getId(), bankItemWidget.getIndex(), 786444, false);
setMenuEntry(targetMenu); setMenuEntry(targetMenu);
clickRandomPointCenter(-200, 200); clickRandomPointCenter(-200, 200);
}); });
@ -2358,7 +2356,7 @@ public class BotUtils extends Plugin
identifier = 6; identifier = 6;
break; break;
} }
targetMenu = new MenuEntry("", "", identifier, MenuOpcode.CC_OP.getId(), item.getIndex(), 786444, false); targetMenu = new MenuEntry("", "", identifier, MenuAction.CC_OP.getId(), item.getIndex(), 786444, false);
setMenuEntry(targetMenu); setMenuEntry(targetMenu);
delayClickRandomPointCenter(-200, 200, 50); delayClickRandomPointCenter(-200, 200, 50);
if (identifier == 6) if (identifier == 6)
@ -2381,25 +2379,20 @@ public class BotUtils extends Plugin
public OSBGrandExchangeResult getOSBItem(int itemId) public OSBGrandExchangeResult getOSBItem(int itemId)
{ {
log.debug("Looking up OSB item price {}", itemId); log.debug("Looking up OSB item price {}", itemId);
osbGrandExchangeClient.lookupItem(itemId) try
.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; final OSBGrandExchangeResult result = osbGrandExchangeClient.lookupItem(itemId);
if (result != null && result.getOverall_average() > 0)
{
return result;
}
} }
else catch (IOException e)
{ {
return null; log.debug("Error getting price of item {}", itemId, e);
} }
return null;
} }
/** /**
@ -2596,7 +2589,7 @@ public class BotUtils extends Plugin
@Subscribe @Subscribe
private void onMenuEntryAdded(MenuEntryAdded event) private void onMenuEntryAdded(MenuEntryAdded event)
{ {
if (event.getOpcode() == MenuOpcode.CC_OP.getId() && (event.getParam1() == WidgetInfo.WORLD_SWITCHER_LIST.getId() || if (event.getOpcode() == MenuAction.CC_OP.getId() && (event.getParam1() == WidgetInfo.WORLD_SWITCHER_LIST.getId() ||
event.getParam1() == 11927560 || event.getParam1() == 4522007 || event.getParam1() == 24772686)) event.getParam1() == 11927560 || event.getParam1() == 4522007 || event.getParam1() == 24772686))
{ {
return; return;
@ -2614,8 +2607,8 @@ public class BotUtils extends Plugin
@Subscribe @Subscribe
private void onMenuOptionClicked(MenuOptionClicked event) private void onMenuOptionClicked(MenuOptionClicked event)
{ {
if (event.getOpcode() == MenuOpcode.CC_OP.getId() && (event.getParam1() == WidgetInfo.WORLD_SWITCHER_LIST.getId() || if (event.getMenuAction() == MenuAction.CC_OP && (event.getWidgetId() == WidgetInfo.WORLD_SWITCHER_LIST.getId() ||
event.getParam1() == 11927560 || event.getParam1() == 4522007 || event.getParam1() == 24772686)) event.getWidgetId() == 11927560 || event.getWidgetId() == 4522007 || event.getWidgetId() == 24772686))
{ {
//Either logging out or world-hopping which is handled by 3rd party plugins so let them have priority //Either logging out or world-hopping which is handled by 3rd party plugins so let them have priority
log.info("Received world-hop/login related click. Giving them priority"); log.info("Received world-hop/login related click. Giving them priority");
@ -2624,15 +2617,17 @@ public class BotUtils extends Plugin
} }
if (targetMenu != null) if (targetMenu != null)
{ {
event.consume();
if (consumeClick) if (consumeClick)
{ {
event.consume();
log.info("Consuming a click and not sending anything else"); log.info("Consuming a click and not sending anything else");
consumeClick = false; consumeClick = false;
return; return;
} }
if (event.getOption().equals("Walk here") && walkAction) if (event.getMenuOption().equals("Walk here") && walkAction)
{ {
event.consume();
log.debug("Walk action"); log.debug("Walk action");
walkTile(coordX, coordY); walkTile(coordX, coordY);
walkAction = false; walkAction = false;
@ -2644,16 +2639,26 @@ public class BotUtils extends Plugin
client.setSelectedItemSlot(modifiedItemIndex); client.setSelectedItemSlot(modifiedItemIndex);
client.setSelectedItemID(modifiedItemID); client.setSelectedItemID(modifiedItemID);
log.info("doing a Modified MOC, mod ID: {}, mod index: {}, param1: {}", modifiedItemID, modifiedItemIndex, targetMenu.getParam1()); log.info("doing a Modified MOC, mod ID: {}, mod index: {}, param1: {}", modifiedItemID, modifiedItemIndex, targetMenu.getParam1());
client.invokeMenuAction(targetMenu.getOption(), targetMenu.getTarget(), targetMenu.getIdentifier(), modifiedOpCode, menuAction(event,targetMenu.getOption(), targetMenu.getTarget(), targetMenu.getIdentifier(), MenuAction.of(modifiedOpCode),
targetMenu.getParam0(), targetMenu.getParam1()); targetMenu.getParam0(), targetMenu.getParam1());
modifiedMenu = false; modifiedMenu = false;
} }
else else
{ {
client.invokeMenuAction(targetMenu.getOption(), targetMenu.getTarget(), targetMenu.getIdentifier(), targetMenu.getOpcode(), menuAction(event,targetMenu.getOption(), targetMenu.getTarget(), targetMenu.getIdentifier(), targetMenu.getMenuAction(),
targetMenu.getParam0(), targetMenu.getParam1()); targetMenu.getParam0(), targetMenu.getParam1());
} }
targetMenu = null; targetMenu = null;
} }
} }
public void menuAction(MenuOptionClicked menuOptionClicked, String option, String target, int identifier, MenuAction menuAction, int param0, int param1)
{
menuOptionClicked.setMenuOption(option);
menuOptionClicked.setMenuTarget(target);
menuOptionClicked.setId(identifier);
menuOptionClicked.setMenuAction(menuAction);
menuOptionClicked.setActionParam(param0);
menuOptionClicked.setWidgetId(param1);
}
} }

View File

@ -67,7 +67,6 @@ subprojects {
implementation(group = "com.google.guava", name = "guava", version = "29.0-jre") implementation(group = "com.google.guava", name = "guava", version = "29.0-jre")
implementation(group = "com.google.inject", name = "guice", version = "4.2.3", classifier = "no_aop") implementation(group = "com.google.inject", name = "guice", version = "4.2.3", classifier = "no_aop")
implementation(group = "com.squareup.okhttp3", name = "okhttp", version = "4.9.0") implementation(group = "com.squareup.okhttp3", name = "okhttp", version = "4.9.0")
implementation(group = "io.reactivex.rxjava3", name = "rxjava", version = "3.0.6")
implementation(group = "net.sf.jopt-simple", name = "jopt-simple", version = "5.0.4") implementation(group = "net.sf.jopt-simple", name = "jopt-simple", version = "5.0.4")
implementation(group = "org.apache.commons", name = "commons-text", version = "1.9") implementation(group = "org.apache.commons", name = "commons-text", version = "1.9")
implementation(group = "org.pf4j", name = "pf4j", version = "3.4.1") implementation(group = "org.pf4j", name = "pf4j", version = "3.4.1")

View File

@ -25,8 +25,8 @@
*/ */
object ProjectVersions { object ProjectVersions {
const val openosrsVersion = "3.5.4" const val openosrsVersion = "4.0.0"
const val apiVersion = "0.0.1" const val apiVersion = "^1.0.0"
} }
object Libraries { object Libraries {
@ -38,7 +38,6 @@ object Libraries {
const val okhttp3 = "4.2.2" const val okhttp3 = "4.2.2"
const val pf4j = "3.2.0" const val pf4j = "3.2.0"
const val slf4j = "1.7.30" const val slf4j = "1.7.30"
const val rxjava = "2.2.14"
} }
const val apacheCommonsText = "org.apache.commons:commons-text:${Versions.apacheCommonsText}" const val apacheCommonsText = "org.apache.commons:commons-text:${Versions.apacheCommonsText}"
@ -48,6 +47,5 @@ object Libraries {
const val okhttp3 = "com.squareup.okhttp3:okhttp:${Versions.okhttp3}" const val okhttp3 = "com.squareup.okhttp3:okhttp:${Versions.okhttp3}"
const val pf4j = "org.pf4j:pf4j:${Versions.pf4j}" const val pf4j = "org.pf4j:pf4j:${Versions.pf4j}"
const val slf4j = "org.slf4j:slf4j-api:${Versions.slf4j}" const val slf4j = "org.slf4j:slf4j-api:${Versions.slf4j}"
const val rxjava = "io.reactivex.rxjava2:rxjava:${Versions.rxjava}"
} }

View File

@ -23,7 +23,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
version = "1.3.3" version = "2.1.0"
project.extra["PluginName"] = "iBlackjack" project.extra["PluginName"] = "iBlackjack"
project.extra["PluginDescription"] = "Illumine - Blackjack plugin" project.extra["PluginDescription"] = "Illumine - Blackjack plugin"

View File

@ -29,25 +29,20 @@ import net.runelite.client.config.Button;
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;
import net.runelite.client.config.ConfigSection; import net.runelite.client.config.ConfigTitle;
import net.runelite.client.config.ConfigTitleSection;
import net.runelite.client.config.Range; import net.runelite.client.config.Range;
import net.runelite.client.config.Title;
@ConfigGroup("iBlackjack") @ConfigGroup("iBlackjack")
public interface iBlackjackConfig extends Config public interface iBlackjackConfig extends Config
{ {
@ConfigSection( @ConfigTitle(
keyName = "delayConfig", keyName = "delayConfig",
name = "Sleep Delay Configuration", name = "Sleep Delay Configuration",
description = "Configure how the bot handles sleep delays", description = "Configure how the bot handles sleep delays",
position = 0 position = 0
) )
default boolean delayConfig() String delayConfig = "delayConfig";
{
return false;
}
@Range( @Range(
min = 0, min = 0,
@ -125,16 +120,13 @@ public interface iBlackjackConfig extends Config
return false; return false;
} }
@ConfigSection( @ConfigTitle(
keyName = "delayTickConfig", keyName = "delayTickConfig",
name = "Game Tick Configuration", name = "Game Tick Configuration",
description = "Configure how the bot handles game tick delays, 1 game tick equates to roughly 600ms", description = "Configure how the bot handles game tick delays, 1 game tick equates to roughly 600ms",
position = 10 position = 10
) )
default boolean delayTickConfig() String delayTickConfig = "delayTickConfig";
{
return false;
}
@Range( @Range(
min = 0, min = 0,
@ -212,23 +204,20 @@ public interface iBlackjackConfig extends Config
return false; return false;
} }
@ConfigTitleSection( @ConfigTitle(
keyName = "instructionsTitle", keyName = "instructionsTitle",
name = "Instructions", name = "Instructions",
description = "", description = "",
position = 16 position = 16
) )
default Title instructionsTitle() String instructionsTitle = "instructionsTitle";
{
return new Title();
}
@ConfigItem( @ConfigItem(
keyName = "instructions", keyName = "instructions",
name = "", name = "",
description = "Instructions. Don't enter anything into this field", description = "Instructions. Don't enter anything into this field",
position = 17, position = 17,
titleSection = "instructionsTitle" title = "instructionsTitle"
) )
default String instructions() default String instructions()
{ {

View File

@ -9,14 +9,14 @@ import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.runelite.api.Client; import net.runelite.api.Client;
import static net.runelite.api.MenuOpcode.RUNELITE_OVERLAY_CONFIG; import static net.runelite.api.MenuAction.RUNELITE_OVERLAY_CONFIG;
import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE; import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE;
import net.runelite.client.ui.overlay.OverlayMenuEntry; import net.runelite.client.ui.overlay.OverlayMenuEntry;
import net.runelite.client.ui.overlay.OverlayPanel; import net.runelite.client.ui.overlay.OverlayPanel;
import net.runelite.client.ui.overlay.OverlayPosition; import net.runelite.client.ui.overlay.OverlayPosition;
import net.runelite.client.ui.overlay.components.TitleComponent; import net.runelite.client.ui.overlay.components.TitleComponent;
import net.runelite.client.ui.overlay.components.table.TableAlignment; import com.openosrs.client.ui.overlay.components.table.TableAlignment;
import net.runelite.client.ui.overlay.components.table.TableComponent; import com.openosrs.client.ui.overlay.components.table.TableComponent;
import net.runelite.client.util.ColorUtil; import net.runelite.client.util.ColorUtil;
import static org.apache.commons.lang3.time.DurationFormatUtils.formatDuration; import static org.apache.commons.lang3.time.DurationFormatUtils.formatDuration;

View File

@ -49,7 +49,6 @@ import net.runelite.client.eventbus.Subscribe;
import net.runelite.client.plugins.Plugin; 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.iblackjack.tasks.BreakTask; import net.runelite.client.plugins.iblackjack.tasks.BreakTask;
import net.runelite.client.plugins.iblackjack.tasks.DropTask; import net.runelite.client.plugins.iblackjack.tasks.DropTask;
import net.runelite.client.plugins.iblackjack.tasks.EatTask; import net.runelite.client.plugins.iblackjack.tasks.EatTask;
@ -77,8 +76,7 @@ import org.pf4j.Extension;
name = "iBlackjack Helper", name = "iBlackjack Helper",
enabledByDefault = false, enabledByDefault = false,
description = "Illumine - Blackjack helper plugin. Handles knocking out and pickpocketing bandits", description = "Illumine - Blackjack helper plugin. Handles knocking out and pickpocketing bandits",
tags = {"illumine", "thieving", "blackjack", "helper", "bot"}, tags = {"illumine", "thieving", "blackjack", "helper", "bot"}
type = PluginType.MISCELLANEOUS
) )
@Slf4j @Slf4j
public class iBlackjackPlugin extends Plugin public class iBlackjackPlugin extends Plugin
@ -337,11 +335,11 @@ public class iBlackjackPlugin extends Plugin
{ {
return; return;
} }
if (event.getOption().equals("Knock-Out") && selectedNPCIndex == 0) if (event.getMenuOption().equals("Knock-Out") && selectedNPCIndex == 0)
{ {
final int ticks = (config.random()) ? RandomUtils.nextInt(3, 4) : 4; final int ticks = (config.random()) ? RandomUtils.nextInt(3, 4) : 4;
nextKnockoutTick = client.getTickCount() + ticks; nextKnockoutTick = client.getTickCount() + ticks;
selectedNPCIndex = event.getIdentifier(); selectedNPCIndex = event.getId();
} }
} }
} }

View File

@ -4,8 +4,9 @@ import java.util.List;
import javax.inject.Inject; import javax.inject.Inject;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.runelite.api.ItemID; import net.runelite.api.ItemID;
import net.runelite.api.MenuAction;
import net.runelite.api.MenuEntry; import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode; import net.runelite.api.MenuAction;
import net.runelite.api.events.GameTick; import net.runelite.api.events.GameTick;
import net.runelite.api.widgets.WidgetInfo; import net.runelite.api.widgets.WidgetInfo;
import net.runelite.api.widgets.WidgetItem; import net.runelite.api.widgets.WidgetItem;
@ -45,7 +46,7 @@ public class DropTask extends Task
long sleep = 0; long sleep = 0;
for (WidgetItem jug : jugs) for (WidgetItem jug : jugs)
{ {
entry = new MenuEntry("", "", jug.getId(), MenuOpcode.ITEM_DROP.getId(), jug.getIndex(), entry = new MenuEntry("", "", jug.getId(), MenuAction.ITEM_FIFTH_OPTION.getId(), jug.getIndex(),
WidgetInfo.INVENTORY.getId(), false); WidgetInfo.INVENTORY.getId(), false);
sleep += sleepDelay(); sleep += sleepDelay();
log.info("Adding jug: {}, delay time: {}", jug.getIndex(), sleep); log.info("Adding jug: {}, delay time: {}", jug.getIndex(), sleep);

View File

@ -3,7 +3,7 @@ package net.runelite.client.plugins.iblackjack.tasks;
import java.util.Set; import java.util.Set;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.runelite.api.MenuEntry; import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode; import net.runelite.api.MenuAction;
import net.runelite.api.Skill; import net.runelite.api.Skill;
import net.runelite.api.events.GameTick; import net.runelite.api.events.GameTick;
import net.runelite.api.widgets.WidgetInfo; import net.runelite.api.widgets.WidgetInfo;
@ -37,7 +37,7 @@ public class EatTask extends Task
WidgetItem food = inventory.getItemMenu(foodMenu); WidgetItem food = inventory.getItemMenu(foodMenu);
if (food != null) if (food != null)
{ {
entry = new MenuEntry("", "", food.getId(), MenuOpcode.ITEM_FIRST_OPTION.getId(), entry = new MenuEntry("", "", food.getId(), MenuAction.ITEM_FIRST_OPTION.getId(),
food.getIndex(), WidgetInfo.INVENTORY.getId(), false); food.getIndex(), WidgetInfo.INVENTORY.getId(), false);
utils.doActionMsTime(entry, food.getCanvasBounds(), sleepDelay()); utils.doActionMsTime(entry, food.getCanvasBounds(), sleepDelay());
eatHP = calc.getRandomIntBetweenRange(config.minEatHP(), config.maxEatHP()); eatHP = calc.getRandomIntBetweenRange(config.minEatHP(), config.maxEatHP());

View File

@ -7,7 +7,7 @@ import javax.inject.Inject;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.runelite.api.GameState; import net.runelite.api.GameState;
import net.runelite.api.MenuEntry; import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode; import net.runelite.api.MenuAction;
import net.runelite.api.Point; import net.runelite.api.Point;
import net.runelite.api.coords.WorldArea; import net.runelite.api.coords.WorldArea;
import net.runelite.api.coords.WorldPoint; import net.runelite.api.coords.WorldPoint;
@ -167,7 +167,7 @@ public class HopTask extends Task
if (isShopOpen()) if (isShopOpen())
{ {
status = "Close shop and hop"; status = "Close shop and hop";
entry = new MenuEntry("", "", 1, MenuOpcode.CC_OP.getId(), 11, 19660801, false); entry = new MenuEntry("", "", 1, MenuAction.CC_OP.getId(), 11, 19660801, false);
utils.doActionMsTime(entry, new Point(0, 0), sleepDelay()); utils.doActionMsTime(entry, new Point(0, 0), sleepDelay());
shouldHop = true; shouldHop = true;
} }

View File

@ -2,7 +2,7 @@ package net.runelite.client.plugins.iblackjack.tasks;
import java.util.Set; import java.util.Set;
import net.runelite.api.MenuEntry; import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode; import net.runelite.api.MenuAction;
import net.runelite.api.NPC; import net.runelite.api.NPC;
import net.runelite.api.events.GameTick; import net.runelite.api.events.GameTick;
import net.runelite.client.plugins.iblackjack.Task; import net.runelite.client.plugins.iblackjack.Task;
@ -36,7 +36,7 @@ public class KnockoutTask extends Task
@Override @Override
public void onGameTick(GameTick event) public void onGameTick(GameTick event)
{ {
entry = new MenuEntry("", "", selectedNPCIndex, MenuOpcode.NPC_FIFTH_OPTION.getId(), 0, 0, false); entry = new MenuEntry("", "", selectedNPCIndex, MenuAction.NPC_FIFTH_OPTION.getId(), 0, 0, false);
utils.doActionMsTime(entry, bandit.getConvexHull().getBounds(), sleepDelay()); utils.doActionMsTime(entry, bandit.getConvexHull().getBounds(), sleepDelay());
} }
} }

View File

@ -5,7 +5,7 @@ import lombok.extern.slf4j.Slf4j;
import net.runelite.api.GameObject; import net.runelite.api.GameObject;
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.MenuAction;
import net.runelite.api.ObjectID; import net.runelite.api.ObjectID;
import net.runelite.api.WallObject; import net.runelite.api.WallObject;
import net.runelite.api.events.GameTick; import net.runelite.api.events.GameTick;
@ -51,7 +51,7 @@ public class LeaveRoomTask extends Task
GameObject ladder = object.findNearestGameObjectWithin(currentRoom.escapeLocation, 1, config.npcType().escapeObjID); GameObject ladder = object.findNearestGameObjectWithin(currentRoom.escapeLocation, 1, config.npcType().escapeObjID);
if (ladder != null) if (ladder != null)
{ {
entry = new MenuEntry("", "", ladder.getId(), MenuOpcode.GAME_OBJECT_FIRST_OPTION.getId(), entry = new MenuEntry("", "", ladder.getId(), MenuAction.GAME_OBJECT_FIRST_OPTION.getId(),
ladder.getSceneMinLocation().getX(), ladder.getSceneMinLocation().getY(), false); ladder.getSceneMinLocation().getX(), ladder.getSceneMinLocation().getY(), false);
utils.doActionMsTime(entry, ladder.getConvexHull().getBounds(), sleepDelay()); utils.doActionMsTime(entry, ladder.getConvexHull().getBounds(), sleepDelay());
timeout = tickDelay(); timeout = tickDelay();
@ -63,7 +63,7 @@ public class LeaveRoomTask extends Task
if (closedCurtain != null) if (closedCurtain != null)
{ {
status = "Opening curtain"; status = "Opening curtain";
entry = new MenuEntry("", "", closedCurtain.getId(), MenuOpcode.GAME_OBJECT_FIRST_OPTION.getId(), entry = new MenuEntry("", "", closedCurtain.getId(), MenuAction.GAME_OBJECT_FIRST_OPTION.getId(),
closedCurtain.getLocalLocation().getSceneX(), closedCurtain.getLocalLocation().getSceneY(), false); closedCurtain.getLocalLocation().getSceneX(), closedCurtain.getLocalLocation().getSceneY(), false);
utils.doActionMsTime(entry, closedCurtain.getConvexHull().getBounds(), sleepDelay()); utils.doActionMsTime(entry, closedCurtain.getConvexHull().getBounds(), sleepDelay());
log.debug(status); log.debug(status);

View File

@ -1,7 +1,7 @@
package net.runelite.client.plugins.iblackjack.tasks; package net.runelite.client.plugins.iblackjack.tasks;
import net.runelite.api.MenuEntry; import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode; import net.runelite.api.MenuAction;
import net.runelite.api.NPC; import net.runelite.api.NPC;
import net.runelite.api.events.GameTick; import net.runelite.api.events.GameTick;
import net.runelite.client.plugins.iblackjack.Task; import net.runelite.client.plugins.iblackjack.Task;
@ -34,7 +34,7 @@ public class PickpocketTask extends Task
@Override @Override
public void onGameTick(GameTick event) public void onGameTick(GameTick event)
{ {
entry = new MenuEntry("", "", selectedNPCIndex, MenuOpcode.NPC_THIRD_OPTION.getId(), 0, 0, false); entry = new MenuEntry("", "", selectedNPCIndex, MenuAction.NPC_THIRD_OPTION.getId(), 0, 0, false);
utils.doActionMsTime(entry, bandit.getConvexHull().getBounds(), sleepDelay()); utils.doActionMsTime(entry, bandit.getConvexHull().getBounds(), sleepDelay());
if (config.random() && calc.getRandomIntBetweenRange(0, 10) == 0) if (config.random() && calc.getRandomIntBetweenRange(0, 10) == 0)
{ {

View File

@ -5,7 +5,7 @@ import lombok.extern.slf4j.Slf4j;
import net.runelite.api.GameObject; import net.runelite.api.GameObject;
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.MenuAction;
import net.runelite.api.NPC; import net.runelite.api.NPC;
import net.runelite.api.NpcID; import net.runelite.api.NpcID;
import net.runelite.api.ObjectID; import net.runelite.api.ObjectID;
@ -60,7 +60,7 @@ public class ResetCombatTask extends Task
if (openCurtain != null) if (openCurtain != null)
{ {
status = "Closing curtain"; status = "Closing curtain";
entry = new MenuEntry("", "", openCurtain.getId(), MenuOpcode.GAME_OBJECT_FIRST_OPTION.getId(), entry = new MenuEntry("", "", openCurtain.getId(), MenuAction.GAME_OBJECT_FIRST_OPTION.getId(),
openCurtain.getLocalLocation().getSceneX(), openCurtain.getLocalLocation().getSceneY(), false); openCurtain.getLocalLocation().getSceneX(), openCurtain.getLocalLocation().getSceneY(), false);
utils.doActionMsTime(entry, openCurtain.getConvexHull().getBounds(), sleepDelay()); utils.doActionMsTime(entry, openCurtain.getConvexHull().getBounds(), sleepDelay());
log.debug(status); log.debug(status);
@ -77,7 +77,7 @@ public class ResetCombatTask extends Task
GameObject staircase = object.findNearestGameObjectWithin(config.npcType().escapeLocation, 2, config.npcType().escapeObjID); GameObject staircase = object.findNearestGameObjectWithin(config.npcType().escapeLocation, 2, config.npcType().escapeObjID);
if (staircase != null) if (staircase != null)
{ {
entry = new MenuEntry("", "", staircase.getId(), MenuOpcode.GAME_OBJECT_FIRST_OPTION.getId(), entry = new MenuEntry("", "", staircase.getId(), MenuAction.GAME_OBJECT_FIRST_OPTION.getId(),
staircase.getSceneMinLocation().getX(), staircase.getSceneMinLocation().getY(), false); staircase.getSceneMinLocation().getX(), staircase.getSceneMinLocation().getY(), false);
utils.doActionMsTime(entry, staircase.getConvexHull().getBounds(), sleepDelay()); utils.doActionMsTime(entry, staircase.getConvexHull().getBounds(), sleepDelay());
status = "Climbing staircase"; status = "Climbing staircase";
@ -94,7 +94,7 @@ public class ResetCombatTask extends Task
if (barman != null) if (barman != null)
{ {
status = "Opening shop"; status = "Opening shop";
entry = new MenuEntry("", "", barman.getIndex(), MenuOpcode.NPC_THIRD_OPTION.getId(), 0, 0, false); entry = new MenuEntry("", "", barman.getIndex(), MenuAction.NPC_THIRD_OPTION.getId(), 0, 0, false);
utils.doActionMsTime(entry, new Point(0, 0), sleepDelay()); utils.doActionMsTime(entry, new Point(0, 0), sleepDelay());
} }
else else

View File

@ -3,7 +3,7 @@ package net.runelite.client.plugins.iblackjack.tasks;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
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.MenuAction;
import net.runelite.api.NPC; import net.runelite.api.NPC;
import net.runelite.api.NpcID; import net.runelite.api.NpcID;
import net.runelite.api.Point; import net.runelite.api.Point;
@ -35,7 +35,7 @@ public class ShopTask extends Task
if (jugWidget != null && jugWidget.getChild(3).getItemQuantity() > 0) if (jugWidget != null && jugWidget.getChild(3).getItemQuantity() > 0)
{ {
status = "Buying Jug of Wine"; status = "Buying Jug of Wine";
entry = new MenuEntry("", "", 5, MenuOpcode.CC_OP.getId(), 3, 19660816, false); entry = new MenuEntry("", "", 5, MenuAction.CC_OP.getId(), 3, 19660816, false);
utils.doActionMsTime(entry, jugWidget.getBounds(), sleepDelay()); utils.doActionMsTime(entry, jugWidget.getBounds(), sleepDelay());
} }
} }
@ -45,7 +45,7 @@ public class ShopTask extends Task
if (barman != null) if (barman != null)
{ {
status = "Opening shop"; status = "Opening shop";
entry = new MenuEntry("", "", barman.getIndex(), MenuOpcode.NPC_THIRD_OPTION.getId(), 0, 0, false); entry = new MenuEntry("", "", barman.getIndex(), MenuAction.NPC_THIRD_OPTION.getId(), 0, 0, false);
utils.doActionMsTime(entry, new Point(0, 0), sleepDelay()); utils.doActionMsTime(entry, new Point(0, 0), sleepDelay());
} }
} }

View File

@ -23,7 +23,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
version = "2.0.5" version = "3.1.0"
project.extra["PluginName"] = "iCombination Runecrafter Plugin" project.extra["PluginName"] = "iCombination Runecrafter Plugin"
project.extra["PluginDescription"] = "Illumine - Combination Runecrafting plugin" project.extra["PluginDescription"] = "Illumine - Combination Runecrafting plugin"

View File

@ -29,25 +29,20 @@ import net.runelite.client.config.Button;
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;
import net.runelite.client.config.ConfigSection; import net.runelite.client.config.ConfigTitle;
import net.runelite.client.config.ConfigTitleSection;
import net.runelite.client.config.Range; import net.runelite.client.config.Range;
import net.runelite.client.config.Title;
@ConfigGroup("iCombinationRunecrafter") @ConfigGroup("iCombinationRunecrafter")
public interface iCombinationRunecrafterConfig extends Config public interface iCombinationRunecrafterConfig extends Config
{ {
@ConfigSection( @ConfigTitle(
keyName = "delayConfig", keyName = "delayConfig",
name = "Sleep Delay Configuration", name = "Sleep Delay Configuration",
description = "Configure how the bot handles sleep delays", description = "Configure how the bot handles sleep delays",
position = 0 position = 0
) )
default boolean delayConfig() String delayConfig = "delayConfig";
{
return false;
}
@Range( @Range(
min = 0, min = 0,
@ -125,16 +120,13 @@ public interface iCombinationRunecrafterConfig extends Config
return false; return false;
} }
@ConfigSection( @ConfigTitle(
keyName = "delayTickConfig", keyName = "delayTickConfig",
name = "Game Tick Configuration", name = "Game Tick Configuration",
description = "Configure how the bot handles game tick delays, 1 game tick equates to roughly 600ms", description = "Configure how the bot handles game tick delays, 1 game tick equates to roughly 600ms",
position = 10 position = 10
) )
default boolean delayTickConfig() String delayTickConfig = "delayTickConfig";
{
return false;
}
@Range( @Range(
min = 0, min = 0,
@ -212,23 +204,20 @@ public interface iCombinationRunecrafterConfig extends Config
return false; return false;
} }
@ConfigTitleSection( @ConfigTitle(
keyName = "instructionsTitle", keyName = "instructionsTitle",
name = "Instructions", name = "Instructions",
description = "", description = "",
position = 16 position = 16
) )
default Title instructionsTitle() String instructionsTitle = "instructionsTitle";
{
return new Title();
}
@ConfigItem( @ConfigItem(
keyName = "instruction", keyName = "instruction",
name = "", name = "",
description = "Instructions. Don't enter anything into this field", description = "Instructions. Don't enter anything into this field",
position = 20, position = 20,
titleSection = "instructionsTitle" title = "instructionsTitle"
) )
default String instruction() default String instruction()
{ {

View File

@ -11,14 +11,14 @@ import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.runelite.api.Client; import net.runelite.api.Client;
import static net.runelite.api.MenuOpcode.RUNELITE_OVERLAY_CONFIG; import static net.runelite.api.MenuAction.RUNELITE_OVERLAY_CONFIG;
import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE; import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE;
import net.runelite.client.ui.overlay.OverlayMenuEntry; import net.runelite.client.ui.overlay.OverlayMenuEntry;
import net.runelite.client.ui.overlay.OverlayPanel; import net.runelite.client.ui.overlay.OverlayPanel;
import net.runelite.client.ui.overlay.OverlayPosition; import net.runelite.client.ui.overlay.OverlayPosition;
import net.runelite.client.ui.overlay.components.TitleComponent; import net.runelite.client.ui.overlay.components.TitleComponent;
import net.runelite.client.ui.overlay.components.table.TableAlignment; import com.openosrs.client.ui.overlay.components.table.TableAlignment;
import net.runelite.client.ui.overlay.components.table.TableComponent; import com.openosrs.client.ui.overlay.components.table.TableComponent;
import net.runelite.client.util.ColorUtil; import net.runelite.client.util.ColorUtil;
import static org.apache.commons.lang3.time.DurationFormatUtils.formatDuration; import static org.apache.commons.lang3.time.DurationFormatUtils.formatDuration;

View File

@ -39,8 +39,8 @@ import net.runelite.api.GameObject;
import net.runelite.api.GameState; import net.runelite.api.GameState;
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.MenuAction;
import static net.runelite.api.MenuOpcode.ITEM_USE_ON_GAME_OBJECT; import static net.runelite.api.MenuAction.ITEM_USE_ON_GAME_OBJECT;
import net.runelite.api.ObjectID; import net.runelite.api.ObjectID;
import net.runelite.api.Player; import net.runelite.api.Player;
import net.runelite.api.Point; import net.runelite.api.Point;
@ -58,7 +58,6 @@ import net.runelite.client.events.ConfigChanged;
import net.runelite.client.plugins.Plugin; 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 static net.runelite.client.plugins.icombinationrunecrafter.iCombinationRunecrafterState.*; import static net.runelite.client.plugins.icombinationrunecrafter.iCombinationRunecrafterState.*;
import net.runelite.client.plugins.iutils.BankUtils; import net.runelite.client.plugins.iutils.BankUtils;
import net.runelite.client.plugins.iutils.CalculationUtils; import net.runelite.client.plugins.iutils.CalculationUtils;
@ -80,8 +79,7 @@ import org.pf4j.Extension;
name = "iCombination Runecrafter Plugin", name = "iCombination Runecrafter Plugin",
enabledByDefault = false, enabledByDefault = false,
description = "Illumine - Combination Runecrafting plugin", description = "Illumine - Combination Runecrafting plugin",
tags = {"illumine", "runecrafting", "bot", "smoke", "steam", "lava", "combination"}, tags = {"illumine", "runecrafting", "bot", "smoke", "steam", "lava", "combination"}
type = PluginType.SKILLING
) )
@Slf4j @Slf4j
public class iCombinationRunecrafterPlugin extends Plugin public class iCombinationRunecrafterPlugin extends Plugin
@ -381,7 +379,7 @@ public class iCombinationRunecrafterPlugin extends Plugin
private void teleportRingOfDueling(int menuIdentifier) private void teleportRingOfDueling(int menuIdentifier)
{ {
targetMenu = new MenuEntry("", "", menuIdentifier, MenuOpcode.CC_OP.getId(), -1, targetMenu = new MenuEntry("", "", menuIdentifier, MenuAction.CC_OP.getId(), -1,
25362455, false); 25362455, false);
Widget ringWidget = client.getWidget(WidgetInfo.EQUIPMENT_RING); Widget ringWidget = client.getWidget(WidgetInfo.EQUIPMENT_RING);
if (ringWidget != null) if (ringWidget != null)
@ -577,7 +575,7 @@ public class iCombinationRunecrafterPlugin extends Plugin
timeout = tickDelay(); timeout = tickDelay();
break; break;
case ENTER_MYSTERIOUS_RUINS: case ENTER_MYSTERIOUS_RUINS:
utils.doGameObjectActionMsTime(mysteriousRuins, MenuOpcode.GAME_OBJECT_FIRST_OPTION.getId(), sleepDelay()); utils.doGameObjectActionMsTime(mysteriousRuins, MenuAction.GAME_OBJECT_FIRST_OPTION.getId(), sleepDelay());
timeout = tickDelay(); timeout = tickDelay();
break; break;
case TELEPORT_CASTLE_WARS: case TELEPORT_CASTLE_WARS:
@ -595,7 +593,7 @@ public class iCombinationRunecrafterPlugin extends Plugin
} }
break; break;
case OPEN_BANK: case OPEN_BANK:
utils.doGameObjectActionMsTime(bankChest, MenuOpcode.GAME_OBJECT_FIRST_OPTION.getId(), sleepDelay()); utils.doGameObjectActionMsTime(bankChest, MenuAction.GAME_OBJECT_FIRST_OPTION.getId(), sleepDelay());
timeout = tickDelay(); timeout = tickDelay();
break; break;
case TELEPORT_DUEL_ARENA: case TELEPORT_DUEL_ARENA:
@ -615,7 +613,7 @@ public class iCombinationRunecrafterPlugin extends Plugin
{ {
totalStaminaPots++; totalStaminaPots++;
} }
MenuEntry targetMenu = new MenuEntry("", "", 9, MenuOpcode.CC_OP_LOW_PRIORITY.getId(), MenuEntry targetMenu = new MenuEntry("", "", 9, MenuAction.CC_OP_LOW_PRIORITY.getId(),
useableItem.getIndex(), 983043, true); useableItem.getIndex(), 983043, true);
utils.doActionMsTime(targetMenu, new Point(0, 0), sleepDelay()); utils.doActionMsTime(targetMenu, new Point(0, 0), sleepDelay());
} }

View File

@ -23,7 +23,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
version = "1.0.2" version = "2.1.0"
project.extra["PluginName"] = "iHerbCleaner" project.extra["PluginName"] = "iHerbCleaner"
project.extra["PluginDescription"] = "Illumine - Herb Cleaner" project.extra["PluginDescription"] = "Illumine - Herb Cleaner"

View File

@ -29,25 +29,20 @@ import net.runelite.client.config.Button;
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;
import net.runelite.client.config.ConfigSection; import net.runelite.client.config.ConfigTitle;
import net.runelite.client.config.ConfigTitleSection;
import net.runelite.client.config.Range; import net.runelite.client.config.Range;
import net.runelite.client.config.Title;
@ConfigGroup("iHerbCleaner") @ConfigGroup("iHerbCleaner")
public interface iHerbCleanerConfig extends Config public interface iHerbCleanerConfig extends Config
{ {
@ConfigSection( @ConfigTitle(
keyName = "delayConfig", keyName = "delayConfig",
name = "Sleep Delay Configuration", name = "Sleep Delay Configuration",
description = "Configure how the bot handles sleep delays", description = "Configure how the bot handles sleep delays",
position = 0 position = 0
) )
default boolean delayConfig() String delayConfig = "delayConfig";
{
return false;
}
@Range( @Range(
min = 0, min = 0,
@ -125,16 +120,13 @@ public interface iHerbCleanerConfig extends Config
return false; return false;
} }
@ConfigSection( @ConfigTitle(
keyName = "delayTickConfig", keyName = "delayTickConfig",
name = "Game Tick Configuration", name = "Game Tick Configuration",
description = "Configure how the bot handles game tick delays, 1 game tick equates to roughly 600ms", description = "Configure how the bot handles game tick delays, 1 game tick equates to roughly 600ms",
position = 10 position = 10
) )
default boolean delayTickConfig() String delayTickConfig = "delayTickConfig";
{
return false;
}
@Range( @Range(
min = 0, min = 0,
@ -212,23 +204,20 @@ public interface iHerbCleanerConfig extends Config
return false; return false;
} }
@ConfigTitleSection( @ConfigTitle(
keyName = "instructionsTitle", keyName = "instructionsTitle",
name = "Instructions", name = "Instructions",
description = "", description = "",
position = 16 position = 16
) )
default Title instructionsTitle() String instructionsTitle = "instructionsTitle";
{
return new Title();
}
@ConfigItem( @ConfigItem(
keyName = "instructions", keyName = "instructions",
name = "", name = "",
description = "Instructions. Don't enter anything into this field", description = "Instructions. Don't enter anything into this field",
position = 17, position = 17,
titleSection = "instructionsTitle" title = "instructionsTitle"
) )
default String instructions() default String instructions()
{ {

View File

@ -9,14 +9,14 @@ import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.runelite.api.Client; import net.runelite.api.Client;
import static net.runelite.api.MenuOpcode.RUNELITE_OVERLAY_CONFIG; import static net.runelite.api.MenuAction.RUNELITE_OVERLAY_CONFIG;
import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE; import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE;
import net.runelite.client.ui.overlay.OverlayMenuEntry; import net.runelite.client.ui.overlay.OverlayMenuEntry;
import net.runelite.client.ui.overlay.OverlayPanel; import net.runelite.client.ui.overlay.OverlayPanel;
import net.runelite.client.ui.overlay.OverlayPosition; import net.runelite.client.ui.overlay.OverlayPosition;
import net.runelite.client.ui.overlay.components.TitleComponent; import net.runelite.client.ui.overlay.components.TitleComponent;
import net.runelite.client.ui.overlay.components.table.TableAlignment; import com.openosrs.client.ui.overlay.components.table.TableAlignment;
import net.runelite.client.ui.overlay.components.table.TableComponent; import com.openosrs.client.ui.overlay.components.table.TableComponent;
import net.runelite.client.util.ColorUtil; import net.runelite.client.util.ColorUtil;
import static org.apache.commons.lang3.time.DurationFormatUtils.formatDuration; import static org.apache.commons.lang3.time.DurationFormatUtils.formatDuration;

View File

@ -44,7 +44,6 @@ import net.runelite.client.eventbus.Subscribe;
import net.runelite.client.plugins.Plugin; 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.iherbcleaner.tasks.BankItemsTask; import net.runelite.client.plugins.iherbcleaner.tasks.BankItemsTask;
import net.runelite.client.plugins.iherbcleaner.tasks.CleanHerbTask; import net.runelite.client.plugins.iherbcleaner.tasks.CleanHerbTask;
import net.runelite.client.plugins.iherbcleaner.tasks.MovingTask; import net.runelite.client.plugins.iherbcleaner.tasks.MovingTask;
@ -61,8 +60,7 @@ import org.pf4j.Extension;
name = "iHerbCleaner", name = "iHerbCleaner",
enabledByDefault = false, enabledByDefault = false,
description = "Illumine - Herb Cleaner plugin", description = "Illumine - Herb Cleaner plugin",
tags = {"illumine", "task", "herblore", "clean", "bot"}, tags = {"illumine", "task", "herblore", "clean", "bot"}
type = PluginType.MISCELLANEOUS
) )
@Slf4j @Slf4j
public class iHerbCleanerPlugin extends Plugin public class iHerbCleanerPlugin extends Plugin

View File

@ -5,7 +5,7 @@ import java.util.List;
import javax.inject.Inject; import javax.inject.Inject;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.runelite.api.MenuEntry; import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode; import net.runelite.api.MenuAction;
import net.runelite.api.events.GameTick; import net.runelite.api.events.GameTick;
import net.runelite.api.widgets.WidgetInfo; import net.runelite.api.widgets.WidgetInfo;
import net.runelite.api.widgets.WidgetItem; import net.runelite.api.widgets.WidgetItem;
@ -46,7 +46,7 @@ public class CleanHerbTask extends Task
for (WidgetItem herb : herbs) for (WidgetItem herb : herbs)
{ {
log.info("Adding herb: {}, delay time: {}", herb.getIndex(), sleep); log.info("Adding herb: {}, delay time: {}", herb.getIndex(), sleep);
entry = new MenuEntry("", "", herb.getId(), MenuOpcode.ITEM_FIRST_OPTION.getId(), entry = new MenuEntry("", "", herb.getId(), MenuAction.ITEM_FIRST_OPTION.getId(),
herb.getIndex(), WidgetInfo.INVENTORY.getId(), true); herb.getIndex(), WidgetInfo.INVENTORY.getId(), true);
sleep += sleepDelay(); sleep += sleepDelay();
herb.getCanvasBounds().getBounds(); herb.getCanvasBounds().getBounds();

View File

@ -5,7 +5,7 @@ import javax.inject.Inject;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.runelite.api.GameObject; import net.runelite.api.GameObject;
import net.runelite.api.MenuEntry; import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode; import net.runelite.api.MenuAction;
import net.runelite.api.events.GameTick; import net.runelite.api.events.GameTick;
import net.runelite.client.plugins.iherbcleaner.Task; import net.runelite.client.plugins.iherbcleaner.Task;
import net.runelite.client.plugins.iherbcleaner.iHerbCleanerPlugin; import net.runelite.client.plugins.iherbcleaner.iHerbCleanerPlugin;
@ -47,7 +47,7 @@ public class OpenBankTask extends Task
if (bank != null) if (bank != null)
{ {
status = "Opening bank"; status = "Opening bank";
entry = new MenuEntry("", "", bank.getId(), MenuOpcode.GAME_OBJECT_SECOND_OPTION.getId(), entry = new MenuEntry("", "", bank.getId(), MenuAction.GAME_OBJECT_SECOND_OPTION.getId(),
bank.getSceneMinLocation().getX(), bank.getSceneMinLocation().getY(), false); bank.getSceneMinLocation().getX(), bank.getSceneMinLocation().getY(), false);
Rectangle rectangle = (bank.getConvexHull() != null) ? bank.getConvexHull().getBounds() : Rectangle rectangle = (bank.getConvexHull() != null) ? bank.getConvexHull().getBounds() :
new Rectangle(client.getCenterX() - 50, client.getCenterY() - 50, 100, 100); new Rectangle(client.getCenterX() - 50, client.getCenterY() - 50, 100, 100);

View File

@ -23,7 +23,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
version = "3.2.1" version = "4.1.0"
project.extra["PluginName"] = "iMagic Caster" project.extra["PluginName"] = "iMagic Caster"
project.extra["PluginDescription"] = "Illumine automated magic caster" project.extra["PluginDescription"] = "Illumine automated magic caster"

View File

@ -29,7 +29,7 @@ import net.runelite.client.config.Button;
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;
import net.runelite.client.config.ConfigSection; import net.runelite.client.config.ConfigTitle;
import net.runelite.client.config.Range; import net.runelite.client.config.Range;
@ -124,16 +124,13 @@ public interface iMagicCasterConfig extends Config
return true; return true;
} }
@ConfigSection( @ConfigTitle(
keyName = "delayConfig", keyName = "delayConfig",
name = "Sleep Delay Configuration", name = "Sleep Delay Configuration",
description = "Configure how the bot handles sleep delays", description = "Configure how the bot handles sleep delays",
position = 5 position = 5
) )
default boolean delayConfig() String delayConfig = "delayConfig";
{
return false;
}
@Range( @Range(
min = 0, min = 0,
@ -211,16 +208,13 @@ public interface iMagicCasterConfig extends Config
return false; return false;
} }
@ConfigSection( @ConfigTitle(
keyName = "delayTickConfig", keyName = "delayTickConfig",
name = "Game Tick Configuration", name = "Game Tick Configuration",
description = "Configure how the bot handles game tick delays, 1 game tick equates to roughly 600ms", description = "Configure how the bot handles game tick delays, 1 game tick equates to roughly 600ms",
position = 11 position = 11
) )
default boolean delayTickConfig() String delayTickConfig = "delayTickConfig";
{
return false;
}
@Range( @Range(
min = 0, min = 0,
@ -298,6 +292,17 @@ public interface iMagicCasterConfig extends Config
return false; return false;
} }
@ConfigItem(
keyName = "enableRun",
name = "Automatically enable run (energy)",
description = "If enabled, this will toggle your run on when you're above 40%",
position = 17
)
default boolean enableRun()
{
return true;
}
@ConfigItem( @ConfigItem(
keyName = "enableUI", keyName = "enableUI",
name = "Enable UI", name = "Enable UI",

View File

@ -9,14 +9,14 @@ import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.runelite.api.Client; import net.runelite.api.Client;
import static net.runelite.api.MenuOpcode.RUNELITE_OVERLAY_CONFIG; import static net.runelite.api.MenuAction.RUNELITE_OVERLAY_CONFIG;
import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE; import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE;
import net.runelite.client.ui.overlay.OverlayMenuEntry; import net.runelite.client.ui.overlay.OverlayMenuEntry;
import net.runelite.client.ui.overlay.OverlayPanel; import net.runelite.client.ui.overlay.OverlayPanel;
import net.runelite.client.ui.overlay.OverlayPosition; import net.runelite.client.ui.overlay.OverlayPosition;
import net.runelite.client.ui.overlay.components.TitleComponent; import net.runelite.client.ui.overlay.components.TitleComponent;
import net.runelite.client.ui.overlay.components.table.TableAlignment; import com.openosrs.client.ui.overlay.components.table.TableAlignment;
import net.runelite.client.ui.overlay.components.table.TableComponent; import com.openosrs.client.ui.overlay.components.table.TableComponent;
import net.runelite.client.util.ColorUtil; import net.runelite.client.util.ColorUtil;
import static org.apache.commons.lang3.time.DurationFormatUtils.formatDuration; import static org.apache.commons.lang3.time.DurationFormatUtils.formatDuration;

View File

@ -36,7 +36,7 @@ import net.runelite.api.ChatMessageType;
import net.runelite.api.Client; import net.runelite.api.Client;
import net.runelite.api.GameState; import net.runelite.api.GameState;
import net.runelite.api.MenuEntry; import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode; import net.runelite.api.MenuAction;
import net.runelite.api.NPC; import net.runelite.api.NPC;
import net.runelite.api.Player; import net.runelite.api.Player;
import net.runelite.api.TileItem; import net.runelite.api.TileItem;
@ -56,7 +56,6 @@ 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.PluginManager; import net.runelite.client.plugins.PluginManager;
import net.runelite.client.plugins.PluginType;
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;
@ -82,8 +81,7 @@ import org.pf4j.Extension;
name = "iMagic Caster", name = "iMagic Caster",
enabledByDefault = false, enabledByDefault = false,
description = "Illumine automated magic caster", description = "Illumine automated magic caster",
tags = {"Magic", "Splashing", "Profit", "Casting"}, tags = {"Magic", "Splashing", "Profit", "Casting"}
type = PluginType.SKILLING
) )
@Slf4j @Slf4j
public class iMagicCasterPlugin extends Plugin public class iMagicCasterPlugin extends Plugin
@ -286,24 +284,24 @@ public class iMagicCasterPlugin extends Plugin
switch (castType.getName()) switch (castType.getName())
{ {
case "Single cast": case "Single cast":
targetMenu = new MenuEntry("Cast", "", targetNPC.getIndex(), MenuOpcode.SPELL_CAST_ON_NPC.getId(), targetMenu = new MenuEntry("Cast", "", targetNPC.getIndex(), MenuAction.SPELL_CAST_ON_NPC.getId(),
0, 0, false); 0, 0, false);
utils.oneClickCastSpell(selectedSpell.getSpell(), targetMenu, targetNPC.getConvexHull().getBounds(), sleepDelay()); utils.oneClickCastSpell(selectedSpell.getSpell(), targetMenu, targetNPC.getConvexHull().getBounds(), sleepDelay());
timeout = 4 + tickDelay(); timeout = 4 + tickDelay();
return; return;
case "Auto-cast": case "Auto-cast":
targetMenu = new MenuEntry("", "", targetNPC.getIndex(), MenuOpcode.NPC_SECOND_OPTION.getId(), 0, 0, false); targetMenu = new MenuEntry("", "", targetNPC.getIndex(), MenuAction.NPC_SECOND_OPTION.getId(), 0, 0, false);
menu.setEntry(targetMenu); menu.setEntry(targetMenu);
mouse.delayMouseClick(targetNPC.getConvexHull().getBounds(), sleepDelay()); mouse.delayMouseClick(targetNPC.getConvexHull().getBounds(), sleepDelay());
timeout = 10 + tickDelay(); timeout = 10 + tickDelay();
return; return;
case "High Alchemy": case "High Alchemy":
targetMenu = new MenuEntry("Cast", "", targetItem.getId(), MenuOpcode.ITEM_USE_ON_WIDGET.getId(), targetItem.getIndex(), 9764864, true); targetMenu = new MenuEntry("Cast", "", targetItem.getId(), MenuAction.ITEM_USE_ON_WIDGET.getId(), targetItem.getIndex(), 9764864, true);
timeout = 5 + tickDelay(); timeout = 5 + tickDelay();
utils.oneClickCastSpell(WidgetInfo.SPELL_HIGH_LEVEL_ALCHEMY, targetMenu, targetItem.getCanvasBounds().getBounds(), sleepDelay()); utils.oneClickCastSpell(WidgetInfo.SPELL_HIGH_LEVEL_ALCHEMY, targetMenu, targetItem.getCanvasBounds().getBounds(), sleepDelay());
return; return;
case "Tele Grab": case "Tele Grab":
targetMenu = new MenuEntry("Cast", "", groundItem.getId(), MenuOpcode.SPELL_CAST_ON_GROUND_ITEM.getId(), groundItem.getTile().getSceneLocation().getX(), groundItem.getTile().getSceneLocation().getY(), true); targetMenu = new MenuEntry("Cast", "", groundItem.getId(), MenuAction.SPELL_CAST_ON_GROUND_ITEM.getId(), groundItem.getTile().getSceneLocation().getX(), groundItem.getTile().getSceneLocation().getY(), true);
timeout = 5 + tickDelay(); timeout = 5 + tickDelay();
utils.oneClickCastSpell(WidgetInfo.SPELL_TELEKINETIC_GRAB, targetMenu, new Rectangle(0, 0, 0, 0), sleepDelay()); utils.oneClickCastSpell(WidgetInfo.SPELL_TELEKINETIC_GRAB, targetMenu, new Rectangle(0, 0, 0, 0), sleepDelay());
return; return;
@ -354,7 +352,9 @@ public class iMagicCasterPlugin extends Plugin
startBot = false; startBot = false;
return; return;
} }
playerUtils.handleRun(40, 20); if (config.enableRun()) {
playerUtils.handleRun(40, 20);
}
state = getState(); state = getState();
beforeLoc = player.getLocalLocation(); beforeLoc = player.getLocalLocation();
switch (state) switch (state)
@ -406,7 +406,8 @@ public class iMagicCasterPlugin extends Plugin
return; return;
} }
log.debug("Animation ID changed to {}, resetting timeout", event.getActor().getAnimation()); log.debug("Animation ID changed to {}, resetting timeout", event.getActor().getAnimation());
if (event.getActor().getAnimation() == AnimationID.LOW_LEVEL_MAGIC_ATTACK) //if (event.getActor().getAnimation() == AnimationID.LOW_LEVEL_MAGIC_ATTACK)
if (event.getActor().getAnimation() == 1162)
{ {
timeout = 10 + tickDelay(); timeout = 10 + tickDelay();
failureCount = 0; failureCount = 0;

View File

@ -23,7 +23,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
version = "1.0.1" version = "2.1.0"
project.extra["PluginName"] = "iMenu Debugger Plugin" project.extra["PluginName"] = "iMenu Debugger Plugin"
project.extra["PluginDescription"] = "Illumine - Menu Debugger plugin" project.extra["PluginDescription"] = "Illumine - Menu Debugger plugin"

View File

@ -29,23 +29,20 @@ import net.runelite.client.config.Button;
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;
import net.runelite.client.config.ConfigSection; import net.runelite.client.config.ConfigTitle;
import net.runelite.client.config.Range; import net.runelite.client.config.Range;
@ConfigGroup("iMenuDebugger") @ConfigGroup("iMenuDebugger")
public interface iMenuDebuggerConfig extends Config public interface iMenuDebuggerConfig extends Config
{ {
@ConfigSection( @ConfigTitle(
keyName = "delayConfig", keyName = "delayConfig",
name = "Sleep Delay Configuration", name = "Sleep Delay Configuration",
description = "Configure how the bot handles sleep delays", description = "Configure how the bot handles sleep delays",
position = 0 position = 0
) )
default boolean delayConfig() String delayConfig = "delayConfig";
{
return false;
}
@Range( @Range(
min = 0, min = 0,
@ -123,16 +120,13 @@ public interface iMenuDebuggerConfig extends Config
return false; return false;
} }
@ConfigSection( @ConfigTitle(
keyName = "delayTickConfig", keyName = "delayTickConfig",
name = "Game Tick Configuration", name = "Game Tick Configuration",
description = "Configure how the bot handles game tick delays, 1 game tick equates to roughly 600ms", description = "Configure how the bot handles game tick delays, 1 game tick equates to roughly 600ms",
position = 10 position = 10
) )
default boolean delayTickConfig() String delayTickConfig = "delayTickConfig";
{
return false;
}
@Range( @Range(
min = 0, min = 0,

View File

@ -48,7 +48,6 @@ import net.runelite.client.game.ItemManager;
import net.runelite.client.plugins.Plugin; 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.iutils.PlayerUtils; import net.runelite.client.plugins.iutils.PlayerUtils;
import net.runelite.client.plugins.iutils.iUtils; import net.runelite.client.plugins.iutils.iUtils;
import static net.runelite.client.plugins.iutils.iUtils.iterating; import static net.runelite.client.plugins.iutils.iUtils.iterating;
@ -61,8 +60,7 @@ import org.pf4j.Extension;
name = "iMenu Debugger Plugin", name = "iMenu Debugger Plugin",
enabledByDefault = false, enabledByDefault = false,
description = "Illumine - Menu Debugger plugin. Has no function other than debugging", description = "Illumine - Menu Debugger plugin. Has no function other than debugging",
tags = {"illumine", "menu", "debug", "bot"}, tags = {"illumine", "menu", "debug", "bot"}
type = PluginType.UTILITY
) )
@Slf4j @Slf4j
public class iMenuDebuggerPlugin extends Plugin public class iMenuDebuggerPlugin extends Plugin
@ -159,13 +157,13 @@ public class iMenuDebuggerPlugin extends Plugin
log.info("Menu Entry before override: {}", event.toString()); log.info("Menu Entry before override: {}", event.toString());
if (config.printChat()) if (config.printChat())
{ {
utils.sendGameMessage("Option value: " + event.getOption()); utils.sendGameMessage("MenuOption value: " + event.getMenuOption());
utils.sendGameMessage("Target value: " + event.getTarget()); utils.sendGameMessage("MenuTarget value: " + event.getMenuTarget());
utils.sendGameMessage("Identifier value: " + event.getIdentifier()); utils.sendGameMessage("Id value: " + event.getId());
utils.sendGameMessage("Opcode value: " + event.getOpcode()); utils.sendGameMessage("MenuAction value: " + event.getMenuAction());
utils.sendGameMessage("Param0 value: " + event.getParam0()); utils.sendGameMessage("ActionParam value: " + event.getActionParam());
utils.sendGameMessage("Param1 value: " + event.getParam1()); utils.sendGameMessage("WidgetId value: " + event.getWidgetId());
utils.sendGameMessage("mouseButton value: " + event.getMouseButton()); utils.sendGameMessage("selectedItemIndex value: " + event.getSelectedItemIndex());
} }
if (testMenu == null) if (testMenu == null)
{ {

View File

@ -23,7 +23,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
version = "3.4.4" version = "4.1.0"
project.extra["PluginName"] = "iPowerfighter Plugin" project.extra["PluginName"] = "iPowerfighter Plugin"
project.extra["PluginDescription"] = "Illumine - Powerfighter plugin" project.extra["PluginDescription"] = "Illumine - Powerfighter plugin"

View File

@ -29,25 +29,20 @@ import net.runelite.client.config.Button;
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;
import net.runelite.client.config.ConfigSection; import net.runelite.client.config.ConfigTitle;
import net.runelite.client.config.ConfigTitleSection;
import net.runelite.client.config.Range; import net.runelite.client.config.Range;
import net.runelite.client.config.Title;
@ConfigGroup("iPowerFighter") @ConfigGroup("iPowerFighter")
public interface iPowerFighterConfig extends Config public interface iPowerFighterConfig extends Config
{ {
@ConfigSection( @ConfigTitle(
keyName = "delayConfig", keyName = "delayConfig",
name = "Sleep Delay Configuration", name = "Sleep Delay Configuration",
description = "Configure how the bot handles sleep delays", description = "Configure how the bot handles sleep delays",
position = 0 position = 0
) )
default boolean delayConfig() String delayConfig = "delayConfig";
{
return false;
}
@Range( @Range(
min = 0, min = 0,
@ -125,16 +120,13 @@ public interface iPowerFighterConfig extends Config
return false; return false;
} }
@ConfigSection( @ConfigTitle(
keyName = "delayTickConfig", keyName = "delayTickConfig",
name = "Game Tick Configuration", name = "Game Tick Configuration",
description = "Configure how the bot handles game tick delays, 1 game tick equates to roughly 600ms", description = "Configure how the bot handles game tick delays, 1 game tick equates to roughly 600ms",
position = 10 position = 10
) )
default boolean delayTickConfig() String delayTickConfig = "delayTickConfig";
{
return false;
}
@Range( @Range(
min = 0, min = 0,
@ -212,46 +204,40 @@ public interface iPowerFighterConfig extends Config
return false; return false;
} }
@ConfigTitleSection( @ConfigTitle(
keyName = "instructionsTitle", keyName = "instructionsTitle",
name = "Instructions", name = "Instructions",
description = "", description = "",
position = 16 position = 16
) )
default Title instructionsTitle() String instructionsTitle = "instructionsTitle";
{
return new Title();
}
@ConfigItem( @ConfigItem(
keyName = "instruction", keyName = "instruction",
name = "", name = "",
description = "Instructions. Don't enter anything into this field", description = "Instructions. Don't enter anything into this field",
position = 17, position = 17,
titleSection = "instructionsTitle" title = "instructionsTitle"
) )
default String instruction() default String instruction()
{ {
return "Auto fights NPC's with the provided name. Enable Quick Eater Plugin for eating."; return "Auto fights NPC's with the provided name. Enable Quick Eater Plugin for eating.";
} }
@ConfigTitleSection( @ConfigTitle(
keyName = "generalTitle", keyName = "generalTitle",
name = "General Config", name = "General Config",
description = "", description = "",
position = 28 position = 28
) )
default Title generalTitle() String generalTitle = "generalTitle";
{
return new Title();
}
@ConfigItem( @ConfigItem(
keyName = "lootOnly", keyName = "lootOnly",
name = "Loot only mode", name = "Loot only mode",
description = "Loot only mode, will loot items and not fight NPCs", description = "Loot only mode, will loot items and not fight NPCs",
position = 29, position = 29,
titleSection = "generalTitle" title = "generalTitle"
) )
default boolean lootOnly() default boolean lootOnly()
{ {
@ -263,7 +249,7 @@ public interface iPowerFighterConfig extends Config
name = "Exact NPC only mode", name = "Exact NPC only mode",
description = "Exact NPC only mode, will fight exact NPC names only", description = "Exact NPC only mode, will fight exact NPC names only",
position = 29, position = 29,
titleSection = "generalTitle" title = "generalTitle"
) )
default boolean exactNpcOnly() default boolean exactNpcOnly()
{ {
@ -276,7 +262,7 @@ public interface iPowerFighterConfig extends Config
description = "Name of NPC. Will attack any NPC containing given name.", description = "Name of NPC. Will attack any NPC containing given name.",
position = 30, position = 30,
hide = "dropInventory", hide = "dropInventory",
titleSection = "generalTitle" title = "generalTitle"
) )
default String npcName() default String npcName()
{ {
@ -293,7 +279,7 @@ public interface iPowerFighterConfig extends Config
description = "The distance (in tiles) to search for target NPC. Center search point is set when you click start.", description = "The distance (in tiles) to search for target NPC. Center search point is set when you click start.",
position = 31, position = 31,
hide = "dropInventory", hide = "dropInventory",
titleSection = "generalTitle" title = "generalTitle"
) )
default int searchRadius() default int searchRadius()
{ {
@ -306,7 +292,7 @@ public interface iPowerFighterConfig extends Config
description = "Safe spot will force your character to always return to the tile you started the plugin on", description = "Safe spot will force your character to always return to the tile you started the plugin on",
position = 32, position = 32,
hide = "dropInventory", hide = "dropInventory",
titleSection = "generalTitle" title = "generalTitle"
) )
default boolean safeSpot() default boolean safeSpot()
{ {
@ -320,30 +306,27 @@ public interface iPowerFighterConfig extends Config
position = 33, position = 33,
hidden = true, hidden = true,
unhide = "safeSpot", unhide = "safeSpot",
titleSection = "generalTitle" title = "generalTitle"
) )
default int safeSpotRadius() default int safeSpotRadius()
{ {
return 1; return 1;
} }
@ConfigTitleSection( @ConfigTitle(
keyName = "ammoTitle", keyName = "ammoTitle",
name = "Ammo Settings", name = "Ammo Settings",
description = "", description = "",
position = 32 position = 32
) )
default Title ammoTitle() String ammoTitle = "ammoTitle";
{
return new Title();
}
@ConfigItem( @ConfigItem(
keyName = "lootAmmo", keyName = "lootAmmo",
name = "Loot Ammo", name = "Loot Ammo",
description = "Enable to loot ammo", description = "Enable to loot ammo",
position = 34, position = 34,
titleSection = "ammoTitle" title = "ammoTitle"
) )
default boolean lootAmmo() default boolean lootAmmo()
{ {
@ -357,7 +340,7 @@ public interface iPowerFighterConfig extends Config
position = 35, position = 35,
hidden = true, hidden = true,
unhide = "lootAmmo", unhide = "lootAmmo",
titleSection = "ammoTitle" title = "ammoTitle"
) )
default int ammoID() default int ammoID()
{ {
@ -371,7 +354,7 @@ public interface iPowerFighterConfig extends Config
position = 36, position = 36,
hidden = true, hidden = true,
unhide = "lootAmmo", unhide = "lootAmmo",
titleSection = "ammoTitle" title = "ammoTitle"
) )
default int minAmmoLootTime() default int minAmmoLootTime()
{ {
@ -385,30 +368,27 @@ public interface iPowerFighterConfig extends Config
position = 37, position = 37,
hidden = true, hidden = true,
unhide = "lootAmmo", unhide = "lootAmmo",
titleSection = "ammoTitle" title = "ammoTitle"
) )
default int randAmmoLootTime() default int randAmmoLootTime()
{ {
return 30; return 30;
} }
@ConfigTitleSection( @ConfigTitle(
keyName = "lootTitle", keyName = "lootTitle",
name = "Loot Settings", name = "Loot Settings",
description = "", description = "",
position = 38 position = 38
) )
default Title lootTile() String lootTitle = "lootTitle";
{
return new Title();
}
@ConfigItem( @ConfigItem(
keyName = "lootItems", keyName = "lootItems",
name = "Loot Items", name = "Loot Items",
description = "Enable to loot items", description = "Enable to loot items",
position = 39, position = 39,
titleSection = "lootTitle" title = "lootTitle"
) )
default boolean lootItems() default boolean lootItems()
{ {
@ -426,7 +406,7 @@ public interface iPowerFighterConfig extends Config
position = 40, position = 40,
hidden = true, hidden = true,
unhide = "lootItems", unhide = "lootItems",
titleSection = "lootItems" title = "lootItems"
) )
default int lootRadius() default int lootRadius()
{ {
@ -440,7 +420,7 @@ public interface iPowerFighterConfig extends Config
position = 41, position = 41,
hidden = true, hidden = true,
unhide = "lootItems", unhide = "lootItems",
titleSection = "lootTitle" title = "lootTitle"
) )
default boolean lootGEValue() default boolean lootGEValue()
{ {
@ -454,7 +434,7 @@ public interface iPowerFighterConfig extends Config
position = 42, position = 42,
hidden = true, hidden = true,
unhide = "lootGEValue", unhide = "lootGEValue",
titleSection = "lootTitle" title = "lootTitle"
) )
default int minGEValue() default int minGEValue()
{ {
@ -468,7 +448,7 @@ public interface iPowerFighterConfig extends Config
position = 43, position = 43,
hidden = true, hidden = true,
unhide = "lootItems", unhide = "lootItems",
titleSection = "lootTitle" title = "lootTitle"
) )
default String lootItemNames() default String lootItemNames()
{ {
@ -482,7 +462,7 @@ public interface iPowerFighterConfig extends Config
position = 44, position = 44,
hidden = true, hidden = true,
unhide = "lootItems", unhide = "lootItems",
titleSection = "lootTitle" title = "lootTitle"
) )
default boolean lootClueScrolls() default boolean lootClueScrolls()
{ {
@ -496,7 +476,7 @@ public interface iPowerFighterConfig extends Config
position = 46, position = 46,
hidden = true, hidden = true,
unhide = "lootItems", unhide = "lootItems",
titleSection = "lootTitle" title = "lootTitle"
) )
default boolean buryBones() default boolean buryBones()
{ {
@ -510,7 +490,7 @@ public interface iPowerFighterConfig extends Config
position = 48, position = 48,
hidden = true, hidden = true,
unhide = "buryBones", unhide = "buryBones",
titleSection = "lootTitle" title = "lootTitle"
) )
default boolean buryOne() default boolean buryOne()
{ {
@ -524,7 +504,7 @@ public interface iPowerFighterConfig extends Config
position = 50, position = 50,
hidden = true, hidden = true,
unhide = "lootItems", unhide = "lootItems",
titleSection = "lootTitle" title = "lootTitle"
) )
default boolean lootNPCOnly() default boolean lootNPCOnly()
{ {
@ -538,30 +518,27 @@ public interface iPowerFighterConfig extends Config
position = 51, position = 51,
hidden = true, hidden = true,
unhide = "lootItems", unhide = "lootItems",
titleSection = "lootTitle" title = "lootTitle"
) )
default boolean forceLoot() default boolean forceLoot()
{ {
return true; return true;
} }
@ConfigTitleSection( @ConfigTitle(
keyName = "alchTitle", keyName = "alchTitle",
name = "Alch Settings", name = "Alch Settings",
description = "", description = "",
position = 90 position = 90
) )
default Title alchTitle() String alchTitle = "alchTitle";
{
return new Title();
}
@ConfigItem( @ConfigItem(
keyName = "alchItems", keyName = "alchItems",
name = "Alch Items", name = "Alch Items",
description = "Enable to alch looted items. Requires fire and nature runes in inventory", description = "Enable to alch looted items. Requires fire and nature runes in inventory",
position = 95, position = 95,
titleSection = "alchTitle" title = "alchTitle"
) )
default boolean alchItems() default boolean alchItems()
{ {
@ -575,7 +552,7 @@ public interface iPowerFighterConfig extends Config
position = 100, position = 100,
hidden = true, hidden = true,
unhide = "alchItems", unhide = "alchItems",
titleSection = "alchTitle" title = "alchTitle"
) )
default boolean alchByValue() default boolean alchByValue()
{ {
@ -589,7 +566,7 @@ public interface iPowerFighterConfig extends Config
position = 105, position = 105,
hidden = true, hidden = true,
unhide = "alchByValue", unhide = "alchByValue",
titleSection = "alchTitle" title = "alchTitle"
) )
default int maxAlchValue() default int maxAlchValue()
{ {
@ -603,7 +580,7 @@ public interface iPowerFighterConfig extends Config
position = 110, position = 110,
hidden = true, hidden = true,
unhide = "alchItems", unhide = "alchItems",
titleSection = "alchTitle" title = "alchTitle"
) )
default boolean alchByName() default boolean alchByName()
{ {
@ -617,30 +594,27 @@ public interface iPowerFighterConfig extends Config
position = 115, position = 115,
hidden = true, hidden = true,
unhide = "alchByName", unhide = "alchByName",
titleSection = "alchTitle" title = "alchTitle"
) )
default String alchNames() default String alchNames()
{ {
return "Steel platebody,Rune scimitar"; return "Steel platebody,Rune scimitar";
} }
@ConfigTitleSection( @ConfigTitle(
keyName = "combatTitle", keyName = "combatTitle",
name = "Combat Settings", name = "Combat Settings",
description = "", description = "",
position = 90 position = 90
) )
default Title combatTitle() String combatTitle = "combatTitle";
{
return new Title();
}
@ConfigItem( @ConfigItem(
keyName = "combatLevels", keyName = "combatLevels",
name = "Combat Levels", name = "Combat Levels",
description = "Enable to set levels for the bot to reach and change between", description = "Enable to set levels for the bot to reach and change between",
position = 120, position = 120,
titleSection = "combatTitle" title = "combatTitle"
) )
default boolean combatLevels() default boolean combatLevels()
{ {
@ -654,7 +628,7 @@ public interface iPowerFighterConfig extends Config
position = 125, position = 125,
hidden = true, hidden = true,
unhide = "combatLevels", unhide = "combatLevels",
titleSection = "combatTitle" title = "combatTitle"
) )
default int attackLvl() default int attackLvl()
{ {
@ -668,7 +642,7 @@ public interface iPowerFighterConfig extends Config
position = 130, position = 130,
hidden = true, hidden = true,
unhide = "combatLevels", unhide = "combatLevels",
titleSection = "combatTitle" title = "combatTitle"
) )
default int strengthLvl() default int strengthLvl()
{ {
@ -682,7 +656,7 @@ public interface iPowerFighterConfig extends Config
position = 135, position = 135,
hidden = true, hidden = true,
unhide = "combatLevels", unhide = "combatLevels",
titleSection = "combatTitle" title = "combatTitle"
) )
default int defenceLvl() default int defenceLvl()
{ {
@ -696,7 +670,7 @@ public interface iPowerFighterConfig extends Config
position = 140, position = 140,
hidden = true, hidden = true,
unhide = "combatLevels", unhide = "combatLevels",
titleSection = "combatTitle" title = "combatTitle"
) )
default combatType continueType() default combatType continueType()
{ {
@ -708,7 +682,7 @@ public interface iPowerFighterConfig extends Config
name = "Stop on Slayer task completion", name = "Stop on Slayer task completion",
description = "Enable to stop when Slayer task completes", description = "Enable to stop when Slayer task completes",
position = 52, position = 52,
titleSection = "generalTitle" title = "generalTitle"
) )
default boolean stopSlayer() default boolean stopSlayer()
{ {
@ -720,7 +694,7 @@ public interface iPowerFighterConfig extends Config
name = "Equip Bracelets of Slaughter/Expeditious", name = "Equip Bracelets of Slaughter/Expeditious",
description = "Enable to equip Bracelets of Slaughter/Expeditious Bracelet if in inventory", description = "Enable to equip Bracelets of Slaughter/Expeditious Bracelet if in inventory",
position = 52, position = 52,
titleSection = "generalTitle" title = "generalTitle"
) )
default boolean equipBracelet() default boolean equipBracelet()
{ {
@ -732,7 +706,7 @@ public interface iPowerFighterConfig extends Config
name = "Stop when out of ammo", name = "Stop when out of ammo",
description = "Enable to stop when out of ammo", description = "Enable to stop when out of ammo",
position = 58, position = 58,
titleSection = "generalTitle" title = "generalTitle"
) )
default boolean stopAmmo() default boolean stopAmmo()
{ {
@ -744,7 +718,7 @@ public interface iPowerFighterConfig extends Config
name = "Stop if out of food", name = "Stop if out of food",
description = "Enable to stop when out of food", description = "Enable to stop when out of food",
position = 59, position = 59,
titleSection = "generalTitle" title = "generalTitle"
) )
default boolean stopFood() default boolean stopFood()
{ {
@ -756,7 +730,7 @@ public interface iPowerFighterConfig extends Config
name = "Food ID", name = "Food ID",
description = "Enter the ID of your food so bot knows when to stop", description = "Enter the ID of your food so bot knows when to stop",
position = 60, position = 60,
titleSection = "generalTitle", title = "generalTitle",
hidden = true, hidden = true,
unhide = "stopFood" unhide = "stopFood"
) )
@ -770,7 +744,7 @@ public interface iPowerFighterConfig extends Config
name = "Logout on stop", name = "Logout on stop",
description = "Enable to logout when out of food or ammo", description = "Enable to logout when out of food or ammo",
position = 65, position = 65,
titleSection = "generalTitle" title = "generalTitle"
) )
default boolean logout() default boolean logout()
{ {
@ -782,7 +756,7 @@ public interface iPowerFighterConfig extends Config
name = "Enable UI", name = "Enable UI",
description = "Enable to turn on in game UI", description = "Enable to turn on in game UI",
position = 70, position = 70,
titleSection = "generalTitle" title = "generalTitle"
) )
default boolean enableUI() default boolean enableUI()
{ {

View File

@ -9,14 +9,14 @@ import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.runelite.api.Client; import net.runelite.api.Client;
import static net.runelite.api.MenuOpcode.RUNELITE_OVERLAY_CONFIG; import static net.runelite.api.MenuAction.RUNELITE_OVERLAY_CONFIG;
import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE; import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE;
import net.runelite.client.ui.overlay.OverlayMenuEntry; import net.runelite.client.ui.overlay.OverlayMenuEntry;
import net.runelite.client.ui.overlay.OverlayPanel; import net.runelite.client.ui.overlay.OverlayPanel;
import net.runelite.client.ui.overlay.OverlayPosition; import net.runelite.client.ui.overlay.OverlayPosition;
import net.runelite.client.ui.overlay.components.TitleComponent; import net.runelite.client.ui.overlay.components.TitleComponent;
import net.runelite.client.ui.overlay.components.table.TableAlignment; import com.openosrs.client.ui.overlay.components.table.TableAlignment;
import net.runelite.client.ui.overlay.components.table.TableComponent; import com.openosrs.client.ui.overlay.components.table.TableComponent;
import net.runelite.client.util.ColorUtil; import net.runelite.client.util.ColorUtil;
import static org.apache.commons.lang3.time.DurationFormatUtils.formatDuration; import static org.apache.commons.lang3.time.DurationFormatUtils.formatDuration;

View File

@ -45,10 +45,10 @@ import net.runelite.api.GameState;
import net.runelite.api.InventoryID; import net.runelite.api.InventoryID;
import net.runelite.api.Item; import net.runelite.api.Item;
import net.runelite.api.ItemContainer; import net.runelite.api.ItemContainer;
import net.runelite.api.ItemDefinition; import net.runelite.api.ItemComposition;
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.MenuAction;
import net.runelite.api.NPC; import net.runelite.api.NPC;
import net.runelite.api.Player; import net.runelite.api.Player;
import net.runelite.api.Skill; import net.runelite.api.Skill;
@ -71,7 +71,6 @@ import net.runelite.client.eventbus.Subscribe;
import net.runelite.client.plugins.Plugin; 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.iutils.CalculationUtils; import net.runelite.client.plugins.iutils.CalculationUtils;
import net.runelite.client.plugins.iutils.InterfaceUtils; import net.runelite.client.plugins.iutils.InterfaceUtils;
import net.runelite.client.plugins.iutils.InventoryUtils; import net.runelite.client.plugins.iutils.InventoryUtils;
@ -94,8 +93,7 @@ import org.pf4j.Extension;
name = "iPower Fighter", name = "iPower Fighter",
enabledByDefault = false, enabledByDefault = false,
description = "Illumine - Power Fighter plugin", description = "Illumine - Power Fighter plugin",
tags = {"illumine", "combat", "ranged", "magic", "bot"}, tags = {"illumine", "combat", "ranged", "magic", "bot"}
type = PluginType.PVM
) )
@Slf4j @Slf4j
public class iPowerFighterPlugin extends Plugin public class iPowerFighterPlugin extends Plugin
@ -319,7 +317,7 @@ public class iPowerFighterPlugin extends Plugin
TileItem lootItem = getNearestTileItem(itemList); TileItem lootItem = getNearestTileItem(itemList);
if (lootItem != null) if (lootItem != null)
{ {
targetMenu = new MenuEntry("", "", lootItem.getId(), MenuOpcode.GROUND_ITEM_THIRD_OPTION.getId(), targetMenu = new MenuEntry("", "", lootItem.getId(), MenuAction.GROUND_ITEM_THIRD_OPTION.getId(),
lootItem.getTile().getSceneLocation().getX(), lootItem.getTile().getSceneLocation().getY(), false); lootItem.getTile().getSceneLocation().getX(), lootItem.getTile().getSceneLocation().getY(), false);
menu.setEntry(targetMenu); menu.setEntry(targetMenu);
mouse.delayMouseClick(lootItem.getTile().getItemLayer().getCanvasTilePoly().getBounds(), sleepDelay()); mouse.delayMouseClick(lootItem.getTile().getItemLayer().getCanvasTilePoly().getBounds(), sleepDelay());
@ -356,7 +354,7 @@ public class iPowerFighterPlugin extends Plugin
{ {
itemGeValue = utils.getOSBItem(itemID); itemGeValue = utils.getOSBItem(itemID);
} }
ItemDefinition itemDef = client.getItemDefinition(itemID); ItemComposition itemDef = client.getItemDefinition(itemID);
/* if (itemDef != null) { //Currently bugged (https://discord.com/channels/734831848173338684/744402742839345182/788226017978220544) /* if (itemDef != null) { //Currently bugged (https://discord.com/channels/734831848173338684/744402742839345182/788226017978220544)
if (!itemDef.isTradeable()) { if (!itemDef.isTradeable()) {
log.debug("Tried to alch untradeable item {}, adding to blacklist", itemDef.getName()); log.debug("Tried to alch untradeable item {}, adding to blacklist", itemDef.getName());
@ -380,7 +378,7 @@ public class iPowerFighterPlugin extends Plugin
log.debug("Alching item: {}", alchItem.getId()); log.debug("Alching item: {}", alchItem.getId());
targetMenu = new MenuEntry("", "", targetMenu = new MenuEntry("", "",
alchItem.getId(), alchItem.getId(),
MenuOpcode.ITEM_USE_ON_WIDGET.getId(), MenuAction.ITEM_USE_ON_WIDGET.getId(),
alchItem.getIndex(), WidgetInfo.INVENTORY.getId(), alchItem.getIndex(), WidgetInfo.INVENTORY.getId(),
false); false);
utils.oneClickCastSpell(WidgetInfo.SPELL_HIGH_LEVEL_ALCHEMY, targetMenu, alchItem.getCanvasBounds().getBounds(), sleepDelay()); utils.oneClickCastSpell(WidgetInfo.SPELL_HIGH_LEVEL_ALCHEMY, targetMenu, alchItem.getCanvasBounds().getBounds(), sleepDelay());
@ -403,7 +401,7 @@ public class iPowerFighterPlugin extends Plugin
{ {
continue; continue;
} }
targetMenu = new MenuEntry("", "", bone.getId(), MenuOpcode.ITEM_FIRST_OPTION.getId(), targetMenu = new MenuEntry("", "", bone.getId(), MenuAction.ITEM_FIRST_OPTION.getId(),
bone.getIndex(), WidgetInfo.INVENTORY.getId(), false); bone.getIndex(), WidgetInfo.INVENTORY.getId(), false);
menu.setEntry(targetMenu); menu.setEntry(targetMenu);
mouse.handleMouseClick(bone.getCanvasBounds()); mouse.handleMouseClick(bone.getCanvasBounds());
@ -415,7 +413,7 @@ public class iPowerFighterPlugin extends Plugin
private void attackNPC(NPC npc) private void attackNPC(NPC npc)
{ {
targetMenu = new MenuEntry("", "", npc.getIndex(), MenuOpcode.NPC_SECOND_OPTION.getId(), targetMenu = new MenuEntry("", "", npc.getIndex(), MenuAction.NPC_SECOND_OPTION.getId(),
0, 0, false); 0, 0, false);
menu.setEntry(targetMenu); menu.setEntry(targetMenu);
mouse.delayMouseClick(currentNPC.getConvexHull().getBounds(), sleepDelay()); mouse.delayMouseClick(currentNPC.getConvexHull().getBounds(), sleepDelay());
@ -684,7 +682,7 @@ public class iPowerFighterPlugin extends Plugin
WidgetItem ammoItem = inventory.getWidgetItem(config.ammoID()); WidgetItem ammoItem = inventory.getWidgetItem(config.ammoID());
if (ammoItem != null) if (ammoItem != null)
{ {
targetMenu = new MenuEntry("", "", ammoItem.getId(), MenuOpcode.ITEM_SECOND_OPTION.getId(), ammoItem.getIndex(), targetMenu = new MenuEntry("", "", ammoItem.getId(), MenuAction.ITEM_SECOND_OPTION.getId(), ammoItem.getIndex(),
WidgetInfo.INVENTORY.getId(), false); WidgetInfo.INVENTORY.getId(), false);
menu.setEntry(targetMenu); menu.setEntry(targetMenu);
mouse.delayMouseClick(ammoItem.getCanvasBounds(), sleepDelay()); mouse.delayMouseClick(ammoItem.getCanvasBounds(), sleepDelay());
@ -695,7 +693,7 @@ public class iPowerFighterPlugin extends Plugin
if (bracelet != null) if (bracelet != null)
{ {
log.debug("Equipping bracelet"); log.debug("Equipping bracelet");
targetMenu = new MenuEntry("", "", bracelet.getId(), MenuOpcode.ITEM_SECOND_OPTION.getId(), bracelet.getIndex(), targetMenu = new MenuEntry("", "", bracelet.getId(), MenuAction.ITEM_SECOND_OPTION.getId(), bracelet.getIndex(),
WidgetInfo.INVENTORY.getId(), false); WidgetInfo.INVENTORY.getId(), false);
menu.setEntry(targetMenu); menu.setEntry(targetMenu);
mouse.delayMouseClick(bracelet.getCanvasBounds(), sleepDelay()); mouse.delayMouseClick(bracelet.getCanvasBounds(), sleepDelay());

View File

@ -23,7 +23,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
version = "5.0.2" version = "6.1.0"
project.extra["PluginName"] = "iPower Skiller" project.extra["PluginName"] = "iPower Skiller"
project.extra["PluginDescription"] = "Illumine auto power skiller plugin" project.extra["PluginDescription"] = "Illumine auto power skiller plugin"

View File

@ -29,25 +29,20 @@ import net.runelite.client.config.Button;
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;
import net.runelite.client.config.ConfigSection; import net.runelite.client.config.ConfigTitle;
import net.runelite.client.config.ConfigTitleSection;
import net.runelite.client.config.Range; import net.runelite.client.config.Range;
import net.runelite.client.config.Title;
@ConfigGroup("iPowerSkiller") @ConfigGroup("iPowerSkiller")
public interface iPowerSkillerConfiguration extends Config public interface iPowerSkillerConfiguration extends Config
{ {
@ConfigSection( @ConfigTitle(
keyName = "delayConfig", keyName = "delayConfig",
name = "Sleep Delay Configuration", name = "Sleep Delay Configuration",
description = "Configure how the bot handles sleep delays", description = "Configure how the bot handles sleep delays",
position = 2 position = 2
) )
default boolean delayConfig() String delayConfig = "delayConfig";
{
return false;
}
@Range( @Range(
min = 0, min = 0,
@ -125,16 +120,13 @@ public interface iPowerSkillerConfiguration extends Config
return false; return false;
} }
@ConfigSection( @ConfigTitle(
keyName = "delayTickConfig", keyName = "delayTickConfig",
name = "Game Tick Configuration", name = "Game Tick Configuration",
description = "Configure how the bot handles game tick delays, 1 game tick equates to roughly 600ms", description = "Configure how the bot handles game tick delays, 1 game tick equates to roughly 600ms",
position = 8 position = 8
) )
default boolean delayTickConfig() String delayTickConfig = "delayTickConfig";
{
return false;
}
@Range( @Range(
min = 0, min = 0,
@ -212,23 +204,20 @@ public interface iPowerSkillerConfiguration extends Config
return false; return false;
} }
@ConfigTitleSection( @ConfigTitle(
keyName = "instructionsTitle", keyName = "instructionsTitle",
name = "Instructions", name = "Instructions",
description = "", description = "",
position = 16 position = 16
) )
default Title instructionsTitle() String instructionsTitle = "instructionsTitle";
{
return new Title();
}
@ConfigItem( @ConfigItem(
keyName = "instructions", keyName = "instructions",
name = "", name = "",
description = "Instructions. Don't enter anything into this field", description = "Instructions. Don't enter anything into this field",
position = 20, position = 20,
titleSection = "instructionsTitle" title = "instructionsTitle"
) )
default String instructions() default String instructions()
{ {
@ -236,16 +225,13 @@ public interface iPowerSkillerConfiguration extends Config
"Typically in-game objects that have blue hover text are Game Objects (trees, rocks etc.) and objects that have yellow text are NPCs (fishing spots etc.)"; "Typically in-game objects that have blue hover text are Game Objects (trees, rocks etc.) and objects that have yellow text are NPCs (fishing spots etc.)";
} }
@ConfigTitleSection( @ConfigTitle(
keyName = "skillerTitle", keyName = "skillerTitle",
name = "Power Skiller Configuration", name = "Power Skiller Configuration",
description = "", description = "",
position = 60 position = 60
) )
default Title skillerTitle() String skillerTitle = "delayConfig";
{
return new Title();
}
@ConfigItem( @ConfigItem(
keyName = "type", keyName = "type",
@ -253,7 +239,7 @@ public interface iPowerSkillerConfiguration extends Config
description = "Type of Object. Typically in-game objects that have blue hover text are Game Objects (trees, rocks etc.) " + description = "Type of Object. Typically in-game objects that have blue hover text are Game Objects (trees, rocks etc.) " +
"and objects that have yellow text are NPCs (e.g. fishing spots). Use Developer Tools to determine Object Type and ID.", "and objects that have yellow text are NPCs (e.g. fishing spots). Use Developer Tools to determine Object Type and ID.",
position = 70, position = 70,
titleSection = "skillerTitle" title = "skillerTitle"
) )
default iPowerSkillerType type() default iPowerSkillerType type()
{ {
@ -265,23 +251,20 @@ public interface iPowerSkillerConfiguration extends Config
name = "IDs to power-skill", name = "IDs to power-skill",
description = "Separate with comma", description = "Separate with comma",
position = 80, position = 80,
titleSection = "skillerTitle" title = "skillerTitle"
) )
default String objectIds() default String objectIds()
{ {
return ""; return "";
} }
@ConfigTitleSection( @ConfigTitle(
keyName = "opcodeTitle", keyName = "opcodeTitle",
name = "Menu Opcodes", name = "Menu Opcodes",
description = "", description = "",
position = 85 position = 85
) )
default Title opcodeTitle() String opcodeTitle = "opcodeTitle";
{
return new Title();
}
@ConfigItem( @ConfigItem(
keyName = "customOpcode", keyName = "customOpcode",
@ -289,7 +272,7 @@ public interface iPowerSkillerConfiguration extends Config
description = "Enable to use a custom Menu Opcode. Use this in scenarios where the default Menu Opcode isn't working." + description = "Enable to use a custom Menu Opcode. Use this in scenarios where the default Menu Opcode isn't working." +
"Example default NPC Opcode works for fishing with lobster pots but not harpooning. To harpoon set an opcode of 10.", "Example default NPC Opcode works for fishing with lobster pots but not harpooning. To harpoon set an opcode of 10.",
position = 86, position = 86,
titleSection = "opcodeTitle" title = "opcodeTitle"
) )
default boolean customOpcode() default boolean customOpcode()
{ {
@ -304,7 +287,7 @@ public interface iPowerSkillerConfiguration extends Config
position = 87, position = 87,
hidden = true, hidden = true,
unhide = "customOpcode", unhide = "customOpcode",
titleSection = "opcodeTitle" title = "opcodeTitle"
) )
default boolean printOpcode() default boolean printOpcode()
{ {
@ -317,7 +300,7 @@ public interface iPowerSkillerConfiguration extends Config
description = "Enable to use a custom Menu Opcode for interacting with an object." + description = "Enable to use a custom Menu Opcode for interacting with an object." +
"Example default NPC Opcode works for fishing with lobster pots but not harpooning. To harpoon set an opcode of 10. Use for pickpocketing etc.", "Example default NPC Opcode works for fishing with lobster pots but not harpooning. To harpoon set an opcode of 10. Use for pickpocketing etc.",
position = 88, position = 88,
titleSection = "opcodeTitle", title = "opcodeTitle",
hidden = true, hidden = true,
unhide = "customOpcode" unhide = "customOpcode"
@ -335,7 +318,7 @@ public interface iPowerSkillerConfiguration extends Config
position = 89, position = 89,
hidden = true, hidden = true,
unhide = "objectOpcode", unhide = "objectOpcode",
titleSection = "opcodeTitle" title = "opcodeTitle"
) )
default int objectOpcodeValue() default int objectOpcodeValue()
{ {
@ -348,7 +331,7 @@ public interface iPowerSkillerConfiguration extends Config
description = "Enable to use a custom Menu for interacting with an inventory item." + description = "Enable to use a custom Menu for interacting with an inventory item." +
"Example emptying jars, combining items etc.", "Example emptying jars, combining items etc.",
position = 90, position = 90,
titleSection = "opcodeTitle", title = "opcodeTitle",
hidden = true, hidden = true,
unhide = "customOpcode" unhide = "customOpcode"
@ -364,7 +347,7 @@ public interface iPowerSkillerConfiguration extends Config
description = "Enable to combine 2 items in inventory together" + description = "Enable to combine 2 items in inventory together" +
"Example cutting fish", "Example cutting fish",
position = 91, position = 91,
titleSection = "opcodeTitle", title = "opcodeTitle",
hidden = true, hidden = true,
unhide = "inventoryMenu" unhide = "inventoryMenu"
@ -381,7 +364,7 @@ public interface iPowerSkillerConfiguration extends Config
position = 92, position = 92,
hidden = true, hidden = true,
unhide = "combineItems", unhide = "combineItems",
titleSection = "opcodeTitle" title = "opcodeTitle"
) )
default int toolId() default int toolId()
{ {
@ -395,30 +378,27 @@ public interface iPowerSkillerConfiguration extends Config
position = 93, position = 93,
hidden = true, hidden = true,
unhide = "inventoryMenu", unhide = "inventoryMenu",
titleSection = "opcodeTitle" title = "opcodeTitle"
) )
default int inventoryOpcodeValue() default int inventoryOpcodeValue()
{ {
return 0; return 0;
} }
@ConfigTitleSection( @ConfigTitle(
keyName = "dropTitle", keyName = "dropTitle",
name = "Dropping & Banking", name = "Dropping & Banking",
description = "", description = "",
position = 89 position = 89
) )
default Title dropTitle() String dropTitle = "dropTitle";
{
return new Title();
}
@ConfigItem( @ConfigItem(
keyName = "bankItems", keyName = "bankItems",
name = "Bank gathered items (Beta)", name = "Bank gathered items (Beta)",
description = "Enable to bank your items instead of drop", description = "Enable to bank your items instead of drop",
position = 90, position = 90,
titleSection = "dropTitle" title = "dropTitle"
) )
default boolean bankItems() default boolean bankItems()
{ {
@ -430,7 +410,7 @@ public interface iPowerSkillerConfiguration extends Config
name = "Drop/Bank entire inventory", name = "Drop/Bank entire inventory",
description = "Enable to drop your entire inventory", description = "Enable to drop your entire inventory",
position = 91, position = 91,
titleSection = "dropTitle" title = "dropTitle"
) )
default boolean dropInventory() default boolean dropInventory()
{ {
@ -443,7 +423,7 @@ public interface iPowerSkillerConfiguration extends Config
description = "Separate with comma. Bot will stop if required items are not in inventory, e.g. fishing bait. Leave at 0 if there are none.", description = "Separate with comma. Bot will stop if required items are not in inventory, e.g. fishing bait. Leave at 0 if there are none.",
position = 100, position = 100,
hide = "dropInventory", hide = "dropInventory",
titleSection = "dropTitle" title = "dropTitle"
) )
default String requiredItems() default String requiredItems()
{ {
@ -456,7 +436,7 @@ public interface iPowerSkillerConfiguration extends Config
description = "Bot will logout if required items are not in inventory, e.g. fishing bait.", description = "Bot will logout if required items are not in inventory, e.g. fishing bait.",
position = 101, position = 101,
hide = "dropInventory", hide = "dropInventory",
titleSection = "dropTitle" title = "dropTitle"
) )
default boolean logout() default boolean logout()
{ {
@ -469,7 +449,7 @@ public interface iPowerSkillerConfiguration extends Config
description = "Separate with comma, enable below option to not drop/bank these IDs.", description = "Separate with comma, enable below option to not drop/bank these IDs.",
position = 110, position = 110,
hide = "dropInventory", hide = "dropInventory",
titleSection = "dropTitle" title = "dropTitle"
) )
default String items() default String items()
{ {
@ -482,7 +462,7 @@ public interface iPowerSkillerConfiguration extends Config
description = "Enable to drop/Bank all items except the given IDs", description = "Enable to drop/Bank all items except the given IDs",
position = 120, position = 120,
hide = "dropInventory", hide = "dropInventory",
titleSection = "dropTitle" title = "dropTitle"
) )
default boolean dropExcept() default boolean dropExcept()
{ {
@ -494,7 +474,7 @@ public interface iPowerSkillerConfiguration extends Config
name = "Get 1 Drop 1", name = "Get 1 Drop 1",
description = "Tick manipulation", description = "Tick manipulation",
position = 121, position = 121,
titleSection = "dropTitle" title = "dropTitle"
) )
default boolean dropOne() default boolean dropOne()
{ {
@ -510,7 +490,7 @@ public interface iPowerSkillerConfiguration extends Config
name = "Location Radius", name = "Location Radius",
description = "Radius to search for GameObjects.", description = "Radius to search for GameObjects.",
position = 130, position = 130,
titleSection = "skillerTitle" title = "skillerTitle"
) )
default int locationRadius() default int locationRadius()
{ {
@ -522,7 +502,7 @@ public interface iPowerSkillerConfiguration extends Config
name = "Draw Location Radius", name = "Draw Location Radius",
description = "Draw location Radius on screen.", description = "Draw location Radius on screen.",
position = 131, position = 131,
titleSection = "skillerTitle" title = "skillerTitle"
) )
default boolean drawlocationRadius() default boolean drawlocationRadius()
{ {
@ -534,7 +514,7 @@ public interface iPowerSkillerConfiguration extends Config
name = "Safe spot", name = "Safe spot",
description = "Safe spot will force your character to always return to the tile you started the plugin on", description = "Safe spot will force your character to always return to the tile you started the plugin on",
position = 135, position = 135,
titleSection = "skillerTitle" title = "skillerTitle"
) )
default boolean safeSpot() default boolean safeSpot()
{ {
@ -548,7 +528,7 @@ public interface iPowerSkillerConfiguration extends Config
position = 136, position = 136,
hidden = true, hidden = true,
unhide = "safeSpot", unhide = "safeSpot",
titleSection = "skillerTitle" title = "skillerTitle"
) )
default int safeSpotRadius() default int safeSpotRadius()
{ {
@ -560,7 +540,7 @@ public interface iPowerSkillerConfiguration extends Config
name = "Enable UI", name = "Enable UI",
description = "Enable to turn on in game UI", description = "Enable to turn on in game UI",
position = 140, position = 140,
titleSection = "skillerTitle" title = "skillerTitle"
) )
default boolean enableUI() default boolean enableUI()
{ {

View File

@ -9,7 +9,7 @@ import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.runelite.api.Client; import net.runelite.api.Client;
import static net.runelite.api.MenuOpcode.RUNELITE_OVERLAY_CONFIG; import static net.runelite.api.MenuAction.RUNELITE_OVERLAY_CONFIG;
import net.runelite.api.Perspective; import net.runelite.api.Perspective;
import net.runelite.api.coords.LocalPoint; import net.runelite.api.coords.LocalPoint;
import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE; import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE;
@ -18,8 +18,8 @@ import net.runelite.client.ui.overlay.OverlayPanel;
import net.runelite.client.ui.overlay.OverlayPosition; import net.runelite.client.ui.overlay.OverlayPosition;
import net.runelite.client.ui.overlay.OverlayUtil; import net.runelite.client.ui.overlay.OverlayUtil;
import net.runelite.client.ui.overlay.components.TitleComponent; import net.runelite.client.ui.overlay.components.TitleComponent;
import net.runelite.client.ui.overlay.components.table.TableAlignment; import com.openosrs.client.ui.overlay.components.table.TableAlignment;
import net.runelite.client.ui.overlay.components.table.TableComponent; import com.openosrs.client.ui.overlay.components.table.TableComponent;
import net.runelite.client.util.ColorUtil; import net.runelite.client.util.ColorUtil;
import static org.apache.commons.lang3.time.DurationFormatUtils.formatDuration; import static org.apache.commons.lang3.time.DurationFormatUtils.formatDuration;

View File

@ -38,7 +38,7 @@ import net.runelite.api.Client;
import net.runelite.api.GameObject; import net.runelite.api.GameObject;
import net.runelite.api.GameState; import net.runelite.api.GameState;
import net.runelite.api.MenuEntry; import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode; import net.runelite.api.MenuAction;
import net.runelite.api.NPC; import net.runelite.api.NPC;
import net.runelite.api.NullObjectID; import net.runelite.api.NullObjectID;
import net.runelite.api.ObjectID; import net.runelite.api.ObjectID;
@ -53,7 +53,7 @@ import net.runelite.api.events.GameStateChanged;
import net.runelite.api.events.GameTick; import net.runelite.api.events.GameTick;
import net.runelite.api.events.ItemContainerChanged; 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.NpcChanged;
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.client.config.ConfigManager; import net.runelite.client.config.ConfigManager;
@ -63,7 +63,6 @@ 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.PluginManager; import net.runelite.client.plugins.PluginManager;
import net.runelite.client.plugins.PluginType;
import static net.runelite.client.plugins.ipowerskiller.iPowerSkillerState.*; import static net.runelite.client.plugins.ipowerskiller.iPowerSkillerState.*;
import net.runelite.client.plugins.iutils.BankUtils; import net.runelite.client.plugins.iutils.BankUtils;
import net.runelite.client.plugins.iutils.CalculationUtils; import net.runelite.client.plugins.iutils.CalculationUtils;
@ -87,8 +86,7 @@ import org.pf4j.Extension;
name = "iPower Skiller", name = "iPower Skiller",
enabledByDefault = false, enabledByDefault = false,
description = "Illumine auto power-skill plugin", description = "Illumine auto power-skill plugin",
tags = {"fishing, mining, wood-cutting, illumine, bot, power, skill"}, tags = {"fishing, mining, wood-cutting, illumine, bot, power, skill"}
type = PluginType.SKILLING
) )
@Slf4j @Slf4j
public class iPowerSkillerPlugin extends Plugin public class iPowerSkillerPlugin extends Plugin
@ -327,7 +325,7 @@ public class iPowerSkillerPlugin extends Plugin
private void interactNPC() private void interactNPC()
{ {
targetNPC = npc.findNearestNpcWithin(skillLocation, config.locationRadius(), objectIds); targetNPC = npc.findNearestNpcWithin(skillLocation, config.locationRadius(), objectIds);
opcode = (config.customOpcode() && config.objectOpcode() ? config.objectOpcodeValue() : MenuOpcode.NPC_FIRST_OPTION.getId()); opcode = (config.customOpcode() && config.objectOpcode() ? config.objectOpcodeValue() : MenuAction.NPC_FIRST_OPTION.getId());
if (targetNPC != null) if (targetNPC != null)
{ {
targetMenu = new MenuEntry("", "", targetNPC.getIndex(), opcode, 0, 0, false); targetMenu = new MenuEntry("", "", targetNPC.getIndex(), opcode, 0, 0, false);
@ -344,7 +342,7 @@ public class iPowerSkillerPlugin extends Plugin
{ {
targetObject = (config.type() == iPowerSkillerType.DENSE_ESSENCE) ? getDenseEssence() : targetObject = (config.type() == iPowerSkillerType.DENSE_ESSENCE) ? getDenseEssence() :
object.findNearestGameObjectWithin(skillLocation, config.locationRadius(), objectIds); object.findNearestGameObjectWithin(skillLocation, config.locationRadius(), objectIds);
opcode = (config.customOpcode() && config.objectOpcode() ? config.objectOpcodeValue() : MenuOpcode.GAME_OBJECT_FIRST_OPTION.getId()); opcode = (config.customOpcode() && config.objectOpcode() ? config.objectOpcodeValue() : MenuAction.GAME_OBJECT_FIRST_OPTION.getId());
if (targetObject != null) if (targetObject != null)
{ {
targetMenu = new MenuEntry("", "", targetObject.getId(), opcode, targetMenu = new MenuEntry("", "", targetObject.getId(), opcode,
@ -361,7 +359,7 @@ public class iPowerSkillerPlugin extends Plugin
private void interactWall() private void interactWall()
{ {
targetWall = object.findWallObjectWithin(skillLocation, config.locationRadius(), objectIds); targetWall = object.findWallObjectWithin(skillLocation, config.locationRadius(), objectIds);
opcode = (config.customOpcode() && config.objectOpcode() ? config.objectOpcodeValue() : MenuOpcode.GAME_OBJECT_FIRST_OPTION.getId()); opcode = (config.customOpcode() && config.objectOpcode() ? config.objectOpcodeValue() : MenuAction.GAME_OBJECT_FIRST_OPTION.getId());
if (targetWall != null) if (targetWall != null)
{ {
targetMenu = new MenuEntry("", "", targetWall.getId(), opcode, targetMenu = new MenuEntry("", "", targetWall.getId(), opcode,
@ -677,8 +675,8 @@ public class iPowerSkillerPlugin extends Plugin
{ {
if (config.customOpcode() && config.printOpcode()) if (config.customOpcode() && config.printOpcode())
{ {
utils.sendGameMessage("Identifier value: " + event.getIdentifier()); utils.sendGameMessage("Identifier value: " + event.getId());
utils.sendGameMessage("Opcode value: " + event.getOpcode()); utils.sendGameMessage("Opcode value: " + event.getMenuAction());
} }
} }
@ -699,7 +697,7 @@ public class iPowerSkillerPlugin extends Plugin
} }
@Subscribe @Subscribe
public void onNPCDefinitionChanged(NpcDefinitionChanged event) public void onNPCDefinitionChanged(NpcChanged event)
{ {
if (targetNPC == null || event.getNpc() != targetNPC || !startPowerSkiller) if (targetNPC == null || event.getNpc() != targetNPC || !startPowerSkiller)
{ {
@ -784,7 +782,7 @@ public class iPowerSkillerPlugin extends Plugin
//extend search outside the players set radius //extend search outside the players set radius
targetObject = object.getGameObjects(ObjectID.GRINDER).get(0); targetObject = object.getGameObjects(ObjectID.GRINDER).get(0);
} }
opcode = (config.customOpcode() && config.objectOpcode() ? config.objectOpcodeValue() : MenuOpcode.GAME_OBJECT_FIRST_OPTION.getId()); opcode = (config.customOpcode() && config.objectOpcode() ? config.objectOpcodeValue() : MenuAction.GAME_OBJECT_FIRST_OPTION.getId());
if (targetObject != null) if (targetObject != null)
{ {
targetMenu = new MenuEntry("", "", targetObject.getId(), opcode, targetMenu = new MenuEntry("", "", targetObject.getId(), opcode,

View File

@ -23,7 +23,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
version = "4.3.4"
version = "5.1.0"
project.extra["PluginName"] = "iQuick Eater" 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"

View File

@ -34,7 +34,7 @@ import net.runelite.api.GameState;
import net.runelite.api.InventoryID; 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.MenuAction;
import net.runelite.api.Player; import net.runelite.api.Player;
import net.runelite.api.Skill; import net.runelite.api.Skill;
import net.runelite.api.VarPlayer; import net.runelite.api.VarPlayer;
@ -51,7 +51,6 @@ import net.runelite.client.game.ItemManager;
import net.runelite.client.plugins.Plugin; 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.iutils.CalculationUtils; import net.runelite.client.plugins.iutils.CalculationUtils;
import net.runelite.client.plugins.iutils.InventoryUtils; import net.runelite.client.plugins.iutils.InventoryUtils;
import net.runelite.client.plugins.iutils.MenuUtils; import net.runelite.client.plugins.iutils.MenuUtils;
@ -67,8 +66,7 @@ import org.pf4j.Extension;
name = "iQuick Eater", name = "iQuick Eater",
enabledByDefault = false, enabledByDefault = false,
description = "Illumine - auto eat food and drink some potions below configured values", description = "Illumine - auto eat food and drink some potions below configured values",
tags = {"illumine", "auto", "bot", "eat", "food", "potions", "stamina", "prayer"}, tags = {"illumine", "auto", "bot", "eat", "food", "potions", "stamina", "prayer"}
type = PluginType.UTILITY
) )
@Slf4j @Slf4j
public class iQuickEaterPlugin extends Plugin public class iQuickEaterPlugin extends Plugin
@ -174,7 +172,7 @@ public class iQuickEaterPlugin extends Plugin
{ {
if (item != null) if (item != null)
{ {
targetMenu = new MenuEntry("", "", item.getId(), MenuOpcode.ITEM_FIRST_OPTION.getId(), item.getIndex(), targetMenu = new MenuEntry("", "", item.getId(), MenuAction.ITEM_FIRST_OPTION.getId(), item.getIndex(),
WidgetInfo.INVENTORY.getId(), false); WidgetInfo.INVENTORY.getId(), false);
menu.setEntry(targetMenu); menu.setEntry(targetMenu);
mouse.delayMouseClick(item.getCanvasBounds(), calc.getRandomIntBetweenRange(25, 200)); mouse.delayMouseClick(item.getCanvasBounds(), calc.getRandomIntBetweenRange(25, 200));
@ -261,7 +259,7 @@ public class iQuickEaterPlugin extends Plugin
{ {
if (playerUtils.getEquippedItems() != null && playerUtils.getEquippedItems().get(2).getId() != 11090) if (playerUtils.getEquippedItems() != null && playerUtils.getEquippedItems().get(2).getId() != 11090)
{ {
targetMenu = new MenuEntry("Wear", "Wear", 11090, MenuOpcode.ITEM_SECOND_OPTION.getId(), inventory.getWidgetItem(11090).getIndex(), targetMenu = new MenuEntry("Wear", "Wear", 11090, MenuAction.ITEM_SECOND_OPTION.getId(), inventory.getWidgetItem(11090).getIndex(),
WidgetInfo.INVENTORY.getId(), false); WidgetInfo.INVENTORY.getId(), false);
menu.setEntry(targetMenu); menu.setEntry(targetMenu);
mouse.delayMouseClick(inventory.getWidgetItem(11090).getCanvasBounds(), calc.getRandomIntBetweenRange(25, 200)); mouse.delayMouseClick(inventory.getWidgetItem(11090).getCanvasBounds(), calc.getRandomIntBetweenRange(25, 200));

View File

@ -23,7 +23,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
version = "2.0.2" version = "3.1.0"
project.extra["PluginName"] = "iRandom Handler" 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"

View File

@ -28,22 +28,19 @@ package net.runelite.client.plugins.irandomhandler;
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;
import net.runelite.client.config.ConfigSection; import net.runelite.client.config.ConfigTitle;
import net.runelite.client.config.Range; import net.runelite.client.config.Range;
@ConfigGroup("irandomhandler") @ConfigGroup("irandomhandler")
public interface iRandomHandlerConfig extends Config public interface iRandomHandlerConfig extends Config
{ {
@ConfigSection( @ConfigTitle(
keyName = "delayConfig", keyName = "delayConfig",
name = "Sleep Delay Configuration", name = "Sleep Delay Configuration",
description = "Configure how the bot handles sleep delays", description = "Configure how the bot handles sleep delays",
position = 0 position = 0
) )
default boolean delayConfig() String delayConfig = "delayConfig";
{
return false;
}
@Range( @Range(
min = 0, min = 0,
@ -121,16 +118,13 @@ public interface iRandomHandlerConfig extends Config
return false; return false;
} }
@ConfigSection( @ConfigTitle(
keyName = "delayTickConfig", keyName = "delayTickConfig",
name = "Game Tick Configuration", name = "Game Tick Configuration",
description = "Configure how the bot handles game tick delays, 1 game tick equates to roughly 600ms", description = "Configure how the bot handles game tick delays, 1 game tick equates to roughly 600ms",
position = 10 position = 10
) )
default boolean delayTickConfig() String delayTickConfig = "delayTickConfig";
{
return false;
}
@Range( @Range(
min = 0, min = 0,

View File

@ -32,7 +32,7 @@ import lombok.extern.slf4j.Slf4j;
import net.runelite.api.Actor; import net.runelite.api.Actor;
import net.runelite.api.Client; import net.runelite.api.Client;
import net.runelite.api.MenuEntry; import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode; import net.runelite.api.MenuAction;
import net.runelite.api.NPC; import net.runelite.api.NPC;
import net.runelite.api.NpcID; import net.runelite.api.NpcID;
import net.runelite.api.Player; import net.runelite.api.Player;
@ -46,7 +46,6 @@ import net.runelite.client.eventbus.Subscribe;
import net.runelite.client.plugins.Plugin; 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.iutils.CalculationUtils; import net.runelite.client.plugins.iutils.CalculationUtils;
import net.runelite.client.plugins.iutils.MenuUtils; import net.runelite.client.plugins.iutils.MenuUtils;
import net.runelite.client.plugins.iutils.MouseUtils; import net.runelite.client.plugins.iutils.MouseUtils;
@ -59,8 +58,7 @@ import org.pf4j.Extension;
name = "iRandom Handler", name = "iRandom Handler",
enabledByDefault = false, enabledByDefault = false,
description = "illumine - Dismiss random events and handle genie", description = "illumine - Dismiss random events and handle genie",
tags = {"illumine", "random", "event", "genie", "bot"}, tags = {"illumine", "random", "event", "genie", "bot"}
type = PluginType.UTILITY
) )
@Slf4j @Slf4j
public class iRandomHandlerPlugin extends Plugin public class iRandomHandlerPlugin extends Plugin
@ -208,7 +206,7 @@ public class iRandomHandlerPlugin extends Plugin
if (client.getWidget(WidgetInfo.DIALOG_NPC_CONTINUE) != null) if (client.getWidget(WidgetInfo.DIALOG_NPC_CONTINUE) != null)
{ {
log.debug("Genie click here to continue found, progressing..."); log.debug("Genie click here to continue found, progressing...");
targetMenu = new MenuEntry("Continue", "", 0, MenuOpcode.WIDGET_TYPE_6.getId(), targetMenu = new MenuEntry("Continue", "", 0, MenuAction.WIDGET_TYPE_6.getId(),
-1, 15138819, false); -1, 15138819, false);
menu.setEntry(targetMenu); menu.setEntry(targetMenu);
mouse.delayMouseClick(randomToDismiss.getConvexHull().getBounds(), sleepDelay()); mouse.delayMouseClick(randomToDismiss.getConvexHull().getBounds(), sleepDelay());
@ -218,7 +216,7 @@ public class iRandomHandlerPlugin extends Plugin
} }
log.debug("Dismissing random event"); log.debug("Dismissing random event");
targetMenu = new MenuEntry("", "", randomToDismiss.getIndex(), targetMenu = new MenuEntry("", "", randomToDismiss.getIndex(),
(genie) ? MenuOpcode.NPC_FIRST_OPTION.getId() : MenuOpcode.NPC_FIFTH_OPTION.getId(), (genie) ? MenuAction.NPC_FIRST_OPTION.getId() : MenuAction.NPC_FIFTH_OPTION.getId(),
0, 0, false); 0, 0, false);
menu.setEntry(targetMenu); menu.setEntry(targetMenu);
mouse.delayMouseClick(randomToDismiss.getConvexHull().getBounds(), sleepDelay()); mouse.delayMouseClick(randomToDismiss.getConvexHull().getBounds(), sleepDelay());

View File

@ -23,7 +23,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
version = "5.0.5" version = "6.1.0"
project.extra["PluginName"] = "iRooftop Agility" project.extra["PluginName"] = "iRooftop Agility"
project.extra["PluginDescription"] = "Illumine automated rooftop agility plugin" project.extra["PluginDescription"] = "Illumine automated rooftop agility plugin"

View File

@ -29,24 +29,19 @@ import net.runelite.client.config.Button;
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;
import net.runelite.client.config.ConfigSection; import net.runelite.client.config.ConfigTitle;
import net.runelite.client.config.ConfigTitleSection;
import net.runelite.client.config.Range; import net.runelite.client.config.Range;
import net.runelite.client.config.Title;
@ConfigGroup("iRooftopAgility") @ConfigGroup("iRooftopAgility")
public interface iRooftopAgilityConfig extends Config public interface iRooftopAgilityConfig extends Config
{ {
@ConfigSection( @ConfigTitle(
keyName = "delayConfig", keyName = "delayConfig",
name = "Sleep Delay(ms) Configuration", name = "Sleep Delay(ms) Configuration",
description = "Configure how the bot handles sleep delays in milliseconds", description = "Configure how the bot handles sleep delays in milliseconds",
position = 1 position = 1
) )
default boolean delayConfig() String delayConfig = "delayConfig";
{
return false;
}
@Range( @Range(
min = 0, min = 0,
@ -124,16 +119,13 @@ public interface iRooftopAgilityConfig extends Config
return false; return false;
} }
@ConfigSection( @ConfigTitle(
keyName = "delayTickConfig", keyName = "delayTickConfig",
name = "Game Tick Configuration", name = "Game Tick Configuration",
description = "Configure how the bot handles game tick delays, 1 game tick equates to roughly 600ms", description = "Configure how the bot handles game tick delays, 1 game tick equates to roughly 600ms",
position = 7 position = 7
) )
default boolean delayTickConfig() String delayTickConfig = "delayTickConfig";
{
return false;
}
@Range( @Range(
min = 0, min = 0,
@ -211,23 +203,20 @@ public interface iRooftopAgilityConfig extends Config
return false; return false;
} }
@ConfigTitleSection( @ConfigTitle(
keyName = "agilityTitle", keyName = "agilityTitle",
name = "Agility Configuration", name = "Agility Configuration",
description = "", description = "",
position = 13 position = 13
) )
default Title agilityTitle() String agilityTitle = "agilityTitle";
{
return new Title();
}
@ConfigItem( @ConfigItem(
keyName = "highAlch", keyName = "highAlch",
name = "High Alch", name = "High Alch",
description = "Enable to High Alch while running", description = "Enable to High Alch while running",
position = 14, position = 14,
titleSection = "agilityTitle" title = "agilityTitle"
) )
default boolean highAlch() default boolean highAlch()
{ {
@ -239,7 +228,7 @@ public interface iRooftopAgilityConfig extends Config
name = "Course", name = "Course",
description = "Supported agility courses", description = "Supported agility courses",
position = 15, position = 15,
titleSection = "agilityTitle", title = "agilityTitle",
hidden = false, hidden = false,
hide = "highAlch", hide = "highAlch",
hideValue = "true" hideValue = "true"
@ -255,7 +244,7 @@ public interface iRooftopAgilityConfig extends Config
name = "Banking Courses", name = "Banking Courses",
description = "Agility courses that support bank restocking", description = "Agility courses that support bank restocking",
position = 16, position = 16,
titleSection = "agilityTitle", title = "agilityTitle",
hidden = true, hidden = true,
unhide = "highAlch", unhide = "highAlch",
unhideValue = "true" unhideValue = "true"
@ -270,7 +259,7 @@ public interface iRooftopAgilityConfig extends Config
name = "Alch Item ID (un-noted)", name = "Alch Item ID (un-noted)",
description = "Item ID (un-noted) of item you wish to high alch.", description = "Item ID (un-noted) of item you wish to high alch.",
position = 17, position = 17,
titleSection = "agilityTitle", title = "agilityTitle",
hidden = true, hidden = true,
unhide = "highAlch" unhide = "highAlch"
) )
@ -284,7 +273,7 @@ public interface iRooftopAgilityConfig extends Config
name = "Bank to restock items", name = "Bank to restock items",
description = "Go to bank to restock items for high alch. Auto-disables at unsupported locations or bank doesn't contain item.", description = "Go to bank to restock items for high alch. Auto-disables at unsupported locations or bank doesn't contain item.",
position = 18, position = 18,
titleSection = "agilityTitle", title = "agilityTitle",
hidden = true, hidden = true,
unhide = "highAlch" unhide = "highAlch"
) )
@ -298,7 +287,7 @@ public interface iRooftopAgilityConfig extends Config
name = "Pick up Mark of Grace", name = "Pick up Mark of Grace",
description = "Enable to pick up Marks of Grace", description = "Enable to pick up Marks of Grace",
position = 19, position = 19,
titleSection = "agilityTitle" title = "agilityTitle"
) )
default boolean mogPickup() default boolean mogPickup()
{ {
@ -310,7 +299,7 @@ public interface iRooftopAgilityConfig extends Config
name = "Stop at HP", name = "Stop at HP",
description = "Stop if HP goes below given threshold", description = "Stop if HP goes below given threshold",
position = 20, position = 20,
titleSection = "agilityTitle" title = "agilityTitle"
) )
default int lowHP() default int lowHP()
{ {
@ -322,7 +311,7 @@ public interface iRooftopAgilityConfig extends Config
name = "Enable UI", name = "Enable UI",
description = "Enable to turn on in game UI", description = "Enable to turn on in game UI",
position = 21, position = 21,
titleSection = "agilityTitle" title = "agilityTitle"
) )
default boolean enableUI() default boolean enableUI()
{ {
@ -334,7 +323,7 @@ public interface iRooftopAgilityConfig extends Config
name = "Use Camelot Teleport", name = "Use Camelot Teleport",
description = "Use Camelot Teleport if you have hard diaries completed. Requires Air Runes or (Air Staff equipped) and Law Runes in inventory", description = "Use Camelot Teleport if you have hard diaries completed. Requires Air Runes or (Air Staff equipped) and Law Runes in inventory",
position = 22, position = 22,
titleSection = "agilityTitle" title = "agilityTitle"
) )
default boolean camelotTeleport() default boolean camelotTeleport()
{ {
@ -346,7 +335,7 @@ public interface iRooftopAgilityConfig extends Config
name = "Start/Stop", name = "Start/Stop",
description = "Test button that changes variable value", description = "Test button that changes variable value",
position = 33, position = 33,
titleSection = "agilityTitle" title = "agilityTitle"
) )
default Button startButton() default Button startButton()
{ {

View File

@ -9,14 +9,14 @@ import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.runelite.api.Client; import net.runelite.api.Client;
import static net.runelite.api.MenuOpcode.RUNELITE_OVERLAY_CONFIG; import static net.runelite.api.MenuAction.RUNELITE_OVERLAY_CONFIG;
import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE; import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE;
import net.runelite.client.ui.overlay.OverlayMenuEntry; import net.runelite.client.ui.overlay.OverlayMenuEntry;
import net.runelite.client.ui.overlay.OverlayPanel; import net.runelite.client.ui.overlay.OverlayPanel;
import net.runelite.client.ui.overlay.OverlayPosition; import net.runelite.client.ui.overlay.OverlayPosition;
import net.runelite.client.ui.overlay.components.TitleComponent; import net.runelite.client.ui.overlay.components.TitleComponent;
import net.runelite.client.ui.overlay.components.table.TableAlignment; import com.openosrs.client.ui.overlay.components.table.TableAlignment;
import net.runelite.client.ui.overlay.components.table.TableComponent; import com.openosrs.client.ui.overlay.components.table.TableComponent;
import net.runelite.client.util.ColorUtil; import net.runelite.client.util.ColorUtil;
import static org.apache.commons.lang3.time.DurationFormatUtils.formatDuration; import static org.apache.commons.lang3.time.DurationFormatUtils.formatDuration;

View File

@ -42,7 +42,7 @@ import net.runelite.api.GameState;
import net.runelite.api.GroundObject; import net.runelite.api.GroundObject;
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.MenuAction;
import net.runelite.api.Player; import net.runelite.api.Player;
import net.runelite.api.Skill; import net.runelite.api.Skill;
import net.runelite.api.Tile; import net.runelite.api.Tile;
@ -68,7 +68,6 @@ 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.PluginManager; import net.runelite.client.plugins.PluginManager;
import net.runelite.client.plugins.PluginType;
import static net.runelite.client.plugins.irooftopagility.iRooftopAgilityState.*; import static net.runelite.client.plugins.irooftopagility.iRooftopAgilityState.*;
import net.runelite.client.plugins.iutils.BankUtils; import net.runelite.client.plugins.iutils.BankUtils;
import net.runelite.client.plugins.iutils.CalculationUtils; import net.runelite.client.plugins.iutils.CalculationUtils;
@ -88,8 +87,7 @@ import org.pf4j.Extension;
name = "iRooftop Agility", name = "iRooftop Agility",
enabledByDefault = false, enabledByDefault = false,
description = "Illumine auto rooftop agility plugin", description = "Illumine auto rooftop agility plugin",
tags = {"agility"}, tags = {"agility"}
type = PluginType.SKILLING
) )
@Slf4j @Slf4j
public class iRooftopAgilityPlugin extends Plugin public class iRooftopAgilityPlugin extends Plugin
@ -298,7 +296,7 @@ public class iRooftopAgilityPlugin extends Plugin
if (!setHighAlch) if (!setHighAlch)
{ {
targetMenu = new MenuEntry("Cast", "<col=00ff00>High Level Alchemy</col>", 0, targetMenu = new MenuEntry("Cast", "<col=00ff00>High Level Alchemy</col>", 0,
MenuOpcode.WIDGET_TYPE_2.getId(), -1, 14286887, false); MenuAction.WIDGET_TYPE_2.getId(), -1, 14286887, false);
Widget spellWidget = client.getWidget(WidgetInfo.SPELL_HIGH_LEVEL_ALCHEMY); Widget spellWidget = client.getWidget(WidgetInfo.SPELL_HIGH_LEVEL_ALCHEMY);
if (spellWidget != null) if (spellWidget != null)
{ {
@ -317,7 +315,7 @@ public class iRooftopAgilityPlugin extends Plugin
alchItem = inventory.getWidgetItem(List.of(config.alchItemID(), (config.alchItemID() + 1))); alchItem = inventory.getWidgetItem(List.of(config.alchItemID(), (config.alchItemID() + 1)));
targetMenu = new MenuEntry("Cast", "<col=00ff00>High Level Alchemy</col><col=ffffff> ->", targetMenu = new MenuEntry("Cast", "<col=00ff00>High Level Alchemy</col><col=ffffff> ->",
alchItem.getId(), alchItem.getId(),
MenuOpcode.ITEM_USE_ON_WIDGET.getId(), MenuAction.ITEM_USE_ON_WIDGET.getId(),
alchItem.getIndex(), 9764864, alchItem.getIndex(), 9764864,
false); false);
menu.setEntry(targetMenu); menu.setEntry(targetMenu);
@ -342,9 +340,10 @@ public class iRooftopAgilityPlugin extends Plugin
{ {
if (bank.isOpen()) if (bank.isOpen())
{ {
if (client.getVarbitValue(Varbits.BANK_NOTE_FLAG.getId()) != 1) //if (client.getVarbitValue(Varbits.BANK_NOTE_FLAG.getId()) != 1)
if (client.getVarbitValue(3958) != 1)
{ {
targetMenu = new MenuEntry("Note", "", 1, MenuOpcode.CC_OP.getId(), -1, 786455, false); targetMenu = new MenuEntry("Note", "", 1, MenuAction.CC_OP.getId(), -1, 786455, false);
menu.setEntry(targetMenu); menu.setEntry(targetMenu);
mouse.delayClickRandomPointCenter(-200, 200, sleepDelay()); mouse.delayClickRandomPointCenter(-200, 200, sleepDelay());
return; return;
@ -397,7 +396,7 @@ public class iRooftopAgilityPlugin extends Plugin
if (bankBooth != null) if (bankBooth != null)
{ {
targetMenu = new MenuEntry("", "", bankBooth.getId(), targetMenu = new MenuEntry("", "", bankBooth.getId(),
MenuOpcode.GAME_OBJECT_SECOND_OPTION.getId(), bankBooth.getSceneMinLocation().getX(), MenuAction.GAME_OBJECT_SECOND_OPTION.getId(), bankBooth.getSceneMinLocation().getX(),
bankBooth.getSceneMinLocation().getY(), false); bankBooth.getSceneMinLocation().getY(), false);
menu.setEntry(targetMenu); menu.setEntry(targetMenu);
mouse.delayMouseClick(bankBooth.getConvexHull().getBounds(), sleepDelay()); mouse.delayMouseClick(bankBooth.getConvexHull().getBounds(), sleepDelay());
@ -422,7 +421,7 @@ public class iRooftopAgilityPlugin extends Plugin
DecorativeObject decObstacle = object.findNearestDecorObject(obstacle.getObstacleId()); DecorativeObject decObstacle = object.findNearestDecorObject(obstacle.getObstacleId());
if (decObstacle != null) if (decObstacle != null)
{ {
targetMenu = new MenuEntry("", "", decObstacle.getId(), MenuOpcode.GAME_OBJECT_FIRST_OPTION.getId(), decObstacle.getLocalLocation().getSceneX(), decObstacle.getLocalLocation().getSceneY(), false); targetMenu = new MenuEntry("", "", decObstacle.getId(), MenuAction.GAME_OBJECT_FIRST_OPTION.getId(), decObstacle.getLocalLocation().getSceneX(), decObstacle.getLocalLocation().getSceneY(), false);
menu.setEntry(targetMenu); menu.setEntry(targetMenu);
Rectangle clickPoint = (decObstacle.getConvexHull() != null) ? decObstacle.getConvexHull().getBounds() : Rectangle clickPoint = (decObstacle.getConvexHull() != null) ? decObstacle.getConvexHull().getBounds() :
new Rectangle(client.getCenterX() - 50, client.getCenterY() - 50, 100, 100); new Rectangle(client.getCenterX() - 50, client.getCenterY() - 50, 100, 100);
@ -435,7 +434,7 @@ public class iRooftopAgilityPlugin extends Plugin
GroundObject groundObstacle = object.findNearestGroundObject(obstacle.getObstacleId()); GroundObject groundObstacle = object.findNearestGroundObject(obstacle.getObstacleId());
if (groundObstacle != null) if (groundObstacle != null)
{ {
targetMenu = new MenuEntry("", "", groundObstacle.getId(), MenuOpcode.GAME_OBJECT_FIRST_OPTION.getId(), groundObstacle.getLocalLocation().getSceneX(), groundObstacle.getLocalLocation().getSceneY(), false); targetMenu = new MenuEntry("", "", groundObstacle.getId(), MenuAction.GAME_OBJECT_FIRST_OPTION.getId(), groundObstacle.getLocalLocation().getSceneX(), groundObstacle.getLocalLocation().getSceneY(), false);
menu.setEntry(targetMenu); menu.setEntry(targetMenu);
Rectangle clickPoint = (groundObstacle.getConvexHull() != null) ? groundObstacle.getConvexHull().getBounds() : Rectangle clickPoint = (groundObstacle.getConvexHull() != null) ? groundObstacle.getConvexHull().getBounds() :
new Rectangle(client.getCenterX() - 50, client.getCenterY() - 50, 100, 100); new Rectangle(client.getCenterX() - 50, client.getCenterY() - 50, 100, 100);
@ -446,7 +445,7 @@ public class iRooftopAgilityPlugin extends Plugin
GameObject objObstacle = object.findNearestGameObject(obstacle.getObstacleId()); GameObject objObstacle = object.findNearestGameObject(obstacle.getObstacleId());
if (objObstacle != null) if (objObstacle != null)
{ {
targetMenu = new MenuEntry("", "", objObstacle.getId(), MenuOpcode.GAME_OBJECT_FIRST_OPTION.getId(), objObstacle.getSceneMinLocation().getX(), objObstacle.getSceneMinLocation().getY(), false); targetMenu = new MenuEntry("", "", objObstacle.getId(), MenuAction.GAME_OBJECT_FIRST_OPTION.getId(), objObstacle.getSceneMinLocation().getX(), objObstacle.getSceneMinLocation().getY(), false);
menu.setEntry(targetMenu); menu.setEntry(targetMenu);
Rectangle clickPoint = (objObstacle.getConvexHull() != null) ? objObstacle.getConvexHull().getBounds() : Rectangle clickPoint = (objObstacle.getConvexHull() != null) ? objObstacle.getConvexHull().getBounds() :
new Rectangle(client.getCenterX() - 50, client.getCenterY() - 50, 100, 100); new Rectangle(client.getCenterX() - 50, client.getCenterY() - 50, 100, 100);
@ -628,7 +627,7 @@ public class iRooftopAgilityPlugin extends Plugin
case MOVING: case MOVING:
break; break;
case CAST_CAMELOT_TELEPORT: case CAST_CAMELOT_TELEPORT:
targetMenu = new MenuEntry("", "", 2, MenuOpcode.CC_OP.getId(), -1, targetMenu = new MenuEntry("", "", 2, MenuAction.CC_OP.getId(), -1,
14286879, false); 14286879, false);
Widget spellWidget = client.getWidget(WidgetInfo.SPELL_CAMELOT_TELEPORT); Widget spellWidget = client.getWidget(WidgetInfo.SPELL_CAMELOT_TELEPORT);
if (spellWidget != null) if (spellWidget != null)
@ -645,7 +644,7 @@ public class iRooftopAgilityPlugin extends Plugin
break; break;
case PRIFF_PORTAL: case PRIFF_PORTAL:
log.info("Using Priff portal"); log.info("Using Priff portal");
targetMenu = new MenuEntry("", "", spawnedPortal.getId(), MenuOpcode.GAME_OBJECT_FIRST_OPTION.getId(), targetMenu = new MenuEntry("", "", spawnedPortal.getId(), MenuAction.GAME_OBJECT_FIRST_OPTION.getId(),
spawnedPortal.getSceneMinLocation().getX(), spawnedPortal.getSceneMinLocation().getY(), false); spawnedPortal.getSceneMinLocation().getX(), spawnedPortal.getSceneMinLocation().getY(), false);
menu.setEntry(targetMenu); menu.setEntry(targetMenu);
mouse.delayMouseClick(spawnedPortal.getConvexHull().getBounds(), sleepDelay()); mouse.delayMouseClick(spawnedPortal.getConvexHull().getBounds(), sleepDelay());

View File

@ -23,7 +23,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
version = "1.0.2" version = "2.1.0"
project.extra["PluginName"] = "iTaskTemplate" project.extra["PluginName"] = "iTaskTemplate"
project.extra["PluginDescription"] = "Illumine - Task Template plugin" project.extra["PluginDescription"] = "Illumine - Task Template plugin"

View File

@ -29,25 +29,20 @@ import net.runelite.client.config.Button;
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;
import net.runelite.client.config.ConfigSection; import net.runelite.client.config.ConfigTitle;
import net.runelite.client.config.ConfigTitleSection;
import net.runelite.client.config.Range; import net.runelite.client.config.Range;
import net.runelite.client.config.Title;
@ConfigGroup("iTaskTemplate") @ConfigGroup("iTaskTemplate")
public interface iTaskTemplateConfig extends Config public interface iTaskTemplateConfig extends Config
{ {
@ConfigSection( @ConfigTitle(
keyName = "delayConfig", keyName = "delayConfig",
name = "Sleep Delay Configuration", name = "Sleep Delay Configuration",
description = "Configure how the bot handles sleep delays", description = "Configure how the bot handles sleep delays",
position = 0 position = 0
) )
default boolean delayConfig() String delayConfig = "delayConfig";
{
return false;
}
@Range( @Range(
min = 0, min = 0,
@ -125,16 +120,13 @@ public interface iTaskTemplateConfig extends Config
return false; return false;
} }
@ConfigSection( @ConfigTitle(
keyName = "delayTickConfig", keyName = "delayTickConfig",
name = "Game Tick Configuration", name = "Game Tick Configuration",
description = "Configure how the bot handles game tick delays, 1 game tick equates to roughly 600ms", description = "Configure how the bot handles game tick delays, 1 game tick equates to roughly 600ms",
position = 10 position = 10
) )
default boolean delayTickConfig() String delayTickConfig = "delayTickConfig";
{
return false;
}
@Range( @Range(
min = 0, min = 0,
@ -212,23 +204,20 @@ public interface iTaskTemplateConfig extends Config
return false; return false;
} }
@ConfigTitleSection( @ConfigTitle(
keyName = "instructionsTitle", keyName = "instructionsTitle",
name = "Instructions", name = "Instructions",
description = "", description = "",
position = 16 position = 16
) )
default Title instructionsTitle() String instructionsTitle = "instructionsTitle";
{
return new Title();
}
@ConfigItem( @ConfigItem(
keyName = "instructions", keyName = "instructions",
name = "", name = "",
description = "Instructions. Don't enter anything into this field", description = "Instructions. Don't enter anything into this field",
position = 17, position = 17,
titleSection = "instructionsTitle" title = "instructionsTitle"
) )
default String instructions() default String instructions()
{ {

View File

@ -9,14 +9,14 @@ import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.runelite.api.Client; import net.runelite.api.Client;
import static net.runelite.api.MenuOpcode.RUNELITE_OVERLAY_CONFIG; import static net.runelite.api.MenuAction.RUNELITE_OVERLAY_CONFIG;
import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE; import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE;
import net.runelite.client.ui.overlay.OverlayMenuEntry; import net.runelite.client.ui.overlay.OverlayMenuEntry;
import net.runelite.client.ui.overlay.OverlayPanel; import net.runelite.client.ui.overlay.OverlayPanel;
import net.runelite.client.ui.overlay.OverlayPosition; import net.runelite.client.ui.overlay.OverlayPosition;
import net.runelite.client.ui.overlay.components.TitleComponent; import net.runelite.client.ui.overlay.components.TitleComponent;
import net.runelite.client.ui.overlay.components.table.TableAlignment; import com.openosrs.client.ui.overlay.components.table.TableAlignment;
import net.runelite.client.ui.overlay.components.table.TableComponent; import com.openosrs.client.ui.overlay.components.table.TableComponent;
import net.runelite.client.util.ColorUtil; import net.runelite.client.util.ColorUtil;
import static org.apache.commons.lang3.time.DurationFormatUtils.formatDuration; import static org.apache.commons.lang3.time.DurationFormatUtils.formatDuration;

View File

@ -44,7 +44,6 @@ import net.runelite.client.eventbus.Subscribe;
import net.runelite.client.plugins.Plugin; 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.itasktemplate.tasks.MovingTask; import net.runelite.client.plugins.itasktemplate.tasks.MovingTask;
import net.runelite.client.plugins.itasktemplate.tasks.TimeoutTask; import net.runelite.client.plugins.itasktemplate.tasks.TimeoutTask;
import net.runelite.client.plugins.iutils.iUtils; import net.runelite.client.plugins.iutils.iUtils;
@ -58,8 +57,7 @@ import org.pf4j.Extension;
name = "iTaskTemplate", name = "iTaskTemplate",
enabledByDefault = false, enabledByDefault = false,
description = "Illumine - Task Template plugin", description = "Illumine - Task Template plugin",
tags = {"illumine", "task", "template", "bot"}, tags = {"illumine", "task", "template", "bot"}
type = PluginType.MISCELLANEOUS
) )
@Slf4j @Slf4j
public class iTaskTemplatePlugin extends Plugin public class iTaskTemplatePlugin extends Plugin

View File

@ -23,7 +23,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
version = "2.3.6" version = "3.1.0"
project.extra["PluginName"] = "iUtils" 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"

View File

@ -12,8 +12,8 @@ import net.runelite.api.Client;
import net.runelite.api.InventoryID; import net.runelite.api.InventoryID;
import net.runelite.api.Item; import net.runelite.api.Item;
import net.runelite.api.ItemContainer; import net.runelite.api.ItemContainer;
import net.runelite.api.MenuAction;
import net.runelite.api.MenuEntry; import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode;
import net.runelite.api.Point; import net.runelite.api.Point;
import net.runelite.api.queries.BankItemQuery; import net.runelite.api.queries.BankItemQuery;
import net.runelite.api.widgets.Widget; import net.runelite.api.widgets.Widget;
@ -74,7 +74,7 @@ public class BankUtils
{ {
return; return;
} }
menu.setEntry(new MenuEntry("", "", 1, MenuOpcode.CC_OP.getId(), 11, 786434, false)); //close bank menu.setEntry(new MenuEntry("", "", 1, MenuAction.CC_OP.getId(), 11, 786434, false)); //close bank
Widget bankCloseWidget = client.getWidget(WidgetInfo.BANK_PIN_EXIT_BUTTON); Widget bankCloseWidget = client.getWidget(WidgetInfo.BANK_PIN_EXIT_BUTTON);
if (bankCloseWidget != null) if (bankCloseWidget != null)
{ {
@ -86,8 +86,8 @@ public class BankUtils
public int getBankMenuOpcode(int bankID) public int getBankMenuOpcode(int bankID)
{ {
return Banks.BANK_CHECK_BOX.contains(bankID) ? MenuOpcode.GAME_OBJECT_FIRST_OPTION.getId() : return Banks.BANK_CHECK_BOX.contains(bankID) ? MenuAction.GAME_OBJECT_FIRST_OPTION.getId() :
MenuOpcode.GAME_OBJECT_SECOND_OPTION.getId(); MenuAction.GAME_OBJECT_SECOND_OPTION.getId();
} }
//doesn't NPE //doesn't NPE
@ -99,7 +99,7 @@ public class BankUtils
for (Item item : bankItemContainer.getItems()) for (Item item : bankItemContainer.getItems())
{ {
if (itemManager.getItemDefinition(item.getId()).getName().equalsIgnoreCase(itemName)) if (itemManager.getItemComposition(item.getId()).getName().equalsIgnoreCase(itemName))
{ {
return true; return true;
} }
@ -146,7 +146,7 @@ public class BankUtils
for (Item item : bankItemContainer.getItems()) for (Item item : bankItemContainer.getItems())
{ {
if (itemManager.getItemDefinition(item.getId()).getName().equalsIgnoreCase(itemName) && item.getQuantity() >= minStackAmount) if (itemManager.getItemComposition(item.getId()).getName().equalsIgnoreCase(itemName) && item.getQuantity() >= minStackAmount)
{ {
return true; return true;
} }
@ -241,11 +241,11 @@ public class BankUtils
Widget depositInventoryWidget = client.getWidget(WidgetInfo.BANK_DEPOSIT_INVENTORY); Widget depositInventoryWidget = client.getWidget(WidgetInfo.BANK_DEPOSIT_INVENTORY);
if (isDepositBoxOpen()) if (isDepositBoxOpen())
{ {
menu.setEntry(new MenuEntry("", "", 1, MenuOpcode.CC_OP.getId(), -1, 12582916, false)); //deposit all in bank interface menu.setEntry(new MenuEntry("", "", 1, MenuAction.CC_OP.getId(), -1, 12582916, false)); //deposit all in bank interface
} }
else else
{ {
menu.setEntry(new MenuEntry("", "", 1, MenuOpcode.CC_OP.getId(), -1, 786473, false)); //deposit all in bank interface menu.setEntry(new MenuEntry("", "", 1, MenuAction.CC_OP.getId(), -1, 786473, false)); //deposit all in bank interface
} }
if ((depositInventoryWidget != null)) if ((depositInventoryWidget != null))
{ {
@ -299,7 +299,7 @@ public class BankUtils
return; return;
} }
boolean depositBox = isDepositBoxOpen(); boolean depositBox = isDepositBoxOpen();
menu.setEntry(new MenuEntry("", "", (depositBox) ? 1 : 8, MenuOpcode.CC_OP.getId(), item.getIndex(), menu.setEntry(new MenuEntry("", "", (depositBox) ? 1 : 8, MenuAction.CC_OP.getId(), item.getIndex(),
(depositBox) ? 12582914 : 983043, false)); (depositBox) ? 12582914 : 983043, false));
mouse.handleMouseClick(item.getCanvasBounds()); mouse.handleMouseClick(item.getCanvasBounds());
} }
@ -355,7 +355,7 @@ public class BankUtils
} }
boolean depositBox = isDepositBoxOpen(); boolean depositBox = isDepositBoxOpen();
menu.setEntry(new MenuEntry("", "", (client.getVarbitValue(6590) == 0) ? 2 : 3, MenuOpcode.CC_OP.getId(), item.getIndex(), menu.setEntry(new MenuEntry("", "", (client.getVarbitValue(6590) == 0) ? 2 : 3, MenuAction.CC_OP.getId(), item.getIndex(),
(depositBox) ? 12582914 : 983043, false)); (depositBox) ? 12582914 : 983043, false));
mouse.delayMouseClick(item.getCanvasBounds(), calc.getRandomIntBetweenRange(0, 50)); mouse.delayMouseClick(item.getCanvasBounds(), calc.getRandomIntBetweenRange(0, 50));
} }
@ -373,7 +373,7 @@ public class BankUtils
{ {
executorService.submit(() -> executorService.submit(() ->
{ {
menu.setEntry(new MenuEntry("Withdraw-All", "", 7, MenuOpcode.CC_OP.getId(), bankItemWidget.getIndex(), 786444, false)); menu.setEntry(new MenuEntry("Withdraw-All", "", 7, MenuAction.CC_OP.getId(), bankItemWidget.getIndex(), 786444, false));
mouse.clickRandomPointCenter(-200, 200); mouse.clickRandomPointCenter(-200, 200);
}); });
} }
@ -393,7 +393,7 @@ public class BankUtils
public void withdrawItem(Widget bankItemWidget) public void withdrawItem(Widget bankItemWidget)
{ {
MenuEntry entry = new MenuEntry("", "", (client.getVarbitValue(6590) == 0) ? 1 : 2, MenuOpcode.CC_OP.getId(), MenuEntry entry = new MenuEntry("", "", (client.getVarbitValue(6590) == 0) ? 1 : 2, MenuAction.CC_OP.getId(),
bankItemWidget.getIndex(), 786444, false); bankItemWidget.getIndex(), 786444, false);
utils.doActionClientTick(entry, bankItemWidget.getBounds(), 0); utils.doActionClientTick(entry, bankItemWidget.getBounds(), 0);
} }
@ -429,7 +429,7 @@ public class BankUtils
identifier = 6; identifier = 6;
break; break;
} }
menu.setEntry(new MenuEntry("", "", identifier, MenuOpcode.CC_OP.getId(), item.getIndex(), 786444, false)); menu.setEntry(new MenuEntry("", "", identifier, MenuAction.CC_OP.getId(), item.getIndex(), 786444, false));
mouse.delayClickRandomPointCenter(-200, 200, 50); mouse.delayClickRandomPointCenter(-200, 200, 50);
if (identifier == 6) if (identifier == 6)
{ {

View File

@ -6,8 +6,8 @@ import javax.inject.Singleton;
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.MenuAction;
import net.runelite.api.MenuEntry; import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode;
import net.runelite.api.Point; import net.runelite.api.Point;
import net.runelite.api.widgets.Widget; import net.runelite.api.widgets.Widget;
import net.runelite.api.widgets.WidgetInfo; import net.runelite.api.widgets.WidgetInfo;
@ -57,13 +57,13 @@ public class InterfaceUtils
final int INCREMENT = 4; final int INCREMENT = 4;
int styleParam = BASE_PARAM + (index * INCREMENT); int styleParam = BASE_PARAM + (index * INCREMENT);
return new MenuEntry("", "", 1, MenuOpcode.CC_OP.getId(), -1, styleParam, false); return new MenuEntry("", "", 1, MenuAction.CC_OP.getId(), -1, styleParam, false);
} }
public void logout() public void logout()
{ {
int param1 = (client.getWidget(WidgetInfo.LOGOUT_BUTTON) != null) ? 11927560 : 4522007; int param1 = (client.getWidget(WidgetInfo.LOGOUT_BUTTON) != null) ? 11927560 : 4522007;
menu.setEntry(new MenuEntry("", "", 1, MenuOpcode.CC_OP.getId(), -1, param1, false)); menu.setEntry(new MenuEntry("", "", 1, MenuAction.CC_OP.getId(), -1, param1, false));
Widget logoutWidget = client.getWidget(WidgetInfo.LOGOUT_BUTTON); Widget logoutWidget = client.getWidget(WidgetInfo.LOGOUT_BUTTON);
if (logoutWidget != null) if (logoutWidget != null)
{ {

View File

@ -17,8 +17,8 @@ import net.runelite.api.GameState;
import net.runelite.api.InventoryID; import net.runelite.api.InventoryID;
import net.runelite.api.Item; import net.runelite.api.Item;
import net.runelite.api.ItemContainer; import net.runelite.api.ItemContainer;
import net.runelite.api.MenuAction;
import net.runelite.api.MenuEntry; import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode;
import net.runelite.api.Varbits; import net.runelite.api.Varbits;
import net.runelite.api.queries.InventoryItemQuery; import net.runelite.api.queries.InventoryItemQuery;
import net.runelite.api.queries.InventoryWidgetItemQuery; import net.runelite.api.queries.InventoryWidgetItemQuery;
@ -227,7 +227,7 @@ public class InventoryUtils
{ {
continue; continue;
} }
String[] menuActions = itemManager.getItemDefinition(item.getId()).getInventoryActions(); String[] menuActions = itemManager.getItemComposition(item.getId()).getInventoryActions();
for (String action : menuActions) for (String action : menuActions)
{ {
if (action != null && action.equals(menuOption)) if (action != null && action.equals(menuOption))
@ -248,7 +248,7 @@ public class InventoryUtils
Collection<WidgetItem> items = inventoryWidget.getWidgetItems(); Collection<WidgetItem> items = inventoryWidget.getWidgetItems();
for (WidgetItem item : items) for (WidgetItem item : items)
{ {
String[] menuActions = itemManager.getItemDefinition(item.getId()).getInventoryActions(); String[] menuActions = itemManager.getItemComposition(item.getId()).getInventoryActions();
for (String action : menuActions) for (String action : menuActions)
{ {
if (action != null && menuOptions.contains(action)) if (action != null && menuOptions.contains(action))
@ -269,7 +269,7 @@ public class InventoryUtils
Collection<WidgetItem> items = inventoryWidget.getWidgetItems(); Collection<WidgetItem> items = inventoryWidget.getWidgetItems();
for (WidgetItem item : items) for (WidgetItem item : items)
{ {
String[] menuActions = itemManager.getItemDefinition(item.getId()).getInventoryActions(); String[] menuActions = itemManager.getItemComposition(item.getId()).getInventoryActions();
for (String action : menuActions) for (String action : menuActions)
{ {
if (action != null && action.equals(menuOption)) if (action != null && action.equals(menuOption))
@ -443,7 +443,7 @@ public class InventoryUtils
{ {
assert !client.isClientThread(); assert !client.isClientThread();
menu.setEntry(new MenuEntry("", "", item.getId(), MenuOpcode.ITEM_DROP.getId(), item.getIndex(), 9764864, false)); menu.setEntry(new MenuEntry("", "", item.getId(), MenuAction.ITEM_FIFTH_OPTION.getId(), item.getIndex(), 9764864, false));
mouse.click(item.getCanvasBounds()); mouse.click(item.getCanvasBounds());
} }
@ -585,7 +585,7 @@ public class InventoryUtils
log.info("interacting inventory item: {}", item.getId()); log.info("interacting inventory item: {}", item.getId());
sleep(minDelayBetween, maxDelayBetween); sleep(minDelayBetween, maxDelayBetween);
menu.setModifiedEntry(new MenuEntry("", "", item1.getId(), opcode, item1.getIndex(), WidgetInfo.INVENTORY.getId(), menu.setModifiedEntry(new MenuEntry("", "", item1.getId(), opcode, item1.getIndex(), WidgetInfo.INVENTORY.getId(),
false), item.getId(), item.getIndex(), MenuOpcode.ITEM_USE_ON_WIDGET_ITEM.getId()); false), item.getId(), item.getIndex(), MenuAction.ITEM_USE_ON_WIDGET_ITEM.getId());
mouse.click(item1.getCanvasBounds()); mouse.click(item1.getCanvasBounds());
if (!interactAll) if (!interactAll)
{ {

View File

@ -12,11 +12,11 @@ import net.runelite.api.Constants;
import net.runelite.api.DecorativeObject; import net.runelite.api.DecorativeObject;
import net.runelite.api.GameObject; import net.runelite.api.GameObject;
import net.runelite.api.GroundObject; import net.runelite.api.GroundObject;
import net.runelite.api.ItemLayer;
import net.runelite.api.Player; import net.runelite.api.Player;
import net.runelite.api.Scene; import net.runelite.api.Scene;
import net.runelite.api.Tile; import net.runelite.api.Tile;
import net.runelite.api.TileItem; import net.runelite.api.TileItem;
import net.runelite.api.TileItemPile;
import net.runelite.api.TileObject; import net.runelite.api.TileObject;
import net.runelite.api.WallObject; import net.runelite.api.WallObject;
import net.runelite.api.coords.LocalPoint; import net.runelite.api.coords.LocalPoint;
@ -224,7 +224,7 @@ public class ObjectUtils
private TileItem findItemAtTile(Tile tile, int id) private TileItem findItemAtTile(Tile tile, int id)
{ {
TileItemPile tileItemPile = tile.getItemLayer(); ItemLayer tileItemPile = tile.getItemLayer();
if (tileItemPile != null) if (tileItemPile != null)
{ {
TileItem tileItem = (TileItem) tileItemPile.getBottom(); TileItem tileItem = (TileItem) tileItemPile.getBottom();

View File

@ -13,8 +13,8 @@ import net.runelite.api.InventoryID;
import net.runelite.api.Item; import net.runelite.api.Item;
import net.runelite.api.ItemContainer; import net.runelite.api.ItemContainer;
import net.runelite.api.ItemID; import net.runelite.api.ItemID;
import net.runelite.api.MenuAction;
import net.runelite.api.MenuEntry; import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode;
import net.runelite.api.Player; import net.runelite.api.Player;
import net.runelite.api.Varbits; import net.runelite.api.Varbits;
import net.runelite.api.coords.LocalPoint; import net.runelite.api.coords.LocalPoint;
@ -169,7 +169,7 @@ public class PlayerUtils
if (staminaPotion != null) if (staminaPotion != null)
{ {
log.info("using stamina potion"); log.info("using stamina potion");
menu.setEntry(new MenuEntry("", "", staminaPotion.getId(), MenuOpcode.ITEM_FIRST_OPTION.getId(), menu.setEntry(new MenuEntry("", "", staminaPotion.getId(), MenuAction.ITEM_FIRST_OPTION.getId(),
staminaPotion.getIndex(), 9764864, false)); staminaPotion.getIndex(), 9764864, false));
mouse.delayMouseClick(staminaPotion.getCanvasBounds(), calc.getRandomIntBetweenRange(5, 200)); mouse.delayMouseClick(staminaPotion.getCanvasBounds(), calc.getRandomIntBetweenRange(5, 200));
return true; return true;

View File

@ -9,8 +9,8 @@ import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.runelite.api.Client; import net.runelite.api.Client;
import net.runelite.api.MenuAction;
import net.runelite.api.MenuEntry; import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode;
import net.runelite.api.Player; import net.runelite.api.Player;
import net.runelite.api.Point; import net.runelite.api.Point;
import net.runelite.api.coords.LocalPoint; import net.runelite.api.coords.LocalPoint;
@ -72,7 +72,7 @@ public class WalkUtils
coordY = localPoint.getSceneY() + calc.getRandomIntBetweenRange(-Math.abs(rand), Math.abs(rand)); coordY = localPoint.getSceneY() + calc.getRandomIntBetweenRange(-Math.abs(rand), Math.abs(rand));
log.info("Coord values: {}, {}", coordX, coordY); log.info("Coord values: {}, {}", coordX, coordY);
walkAction = true; walkAction = true;
menu.setEntry(new MenuEntry("Walk here", "", 0, MenuOpcode.WALK.getId(), menu.setEntry(new MenuEntry("Walk here", "", 0, MenuAction.WALK.getId(),
0, 0, false)); 0, 0, false));
mouse.delayMouseClick(new Point(0, 0), delay); mouse.delayMouseClick(new Point(0, 0), delay);
} }
@ -96,7 +96,7 @@ public class WalkUtils
public static String post(String url, String json) throws IOException public static String post(String url, String json) throws IOException
{ {
OkHttpClient okHttpClient = new OkHttpClient(); OkHttpClient okHttpClient = new OkHttpClient();
RequestBody body = RequestBody.create(json, JSON); // new RequestBody body = RequestBody.create(JSON, json); // new
log.info("Sending POST request: {}", body); log.info("Sending POST request: {}", body);
Request request = new Request.Builder() Request request = new Request.Builder()
.url(url) .url(url)

View File

@ -7,6 +7,7 @@ package net.runelite.client.plugins.iutils;
import com.google.inject.Provides; import com.google.inject.Provides;
import java.awt.Rectangle; import java.awt.Rectangle;
import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
@ -18,8 +19,8 @@ import lombok.extern.slf4j.Slf4j;
import net.runelite.api.ChatMessageType; import net.runelite.api.ChatMessageType;
import net.runelite.api.Client; import net.runelite.api.Client;
import net.runelite.api.GameObject; import net.runelite.api.GameObject;
import net.runelite.api.MenuAction;
import net.runelite.api.MenuEntry; import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode;
import net.runelite.api.NPC; import net.runelite.api.NPC;
import net.runelite.api.Point; import net.runelite.api.Point;
import net.runelite.api.TileObject; import net.runelite.api.TileObject;
@ -38,7 +39,6 @@ import net.runelite.client.config.ConfigManager;
import net.runelite.client.eventbus.Subscribe; import net.runelite.client.eventbus.Subscribe;
import net.runelite.client.plugins.Plugin; import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.plugins.PluginType;
import net.runelite.http.api.ge.GrandExchangeClient; import net.runelite.http.api.ge.GrandExchangeClient;
import net.runelite.http.api.osbuddy.OSBGrandExchangeClient; import net.runelite.http.api.osbuddy.OSBGrandExchangeClient;
import net.runelite.http.api.osbuddy.OSBGrandExchangeResult; import net.runelite.http.api.osbuddy.OSBGrandExchangeResult;
@ -51,7 +51,6 @@ import org.pf4j.Extension;
@Extension @Extension
@PluginDescriptor( @PluginDescriptor(
name = "iUtils", name = "iUtils",
type = PluginType.UTILITY,
description = "Illumine plugin utilities", description = "Illumine plugin utilities",
hidden = false hidden = false
) )
@ -453,25 +452,21 @@ public class iUtils extends Plugin
public OSBGrandExchangeResult getOSBItem(int itemId) public OSBGrandExchangeResult getOSBItem(int itemId)
{ {
log.debug("Looking up OSB item price {}", itemId); log.debug("Looking up OSB item price {}", itemId);
osbGrandExchangeClient.lookupItem(itemId)
.subscribe( try
(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; final OSBGrandExchangeResult result = osbGrandExchangeClient.lookupItem(itemId);
if (result != null && result.getOverall_average() > 0)
{
return result;
}
} }
else catch (IOException e)
{ {
return null; log.debug("Error getting price of item {}", itemId, e);
} }
return null;
} }
//Ganom's //Ganom's
@ -581,7 +576,7 @@ public class iUtils extends Plugin
@Subscribe @Subscribe
private void onMenuEntryAdded(MenuEntryAdded event) private void onMenuEntryAdded(MenuEntryAdded event)
{ {
if (event.getOpcode() == MenuOpcode.CC_OP.getId() && (event.getParam1() == WidgetInfo.WORLD_SWITCHER_LIST.getId() || if (event.getOpcode() == MenuAction.CC_OP.getId() && (event.getParam1() == WidgetInfo.WORLD_SWITCHER_LIST.getId() ||
event.getParam1() == 11927560 || event.getParam1() == 4522007 || event.getParam1() == 24772686)) event.getParam1() == 11927560 || event.getParam1() == 4522007 || event.getParam1() == 24772686))
{ {
return; return;
@ -599,8 +594,8 @@ public class iUtils extends Plugin
@Subscribe @Subscribe
private void onMenuOptionClicked(MenuOptionClicked event) private void onMenuOptionClicked(MenuOptionClicked event)
{ {
if (event.getOpcode() == MenuOpcode.CC_OP.getId() && (event.getParam1() == WidgetInfo.WORLD_SWITCHER_LIST.getId() || if (event.getMenuAction() == MenuAction.CC_OP && (event.getWidgetId() == WidgetInfo.WORLD_SWITCHER_LIST.getId() ||
event.getParam1() == 11927560 || event.getParam1() == 4522007 || event.getParam1() == 24772686)) event.getWidgetId() == 11927560 || event.getWidgetId() == 4522007 || event.getWidgetId() == 24772686))
{ {
//Either logging out or world-hopping which is handled by 3rd party plugins so let them have priority //Either logging out or world-hopping which is handled by 3rd party plugins so let them have priority
log.info("Received world-hop/login related click. Giving them priority"); log.info("Received world-hop/login related click. Giving them priority");
@ -610,16 +605,17 @@ public class iUtils extends Plugin
if (menu.entry != null) if (menu.entry != null)
{ {
tickActions++; tickActions++;
event.consume();
log.debug("Actions this game tick: {}", tickActions); log.debug("Actions this game tick: {}", tickActions);
if (menu.consumeClick) if (menu.consumeClick)
{ {
event.consume();
log.info("Consuming a click and not sending anything else"); log.info("Consuming a click and not sending anything else");
menu.consumeClick = false; menu.consumeClick = false;
return; return;
} }
if (menu.entry.getOption().equals("Walk here")) if (menu.entry.getOption().equals("Walk here"))
{ {
event.consume();
log.info("Walk action: {} {}", walk.coordX, walk.coordY); log.info("Walk action: {} {}", walk.coordX, walk.coordY);
walk.walkTile(walk.coordX, walk.coordY); walk.walkTile(walk.coordX, walk.coordY);
walk.walkAction = false; walk.walkAction = false;
@ -632,25 +628,36 @@ public class iUtils extends Plugin
client.setSelectedItemSlot(menu.modifiedItemIndex); client.setSelectedItemSlot(menu.modifiedItemIndex);
client.setSelectedItemID(menu.modifiedItemID); client.setSelectedItemID(menu.modifiedItemID);
log.debug("doing a Modified MOC, mod ID: {}, mod index: {}, param1: {}", menu.modifiedItemID, log.debug("doing a Modified MOC, mod ID: {}, mod index: {}, param1: {}", menu.modifiedItemID,
menu.modifiedItemIndex, menu.entry.getParam1()); menu.modifiedItemIndex, menu.entry.getParam1());
client.invokeMenuAction(menu.entry.getOption(), menu.entry.getTarget(), menu.entry.getIdentifier(), menuAction(event,menu.entry.getOption(), menu.entry.getTarget(), menu.entry.getIdentifier(),
menu.modifiedOpCode, menu.entry.getParam0(), menu.entry.getParam1()); MenuAction.of(menu.modifiedOpCode), menu.entry.getParam0(), menu.entry.getParam1());
menu.modifiedMenu = false; menu.modifiedMenu = false;
} }
else else
{ {
client.invokeMenuAction(menu.entry.getOption(), menu.entry.getTarget(), menu.entry.getIdentifier(), System.out.println(String.format("%s, %s, %s, %s, %s, %s", menu.entry.getOption(), menu.entry.getTarget(), menu.entry.getIdentifier(), menu.entry.getOpcode(), menu.entry.getParam0(), menu.entry.getParam1()));
menu.entry.getOpcode(), menu.entry.getParam0(), menu.entry.getParam1()); menuAction(event,menu.entry.getOption(), menu.entry.getTarget(), menu.entry.getIdentifier(),
MenuAction.of(menu.entry.getOpcode()), menu.entry.getParam0(), menu.entry.getParam1());
} }
menu.entry = null; menu.entry = null;
} }
else else
{ {
if (!event.isConsumed() && !action.delayedActions.isEmpty() && event.getOption().equals("Walk here")) if (!event.isConsumed() && !action.delayedActions.isEmpty() && event.getMenuOption().equals("Walk here"))
{ {
log.info("Consuming a NULL MOC event"); log.info("Consuming a NULL MOC event");
event.consume(); event.consume();
} }
} }
} }
public void menuAction(MenuOptionClicked menuOptionClicked, String option, String target, int identifier, MenuAction menuAction, int param0, int param1)
{
menuOptionClicked.setMenuOption(option);
menuOptionClicked.setMenuTarget(target);
menuOptionClicked.setId(identifier);
menuOptionClicked.setMenuAction(menuAction);
menuOptionClicked.setActionParam(param0);
menuOptionClicked.setWidgetId(param1);
}
} }

View File

@ -23,7 +23,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
version = "2.5.1" version = "3.1.0"
project.extra["PluginName"] = "iWorld Walker Plugin" project.extra["PluginName"] = "iWorld Walker Plugin"
project.extra["PluginDescription"] = "Illumine - World Walker plugin" project.extra["PluginDescription"] = "Illumine - World Walker plugin"

View File

@ -29,7 +29,7 @@ import net.runelite.client.config.Button;
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;
import net.runelite.client.config.ConfigSection; import net.runelite.client.config.ConfigTitle;
import net.runelite.client.config.Range; import net.runelite.client.config.Range;
import net.runelite.client.plugins.iworldwalker.farming.Allotments; import net.runelite.client.plugins.iworldwalker.farming.Allotments;
import net.runelite.client.plugins.iworldwalker.farming.Bushes; import net.runelite.client.plugins.iworldwalker.farming.Bushes;
@ -42,16 +42,13 @@ import net.runelite.client.plugins.iworldwalker.farming.Trees;
public interface iWorldWalkerConfig extends Config public interface iWorldWalkerConfig extends Config
{ {
@ConfigSection( @ConfigTitle(
keyName = "delayConfig", keyName = "delayConfig",
name = "Sleep Delay Configuration", name = "Sleep Delay Configuration",
description = "Configure how the bot handles sleep delays", description = "Configure how the bot handles sleep delays",
position = 1 position = 1
) )
default boolean delayConfig() String delayConfig = "delayConfig";
{
return false;
}
@Range( @Range(
min = 0, min = 0,
@ -129,16 +126,13 @@ public interface iWorldWalkerConfig extends Config
return false; return false;
} }
@ConfigSection( @ConfigTitle(
keyName = "delayTickConfig", keyName = "delayTickConfig",
name = "Game Tick Configuration", name = "Game Tick Configuration",
description = "Configure how the bot handles game tick delays, 1 game tick equates to roughly 600ms", description = "Configure how the bot handles game tick delays, 1 game tick equates to roughly 600ms",
position = 7 position = 7
) )
default boolean delayTickConfig() String delayTickConfig = "delayTickConfig";
{
return false;
}
@Range( @Range(
min = 0, min = 0,
@ -216,16 +210,13 @@ public interface iWorldWalkerConfig extends Config
return false; return false;
} }
@ConfigSection( @ConfigTitle(
keyName = "instructionsTitle", keyName = "instructionsTitle",
name = "Instructions", name = "Instructions",
description = "Instructions Title", description = "Instructions Title",
position = 15 position = 15
) )
default boolean instructionsTitle() String instructionsTitle = "instructionsTitle";
{
return false;
}
@ConfigItem( @ConfigItem(
keyName = "instructions", keyName = "instructions",
@ -239,16 +230,13 @@ public interface iWorldWalkerConfig extends Config
return "Select your location from the drop-down or enter a custom location using x,y,z format. Use Location/Tile Location in Developer Tools to obtain a custom coordinate."; return "Select your location from the drop-down or enter a custom location using x,y,z format. Use Location/Tile Location in Developer Tools to obtain a custom coordinate.";
} }
@ConfigSection( @ConfigTitle(
keyName = "notesTitle", keyName = "notesTitle",
name = "Custom Notes", name = "Custom Notes",
description = "Notes Title", description = "Notes Title",
position = 29 position = 29
) )
default boolean notesTitle() String notesTitle = "notesTitle";
{
return false;
}
@ConfigItem( @ConfigItem(
keyName = "notepad", keyName = "notepad",
@ -262,16 +250,13 @@ public interface iWorldWalkerConfig extends Config
return "Paste custom co-ords that you want to save for frequent use"; return "Paste custom co-ords that you want to save for frequent use";
} }
@ConfigSection( @ConfigTitle(
keyName = "showQuestNotes", keyName = "showQuestNotes",
name = "Show Quest Notes", name = "Show Quest Notes",
description = "Unhide the quest notes section, containing notes on supported quests", description = "Unhide the quest notes section, containing notes on supported quests",
position = 31 position = 31
) )
default boolean showQuestNotes() String showQuestNotes = "showQuestNotes";
{
return false;
}
@ConfigItem( @ConfigItem(
keyName = "supportedQuests", keyName = "supportedQuests",

View File

@ -9,14 +9,14 @@ import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.runelite.api.Client; import net.runelite.api.Client;
import static net.runelite.api.MenuOpcode.RUNELITE_OVERLAY_CONFIG; import static net.runelite.api.MenuAction.RUNELITE_OVERLAY_CONFIG;
import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE; import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE;
import net.runelite.client.ui.overlay.OverlayMenuEntry; import net.runelite.client.ui.overlay.OverlayMenuEntry;
import net.runelite.client.ui.overlay.OverlayPanel; import net.runelite.client.ui.overlay.OverlayPanel;
import net.runelite.client.ui.overlay.OverlayPosition; import net.runelite.client.ui.overlay.OverlayPosition;
import net.runelite.client.ui.overlay.components.TitleComponent; import net.runelite.client.ui.overlay.components.TitleComponent;
import net.runelite.client.ui.overlay.components.table.TableAlignment; import com.openosrs.client.ui.overlay.components.table.TableAlignment;
import net.runelite.client.ui.overlay.components.table.TableComponent; import com.openosrs.client.ui.overlay.components.table.TableComponent;
import net.runelite.client.util.ColorUtil; import net.runelite.client.util.ColorUtil;
import static org.apache.commons.lang3.time.DurationFormatUtils.formatDuration; import static org.apache.commons.lang3.time.DurationFormatUtils.formatDuration;

View File

@ -35,7 +35,7 @@ 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.MenuEntry; import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode; import net.runelite.api.MenuAction;
import net.runelite.api.Player; import net.runelite.api.Player;
import net.runelite.api.Point; import net.runelite.api.Point;
import net.runelite.api.RenderOverview; import net.runelite.api.RenderOverview;
@ -54,7 +54,6 @@ import net.runelite.client.events.ConfigChanged;
import net.runelite.client.plugins.Plugin; 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.iutils.CalculationUtils; import net.runelite.client.plugins.iutils.CalculationUtils;
import net.runelite.client.plugins.iutils.PlayerUtils; import net.runelite.client.plugins.iutils.PlayerUtils;
import net.runelite.client.plugins.iutils.WalkUtils; import net.runelite.client.plugins.iutils.WalkUtils;
@ -71,8 +70,7 @@ import org.pf4j.Extension;
name = "iWorld Walker Plugin", name = "iWorld Walker Plugin",
enabledByDefault = false, enabledByDefault = false,
description = "Illumine - World Walker plugin", description = "Illumine - World Walker plugin",
tags = {"illumine", "walk", "web", "travel", "bot"}, tags = {"illumine", "walk", "web", "travel", "bot"}
type = PluginType.UTILITY
) )
@Slf4j @Slf4j
public class iWorldWalkerPlugin extends Plugin public class iWorldWalkerPlugin extends Plugin
@ -452,12 +450,12 @@ public class iWorldWalkerPlugin extends Plugin
@Subscribe @Subscribe
public void onMenuOptionClicked(MenuOptionClicked event) public void onMenuOptionClicked(MenuOptionClicked event)
{ {
if (event.getOption().equals("illu-Walk here")) if (event.getMenuOption().equals("illu-Walk here"))
{ {
mapPoint = calculateMapPoint(client.isMenuOpen() ? lastMenuOpenedPoint : client.getMouseCanvasPosition()); mapPoint = calculateMapPoint(client.isMenuOpen() ? lastMenuOpenedPoint : client.getMouseCanvasPosition());
startVals(); startVals();
} }
if (event.getOption().equals("illu-Clear Destination")) if (event.getMenuOption().equals("illu-Clear Destination"))
{ {
mapPoint = null; mapPoint = null;
resetVals(); resetVals();
@ -484,7 +482,7 @@ public class iWorldWalkerPlugin extends Plugin
MenuEntry entry = new MenuEntry(); MenuEntry entry = new MenuEntry();
entry.setOption(option); entry.setOption(option);
entry.setTarget(event.getTarget()); entry.setTarget(event.getTarget());
entry.setOpcode(MenuOpcode.RUNELITE.getId()); entry.setOpcode(MenuAction.RUNELITE.getId());
entries.add(0, entry); entries.add(0, entry);
client.setMenuEntries(entries.toArray(new MenuEntry[0])); client.setMenuEntries(entries.toArray(new MenuEntry[0]));

File diff suppressed because one or more lines are too long

Binary file not shown.

BIN
release/botutils-5.1.0.jar Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.