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.
*/
version = "4.9.3"
version = "5.1.0"
project.extra["PluginName"] = "BotUtils"
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.ItemContainer;
import net.runelite.api.ItemID;
import net.runelite.api.MenuAction;
import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode;
import net.runelite.api.NPC;
import net.runelite.api.Player;
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.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.plugins.PluginType;
import static net.runelite.client.plugins.botutils.Banks.ALL_BANKS;
import net.runelite.http.api.ge.GrandExchangeClient;
import net.runelite.http.api.osbuddy.OSBGrandExchangeClient;
@ -95,7 +94,6 @@ import org.pf4j.Extension;
@Extension
@PluginDescriptor(
name = "BotUtils",
type = PluginType.UTILITY,
description = "Illumine bot utilities",
hidden = false
)
@ -1061,7 +1059,7 @@ public class BotUtils extends Plugin
coordX = localPoint.getSceneX() + getRandomIntBetweenRange(-Math.abs(rand), Math.abs(rand));
coordY = localPoint.getSceneY() + getRandomIntBetweenRange(-Math.abs(rand), Math.abs(rand));
walkAction = true;
targetMenu = new MenuEntry("Walk here", "", 0, MenuOpcode.WALK.getId(),
targetMenu = new MenuEntry("Walk here", "", 0, MenuAction.WALK.getId(),
0, 0, false);
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));
coordY = localPoint.getSceneY() + getRandomIntBetweenRange(-Math.abs(rand), Math.abs(rand));
walkAction = true;
targetMenu = new MenuEntry("Walk here", "", 0, MenuOpcode.WALK.getId(),
targetMenu = new MenuEntry("Walk here", "", 0, MenuAction.WALK.getId(),
0, 0, false);
delayMouseClick(new Point(0, 0), delay);
}
@ -1310,7 +1308,7 @@ public class BotUtils extends Plugin
if (staminaPotion != null)
{
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));
return true;
}
@ -1320,7 +1318,7 @@ public class BotUtils extends Plugin
public void logout()
{
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);
if (logoutWidget != null)
{
@ -1494,7 +1492,7 @@ public class BotUtils extends Plugin
{
continue;
}
String[] menuActions = itemManager.getItemDefinition(item.getId()).getInventoryActions();
String[] menuActions = itemManager.getItemComposition(item.getId()).getInventoryActions();
for (String action : menuActions)
{
if (action != null && action.equals(menuOption))
@ -1515,7 +1513,7 @@ public class BotUtils extends Plugin
Collection<WidgetItem> items = inventoryWidget.getWidgetItems();
for (WidgetItem item : items)
{
String[] menuActions = itemManager.getItemDefinition(item.getId()).getInventoryActions();
String[] menuActions = itemManager.getItemComposition(item.getId()).getInventoryActions();
for (String action : menuActions)
{
if (action != null && menuOptions.contains(action))
@ -1536,7 +1534,7 @@ public class BotUtils extends Plugin
Collection<WidgetItem> items = inventoryWidget.getWidgetItems();
for (WidgetItem item : items)
{
String[] menuActions = itemManager.getItemDefinition(item.getId()).getInventoryActions();
String[] menuActions = itemManager.getItemComposition(item.getId()).getInventoryActions();
for (String action : menuActions)
{
if (action != null && action.equals(menuOption))
@ -1736,7 +1734,7 @@ public class BotUtils extends Plugin
{
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());
}
@ -1878,7 +1876,7 @@ public class BotUtils extends Plugin
log.info("interacting inventory item: {}", item.getId());
sleep(minDelayBetween, maxDelayBetween);
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());
if (!interactAll)
{
@ -1975,7 +1973,7 @@ public class BotUtils extends Plugin
{
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);
if (bankCloseWidget != null)
{
@ -1987,8 +1985,8 @@ public class BotUtils extends Plugin
public int getBankMenuOpcode(int bankID)
{
return Banks.BANK_CHECK_BOX.contains(bankID) ? MenuOpcode.GAME_OBJECT_FIRST_OPTION.getId() :
MenuOpcode.GAME_OBJECT_SECOND_OPTION.getId();
return Banks.BANK_CHECK_BOX.contains(bankID) ? MenuAction.GAME_OBJECT_FIRST_OPTION.getId() :
MenuAction.GAME_OBJECT_SECOND_OPTION.getId();
}
//doesn't NPE
@ -2000,7 +1998,7 @@ public class BotUtils extends Plugin
for (Item item : bankItemContainer.getItems())
{
if (itemManager.getItemDefinition(item.getId()).getName().equalsIgnoreCase(itemName))
if (itemManager.getItemComposition(item.getId()).getName().equalsIgnoreCase(itemName))
{
return true;
}
@ -2047,7 +2045,7 @@ public class BotUtils extends Plugin
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;
}
@ -2165,11 +2163,11 @@ public class BotUtils extends Plugin
Widget depositInventoryWidget = client.getWidget(WidgetInfo.BANK_DEPOSIT_INVENTORY);
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
{
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))
{
@ -2225,7 +2223,7 @@ public class BotUtils extends Plugin
return;
}
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);
click(item.getCanvasBounds());
}
@ -2281,7 +2279,7 @@ public class BotUtils extends Plugin
}
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);
delayMouseClick(item.getCanvasBounds(), getRandomIntBetweenRange(0, 50));
}
@ -2299,7 +2297,7 @@ public class BotUtils extends Plugin
{
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);
});
}
@ -2321,7 +2319,7 @@ public class BotUtils extends Plugin
{
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);
clickRandomPointCenter(-200, 200);
});
@ -2358,7 +2356,7 @@ public class BotUtils extends Plugin
identifier = 6;
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);
delayClickRandomPointCenter(-200, 200, 50);
if (identifier == 6)
@ -2381,25 +2379,20 @@ public class BotUtils extends Plugin
public OSBGrandExchangeResult getOSBItem(int itemId)
{
log.debug("Looking up OSB item price {}", itemId);
osbGrandExchangeClient.lookupItem(itemId)
.subscribe(
(osbresult) ->
{
if (osbresult != null && osbresult.getOverall_average() > 0)
{
osbGrandExchangeResult = osbresult;
}
},
(e) -> log.debug("Error getting price of item {}", itemId, e)
);
if (osbGrandExchangeResult != null)
try
{
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
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))
{
return;
@ -2614,8 +2607,8 @@ public class BotUtils extends Plugin
@Subscribe
private void onMenuOptionClicked(MenuOptionClicked event)
{
if (event.getOpcode() == MenuOpcode.CC_OP.getId() && (event.getParam1() == WidgetInfo.WORLD_SWITCHER_LIST.getId() ||
event.getParam1() == 11927560 || event.getParam1() == 4522007 || event.getParam1() == 24772686))
if (event.getMenuAction() == MenuAction.CC_OP && (event.getWidgetId() == WidgetInfo.WORLD_SWITCHER_LIST.getId() ||
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
log.info("Received world-hop/login related click. Giving them priority");
@ -2624,15 +2617,17 @@ public class BotUtils extends Plugin
}
if (targetMenu != null)
{
event.consume();
if (consumeClick)
{
event.consume();
log.info("Consuming a click and not sending anything else");
consumeClick = false;
return;
}
if (event.getOption().equals("Walk here") && walkAction)
if (event.getMenuOption().equals("Walk here") && walkAction)
{
event.consume();
log.debug("Walk action");
walkTile(coordX, coordY);
walkAction = false;
@ -2644,16 +2639,26 @@ public class BotUtils extends Plugin
client.setSelectedItemSlot(modifiedItemIndex);
client.setSelectedItemID(modifiedItemID);
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());
modifiedMenu = false;
}
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 = 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.inject", name = "guice", version = "4.2.3", classifier = "no_aop")
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 = "org.apache.commons", name = "commons-text", version = "1.9")
implementation(group = "org.pf4j", name = "pf4j", version = "3.4.1")

View File

@ -25,8 +25,8 @@
*/
object ProjectVersions {
const val openosrsVersion = "3.5.4"
const val apiVersion = "0.0.1"
const val openosrsVersion = "4.0.0"
const val apiVersion = "^1.0.0"
}
object Libraries {
@ -38,7 +38,6 @@ object Libraries {
const val okhttp3 = "4.2.2"
const val pf4j = "3.2.0"
const val slf4j = "1.7.30"
const val rxjava = "2.2.14"
}
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 pf4j = "org.pf4j:pf4j:${Versions.pf4j}"
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.
*/
version = "1.3.3"
version = "2.1.0"
project.extra["PluginName"] = "iBlackjack"
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.ConfigGroup;
import net.runelite.client.config.ConfigItem;
import net.runelite.client.config.ConfigSection;
import net.runelite.client.config.ConfigTitleSection;
import net.runelite.client.config.ConfigTitle;
import net.runelite.client.config.Range;
import net.runelite.client.config.Title;
@ConfigGroup("iBlackjack")
public interface iBlackjackConfig extends Config
{
@ConfigSection(
@ConfigTitle(
keyName = "delayConfig",
name = "Sleep Delay Configuration",
description = "Configure how the bot handles sleep delays",
position = 0
)
default boolean delayConfig()
{
return false;
}
String delayConfig = "delayConfig";
@Range(
min = 0,
@ -125,16 +120,13 @@ public interface iBlackjackConfig extends Config
return false;
}
@ConfigSection(
@ConfigTitle(
keyName = "delayTickConfig",
name = "Game Tick Configuration",
description = "Configure how the bot handles game tick delays, 1 game tick equates to roughly 600ms",
position = 10
)
default boolean delayTickConfig()
{
return false;
}
String delayTickConfig = "delayTickConfig";
@Range(
min = 0,
@ -212,23 +204,20 @@ public interface iBlackjackConfig extends Config
return false;
}
@ConfigTitleSection(
@ConfigTitle(
keyName = "instructionsTitle",
name = "Instructions",
description = "",
position = 16
)
default Title instructionsTitle()
{
return new Title();
}
String instructionsTitle = "instructionsTitle";
@ConfigItem(
keyName = "instructions",
name = "",
description = "Instructions. Don't enter anything into this field",
position = 17,
titleSection = "instructionsTitle"
title = "instructionsTitle"
)
default String instructions()
{

View File

@ -9,14 +9,14 @@ import javax.inject.Inject;
import javax.inject.Singleton;
import lombok.extern.slf4j.Slf4j;
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 net.runelite.client.ui.overlay.OverlayMenuEntry;
import net.runelite.client.ui.overlay.OverlayPanel;
import net.runelite.client.ui.overlay.OverlayPosition;
import net.runelite.client.ui.overlay.components.TitleComponent;
import net.runelite.client.ui.overlay.components.table.TableAlignment;
import net.runelite.client.ui.overlay.components.table.TableComponent;
import com.openosrs.client.ui.overlay.components.table.TableAlignment;
import com.openosrs.client.ui.overlay.components.table.TableComponent;
import net.runelite.client.util.ColorUtil;
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.PluginDependency;
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.DropTask;
import net.runelite.client.plugins.iblackjack.tasks.EatTask;
@ -77,8 +76,7 @@ import org.pf4j.Extension;
name = "iBlackjack Helper",
enabledByDefault = false,
description = "Illumine - Blackjack helper plugin. Handles knocking out and pickpocketing bandits",
tags = {"illumine", "thieving", "blackjack", "helper", "bot"},
type = PluginType.MISCELLANEOUS
tags = {"illumine", "thieving", "blackjack", "helper", "bot"}
)
@Slf4j
public class iBlackjackPlugin extends Plugin
@ -337,11 +335,11 @@ public class iBlackjackPlugin extends Plugin
{
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;
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 lombok.extern.slf4j.Slf4j;
import net.runelite.api.ItemID;
import net.runelite.api.MenuAction;
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.widgets.WidgetInfo;
import net.runelite.api.widgets.WidgetItem;
@ -45,7 +46,7 @@ public class DropTask extends Task
long sleep = 0;
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);
sleep += sleepDelay();
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 lombok.extern.slf4j.Slf4j;
import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode;
import net.runelite.api.MenuAction;
import net.runelite.api.Skill;
import net.runelite.api.events.GameTick;
import net.runelite.api.widgets.WidgetInfo;
@ -37,7 +37,7 @@ public class EatTask extends Task
WidgetItem food = inventory.getItemMenu(foodMenu);
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);
utils.doActionMsTime(entry, food.getCanvasBounds(), sleepDelay());
eatHP = calc.getRandomIntBetweenRange(config.minEatHP(), config.maxEatHP());

View File

@ -7,7 +7,7 @@ import javax.inject.Inject;
import lombok.extern.slf4j.Slf4j;
import net.runelite.api.GameState;
import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode;
import net.runelite.api.MenuAction;
import net.runelite.api.Point;
import net.runelite.api.coords.WorldArea;
import net.runelite.api.coords.WorldPoint;
@ -167,7 +167,7 @@ public class HopTask extends Task
if (isShopOpen())
{
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());
shouldHop = true;
}

View File

@ -2,7 +2,7 @@ package net.runelite.client.plugins.iblackjack.tasks;
import java.util.Set;
import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode;
import net.runelite.api.MenuAction;
import net.runelite.api.NPC;
import net.runelite.api.events.GameTick;
import net.runelite.client.plugins.iblackjack.Task;
@ -36,7 +36,7 @@ public class KnockoutTask extends Task
@Override
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());
}
}

View File

@ -5,7 +5,7 @@ import lombok.extern.slf4j.Slf4j;
import net.runelite.api.GameObject;
import net.runelite.api.ItemID;
import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode;
import net.runelite.api.MenuAction;
import net.runelite.api.ObjectID;
import net.runelite.api.WallObject;
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);
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);
utils.doActionMsTime(entry, ladder.getConvexHull().getBounds(), sleepDelay());
timeout = tickDelay();
@ -63,7 +63,7 @@ public class LeaveRoomTask extends Task
if (closedCurtain != null)
{
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);
utils.doActionMsTime(entry, closedCurtain.getConvexHull().getBounds(), sleepDelay());
log.debug(status);

View File

@ -1,7 +1,7 @@
package net.runelite.client.plugins.iblackjack.tasks;
import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode;
import net.runelite.api.MenuAction;
import net.runelite.api.NPC;
import net.runelite.api.events.GameTick;
import net.runelite.client.plugins.iblackjack.Task;
@ -34,7 +34,7 @@ public class PickpocketTask extends Task
@Override
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());
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.ItemID;
import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode;
import net.runelite.api.MenuAction;
import net.runelite.api.NPC;
import net.runelite.api.NpcID;
import net.runelite.api.ObjectID;
@ -60,7 +60,7 @@ public class ResetCombatTask extends Task
if (openCurtain != null)
{
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);
utils.doActionMsTime(entry, openCurtain.getConvexHull().getBounds(), sleepDelay());
log.debug(status);
@ -77,7 +77,7 @@ public class ResetCombatTask extends Task
GameObject staircase = object.findNearestGameObjectWithin(config.npcType().escapeLocation, 2, config.npcType().escapeObjID);
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);
utils.doActionMsTime(entry, staircase.getConvexHull().getBounds(), sleepDelay());
status = "Climbing staircase";
@ -94,7 +94,7 @@ public class ResetCombatTask extends Task
if (barman != null)
{
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());
}
else

View File

@ -3,7 +3,7 @@ package net.runelite.client.plugins.iblackjack.tasks;
import lombok.extern.slf4j.Slf4j;
import net.runelite.api.ItemID;
import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode;
import net.runelite.api.MenuAction;
import net.runelite.api.NPC;
import net.runelite.api.NpcID;
import net.runelite.api.Point;
@ -35,7 +35,7 @@ public class ShopTask extends Task
if (jugWidget != null && jugWidget.getChild(3).getItemQuantity() > 0)
{
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());
}
}
@ -45,7 +45,7 @@ public class ShopTask extends Task
if (barman != null)
{
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());
}
}

View File

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

View File

@ -11,14 +11,14 @@ import javax.inject.Inject;
import javax.inject.Singleton;
import lombok.extern.slf4j.Slf4j;
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 net.runelite.client.ui.overlay.OverlayMenuEntry;
import net.runelite.client.ui.overlay.OverlayPanel;
import net.runelite.client.ui.overlay.OverlayPosition;
import net.runelite.client.ui.overlay.components.TitleComponent;
import net.runelite.client.ui.overlay.components.table.TableAlignment;
import net.runelite.client.ui.overlay.components.table.TableComponent;
import com.openosrs.client.ui.overlay.components.table.TableAlignment;
import com.openosrs.client.ui.overlay.components.table.TableComponent;
import net.runelite.client.util.ColorUtil;
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.ItemID;
import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode;
import static net.runelite.api.MenuOpcode.ITEM_USE_ON_GAME_OBJECT;
import net.runelite.api.MenuAction;
import static net.runelite.api.MenuAction.ITEM_USE_ON_GAME_OBJECT;
import net.runelite.api.ObjectID;
import net.runelite.api.Player;
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.PluginDependency;
import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.plugins.PluginType;
import static net.runelite.client.plugins.icombinationrunecrafter.iCombinationRunecrafterState.*;
import net.runelite.client.plugins.iutils.BankUtils;
import net.runelite.client.plugins.iutils.CalculationUtils;
@ -80,8 +79,7 @@ import org.pf4j.Extension;
name = "iCombination Runecrafter Plugin",
enabledByDefault = false,
description = "Illumine - Combination Runecrafting plugin",
tags = {"illumine", "runecrafting", "bot", "smoke", "steam", "lava", "combination"},
type = PluginType.SKILLING
tags = {"illumine", "runecrafting", "bot", "smoke", "steam", "lava", "combination"}
)
@Slf4j
public class iCombinationRunecrafterPlugin extends Plugin
@ -381,7 +379,7 @@ public class iCombinationRunecrafterPlugin extends Plugin
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);
Widget ringWidget = client.getWidget(WidgetInfo.EQUIPMENT_RING);
if (ringWidget != null)
@ -577,7 +575,7 @@ public class iCombinationRunecrafterPlugin extends Plugin
timeout = tickDelay();
break;
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();
break;
case TELEPORT_CASTLE_WARS:
@ -595,7 +593,7 @@ public class iCombinationRunecrafterPlugin extends Plugin
}
break;
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();
break;
case TELEPORT_DUEL_ARENA:
@ -615,7 +613,7 @@ public class iCombinationRunecrafterPlugin extends Plugin
{
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);
utils.doActionMsTime(targetMenu, new Point(0, 0), sleepDelay());
}

View File

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

View File

@ -9,14 +9,14 @@ import javax.inject.Inject;
import javax.inject.Singleton;
import lombok.extern.slf4j.Slf4j;
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 net.runelite.client.ui.overlay.OverlayMenuEntry;
import net.runelite.client.ui.overlay.OverlayPanel;
import net.runelite.client.ui.overlay.OverlayPosition;
import net.runelite.client.ui.overlay.components.TitleComponent;
import net.runelite.client.ui.overlay.components.table.TableAlignment;
import net.runelite.client.ui.overlay.components.table.TableComponent;
import com.openosrs.client.ui.overlay.components.table.TableAlignment;
import com.openosrs.client.ui.overlay.components.table.TableComponent;
import net.runelite.client.util.ColorUtil;
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.PluginDependency;
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.CleanHerbTask;
import net.runelite.client.plugins.iherbcleaner.tasks.MovingTask;
@ -61,8 +60,7 @@ import org.pf4j.Extension;
name = "iHerbCleaner",
enabledByDefault = false,
description = "Illumine - Herb Cleaner plugin",
tags = {"illumine", "task", "herblore", "clean", "bot"},
type = PluginType.MISCELLANEOUS
tags = {"illumine", "task", "herblore", "clean", "bot"}
)
@Slf4j
public class iHerbCleanerPlugin extends Plugin

View File

@ -5,7 +5,7 @@ import java.util.List;
import javax.inject.Inject;
import lombok.extern.slf4j.Slf4j;
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.widgets.WidgetInfo;
import net.runelite.api.widgets.WidgetItem;
@ -46,7 +46,7 @@ public class CleanHerbTask extends Task
for (WidgetItem herb : herbs)
{
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);
sleep += sleepDelay();
herb.getCanvasBounds().getBounds();

View File

@ -5,7 +5,7 @@ import javax.inject.Inject;
import lombok.extern.slf4j.Slf4j;
import net.runelite.api.GameObject;
import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode;
import net.runelite.api.MenuAction;
import net.runelite.api.events.GameTick;
import net.runelite.client.plugins.iherbcleaner.Task;
import net.runelite.client.plugins.iherbcleaner.iHerbCleanerPlugin;
@ -47,7 +47,7 @@ public class OpenBankTask extends Task
if (bank != null)
{
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);
Rectangle rectangle = (bank.getConvexHull() != null) ? bank.getConvexHull().getBounds() :
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.
*/
version = "3.2.1"
version = "4.1.0"
project.extra["PluginName"] = "iMagic 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.ConfigGroup;
import net.runelite.client.config.ConfigItem;
import net.runelite.client.config.ConfigSection;
import net.runelite.client.config.ConfigTitle;
import net.runelite.client.config.Range;
@ -124,16 +124,13 @@ public interface iMagicCasterConfig extends Config
return true;
}
@ConfigSection(
@ConfigTitle(
keyName = "delayConfig",
name = "Sleep Delay Configuration",
description = "Configure how the bot handles sleep delays",
position = 5
)
default boolean delayConfig()
{
return false;
}
String delayConfig = "delayConfig";
@Range(
min = 0,
@ -211,16 +208,13 @@ public interface iMagicCasterConfig extends Config
return false;
}
@ConfigSection(
@ConfigTitle(
keyName = "delayTickConfig",
name = "Game Tick Configuration",
description = "Configure how the bot handles game tick delays, 1 game tick equates to roughly 600ms",
position = 11
)
default boolean delayTickConfig()
{
return false;
}
String delayTickConfig = "delayTickConfig";
@Range(
min = 0,
@ -298,6 +292,17 @@ public interface iMagicCasterConfig extends Config
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(
keyName = "enableUI",
name = "Enable UI",

View File

@ -9,14 +9,14 @@ import javax.inject.Inject;
import javax.inject.Singleton;
import lombok.extern.slf4j.Slf4j;
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 net.runelite.client.ui.overlay.OverlayMenuEntry;
import net.runelite.client.ui.overlay.OverlayPanel;
import net.runelite.client.ui.overlay.OverlayPosition;
import net.runelite.client.ui.overlay.components.TitleComponent;
import net.runelite.client.ui.overlay.components.table.TableAlignment;
import net.runelite.client.ui.overlay.components.table.TableComponent;
import com.openosrs.client.ui.overlay.components.table.TableAlignment;
import com.openosrs.client.ui.overlay.components.table.TableComponent;
import net.runelite.client.util.ColorUtil;
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.GameState;
import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode;
import net.runelite.api.MenuAction;
import net.runelite.api.NPC;
import net.runelite.api.Player;
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.PluginDescriptor;
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_NPC;
import static net.runelite.client.plugins.imagiccaster.iMagicCasterState.HANDLE_BREAK;
@ -82,8 +81,7 @@ import org.pf4j.Extension;
name = "iMagic Caster",
enabledByDefault = false,
description = "Illumine automated magic caster",
tags = {"Magic", "Splashing", "Profit", "Casting"},
type = PluginType.SKILLING
tags = {"Magic", "Splashing", "Profit", "Casting"}
)
@Slf4j
public class iMagicCasterPlugin extends Plugin
@ -286,24 +284,24 @@ public class iMagicCasterPlugin extends Plugin
switch (castType.getName())
{
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);
utils.oneClickCastSpell(selectedSpell.getSpell(), targetMenu, targetNPC.getConvexHull().getBounds(), sleepDelay());
timeout = 4 + tickDelay();
return;
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);
mouse.delayMouseClick(targetNPC.getConvexHull().getBounds(), sleepDelay());
timeout = 10 + tickDelay();
return;
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();
utils.oneClickCastSpell(WidgetInfo.SPELL_HIGH_LEVEL_ALCHEMY, targetMenu, targetItem.getCanvasBounds().getBounds(), sleepDelay());
return;
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();
utils.oneClickCastSpell(WidgetInfo.SPELL_TELEKINETIC_GRAB, targetMenu, new Rectangle(0, 0, 0, 0), sleepDelay());
return;
@ -354,7 +352,9 @@ public class iMagicCasterPlugin extends Plugin
startBot = false;
return;
}
playerUtils.handleRun(40, 20);
if (config.enableRun()) {
playerUtils.handleRun(40, 20);
}
state = getState();
beforeLoc = player.getLocalLocation();
switch (state)
@ -406,7 +406,8 @@ public class iMagicCasterPlugin extends Plugin
return;
}
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();
failureCount = 0;

View File

@ -23,7 +23,7 @@
* 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["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.ConfigGroup;
import net.runelite.client.config.ConfigItem;
import net.runelite.client.config.ConfigSection;
import net.runelite.client.config.ConfigTitle;
import net.runelite.client.config.Range;
@ConfigGroup("iMenuDebugger")
public interface iMenuDebuggerConfig extends Config
{
@ConfigSection(
@ConfigTitle(
keyName = "delayConfig",
name = "Sleep Delay Configuration",
description = "Configure how the bot handles sleep delays",
position = 0
)
default boolean delayConfig()
{
return false;
}
String delayConfig = "delayConfig";
@Range(
min = 0,
@ -123,16 +120,13 @@ public interface iMenuDebuggerConfig extends Config
return false;
}
@ConfigSection(
@ConfigTitle(
keyName = "delayTickConfig",
name = "Game Tick Configuration",
description = "Configure how the bot handles game tick delays, 1 game tick equates to roughly 600ms",
position = 10
)
default boolean delayTickConfig()
{
return false;
}
String delayTickConfig = "delayTickConfig";
@Range(
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.PluginDependency;
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.iUtils;
import static net.runelite.client.plugins.iutils.iUtils.iterating;
@ -61,8 +60,7 @@ import org.pf4j.Extension;
name = "iMenu Debugger Plugin",
enabledByDefault = false,
description = "Illumine - Menu Debugger plugin. Has no function other than debugging",
tags = {"illumine", "menu", "debug", "bot"},
type = PluginType.UTILITY
tags = {"illumine", "menu", "debug", "bot"}
)
@Slf4j
public class iMenuDebuggerPlugin extends Plugin
@ -159,13 +157,13 @@ public class iMenuDebuggerPlugin extends Plugin
log.info("Menu Entry before override: {}", event.toString());
if (config.printChat())
{
utils.sendGameMessage("Option value: " + event.getOption());
utils.sendGameMessage("Target value: " + event.getTarget());
utils.sendGameMessage("Identifier value: " + event.getIdentifier());
utils.sendGameMessage("Opcode value: " + event.getOpcode());
utils.sendGameMessage("Param0 value: " + event.getParam0());
utils.sendGameMessage("Param1 value: " + event.getParam1());
utils.sendGameMessage("mouseButton value: " + event.getMouseButton());
utils.sendGameMessage("MenuOption value: " + event.getMenuOption());
utils.sendGameMessage("MenuTarget value: " + event.getMenuTarget());
utils.sendGameMessage("Id value: " + event.getId());
utils.sendGameMessage("MenuAction value: " + event.getMenuAction());
utils.sendGameMessage("ActionParam value: " + event.getActionParam());
utils.sendGameMessage("WidgetId value: " + event.getWidgetId());
utils.sendGameMessage("selectedItemIndex value: " + event.getSelectedItemIndex());
}
if (testMenu == null)
{

View File

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

View File

@ -9,14 +9,14 @@ import javax.inject.Inject;
import javax.inject.Singleton;
import lombok.extern.slf4j.Slf4j;
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 net.runelite.client.ui.overlay.OverlayMenuEntry;
import net.runelite.client.ui.overlay.OverlayPanel;
import net.runelite.client.ui.overlay.OverlayPosition;
import net.runelite.client.ui.overlay.components.TitleComponent;
import net.runelite.client.ui.overlay.components.table.TableAlignment;
import net.runelite.client.ui.overlay.components.table.TableComponent;
import com.openosrs.client.ui.overlay.components.table.TableAlignment;
import com.openosrs.client.ui.overlay.components.table.TableComponent;
import net.runelite.client.util.ColorUtil;
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.Item;
import net.runelite.api.ItemContainer;
import net.runelite.api.ItemDefinition;
import net.runelite.api.ItemComposition;
import net.runelite.api.ItemID;
import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode;
import net.runelite.api.MenuAction;
import net.runelite.api.NPC;
import net.runelite.api.Player;
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.PluginDependency;
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.InterfaceUtils;
import net.runelite.client.plugins.iutils.InventoryUtils;
@ -94,8 +93,7 @@ import org.pf4j.Extension;
name = "iPower Fighter",
enabledByDefault = false,
description = "Illumine - Power Fighter plugin",
tags = {"illumine", "combat", "ranged", "magic", "bot"},
type = PluginType.PVM
tags = {"illumine", "combat", "ranged", "magic", "bot"}
)
@Slf4j
public class iPowerFighterPlugin extends Plugin
@ -319,7 +317,7 @@ public class iPowerFighterPlugin extends Plugin
TileItem lootItem = getNearestTileItem(itemList);
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);
menu.setEntry(targetMenu);
mouse.delayMouseClick(lootItem.getTile().getItemLayer().getCanvasTilePoly().getBounds(), sleepDelay());
@ -356,7 +354,7 @@ public class iPowerFighterPlugin extends Plugin
{
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.isTradeable()) {
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());
targetMenu = new MenuEntry("", "",
alchItem.getId(),
MenuOpcode.ITEM_USE_ON_WIDGET.getId(),
MenuAction.ITEM_USE_ON_WIDGET.getId(),
alchItem.getIndex(), WidgetInfo.INVENTORY.getId(),
false);
utils.oneClickCastSpell(WidgetInfo.SPELL_HIGH_LEVEL_ALCHEMY, targetMenu, alchItem.getCanvasBounds().getBounds(), sleepDelay());
@ -403,7 +401,7 @@ public class iPowerFighterPlugin extends Plugin
{
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);
menu.setEntry(targetMenu);
mouse.handleMouseClick(bone.getCanvasBounds());
@ -415,7 +413,7 @@ public class iPowerFighterPlugin extends Plugin
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);
menu.setEntry(targetMenu);
mouse.delayMouseClick(currentNPC.getConvexHull().getBounds(), sleepDelay());
@ -684,7 +682,7 @@ public class iPowerFighterPlugin extends Plugin
WidgetItem ammoItem = inventory.getWidgetItem(config.ammoID());
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);
menu.setEntry(targetMenu);
mouse.delayMouseClick(ammoItem.getCanvasBounds(), sleepDelay());
@ -695,7 +693,7 @@ public class iPowerFighterPlugin extends Plugin
if (bracelet != null)
{
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);
menu.setEntry(targetMenu);
mouse.delayMouseClick(bracelet.getCanvasBounds(), sleepDelay());

View File

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

View File

@ -9,7 +9,7 @@ import javax.inject.Inject;
import javax.inject.Singleton;
import lombok.extern.slf4j.Slf4j;
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.coords.LocalPoint;
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.OverlayUtil;
import net.runelite.client.ui.overlay.components.TitleComponent;
import net.runelite.client.ui.overlay.components.table.TableAlignment;
import net.runelite.client.ui.overlay.components.table.TableComponent;
import com.openosrs.client.ui.overlay.components.table.TableAlignment;
import com.openosrs.client.ui.overlay.components.table.TableComponent;
import net.runelite.client.util.ColorUtil;
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.GameState;
import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode;
import net.runelite.api.MenuAction;
import net.runelite.api.NPC;
import net.runelite.api.NullObjectID;
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.ItemContainerChanged;
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.WidgetInfo;
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.PluginDescriptor;
import net.runelite.client.plugins.PluginManager;
import net.runelite.client.plugins.PluginType;
import static net.runelite.client.plugins.ipowerskiller.iPowerSkillerState.*;
import net.runelite.client.plugins.iutils.BankUtils;
import net.runelite.client.plugins.iutils.CalculationUtils;
@ -87,8 +86,7 @@ import org.pf4j.Extension;
name = "iPower Skiller",
enabledByDefault = false,
description = "Illumine auto power-skill plugin",
tags = {"fishing, mining, wood-cutting, illumine, bot, power, skill"},
type = PluginType.SKILLING
tags = {"fishing, mining, wood-cutting, illumine, bot, power, skill"}
)
@Slf4j
public class iPowerSkillerPlugin extends Plugin
@ -327,7 +325,7 @@ public class iPowerSkillerPlugin extends Plugin
private void interactNPC()
{
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)
{
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() :
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)
{
targetMenu = new MenuEntry("", "", targetObject.getId(), opcode,
@ -361,7 +359,7 @@ public class iPowerSkillerPlugin extends Plugin
private void interactWall()
{
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)
{
targetMenu = new MenuEntry("", "", targetWall.getId(), opcode,
@ -677,8 +675,8 @@ public class iPowerSkillerPlugin extends Plugin
{
if (config.customOpcode() && config.printOpcode())
{
utils.sendGameMessage("Identifier value: " + event.getIdentifier());
utils.sendGameMessage("Opcode value: " + event.getOpcode());
utils.sendGameMessage("Identifier value: " + event.getId());
utils.sendGameMessage("Opcode value: " + event.getMenuAction());
}
}
@ -699,7 +697,7 @@ public class iPowerSkillerPlugin extends Plugin
}
@Subscribe
public void onNPCDefinitionChanged(NpcDefinitionChanged event)
public void onNPCDefinitionChanged(NpcChanged event)
{
if (targetNPC == null || event.getNpc() != targetNPC || !startPowerSkiller)
{
@ -784,7 +782,7 @@ public class iPowerSkillerPlugin extends Plugin
//extend search outside the players set radius
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)
{
targetMenu = new MenuEntry("", "", targetObject.getId(), opcode,

View File

@ -23,7 +23,8 @@
* 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["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.ItemID;
import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode;
import net.runelite.api.MenuAction;
import net.runelite.api.Player;
import net.runelite.api.Skill;
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.PluginDependency;
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.InventoryUtils;
import net.runelite.client.plugins.iutils.MenuUtils;
@ -67,8 +66,7 @@ import org.pf4j.Extension;
name = "iQuick Eater",
enabledByDefault = false,
description = "Illumine - auto eat food and drink some potions below configured values",
tags = {"illumine", "auto", "bot", "eat", "food", "potions", "stamina", "prayer"},
type = PluginType.UTILITY
tags = {"illumine", "auto", "bot", "eat", "food", "potions", "stamina", "prayer"}
)
@Slf4j
public class iQuickEaterPlugin extends Plugin
@ -174,7 +172,7 @@ public class iQuickEaterPlugin extends Plugin
{
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);
menu.setEntry(targetMenu);
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)
{
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);
menu.setEntry(targetMenu);
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.
*/
version = "2.0.2"
version = "3.1.0"
project.extra["PluginName"] = "iRandom Handler"
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.ConfigGroup;
import net.runelite.client.config.ConfigItem;
import net.runelite.client.config.ConfigSection;
import net.runelite.client.config.ConfigTitle;
import net.runelite.client.config.Range;
@ConfigGroup("irandomhandler")
public interface iRandomHandlerConfig extends Config
{
@ConfigSection(
@ConfigTitle(
keyName = "delayConfig",
name = "Sleep Delay Configuration",
description = "Configure how the bot handles sleep delays",
position = 0
)
default boolean delayConfig()
{
return false;
}
String delayConfig = "delayConfig";
@Range(
min = 0,
@ -121,16 +118,13 @@ public interface iRandomHandlerConfig extends Config
return false;
}
@ConfigSection(
@ConfigTitle(
keyName = "delayTickConfig",
name = "Game Tick Configuration",
description = "Configure how the bot handles game tick delays, 1 game tick equates to roughly 600ms",
position = 10
)
default boolean delayTickConfig()
{
return false;
}
String delayTickConfig = "delayTickConfig";
@Range(
min = 0,

View File

@ -32,7 +32,7 @@ import lombok.extern.slf4j.Slf4j;
import net.runelite.api.Actor;
import net.runelite.api.Client;
import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode;
import net.runelite.api.MenuAction;
import net.runelite.api.NPC;
import net.runelite.api.NpcID;
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.PluginDependency;
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.MenuUtils;
import net.runelite.client.plugins.iutils.MouseUtils;
@ -59,8 +58,7 @@ import org.pf4j.Extension;
name = "iRandom Handler",
enabledByDefault = false,
description = "illumine - Dismiss random events and handle genie",
tags = {"illumine", "random", "event", "genie", "bot"},
type = PluginType.UTILITY
tags = {"illumine", "random", "event", "genie", "bot"}
)
@Slf4j
public class iRandomHandlerPlugin extends Plugin
@ -208,7 +206,7 @@ public class iRandomHandlerPlugin extends Plugin
if (client.getWidget(WidgetInfo.DIALOG_NPC_CONTINUE) != null)
{
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);
menu.setEntry(targetMenu);
mouse.delayMouseClick(randomToDismiss.getConvexHull().getBounds(), sleepDelay());
@ -218,7 +216,7 @@ public class iRandomHandlerPlugin extends Plugin
}
log.debug("Dismissing random event");
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);
menu.setEntry(targetMenu);
mouse.delayMouseClick(randomToDismiss.getConvexHull().getBounds(), sleepDelay());

View File

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

View File

@ -9,14 +9,14 @@ import javax.inject.Inject;
import javax.inject.Singleton;
import lombok.extern.slf4j.Slf4j;
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 net.runelite.client.ui.overlay.OverlayMenuEntry;
import net.runelite.client.ui.overlay.OverlayPanel;
import net.runelite.client.ui.overlay.OverlayPosition;
import net.runelite.client.ui.overlay.components.TitleComponent;
import net.runelite.client.ui.overlay.components.table.TableAlignment;
import net.runelite.client.ui.overlay.components.table.TableComponent;
import com.openosrs.client.ui.overlay.components.table.TableAlignment;
import com.openosrs.client.ui.overlay.components.table.TableComponent;
import net.runelite.client.util.ColorUtil;
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.ItemID;
import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode;
import net.runelite.api.MenuAction;
import net.runelite.api.Player;
import net.runelite.api.Skill;
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.PluginDescriptor;
import net.runelite.client.plugins.PluginManager;
import net.runelite.client.plugins.PluginType;
import static net.runelite.client.plugins.irooftopagility.iRooftopAgilityState.*;
import net.runelite.client.plugins.iutils.BankUtils;
import net.runelite.client.plugins.iutils.CalculationUtils;
@ -88,8 +87,7 @@ import org.pf4j.Extension;
name = "iRooftop Agility",
enabledByDefault = false,
description = "Illumine auto rooftop agility plugin",
tags = {"agility"},
type = PluginType.SKILLING
tags = {"agility"}
)
@Slf4j
public class iRooftopAgilityPlugin extends Plugin
@ -298,7 +296,7 @@ public class iRooftopAgilityPlugin extends Plugin
if (!setHighAlch)
{
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);
if (spellWidget != null)
{
@ -317,7 +315,7 @@ public class iRooftopAgilityPlugin extends Plugin
alchItem = inventory.getWidgetItem(List.of(config.alchItemID(), (config.alchItemID() + 1)));
targetMenu = new MenuEntry("Cast", "<col=00ff00>High Level Alchemy</col><col=ffffff> ->",
alchItem.getId(),
MenuOpcode.ITEM_USE_ON_WIDGET.getId(),
MenuAction.ITEM_USE_ON_WIDGET.getId(),
alchItem.getIndex(), 9764864,
false);
menu.setEntry(targetMenu);
@ -342,9 +340,10 @@ public class iRooftopAgilityPlugin extends Plugin
{
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);
mouse.delayClickRandomPointCenter(-200, 200, sleepDelay());
return;
@ -397,7 +396,7 @@ public class iRooftopAgilityPlugin extends Plugin
if (bankBooth != null)
{
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);
menu.setEntry(targetMenu);
mouse.delayMouseClick(bankBooth.getConvexHull().getBounds(), sleepDelay());
@ -422,7 +421,7 @@ public class iRooftopAgilityPlugin extends Plugin
DecorativeObject decObstacle = object.findNearestDecorObject(obstacle.getObstacleId());
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);
Rectangle clickPoint = (decObstacle.getConvexHull() != null) ? decObstacle.getConvexHull().getBounds() :
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());
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);
Rectangle clickPoint = (groundObstacle.getConvexHull() != null) ? groundObstacle.getConvexHull().getBounds() :
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());
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);
Rectangle clickPoint = (objObstacle.getConvexHull() != null) ? objObstacle.getConvexHull().getBounds() :
new Rectangle(client.getCenterX() - 50, client.getCenterY() - 50, 100, 100);
@ -628,7 +627,7 @@ public class iRooftopAgilityPlugin extends Plugin
case MOVING:
break;
case CAST_CAMELOT_TELEPORT:
targetMenu = new MenuEntry("", "", 2, MenuOpcode.CC_OP.getId(), -1,
targetMenu = new MenuEntry("", "", 2, MenuAction.CC_OP.getId(), -1,
14286879, false);
Widget spellWidget = client.getWidget(WidgetInfo.SPELL_CAMELOT_TELEPORT);
if (spellWidget != null)
@ -645,7 +644,7 @@ public class iRooftopAgilityPlugin extends Plugin
break;
case 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);
menu.setEntry(targetMenu);
mouse.delayMouseClick(spawnedPortal.getConvexHull().getBounds(), sleepDelay());

View File

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

View File

@ -9,14 +9,14 @@ import javax.inject.Inject;
import javax.inject.Singleton;
import lombok.extern.slf4j.Slf4j;
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 net.runelite.client.ui.overlay.OverlayMenuEntry;
import net.runelite.client.ui.overlay.OverlayPanel;
import net.runelite.client.ui.overlay.OverlayPosition;
import net.runelite.client.ui.overlay.components.TitleComponent;
import net.runelite.client.ui.overlay.components.table.TableAlignment;
import net.runelite.client.ui.overlay.components.table.TableComponent;
import com.openosrs.client.ui.overlay.components.table.TableAlignment;
import com.openosrs.client.ui.overlay.components.table.TableComponent;
import net.runelite.client.util.ColorUtil;
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.PluginDependency;
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.TimeoutTask;
import net.runelite.client.plugins.iutils.iUtils;
@ -58,8 +57,7 @@ import org.pf4j.Extension;
name = "iTaskTemplate",
enabledByDefault = false,
description = "Illumine - Task Template plugin",
tags = {"illumine", "task", "template", "bot"},
type = PluginType.MISCELLANEOUS
tags = {"illumine", "task", "template", "bot"}
)
@Slf4j
public class iTaskTemplatePlugin extends Plugin

View File

@ -23,7 +23,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
version = "2.3.6"
version = "3.1.0"
project.extra["PluginName"] = "iUtils"
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.Item;
import net.runelite.api.ItemContainer;
import net.runelite.api.MenuAction;
import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode;
import net.runelite.api.Point;
import net.runelite.api.queries.BankItemQuery;
import net.runelite.api.widgets.Widget;
@ -74,7 +74,7 @@ public class BankUtils
{
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);
if (bankCloseWidget != null)
{
@ -86,8 +86,8 @@ public class BankUtils
public int getBankMenuOpcode(int bankID)
{
return Banks.BANK_CHECK_BOX.contains(bankID) ? MenuOpcode.GAME_OBJECT_FIRST_OPTION.getId() :
MenuOpcode.GAME_OBJECT_SECOND_OPTION.getId();
return Banks.BANK_CHECK_BOX.contains(bankID) ? MenuAction.GAME_OBJECT_FIRST_OPTION.getId() :
MenuAction.GAME_OBJECT_SECOND_OPTION.getId();
}
//doesn't NPE
@ -99,7 +99,7 @@ public class BankUtils
for (Item item : bankItemContainer.getItems())
{
if (itemManager.getItemDefinition(item.getId()).getName().equalsIgnoreCase(itemName))
if (itemManager.getItemComposition(item.getId()).getName().equalsIgnoreCase(itemName))
{
return true;
}
@ -146,7 +146,7 @@ public class BankUtils
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;
}
@ -241,11 +241,11 @@ public class BankUtils
Widget depositInventoryWidget = client.getWidget(WidgetInfo.BANK_DEPOSIT_INVENTORY);
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
{
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))
{
@ -299,7 +299,7 @@ public class BankUtils
return;
}
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));
mouse.handleMouseClick(item.getCanvasBounds());
}
@ -355,7 +355,7 @@ public class BankUtils
}
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));
mouse.delayMouseClick(item.getCanvasBounds(), calc.getRandomIntBetweenRange(0, 50));
}
@ -373,7 +373,7 @@ public class BankUtils
{
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);
});
}
@ -393,7 +393,7 @@ public class BankUtils
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);
utils.doActionClientTick(entry, bankItemWidget.getBounds(), 0);
}
@ -429,7 +429,7 @@ public class BankUtils
identifier = 6;
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);
if (identifier == 6)
{

View File

@ -6,8 +6,8 @@ import javax.inject.Singleton;
import lombok.extern.slf4j.Slf4j;
import net.runelite.api.Client;
import net.runelite.api.GameState;
import net.runelite.api.MenuAction;
import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode;
import net.runelite.api.Point;
import net.runelite.api.widgets.Widget;
import net.runelite.api.widgets.WidgetInfo;
@ -57,13 +57,13 @@ public class InterfaceUtils
final int INCREMENT = 4;
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()
{
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);
if (logoutWidget != null)
{

View File

@ -17,8 +17,8 @@ import net.runelite.api.GameState;
import net.runelite.api.InventoryID;
import net.runelite.api.Item;
import net.runelite.api.ItemContainer;
import net.runelite.api.MenuAction;
import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode;
import net.runelite.api.Varbits;
import net.runelite.api.queries.InventoryItemQuery;
import net.runelite.api.queries.InventoryWidgetItemQuery;
@ -227,7 +227,7 @@ public class InventoryUtils
{
continue;
}
String[] menuActions = itemManager.getItemDefinition(item.getId()).getInventoryActions();
String[] menuActions = itemManager.getItemComposition(item.getId()).getInventoryActions();
for (String action : menuActions)
{
if (action != null && action.equals(menuOption))
@ -248,7 +248,7 @@ public class InventoryUtils
Collection<WidgetItem> items = inventoryWidget.getWidgetItems();
for (WidgetItem item : items)
{
String[] menuActions = itemManager.getItemDefinition(item.getId()).getInventoryActions();
String[] menuActions = itemManager.getItemComposition(item.getId()).getInventoryActions();
for (String action : menuActions)
{
if (action != null && menuOptions.contains(action))
@ -269,7 +269,7 @@ public class InventoryUtils
Collection<WidgetItem> items = inventoryWidget.getWidgetItems();
for (WidgetItem item : items)
{
String[] menuActions = itemManager.getItemDefinition(item.getId()).getInventoryActions();
String[] menuActions = itemManager.getItemComposition(item.getId()).getInventoryActions();
for (String action : menuActions)
{
if (action != null && action.equals(menuOption))
@ -443,7 +443,7 @@ public class InventoryUtils
{
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());
}
@ -585,7 +585,7 @@ public class InventoryUtils
log.info("interacting inventory item: {}", item.getId());
sleep(minDelayBetween, maxDelayBetween);
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());
if (!interactAll)
{

View File

@ -12,11 +12,11 @@ import net.runelite.api.Constants;
import net.runelite.api.DecorativeObject;
import net.runelite.api.GameObject;
import net.runelite.api.GroundObject;
import net.runelite.api.ItemLayer;
import net.runelite.api.Player;
import net.runelite.api.Scene;
import net.runelite.api.Tile;
import net.runelite.api.TileItem;
import net.runelite.api.TileItemPile;
import net.runelite.api.TileObject;
import net.runelite.api.WallObject;
import net.runelite.api.coords.LocalPoint;
@ -224,7 +224,7 @@ public class ObjectUtils
private TileItem findItemAtTile(Tile tile, int id)
{
TileItemPile tileItemPile = tile.getItemLayer();
ItemLayer tileItemPile = tile.getItemLayer();
if (tileItemPile != null)
{
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.ItemContainer;
import net.runelite.api.ItemID;
import net.runelite.api.MenuAction;
import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode;
import net.runelite.api.Player;
import net.runelite.api.Varbits;
import net.runelite.api.coords.LocalPoint;
@ -169,7 +169,7 @@ public class PlayerUtils
if (staminaPotion != null)
{
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));
mouse.delayMouseClick(staminaPotion.getCanvasBounds(), calc.getRandomIntBetweenRange(5, 200));
return true;

View File

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

View File

@ -7,6 +7,7 @@ package net.runelite.client.plugins.iutils;
import com.google.inject.Provides;
import java.awt.Rectangle;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@ -18,8 +19,8 @@ import lombok.extern.slf4j.Slf4j;
import net.runelite.api.ChatMessageType;
import net.runelite.api.Client;
import net.runelite.api.GameObject;
import net.runelite.api.MenuAction;
import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode;
import net.runelite.api.NPC;
import net.runelite.api.Point;
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.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.plugins.PluginType;
import net.runelite.http.api.ge.GrandExchangeClient;
import net.runelite.http.api.osbuddy.OSBGrandExchangeClient;
import net.runelite.http.api.osbuddy.OSBGrandExchangeResult;
@ -51,7 +51,6 @@ import org.pf4j.Extension;
@Extension
@PluginDescriptor(
name = "iUtils",
type = PluginType.UTILITY,
description = "Illumine plugin utilities",
hidden = false
)
@ -453,25 +452,21 @@ public class iUtils extends Plugin
public OSBGrandExchangeResult getOSBItem(int itemId)
{
log.debug("Looking up OSB item price {}", itemId);
osbGrandExchangeClient.lookupItem(itemId)
.subscribe(
(osbresult) ->
{
if (osbresult != null && osbresult.getOverall_average() > 0)
{
osbGrandExchangeResult = osbresult;
}
},
(e) -> log.debug("Error getting price of item {}", itemId, e)
);
if (osbGrandExchangeResult != null)
try
{
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
@ -581,7 +576,7 @@ public class iUtils extends Plugin
@Subscribe
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))
{
return;
@ -599,8 +594,8 @@ public class iUtils extends Plugin
@Subscribe
private void onMenuOptionClicked(MenuOptionClicked event)
{
if (event.getOpcode() == MenuOpcode.CC_OP.getId() && (event.getParam1() == WidgetInfo.WORLD_SWITCHER_LIST.getId() ||
event.getParam1() == 11927560 || event.getParam1() == 4522007 || event.getParam1() == 24772686))
if (event.getMenuAction() == MenuAction.CC_OP && (event.getWidgetId() == WidgetInfo.WORLD_SWITCHER_LIST.getId() ||
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
log.info("Received world-hop/login related click. Giving them priority");
@ -610,16 +605,17 @@ public class iUtils extends Plugin
if (menu.entry != null)
{
tickActions++;
event.consume();
log.debug("Actions this game tick: {}", tickActions);
if (menu.consumeClick)
{
event.consume();
log.info("Consuming a click and not sending anything else");
menu.consumeClick = false;
return;
}
if (menu.entry.getOption().equals("Walk here"))
{
event.consume();
log.info("Walk action: {} {}", walk.coordX, walk.coordY);
walk.walkTile(walk.coordX, walk.coordY);
walk.walkAction = false;
@ -632,25 +628,36 @@ public class iUtils extends Plugin
client.setSelectedItemSlot(menu.modifiedItemIndex);
client.setSelectedItemID(menu.modifiedItemID);
log.debug("doing a Modified MOC, mod ID: {}, mod index: {}, param1: {}", menu.modifiedItemID,
menu.modifiedItemIndex, menu.entry.getParam1());
client.invokeMenuAction(menu.entry.getOption(), menu.entry.getTarget(), menu.entry.getIdentifier(),
menu.modifiedOpCode, menu.entry.getParam0(), menu.entry.getParam1());
menu.modifiedItemIndex, menu.entry.getParam1());
menuAction(event,menu.entry.getOption(), menu.entry.getTarget(), menu.entry.getIdentifier(),
MenuAction.of(menu.modifiedOpCode), menu.entry.getParam0(), menu.entry.getParam1());
menu.modifiedMenu = false;
}
else
{
client.invokeMenuAction(menu.entry.getOption(), menu.entry.getTarget(), menu.entry.getIdentifier(),
menu.entry.getOpcode(), menu.entry.getParam0(), menu.entry.getParam1());
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()));
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;
}
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");
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.
*/
version = "2.5.1"
version = "3.1.0"
project.extra["PluginName"] = "iWorld 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.ConfigGroup;
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.plugins.iworldwalker.farming.Allotments;
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
{
@ConfigSection(
@ConfigTitle(
keyName = "delayConfig",
name = "Sleep Delay Configuration",
description = "Configure how the bot handles sleep delays",
position = 1
)
default boolean delayConfig()
{
return false;
}
String delayConfig = "delayConfig";
@Range(
min = 0,
@ -129,16 +126,13 @@ public interface iWorldWalkerConfig extends Config
return false;
}
@ConfigSection(
@ConfigTitle(
keyName = "delayTickConfig",
name = "Game Tick Configuration",
description = "Configure how the bot handles game tick delays, 1 game tick equates to roughly 600ms",
position = 7
)
default boolean delayTickConfig()
{
return false;
}
String delayTickConfig = "delayTickConfig";
@Range(
min = 0,
@ -216,16 +210,13 @@ public interface iWorldWalkerConfig extends Config
return false;
}
@ConfigSection(
@ConfigTitle(
keyName = "instructionsTitle",
name = "Instructions",
description = "Instructions Title",
position = 15
)
default boolean instructionsTitle()
{
return false;
}
String instructionsTitle = "instructionsTitle";
@ConfigItem(
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.";
}
@ConfigSection(
@ConfigTitle(
keyName = "notesTitle",
name = "Custom Notes",
description = "Notes Title",
position = 29
)
default boolean notesTitle()
{
return false;
}
String notesTitle = "notesTitle";
@ConfigItem(
keyName = "notepad",
@ -262,16 +250,13 @@ public interface iWorldWalkerConfig extends Config
return "Paste custom co-ords that you want to save for frequent use";
}
@ConfigSection(
@ConfigTitle(
keyName = "showQuestNotes",
name = "Show Quest Notes",
description = "Unhide the quest notes section, containing notes on supported quests",
position = 31
)
default boolean showQuestNotes()
{
return false;
}
String showQuestNotes = "showQuestNotes";
@ConfigItem(
keyName = "supportedQuests",

View File

@ -9,14 +9,14 @@ import javax.inject.Inject;
import javax.inject.Singleton;
import lombok.extern.slf4j.Slf4j;
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 net.runelite.client.ui.overlay.OverlayMenuEntry;
import net.runelite.client.ui.overlay.OverlayPanel;
import net.runelite.client.ui.overlay.OverlayPosition;
import net.runelite.client.ui.overlay.components.TitleComponent;
import net.runelite.client.ui.overlay.components.table.TableAlignment;
import net.runelite.client.ui.overlay.components.table.TableComponent;
import com.openosrs.client.ui.overlay.components.table.TableAlignment;
import com.openosrs.client.ui.overlay.components.table.TableComponent;
import net.runelite.client.util.ColorUtil;
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.GameState;
import net.runelite.api.MenuEntry;
import net.runelite.api.MenuOpcode;
import net.runelite.api.MenuAction;
import net.runelite.api.Player;
import net.runelite.api.Point;
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.PluginDependency;
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.PlayerUtils;
import net.runelite.client.plugins.iutils.WalkUtils;
@ -71,8 +70,7 @@ import org.pf4j.Extension;
name = "iWorld Walker Plugin",
enabledByDefault = false,
description = "Illumine - World Walker plugin",
tags = {"illumine", "walk", "web", "travel", "bot"},
type = PluginType.UTILITY
tags = {"illumine", "walk", "web", "travel", "bot"}
)
@Slf4j
public class iWorldWalkerPlugin extends Plugin
@ -452,12 +450,12 @@ public class iWorldWalkerPlugin extends Plugin
@Subscribe
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());
startVals();
}
if (event.getOption().equals("illu-Clear Destination"))
if (event.getMenuOption().equals("illu-Clear Destination"))
{
mapPoint = null;
resetVals();
@ -484,7 +482,7 @@ public class iWorldWalkerPlugin extends Plugin
MenuEntry entry = new MenuEntry();
entry.setOption(option);
entry.setTarget(event.getTarget());
entry.setOpcode(MenuOpcode.RUNELITE.getId());
entry.setOpcode(MenuAction.RUNELITE.getId());
entries.add(0, entry);
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.