project: 🧹🧹
This commit is contained in:
6
.github/workflows/pr.yml
vendored
6
.github/workflows/pr.yml
vendored
@@ -1,6 +1,8 @@
|
|||||||
name: OpenOSRS - CI (PR)
|
name: OpenOSRS - CI (PR)
|
||||||
|
|
||||||
on: pull_request
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: ['opened', 'edited', 'reopened', 'synchronize']
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pr-lint:
|
pr-lint:
|
||||||
@@ -10,7 +12,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: PR title lint
|
- name: PR title lint
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
uses: seferov/pr-lint-action@master
|
uses: seferov/pr-lint-action@v1.0.3
|
||||||
with:
|
with:
|
||||||
title-regex: '^([\w-/]+): \w+'
|
title-regex: '^([\w-/]+): \w+'
|
||||||
|
|
||||||
|
|||||||
26
README.md
26
README.md
@@ -3,11 +3,13 @@
|
|||||||
|
|
||||||
|
|
||||||
# OpenOSRS
|
# OpenOSRS
|
||||||
|
|
||||||
[/badge.svg)](https://github.com/open-osrs/runelite/actions?query=workflow%3A%22OpenOSRS+-+CI+%28push%29%22)
|
[/badge.svg)](https://github.com/open-osrs/runelite/actions?query=workflow%3A%22OpenOSRS+-+CI+%28push%29%22)
|
||||||
[](http://hits.dwyl.io/open-osrs/runelite)
|
[](http://hits.dwyl.io/open-osrs/runelite)
|
||||||
[OpenOSRS](https://openosrs.com) is an extended version of [RuneLite](https://github.com/runelite/runelite) that provides more functionality and less restrictions while staying more open-source. We are not affiliated with RuneLite.
|
[OpenOSRS](https://openosrs.com) is an extended version of [RuneLite](https://github.com/runelite/runelite) that provides more functionality and less restrictions while staying fully open-source. We are not affiliated with RuneLite.
|
||||||
|
|
||||||
## Discord
|
## Discord
|
||||||
|
|
||||||
[](https://discord.gg/HN5gf3m)
|
[](https://discord.gg/HN5gf3m)
|
||||||
|
|
||||||
## Project Layout
|
## Project Layout
|
||||||
@@ -24,29 +26,9 @@
|
|||||||
- [runelite-client](runelite-client/src/main/java/net/runelite/client) - Game client with plugins
|
- [runelite-client](runelite-client/src/main/java/net/runelite/client) - Game client with plugins
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
We have migrated the project to Gradle. Information on how to setup and build the project can be found at https://github.com/open-osrs/runelite/wiki/Building-with-IntelliJ-IDEA
|
We have migrated the project to Gradle. Information on how to setup and build the project can be found at https://github.com/open-osrs/runelite/wiki/Building-with-IntelliJ-IDEA
|
||||||
|
|
||||||
## Private Servers
|
|
||||||
Currently we support RSMod which can be found at: https://github.com/Tomm0017/rsmod but should work with any server that follows osrs protocol.
|
|
||||||
```
|
|
||||||
Gradle
|
|
||||||
enter
|
|
||||||
run --args='--rs=RSPS'
|
|
||||||
into the tasks box
|
|
||||||
|
|
||||||
Jar
|
|
||||||
Use -rs=RSPS arg.
|
|
||||||
|
|
||||||
Exe
|
|
||||||
Use --clientargs="--rs=RSPS" arg.
|
|
||||||
|
|
||||||
-----
|
|
||||||
|
|
||||||
Codebase is set to 127.0.0.1 by default and can be changed in the Private Server plugin (requires restart)
|
|
||||||
Update modulus in Private Server plugin.
|
|
||||||
|
|
||||||
Disable Default World plugin if you have it enabled, this causes issues with codebase.
|
|
||||||
```
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
OpenOSRS is licensed under the BSD 2-clause license. See the license header in the respective file to be sure.
|
OpenOSRS is licensed under the BSD 2-clause license. See the license header in the respective file to be sure.
|
||||||
|
|||||||
@@ -316,7 +316,7 @@ public class Notifier
|
|||||||
|
|
||||||
private static Process sendCommand(final List<String> commands) throws IOException
|
private static Process sendCommand(final List<String> commands) throws IOException
|
||||||
{
|
{
|
||||||
return new ProcessBuilder(commands.toArray(new String[commands.size()]))
|
return new ProcessBuilder(commands.toArray(new String[0]))
|
||||||
.redirectErrorStream(true)
|
.redirectErrorStream(true)
|
||||||
.start();
|
.start();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ public class RuneLite
|
|||||||
|
|
||||||
Authenticator.setDefault(new Authenticator()
|
Authenticator.setDefault(new Authenticator()
|
||||||
{
|
{
|
||||||
private PasswordAuthentication auth = new PasswordAuthentication(user, pass);
|
private final PasswordAuthentication auth = new PasswordAuthentication(user, pass);
|
||||||
|
|
||||||
protected PasswordAuthentication getPasswordAuthentication()
|
protected PasswordAuthentication getPasswordAuthentication()
|
||||||
{
|
{
|
||||||
@@ -308,7 +308,7 @@ public class RuneLite
|
|||||||
log.info("Client initialization took {}ms. Uptime: {}ms", end - start, uptime);
|
log.info("Client initialization took {}ms. Uptime: {}ms", end - start, uptime);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void start() throws Exception
|
private void start() throws Exception
|
||||||
{
|
{
|
||||||
// Load RuneLite or Vanilla client
|
// Load RuneLite or Vanilla client
|
||||||
final boolean isOutdated = client == null;
|
final boolean isOutdated = client == null;
|
||||||
|
|||||||
@@ -41,8 +41,8 @@ import net.runelite.client.callback.Hooks;
|
|||||||
import net.runelite.client.chat.ChatMessageManager;
|
import net.runelite.client.chat.ChatMessageManager;
|
||||||
import net.runelite.client.config.ChatColorConfig;
|
import net.runelite.client.config.ChatColorConfig;
|
||||||
import net.runelite.client.config.ConfigManager;
|
import net.runelite.client.config.ConfigManager;
|
||||||
import net.runelite.client.config.RuneLiteConfig;
|
|
||||||
import net.runelite.client.config.OpenOSRSConfig;
|
import net.runelite.client.config.OpenOSRSConfig;
|
||||||
|
import net.runelite.client.config.RuneLiteConfig;
|
||||||
import net.runelite.client.eventbus.EventBus;
|
import net.runelite.client.eventbus.EventBus;
|
||||||
import net.runelite.client.game.ItemManager;
|
import net.runelite.client.game.ItemManager;
|
||||||
import net.runelite.client.menus.MenuManager;
|
import net.runelite.client.menus.MenuManager;
|
||||||
|
|||||||
@@ -139,6 +139,7 @@ public class Hooks implements Callbacks
|
|||||||
/**
|
/**
|
||||||
* Get the Graphics2D for the MainBufferProvider image
|
* Get the Graphics2D for the MainBufferProvider image
|
||||||
* This caches the Graphics2D instance so it can be reused
|
* This caches the Graphics2D instance so it can be reused
|
||||||
|
*
|
||||||
* @param mainBufferProvider
|
* @param mainBufferProvider
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
package net.runelite.client.chat;
|
package net.runelite.client.chat;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import net.runelite.client.util.ColorUtil;
|
|
||||||
import net.runelite.api.util.Text;
|
import net.runelite.api.util.Text;
|
||||||
|
import net.runelite.client.util.ColorUtil;
|
||||||
|
|
||||||
public class ChatMessageBuilder
|
public class ChatMessageBuilder
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -46,13 +46,13 @@ import net.runelite.api.MessageNode;
|
|||||||
import net.runelite.api.Player;
|
import net.runelite.api.Player;
|
||||||
import net.runelite.api.Varbits;
|
import net.runelite.api.Varbits;
|
||||||
import net.runelite.api.events.ChatMessage;
|
import net.runelite.api.events.ChatMessage;
|
||||||
import net.runelite.client.events.ConfigChanged;
|
|
||||||
import net.runelite.api.events.ResizeableChanged;
|
import net.runelite.api.events.ResizeableChanged;
|
||||||
import net.runelite.api.events.ScriptCallbackEvent;
|
import net.runelite.api.events.ScriptCallbackEvent;
|
||||||
import net.runelite.api.events.VarbitChanged;
|
import net.runelite.api.events.VarbitChanged;
|
||||||
import net.runelite.client.callback.ClientThread;
|
import net.runelite.client.callback.ClientThread;
|
||||||
import net.runelite.client.config.ChatColorConfig;
|
import net.runelite.client.config.ChatColorConfig;
|
||||||
import net.runelite.client.eventbus.EventBus;
|
import net.runelite.client.eventbus.EventBus;
|
||||||
|
import net.runelite.client.events.ConfigChanged;
|
||||||
import net.runelite.client.ui.JagexColors;
|
import net.runelite.client.ui.JagexColors;
|
||||||
import net.runelite.client.util.ColorUtil;
|
import net.runelite.client.util.ColorUtil;
|
||||||
|
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ public @interface ConfigItem
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* For Config items that have a value of multiple enums,
|
* For Config items that have a value of multiple enums,
|
||||||
|
*
|
||||||
* @return the number of rows that are display in the item without having to scroll.
|
* @return the number of rows that are display in the item without having to scroll.
|
||||||
*/
|
*/
|
||||||
int displayRows() default 2;
|
int displayRows() default 2;
|
||||||
@@ -82,6 +83,7 @@ public @interface ConfigItem
|
|||||||
/**
|
/**
|
||||||
* Use this to indicate the enum class that is going to be used in the multiple select config.
|
* Use this to indicate the enum class that is going to be used in the multiple select config.
|
||||||
* This implementation made debugging problems with multiple selects a lot easier
|
* This implementation made debugging problems with multiple selects a lot easier
|
||||||
|
*
|
||||||
* @return The Enum that will be used for the multiple select
|
* @return The Enum that will be used for the multiple select
|
||||||
*/
|
*/
|
||||||
Class<? extends Enum> enumClass() default Enum.class;
|
Class<? extends Enum> enumClass() default Enum.class;
|
||||||
|
|||||||
@@ -59,10 +59,10 @@ import javax.inject.Inject;
|
|||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import net.runelite.api.coords.WorldPoint;
|
import net.runelite.api.coords.WorldPoint;
|
||||||
import net.runelite.client.events.ConfigChanged;
|
|
||||||
import net.runelite.client.RuneLite;
|
import net.runelite.client.RuneLite;
|
||||||
import static net.runelite.client.RuneLite.PROFILES_DIR;
|
import static net.runelite.client.RuneLite.PROFILES_DIR;
|
||||||
import net.runelite.client.eventbus.EventBus;
|
import net.runelite.client.eventbus.EventBus;
|
||||||
|
import net.runelite.client.events.ConfigChanged;
|
||||||
import net.runelite.client.util.ColorUtil;
|
import net.runelite.client.util.ColorUtil;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ import net.runelite.client.config.OpenOSRSConfig;
|
|||||||
@Singleton
|
@Singleton
|
||||||
public class EventBus implements EventBusInterface
|
public class EventBus implements EventBusInterface
|
||||||
{
|
{
|
||||||
private Map<Object, Object> subscriptionList = new HashMap<>();
|
private final Map<Object, Object> subscriptionList = new HashMap<>();
|
||||||
private Map<Class<?>, Relay<Object>> subjectList = new HashMap<>();
|
private final Map<Class<?>, Relay<Object>> subjectList = new HashMap<>();
|
||||||
private Map<Object, CompositeDisposable> subscriptionsMap = new HashMap<>();
|
private final Map<Object, CompositeDisposable> subscriptionsMap = new HashMap<>();
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private OpenOSRSConfig openOSRSConfig;
|
private OpenOSRSConfig openOSRSConfig;
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ public class Flexo extends Robot
|
|||||||
public static final int fixedWidth = Constants.GAME_FIXED_WIDTH;
|
public static final int fixedWidth = Constants.GAME_FIXED_WIDTH;
|
||||||
public static final int fixedHeight = Constants.GAME_FIXED_HEIGHT;
|
public static final int fixedHeight = Constants.GAME_FIXED_HEIGHT;
|
||||||
public static boolean isStretched;
|
public static boolean isStretched;
|
||||||
public static int minDelay = 45;
|
public static final int minDelay = 45;
|
||||||
public static MouseMotionFactory currentMouseMotionFactory;
|
public static MouseMotionFactory currentMouseMotionFactory;
|
||||||
public boolean pausedIndefinitely = false;
|
public boolean pausedIndefinitely = false;
|
||||||
private Robot peer;
|
private Robot peer;
|
||||||
@@ -74,7 +74,7 @@ public class Flexo extends Robot
|
|||||||
.getDefaultScreenDevice());
|
.getDefaultScreenDevice());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void init(GraphicsDevice screen) throws AWTException
|
private void init(GraphicsDevice screen)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -26,18 +26,7 @@
|
|||||||
package net.runelite.client.game;
|
package net.runelite.client.game;
|
||||||
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import static net.runelite.api.NullObjectID.NULL_25337;
|
import static net.runelite.api.NullObjectID.*;
|
||||||
import static net.runelite.api.NullObjectID.NULL_26371;
|
|
||||||
import static net.runelite.api.NullObjectID.NULL_26375;
|
|
||||||
import static net.runelite.api.NullObjectID.NULL_26884;
|
|
||||||
import static net.runelite.api.NullObjectID.NULL_26886;
|
|
||||||
import static net.runelite.api.NullObjectID.NULL_29868;
|
|
||||||
import static net.runelite.api.NullObjectID.NULL_29869;
|
|
||||||
import static net.runelite.api.NullObjectID.NULL_29870;
|
|
||||||
import static net.runelite.api.NullObjectID.NULL_31823;
|
|
||||||
import static net.runelite.api.NullObjectID.NULL_31849;
|
|
||||||
import static net.runelite.api.NullObjectID.NULL_33327;
|
|
||||||
import static net.runelite.api.NullObjectID.NULL_33328;
|
|
||||||
import static net.runelite.api.ObjectID.*;
|
import static net.runelite.api.ObjectID.*;
|
||||||
import net.runelite.api.coords.WorldPoint;
|
import net.runelite.api.coords.WorldPoint;
|
||||||
|
|
||||||
|
|||||||
@@ -45,9 +45,9 @@ import net.runelite.api.IndexedSprite;
|
|||||||
import net.runelite.api.SpriteID;
|
import net.runelite.api.SpriteID;
|
||||||
import net.runelite.api.events.ClanChanged;
|
import net.runelite.api.events.ClanChanged;
|
||||||
import net.runelite.api.events.GameStateChanged;
|
import net.runelite.api.events.GameStateChanged;
|
||||||
|
import net.runelite.api.util.Text;
|
||||||
import net.runelite.client.eventbus.EventBus;
|
import net.runelite.client.eventbus.EventBus;
|
||||||
import net.runelite.client.util.ImageUtil;
|
import net.runelite.client.util.ImageUtil;
|
||||||
import net.runelite.api.util.Text;
|
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
public class ClanManager
|
public class ClanManager
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ class HiscoreLoader extends CacheLoader<HiscoreManager.HiscoreKey, HiscoreResult
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HiscoreResult load(@NotNull HiscoreManager.HiscoreKey hiscoreKey) throws Exception
|
public HiscoreResult load(@NotNull HiscoreManager.HiscoreKey hiscoreKey)
|
||||||
{
|
{
|
||||||
return EMPTY;
|
return EMPTY;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -331,7 +331,7 @@ public class ItemManager
|
|||||||
return getRepairValue(itemId, false);
|
return getRepairValue(itemId, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getRepairValue(int itemId, boolean fullValue)
|
private int getRepairValue(int itemId, boolean fullValue)
|
||||||
{
|
{
|
||||||
final ItemReclaimCost b = ItemReclaimCost.of(itemId);
|
final ItemReclaimCost b = ItemReclaimCost.of(itemId);
|
||||||
|
|
||||||
|
|||||||
@@ -38,12 +38,12 @@ import javax.inject.Singleton;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import net.runelite.api.AnimationID;
|
import net.runelite.api.AnimationID;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
import net.runelite.api.TileItem;
|
|
||||||
import net.runelite.api.ItemID;
|
import net.runelite.api.ItemID;
|
||||||
import net.runelite.api.NPC;
|
import net.runelite.api.NPC;
|
||||||
import net.runelite.api.NpcID;
|
import net.runelite.api.NpcID;
|
||||||
import net.runelite.api.Player;
|
import net.runelite.api.Player;
|
||||||
import net.runelite.api.Tile;
|
import net.runelite.api.Tile;
|
||||||
|
import net.runelite.api.TileItem;
|
||||||
import net.runelite.api.coords.LocalPoint;
|
import net.runelite.api.coords.LocalPoint;
|
||||||
import net.runelite.api.coords.WorldPoint;
|
import net.runelite.api.coords.WorldPoint;
|
||||||
import net.runelite.api.events.AnimationChanged;
|
import net.runelite.api.events.AnimationChanged;
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ public class NPCStats
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Based off the formula found here: http://services.runescape.com/m=forum/c=PLuJ4cy6gtA/forums.ws?317,318,712,65587452,209,337584542#209
|
* Based off the formula found here: http://services.runescape.com/m=forum/c=PLuJ4cy6gtA/forums.ws?317,318,712,65587452,209,337584542#209
|
||||||
|
*
|
||||||
* @return bonus XP modifier
|
* @return bonus XP modifier
|
||||||
*/
|
*/
|
||||||
public double calculateXpModifier()
|
public double calculateXpModifier()
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public class SpriteManager
|
|||||||
@Inject
|
@Inject
|
||||||
private InfoBoxManager infoBoxManager;
|
private InfoBoxManager infoBoxManager;
|
||||||
|
|
||||||
public Cache<Long, BufferedImage> cache = CacheBuilder.newBuilder()
|
private final Cache<Long, BufferedImage> cache = CacheBuilder.newBuilder()
|
||||||
.maximumSize(128L)
|
.maximumSize(128L)
|
||||||
.expireAfterAccess(1, TimeUnit.HOURS)
|
.expireAfterAccess(1, TimeUnit.HOURS)
|
||||||
.build();
|
.build();
|
||||||
|
|||||||
@@ -21,9 +21,8 @@ public class XpDropManager
|
|||||||
private int damage = 0;
|
private int damage = 0;
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private int tickShow = 0;
|
private int tickShow = 0;
|
||||||
private int previousExpGained;
|
private final Client client;
|
||||||
private Client client;
|
private final EventBus eventBus;
|
||||||
private EventBus eventBus;
|
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private XpDropManager(
|
private XpDropManager(
|
||||||
@@ -50,7 +49,7 @@ public class XpDropManager
|
|||||||
Integer previous = previousSkillExpTable.put(skill, xp);
|
Integer previous = previousSkillExpTable.put(skill, xp);
|
||||||
if (previous != null)
|
if (previous != null)
|
||||||
{
|
{
|
||||||
previousExpGained = xp - previous;
|
int previousExpGained = xp - previous;
|
||||||
XpDropEvent xpDropEvent = new XpDropEvent();
|
XpDropEvent xpDropEvent = new XpDropEvent();
|
||||||
xpDropEvent.setExp(previousExpGained);
|
xpDropEvent.setExp(previousExpGained);
|
||||||
xpDropEvent.setSkill(skill);
|
xpDropEvent.setSkill(skill);
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ public class ChatboxItemSearch extends ChatboxTextInput
|
|||||||
private final ItemManager itemManager;
|
private final ItemManager itemManager;
|
||||||
private final Client client;
|
private final Client client;
|
||||||
|
|
||||||
private Map<Integer, ItemDefinition> results = new LinkedHashMap<>();
|
private final Map<Integer, ItemDefinition> results = new LinkedHashMap<>();
|
||||||
private String tooltipText;
|
private String tooltipText;
|
||||||
private int index = -1;
|
private int index = -1;
|
||||||
|
|
||||||
@@ -181,7 +181,7 @@ public class ChatboxItemSearch extends ChatboxTextInput
|
|||||||
{
|
{
|
||||||
if (onItemSelected != null)
|
if (onItemSelected != null)
|
||||||
{
|
{
|
||||||
onItemSelected.accept(results.keySet().toArray(new Integer[results.size()])[index]);
|
onItemSelected.accept(results.keySet().toArray(new Integer[0])[index]);
|
||||||
}
|
}
|
||||||
|
|
||||||
chatboxPanelManager.close();
|
chatboxPanelManager.close();
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ import lombok.Getter;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import net.runelite.api.FontID;
|
import net.runelite.api.FontID;
|
||||||
import net.runelite.api.FontTypeFace;
|
import net.runelite.api.FontTypeFace;
|
||||||
|
import net.runelite.api.util.Text;
|
||||||
import net.runelite.api.widgets.JavaScriptCallback;
|
import net.runelite.api.widgets.JavaScriptCallback;
|
||||||
import net.runelite.api.widgets.Widget;
|
import net.runelite.api.widgets.Widget;
|
||||||
import net.runelite.api.widgets.WidgetPositionMode;
|
import net.runelite.api.widgets.WidgetPositionMode;
|
||||||
@@ -58,7 +59,6 @@ import net.runelite.client.callback.ClientThread;
|
|||||||
import net.runelite.client.input.KeyListener;
|
import net.runelite.client.input.KeyListener;
|
||||||
import net.runelite.client.input.MouseListener;
|
import net.runelite.client.input.MouseListener;
|
||||||
import net.runelite.client.util.MiscUtils;
|
import net.runelite.client.util.MiscUtils;
|
||||||
import net.runelite.api.util.Text;
|
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class ChatboxTextInput extends ChatboxInput implements KeyListener, MouseListener
|
public class ChatboxTextInput extends ChatboxInput implements KeyListener, MouseListener
|
||||||
@@ -67,7 +67,7 @@ public class ChatboxTextInput extends ChatboxInput implements KeyListener, Mouse
|
|||||||
private static final Pattern BREAK_MATCHER = Pattern.compile("[^a-zA-Z0-9']");
|
private static final Pattern BREAK_MATCHER = Pattern.compile("[^a-zA-Z0-9']");
|
||||||
|
|
||||||
private final ChatboxPanelManager chatboxPanelManager;
|
private final ChatboxPanelManager chatboxPanelManager;
|
||||||
protected final ClientThread clientThread;
|
final ClientThread clientThread;
|
||||||
|
|
||||||
private static IntPredicate getDefaultCharValidator()
|
private static IntPredicate getDefaultCharValidator()
|
||||||
{
|
{
|
||||||
@@ -135,7 +135,7 @@ public class ChatboxTextInput extends ChatboxInput implements KeyListener, Mouse
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ChatboxTextInput lines(int lines)
|
protected ChatboxTextInput lines(int lines)
|
||||||
{
|
{
|
||||||
this.lines = lines;
|
this.lines = lines;
|
||||||
if (built)
|
if (built)
|
||||||
@@ -573,7 +573,7 @@ public class ChatboxTextInput extends ChatboxInput implements KeyListener, Mouse
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void close()
|
void close()
|
||||||
{
|
{
|
||||||
if (this.onClose != null)
|
if (this.onClose != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -83,10 +83,7 @@ public class BaseComparableEntry extends AbstractComparableEntry
|
|||||||
{
|
{
|
||||||
int type = entry.getOpcode();
|
int type = entry.getOpcode();
|
||||||
|
|
||||||
if (this.type != type)
|
return this.type == type;
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ public interface ComparableEntries
|
|||||||
*
|
*
|
||||||
* @param option has to equal entry option
|
* @param option has to equal entry option
|
||||||
* @param target has to equal entry option
|
* @param target has to equal entry option
|
||||||
*
|
|
||||||
* @return a new BaseComparableEntry
|
* @return a new BaseComparableEntry
|
||||||
*/
|
*/
|
||||||
static BaseComparableEntry newBaseComparableEntry(String option, String target)
|
static BaseComparableEntry newBaseComparableEntry(String option, String target)
|
||||||
@@ -26,7 +25,6 @@ public interface ComparableEntries
|
|||||||
* @param option has to equal option
|
* @param option has to equal option
|
||||||
* @param target equal or contains depending on strictTarget
|
* @param target equal or contains depending on strictTarget
|
||||||
* @param strictTarget read up one line
|
* @param strictTarget read up one line
|
||||||
*
|
|
||||||
* @return a new BaseComparableEntry
|
* @return a new BaseComparableEntry
|
||||||
*/
|
*/
|
||||||
static BaseComparableEntry newBaseComparableEntry(String option, String target, boolean strictTarget)
|
static BaseComparableEntry newBaseComparableEntry(String option, String target, boolean strictTarget)
|
||||||
@@ -44,7 +42,6 @@ public interface ComparableEntries
|
|||||||
* @param type has to be the same, or -1 to skip checking
|
* @param type has to be the same, or -1 to skip checking
|
||||||
* @param strictOption strict option or nah
|
* @param strictOption strict option or nah
|
||||||
* @param strictTarget strict target or nah
|
* @param strictTarget strict target or nah
|
||||||
*
|
|
||||||
* @return a new BaseComparableEntry
|
* @return a new BaseComparableEntry
|
||||||
*/
|
*/
|
||||||
static BaseComparableEntry newBaseComparableEntry(String option, String target, int id, int type, boolean strictOption, boolean strictTarget)
|
static BaseComparableEntry newBaseComparableEntry(String option, String target, int id, int type, boolean strictOption, boolean strictTarget)
|
||||||
@@ -57,7 +54,7 @@ public interface ComparableEntries
|
|||||||
* in their name. It then checks the ItemDefinition
|
* in their name. It then checks the ItemDefinition
|
||||||
* for each of them, to see if it's possible for
|
* for each of them, to see if it's possible for
|
||||||
* the item to have option as one of their options.
|
* the item to have option as one of their options.
|
||||||
*
|
* <p>
|
||||||
* This has to be ran on the clientthread!
|
* This has to be ran on the clientthread!
|
||||||
*/
|
*/
|
||||||
static ItemComparableEntry newInvItemComparableEntry(Client client, String option, String itemName)
|
static ItemComparableEntry newInvItemComparableEntry(Client client, String option, String itemName)
|
||||||
|
|||||||
@@ -639,7 +639,7 @@ public class MenuManager
|
|||||||
/**
|
/**
|
||||||
* Adds to the map of swaps.
|
* Adds to the map of swaps.
|
||||||
*/
|
*/
|
||||||
public void addSwap(String option, String target, String option2, String target2, boolean strictOption, boolean strictTarget)
|
private void addSwap(String option, String target, String option2, String target2, boolean strictOption, boolean strictTarget)
|
||||||
{
|
{
|
||||||
option = option.trim().toLowerCase();
|
option = option.trim().toLowerCase();
|
||||||
target = Text.standardize(target);
|
target = Text.standardize(target);
|
||||||
@@ -660,7 +660,7 @@ public class MenuManager
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void removeSwap(String option, String target, String option2, String target2, boolean strictOption, boolean strictTarget)
|
private void removeSwap(String option, String target, String option2, String target2, boolean strictOption, boolean strictTarget)
|
||||||
{
|
{
|
||||||
option = option.trim().toLowerCase();
|
option = option.trim().toLowerCase();
|
||||||
target = Text.standardize(target);
|
target = Text.standardize(target);
|
||||||
|
|||||||
@@ -77,7 +77,9 @@ public abstract class Plugin implements Module
|
|||||||
for (Method method : this.getClass().getDeclaredMethods())
|
for (Method method : this.getClass().getDeclaredMethods())
|
||||||
{
|
{
|
||||||
if (method.getAnnotation(Subscribe.class) == null)
|
if (method.getAnnotation(Subscribe.class) == null)
|
||||||
|
{
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
assert method.getParameterCount() == 1 : "Methods annotated with @Subscribe should have only one parameter";
|
assert method.getParameterCount() == 1 : "Methods annotated with @Subscribe should have only one parameter";
|
||||||
|
|
||||||
|
|||||||
@@ -570,6 +570,7 @@ public class PluginManager
|
|||||||
* Plugins in group 2 has dependents in group 1, etc.
|
* Plugins in group 2 has dependents in group 1, etc.
|
||||||
* This allows for loading dependent groups serially, starting from the last group,
|
* This allows for loading dependent groups serially, starting from the last group,
|
||||||
* while loading plugins within each group in parallel.
|
* while loading plugins within each group in parallel.
|
||||||
|
*
|
||||||
* @param graph
|
* @param graph
|
||||||
* @param <T>
|
* @param <T>
|
||||||
* @return
|
* @return
|
||||||
|
|||||||
@@ -24,11 +24,12 @@
|
|||||||
*/
|
*/
|
||||||
package net.runelite.client.plugins.achievementdiary;
|
package net.runelite.client.plugins.achievementdiary;
|
||||||
|
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
public class CombatLevelRequirement implements Requirement
|
public class CombatLevelRequirement implements Requirement
|
||||||
{
|
{
|
||||||
private final int level;
|
private final int level;
|
||||||
|
|||||||
@@ -27,9 +27,10 @@ package net.runelite.client.plugins.achievementdiary;
|
|||||||
|
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
class DiaryRequirement
|
class DiaryRequirement
|
||||||
{
|
{
|
||||||
private final String task;
|
private final String task;
|
||||||
|
|||||||
@@ -79,16 +79,6 @@ public class DiaryRequirementsPlugin extends Plugin
|
|||||||
@Inject
|
@Inject
|
||||||
private ClientThread clientThread;
|
private ClientThread clientThread;
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void startUp() throws Exception
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void shutDown() throws Exception
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
private void onWidgetLoaded(final WidgetLoaded event)
|
private void onWidgetLoaded(final WidgetLoaded event)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,12 +24,13 @@
|
|||||||
*/
|
*/
|
||||||
package net.runelite.client.plugins.achievementdiary;
|
package net.runelite.client.plugins.achievementdiary;
|
||||||
|
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import net.runelite.api.Favour;
|
import net.runelite.api.Favour;
|
||||||
|
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
public class FavourRequirement implements Requirement
|
public class FavourRequirement implements Requirement
|
||||||
{
|
{
|
||||||
private final Favour house;
|
private final Favour house;
|
||||||
|
|||||||
@@ -27,11 +27,12 @@ package net.runelite.client.plugins.achievementdiary;
|
|||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
public abstract class GenericDiaryRequirement
|
public abstract class GenericDiaryRequirement
|
||||||
{
|
{
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private Set<DiaryRequirement> requirements = new HashSet<>();
|
private Set<DiaryRequirement> requirements = new HashSet<>();
|
||||||
|
|
||||||
protected void add(String task, Requirement... requirements)
|
protected void add(String task, Requirement... requirements)
|
||||||
|
|||||||
@@ -27,11 +27,12 @@ package net.runelite.client.plugins.achievementdiary;
|
|||||||
import com.google.common.base.Joiner;
|
import com.google.common.base.Joiner;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
public class OrRequirement implements Requirement
|
public class OrRequirement implements Requirement
|
||||||
{
|
{
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private final List<Requirement> requirements;
|
private final List<Requirement> requirements;
|
||||||
|
|
||||||
public OrRequirement(Requirement... reqs)
|
public OrRequirement(Requirement... reqs)
|
||||||
|
|||||||
@@ -24,11 +24,12 @@
|
|||||||
*/
|
*/
|
||||||
package net.runelite.client.plugins.achievementdiary;
|
package net.runelite.client.plugins.achievementdiary;
|
||||||
|
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
public class QuestPointRequirement implements Requirement
|
public class QuestPointRequirement implements Requirement
|
||||||
{
|
{
|
||||||
private final int qp;
|
private final int qp;
|
||||||
|
|||||||
@@ -24,11 +24,12 @@
|
|||||||
*/
|
*/
|
||||||
package net.runelite.client.plugins.achievementdiary;
|
package net.runelite.client.plugins.achievementdiary;
|
||||||
|
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import net.runelite.api.Quest;
|
import net.runelite.api.Quest;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class QuestRequirement implements Requirement
|
public class QuestRequirement implements Requirement
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,12 +24,13 @@
|
|||||||
*/
|
*/
|
||||||
package net.runelite.client.plugins.achievementdiary;
|
package net.runelite.client.plugins.achievementdiary;
|
||||||
|
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import net.runelite.api.Skill;
|
import net.runelite.api.Skill;
|
||||||
|
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
public class SkillRequirement implements Requirement
|
public class SkillRequirement implements Requirement
|
||||||
{
|
{
|
||||||
private final Skill skill;
|
private final Skill skill;
|
||||||
|
|||||||
@@ -135,12 +135,6 @@ public class AgilityPlugin extends Plugin
|
|||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private int agilityLevel;
|
private int agilityLevel;
|
||||||
|
|
||||||
@Provides
|
|
||||||
AgilityConfig getConfig(ConfigManager configManager)
|
|
||||||
{
|
|
||||||
return configManager.getConfig(AgilityConfig.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Config values
|
// Config values
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private boolean removeDistanceCap;
|
private boolean removeDistanceCap;
|
||||||
@@ -167,8 +161,14 @@ public class AgilityPlugin extends Plugin
|
|||||||
private boolean notifyAgilityArena;
|
private boolean notifyAgilityArena;
|
||||||
private boolean showAgilityArenaTimer;
|
private boolean showAgilityArenaTimer;
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
AgilityConfig getConfig(ConfigManager configManager)
|
||||||
|
{
|
||||||
|
return configManager.getConfig(AgilityConfig.class);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp()
|
||||||
{
|
{
|
||||||
updateConfig();
|
updateConfig();
|
||||||
|
|
||||||
@@ -183,7 +183,7 @@ public class AgilityPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void shutDown() throws Exception
|
protected void shutDown()
|
||||||
{
|
{
|
||||||
eventBus.unregister(MENU_SUBS);
|
eventBus.unregister(MENU_SUBS);
|
||||||
|
|
||||||
@@ -255,7 +255,7 @@ public class AgilityPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateConfig()
|
private void updateConfig()
|
||||||
{
|
{
|
||||||
this.removeDistanceCap = config.removeDistanceCap();
|
this.removeDistanceCap = config.removeDistanceCap();
|
||||||
this.showLapCount = config.showLapCount();
|
this.showLapCount = config.showLapCount();
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
package net.runelite.client.plugins.agility;
|
package net.runelite.client.plugins.agility;
|
||||||
|
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
@@ -32,8 +33,8 @@ import net.runelite.api.Experience;
|
|||||||
import net.runelite.api.Skill;
|
import net.runelite.api.Skill;
|
||||||
import net.runelite.api.VarPlayer;
|
import net.runelite.api.VarPlayer;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
@Setter
|
@Setter(AccessLevel.PACKAGE)
|
||||||
class AgilitySession
|
class AgilitySession
|
||||||
{
|
{
|
||||||
private final Courses course;
|
private final Courses course;
|
||||||
|
|||||||
@@ -70,6 +70,12 @@ import net.runelite.client.ui.overlay.OverlayManager;
|
|||||||
@Singleton
|
@Singleton
|
||||||
public class HydraPlugin extends Plugin
|
public class HydraPlugin extends Plugin
|
||||||
{
|
{
|
||||||
|
private static final int[] HYDRA_REGIONS = {
|
||||||
|
5279, 5280,
|
||||||
|
5535, 5536
|
||||||
|
};
|
||||||
|
private static final int STUN_LENGTH = 7;
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private Map<LocalPoint, Projectile> poisonProjectiles = new HashMap<>();
|
private Map<LocalPoint, Projectile> poisonProjectiles = new HashMap<>();
|
||||||
|
|
||||||
@@ -88,12 +94,6 @@ public class HydraPlugin extends Plugin
|
|||||||
private boolean inHydraInstance;
|
private boolean inHydraInstance;
|
||||||
private int lastAttackTick;
|
private int lastAttackTick;
|
||||||
|
|
||||||
private static final int[] HYDRA_REGIONS = {
|
|
||||||
5279, 5280,
|
|
||||||
5535, 5536
|
|
||||||
};
|
|
||||||
private static final int STUN_LENGTH = 7;
|
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private Client client;
|
private Client client;
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ public class AmmoPlugin extends Plugin
|
|||||||
private AmmoCounter counterBox;
|
private AmmoCounter counterBox;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp()
|
||||||
{
|
{
|
||||||
|
|
||||||
clientThread.invokeLater(() ->
|
clientThread.invokeLater(() ->
|
||||||
@@ -79,7 +79,7 @@ public class AmmoPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void shutDown() throws Exception
|
protected void shutDown()
|
||||||
{
|
{
|
||||||
infoBoxManager.removeInfoBox(counterBox);
|
infoBoxManager.removeInfoBox(counterBox);
|
||||||
counterBox = null;
|
counterBox = null;
|
||||||
|
|||||||
@@ -58,13 +58,13 @@ public class AnimationSmoothingPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp()
|
||||||
{
|
{
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void shutDown() throws Exception
|
protected void shutDown()
|
||||||
{
|
{
|
||||||
client.setInterpolatePlayerAnimations(false);
|
client.setInterpolatePlayerAnimations(false);
|
||||||
client.setInterpolateNpcAnimations(false);
|
client.setInterpolateNpcAnimations(false);
|
||||||
|
|||||||
@@ -74,20 +74,74 @@ public class AntiDragPlugin extends Plugin
|
|||||||
@Inject
|
@Inject
|
||||||
private KeyManager keyManager;
|
private KeyManager keyManager;
|
||||||
|
|
||||||
@Provides
|
|
||||||
AntiDragConfig getConfig(ConfigManager configManager)
|
|
||||||
{
|
|
||||||
return configManager.getConfig(AntiDragConfig.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean toggleDrag;
|
private boolean toggleDrag;
|
||||||
private boolean configOverlay;
|
private boolean configOverlay;
|
||||||
private boolean changeCursor;
|
private boolean changeCursor;
|
||||||
private CustomCursor selectedCursor;
|
private CustomCursor selectedCursor;
|
||||||
private Keybind key;
|
private Keybind key;
|
||||||
|
|
||||||
|
private final HotkeyListener toggleListener = new HotkeyListener(() -> this.key)
|
||||||
|
{
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
public void hotkeyPressed()
|
||||||
|
{
|
||||||
|
toggleDrag = !toggleDrag;
|
||||||
|
if (toggleDrag)
|
||||||
|
{
|
||||||
|
if (configOverlay)
|
||||||
|
{
|
||||||
|
overlayManager.add(overlay);
|
||||||
|
}
|
||||||
|
if (changeCursor)
|
||||||
|
{
|
||||||
|
clientUI.setCursor(selectedCursor.getCursorImage(), selectedCursor.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
client.setInventoryDragDelay(config.dragDelay());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
overlayManager.remove(overlay);
|
||||||
|
client.setInventoryDragDelay(DEFAULT_DELAY);
|
||||||
|
clientUI.resetCursor();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
private final HotkeyListener holdListener = new HotkeyListener(() -> this.key)
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void hotkeyPressed()
|
||||||
|
{
|
||||||
|
if (configOverlay)
|
||||||
|
{
|
||||||
|
overlayManager.add(overlay);
|
||||||
|
}
|
||||||
|
if (changeCursor)
|
||||||
|
{
|
||||||
|
clientUI.setCursor(selectedCursor.getCursorImage(), selectedCursor.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
client.setInventoryDragDelay(config.dragDelay());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void hotkeyReleased()
|
||||||
|
{
|
||||||
|
overlayManager.remove(overlay);
|
||||||
|
client.setInventoryDragDelay(DEFAULT_DELAY);
|
||||||
|
clientUI.resetCursor();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
AntiDragConfig getConfig(ConfigManager configManager)
|
||||||
|
{
|
||||||
|
return configManager.getConfig(AntiDragConfig.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void startUp()
|
||||||
{
|
{
|
||||||
overlay.setColor(config.color());
|
overlay.setColor(config.color());
|
||||||
updateConfig();
|
updateConfig();
|
||||||
@@ -100,7 +154,7 @@ public class AntiDragPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void shutDown() throws Exception
|
protected void shutDown()
|
||||||
{
|
{
|
||||||
client.setInventoryDragDelay(DEFAULT_DELAY);
|
client.setInventoryDragDelay(DEFAULT_DELAY);
|
||||||
keyManager.unregisterKeyListener(holdListener);
|
keyManager.unregisterKeyListener(holdListener);
|
||||||
@@ -194,58 +248,4 @@ public class AntiDragPlugin extends Plugin
|
|||||||
keyManager.unregisterKeyListener(toggleListener);
|
keyManager.unregisterKeyListener(toggleListener);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private final HotkeyListener toggleListener = new HotkeyListener(() -> this.key)
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public void hotkeyPressed()
|
|
||||||
{
|
|
||||||
toggleDrag = !toggleDrag;
|
|
||||||
if (toggleDrag)
|
|
||||||
{
|
|
||||||
if (configOverlay)
|
|
||||||
{
|
|
||||||
overlayManager.add(overlay);
|
|
||||||
}
|
|
||||||
if (changeCursor)
|
|
||||||
{
|
|
||||||
clientUI.setCursor(selectedCursor.getCursorImage(), selectedCursor.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
client.setInventoryDragDelay(config.dragDelay());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
overlayManager.remove(overlay);
|
|
||||||
client.setInventoryDragDelay(DEFAULT_DELAY);
|
|
||||||
clientUI.resetCursor();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
private final HotkeyListener holdListener = new HotkeyListener(() -> this.key)
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public void hotkeyPressed()
|
|
||||||
{
|
|
||||||
if (configOverlay)
|
|
||||||
{
|
|
||||||
overlayManager.add(overlay);
|
|
||||||
}
|
|
||||||
if (changeCursor)
|
|
||||||
{
|
|
||||||
clientUI.setCursor(selectedCursor.getCursorImage(), selectedCursor.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
client.setInventoryDragDelay(config.dragDelay());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void hotkeyReleased()
|
|
||||||
{
|
|
||||||
overlayManager.remove(overlay);
|
|
||||||
client.setInventoryDragDelay(DEFAULT_DELAY);
|
|
||||||
clientUI.resetCursor();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ package net.runelite.client.plugins.aoewarnings;
|
|||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Font;
|
import java.awt.Font;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.client.config.Config;
|
import net.runelite.client.config.Config;
|
||||||
@@ -40,7 +41,7 @@ import net.runelite.client.config.Title;
|
|||||||
@ConfigGroup("aoe")
|
@ConfigGroup("aoe")
|
||||||
public interface AoeWarningConfig extends Config
|
public interface AoeWarningConfig extends Config
|
||||||
{
|
{
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
enum FontStyle
|
enum FontStyle
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -72,30 +72,42 @@ import net.runelite.client.ui.overlay.OverlayManager;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
public class AoeWarningPlugin extends Plugin
|
public class AoeWarningPlugin extends Plugin
|
||||||
{
|
{
|
||||||
@Inject
|
|
||||||
public AoeWarningConfig config;
|
|
||||||
@Inject
|
|
||||||
private Notifier notifier;
|
|
||||||
@Inject
|
|
||||||
private OverlayManager overlayManager;
|
|
||||||
@Inject
|
|
||||||
private AoeWarningOverlay coreOverlay;
|
|
||||||
@Inject
|
|
||||||
private BombOverlay bombOverlay;
|
|
||||||
@Inject
|
|
||||||
private Client client;
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private List<WorldPoint> lightningTrail = new ArrayList<>();
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private List<GameObject> acidTrail = new ArrayList<>();
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private List<GameObject> crystalSpike = new ArrayList<>();
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private List<GameObject> wintertodtSnowFall = new ArrayList<>();
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private final Set<CrystalBomb> bombs = new HashSet<>();
|
private final Set<CrystalBomb> bombs = new HashSet<>();
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private final Set<ProjectileContainer> projectiles = new HashSet<>();
|
private final Set<ProjectileContainer> projectiles = new HashSet<>();
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
public AoeWarningConfig config;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Notifier notifier;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private OverlayManager overlayManager;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private AoeWarningOverlay coreOverlay;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private BombOverlay bombOverlay;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Client client;
|
||||||
|
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private List<WorldPoint> lightningTrail = new ArrayList<>();
|
||||||
|
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private List<GameObject> acidTrail = new ArrayList<>();
|
||||||
|
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private List<GameObject> crystalSpike = new ArrayList<>();
|
||||||
|
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private List<GameObject> wintertodtSnowFall = new ArrayList<>();
|
||||||
|
|
||||||
// Config values
|
// Config values
|
||||||
private boolean aoeNotifyAll;
|
private boolean aoeNotifyAll;
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ public class AttackStylesPlugin extends Plugin
|
|||||||
private int attackStyleVarbit = -1;
|
private int attackStyleVarbit = -1;
|
||||||
private int equippedWeaponTypeVarbit = -1;
|
private int equippedWeaponTypeVarbit = -1;
|
||||||
private int castingModeVarbit = -1;
|
private int castingModeVarbit = -1;
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
@Nullable
|
@Nullable
|
||||||
private AttackStyle attackStyle;
|
private AttackStyle attackStyle;
|
||||||
private final Set<Skill> warnedSkills = new HashSet<>();
|
private final Set<Skill> warnedSkills = new HashSet<>();
|
||||||
@@ -112,7 +112,7 @@ public class AttackStylesPlugin extends Plugin
|
|||||||
boolean removeWarnedStyles;
|
boolean removeWarnedStyles;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp()
|
||||||
{
|
{
|
||||||
updateConfig();
|
updateConfig();
|
||||||
|
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ public class BankPlugin extends Plugin
|
|||||||
private boolean rightClickBankLoot;
|
private boolean rightClickBankLoot;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp()
|
||||||
{
|
{
|
||||||
updateConfig();
|
updateConfig();
|
||||||
searchString = "";
|
searchString = "";
|
||||||
|
|||||||
@@ -97,9 +97,9 @@ public class BankTagsPlugin extends Plugin implements MouseWheelListener, KeyLis
|
|||||||
{
|
{
|
||||||
public static final String CONFIG_GROUP = "banktags";
|
public static final String CONFIG_GROUP = "banktags";
|
||||||
public static final String TAG_SEARCH = "tag:";
|
public static final String TAG_SEARCH = "tag:";
|
||||||
private static final String EDIT_TAGS_MENU_OPTION = "Edit-tags";
|
|
||||||
public static final String ICON_SEARCH = "icon_";
|
public static final String ICON_SEARCH = "icon_";
|
||||||
public static final String VAR_TAG_SUFFIX = "*";
|
public static final String VAR_TAG_SUFFIX = "*";
|
||||||
|
private static final String EDIT_TAGS_MENU_OPTION = "Edit-tags";
|
||||||
private static final String NUMBER_REGEX = "[0-9]+(\\.[0-9]+)?[kmb]?";
|
private static final String NUMBER_REGEX = "[0-9]+(\\.[0-9]+)?[kmb]?";
|
||||||
|
|
||||||
private static final String SEARCH_BANK_INPUT_TEXT =
|
private static final String SEARCH_BANK_INPUT_TEXT =
|
||||||
@@ -112,6 +112,8 @@ public class BankTagsPlugin extends Plugin implements MouseWheelListener, KeyLis
|
|||||||
" *(((?<op>[<>=]|>=|<=) *(?<num>" + NUMBER_REGEX + "))|" +
|
" *(((?<op>[<>=]|>=|<=) *(?<num>" + NUMBER_REGEX + "))|" +
|
||||||
"((?<num1>" + NUMBER_REGEX + ") *- *(?<num2>" + NUMBER_REGEX + ")))$", Pattern.CASE_INSENSITIVE);
|
"((?<num1>" + NUMBER_REGEX + ") *- *(?<num2>" + NUMBER_REGEX + ")))$", Pattern.CASE_INSENSITIVE);
|
||||||
|
|
||||||
|
@VisibleForTesting
|
||||||
|
final Multiset<Integer> itemQuantities = HashMultiset.create();
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private ItemManager itemManager;
|
private ItemManager itemManager;
|
||||||
@@ -151,8 +153,6 @@ public class BankTagsPlugin extends Plugin implements MouseWheelListener, KeyLis
|
|||||||
|
|
||||||
private boolean shiftPressed = false;
|
private boolean shiftPressed = false;
|
||||||
private int nextRowIndex = 0;
|
private int nextRowIndex = 0;
|
||||||
@VisibleForTesting
|
|
||||||
Multiset<Integer> itemQuantities = HashMultiset.create();
|
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
BankTagsConfig getConfig(ConfigManager configManager)
|
BankTagsConfig getConfig(ConfigManager configManager)
|
||||||
@@ -171,6 +171,18 @@ public class BankTagsPlugin extends Plugin implements MouseWheelListener, KeyLis
|
|||||||
spriteManager.addSpriteOverrides(TabSprites.values());
|
spriteManager.addSpriteOverrides(TabSprites.values());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void shutDown()
|
||||||
|
{
|
||||||
|
keyManager.unregisterKeyListener(this);
|
||||||
|
mouseManager.unregisterMouseWheelListener(this);
|
||||||
|
clientThread.invokeLater(tabInterface::destroy);
|
||||||
|
spriteManager.removeSpriteOverrides(TabSprites.values());
|
||||||
|
|
||||||
|
shiftPressed = false;
|
||||||
|
itemQuantities.clear();
|
||||||
|
}
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
private void cleanConfig()
|
private void cleanConfig()
|
||||||
{
|
{
|
||||||
@@ -224,18 +236,6 @@ public class BankTagsPlugin extends Plugin implements MouseWheelListener, KeyLis
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void shutDown()
|
|
||||||
{
|
|
||||||
keyManager.unregisterKeyListener(this);
|
|
||||||
mouseManager.unregisterMouseWheelListener(this);
|
|
||||||
clientThread.invokeLater(tabInterface::destroy);
|
|
||||||
spriteManager.removeSpriteOverrides(TabSprites.values());
|
|
||||||
|
|
||||||
shiftPressed = false;
|
|
||||||
itemQuantities.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean isSearching()
|
private boolean isSearching()
|
||||||
{
|
{
|
||||||
return client.getVar(VarClientInt.INPUT_TYPE) == InputType.SEARCH.getType()
|
return client.getVar(VarClientInt.INPUT_TYPE) == InputType.SEARCH.getType()
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ import java.util.stream.Collectors;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
import net.runelite.api.ItemID;
|
import net.runelite.api.ItemID;
|
||||||
|
import net.runelite.api.util.Text;
|
||||||
import net.runelite.client.config.ConfigManager;
|
import net.runelite.client.config.ConfigManager;
|
||||||
import net.runelite.client.game.ItemManager;
|
import net.runelite.client.game.ItemManager;
|
||||||
import net.runelite.client.game.ItemVariationMapping;
|
import net.runelite.client.game.ItemVariationMapping;
|
||||||
@@ -45,7 +46,6 @@ import net.runelite.client.plugins.cluescrolls.clues.FairyRingClue;
|
|||||||
import net.runelite.client.plugins.cluescrolls.clues.HotColdClue;
|
import net.runelite.client.plugins.cluescrolls.clues.HotColdClue;
|
||||||
import net.runelite.client.plugins.cluescrolls.clues.MapClue;
|
import net.runelite.client.plugins.cluescrolls.clues.MapClue;
|
||||||
import net.runelite.client.plugins.cluescrolls.clues.item.ItemRequirement;
|
import net.runelite.client.plugins.cluescrolls.clues.item.ItemRequirement;
|
||||||
import net.runelite.api.util.Text;
|
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
public class TagManager
|
public class TagManager
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ public class TabInterface
|
|||||||
private final Rectangle bounds = new Rectangle();
|
private final Rectangle bounds = new Rectangle();
|
||||||
private final Rectangle canvasBounds = new Rectangle();
|
private final Rectangle canvasBounds = new Rectangle();
|
||||||
|
|
||||||
private ChatboxItemSearch searchProvider;
|
private final ChatboxItemSearch searchProvider;
|
||||||
private TagTab activeTab;
|
private TagTab activeTab;
|
||||||
private int maxTabs;
|
private int maxTabs;
|
||||||
private int currentTabIndex;
|
private int currentTabIndex;
|
||||||
@@ -302,7 +302,7 @@ public class TabInterface
|
|||||||
|
|
||||||
final Iterator<String> dataIter = Text.fromCSV(dataString).iterator();
|
final Iterator<String> dataIter = Text.fromCSV(dataString).iterator();
|
||||||
String name = dataIter.next();
|
String name = dataIter.next();
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
for (char c : name.toCharArray())
|
for (char c : name.toCharArray())
|
||||||
{
|
{
|
||||||
if (FILTERED_CHARS.test(c))
|
if (FILTERED_CHARS.test(c))
|
||||||
@@ -324,7 +324,7 @@ public class TabInterface
|
|||||||
|
|
||||||
while (dataIter.hasNext())
|
while (dataIter.hasNext())
|
||||||
{
|
{
|
||||||
final int itemId = Integer.valueOf(dataIter.next());
|
final int itemId = Integer.parseInt(dataIter.next());
|
||||||
tagManager.addTag(itemId, name, itemId < 0);
|
tagManager.addTag(itemId, name, itemId < 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -33,12 +33,13 @@ import java.util.Optional;
|
|||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.ItemID;
|
import net.runelite.api.ItemID;
|
||||||
|
import net.runelite.api.util.Text;
|
||||||
import net.runelite.client.config.ConfigManager;
|
import net.runelite.client.config.ConfigManager;
|
||||||
import static net.runelite.client.plugins.banktags.BankTagsPlugin.CONFIG_GROUP;
|
import static net.runelite.client.plugins.banktags.BankTagsPlugin.CONFIG_GROUP;
|
||||||
import static net.runelite.client.plugins.banktags.BankTagsPlugin.ICON_SEARCH;
|
import static net.runelite.client.plugins.banktags.BankTagsPlugin.ICON_SEARCH;
|
||||||
import net.runelite.api.util.Text;
|
|
||||||
import org.apache.commons.lang3.math.NumberUtils;
|
import org.apache.commons.lang3.math.NumberUtils;
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
@@ -46,7 +47,7 @@ class TabManager
|
|||||||
{
|
{
|
||||||
private static final String TAG_TABS_CONFIG = "tagtabs";
|
private static final String TAG_TABS_CONFIG = "tagtabs";
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private final List<TagTab> tabs = new ArrayList<>();
|
private final List<TagTab> tabs = new ArrayList<>();
|
||||||
private final ConfigManager configManager;
|
private final ConfigManager configManager;
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
*/
|
*/
|
||||||
package net.runelite.client.plugins.banktags.tabs;
|
package net.runelite.client.plugins.banktags.tabs;
|
||||||
|
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import net.runelite.client.game.SpriteOverride;
|
import net.runelite.client.game.SpriteOverride;
|
||||||
@@ -39,9 +40,9 @@ public enum TabSprites implements SpriteOverride
|
|||||||
DOWN_ARROW(-204, "down-arrow.png"),
|
DOWN_ARROW(-204, "down-arrow.png"),
|
||||||
NEW_TAB(-205, "new-tab.png");
|
NEW_TAB(-205, "new-tab.png");
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PUBLIC)
|
||||||
private final int spriteId;
|
private final int spriteId;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PUBLIC)
|
||||||
private final String fileName;
|
private final String fileName;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ public class BanListPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp()
|
||||||
{
|
{
|
||||||
updateConfig();
|
updateConfig();
|
||||||
|
|
||||||
@@ -116,7 +116,7 @@ public class BanListPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void shutDown() throws Exception
|
protected void shutDown()
|
||||||
{
|
{
|
||||||
|
|
||||||
wdrScamSet.clear();
|
wdrScamSet.clear();
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ public interface BarbarianAssaultConfig extends Config
|
|||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "showTimer",
|
keyName = "showTimer",
|
||||||
name = "Show call change timer",
|
name = "Show call change timer",
|
||||||
|
|||||||
@@ -122,6 +122,24 @@ public class BarbarianAssaultPlugin extends Plugin implements KeyListener
|
|||||||
private static final ImmutableList<WidgetInfo> attackStyles = ImmutableList.of(WidgetInfo.COMBAT_STYLE_ONE,
|
private static final ImmutableList<WidgetInfo> attackStyles = ImmutableList.of(WidgetInfo.COMBAT_STYLE_ONE,
|
||||||
WidgetInfo.COMBAT_STYLE_TWO, WidgetInfo.COMBAT_STYLE_THREE, WidgetInfo.COMBAT_STYLE_FOUR);
|
WidgetInfo.COMBAT_STYLE_TWO, WidgetInfo.COMBAT_STYLE_THREE, WidgetInfo.COMBAT_STYLE_FOUR);
|
||||||
|
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private final Map<WorldPoint, Integer> redEggs = new HashMap<>();
|
||||||
|
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private final Map<WorldPoint, Integer> greenEggs = new HashMap<>();
|
||||||
|
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private final Map<WorldPoint, Integer> blueEggs = new HashMap<>();
|
||||||
|
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private final Map<WorldPoint, Integer> yellowEggs = new HashMap<>();
|
||||||
|
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private final Map<Integer, Healer> healers = new HashMap<>();
|
||||||
|
|
||||||
|
private final List<TimerBox> deathTimes = new ArrayList<>();
|
||||||
|
private final Map<Integer, Projectile> projectiles = new HashMap<>();
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private Client client;
|
private Client client;
|
||||||
|
|
||||||
@@ -155,99 +173,50 @@ public class BarbarianAssaultPlugin extends Plugin implements KeyListener
|
|||||||
@Inject
|
@Inject
|
||||||
private KeyManager keyManager;
|
private KeyManager keyManager;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private boolean inGame = false;
|
private boolean inGame = false;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
@Getter
|
|
||||||
private Wave wave = null;
|
private Wave wave = null;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
@Getter
|
|
||||||
private Role role = null;
|
private Role role = null;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
@Getter
|
|
||||||
private Scorecard scorecard = null;
|
private Scorecard scorecard = null;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
@Getter
|
|
||||||
private Timer gameTimer = null;
|
private Timer gameTimer = null;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
@Getter
|
|
||||||
private Timer callTimer = null;
|
private Timer callTimer = null;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
@Getter
|
|
||||||
private int stage = -1;
|
private int stage = -1;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
@Getter
|
|
||||||
private BufferedImage clockImage;
|
private BufferedImage clockImage;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
@Getter
|
|
||||||
private Font font = null;
|
private Font font = null;
|
||||||
|
|
||||||
@Getter
|
|
||||||
private final Map<WorldPoint, Integer> redEggs = new HashMap<>();
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
private final Map<WorldPoint, Integer> greenEggs = new HashMap<>();
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
private final Map<WorldPoint, Integer> blueEggs = new HashMap<>();
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
private final Map<WorldPoint, Integer> yellowEggs = new HashMap<>();
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
private final Map<Integer, Healer> healers = new HashMap<>();
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
private String lastCallText = null;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
private String lastListenText = null;
|
|
||||||
|
|
||||||
// private String lastClickedTell = null;
|
// private String lastClickedTell = null;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private String lastCallText = null;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private String lastListenText = null;
|
||||||
private int lastCallColor = -1;
|
private int lastCallColor = -1;
|
||||||
|
|
||||||
private int lastInteracted = -1;
|
private int lastInteracted = -1;
|
||||||
|
|
||||||
private int lastHealerPoisoned = -1;
|
|
||||||
|
|
||||||
private int tickNum = 0;
|
|
||||||
|
|
||||||
// private int gameTick = -1;
|
// private int gameTick = -1;
|
||||||
|
private int lastHealerPoisoned = -1;
|
||||||
|
private int tickNum = 0;
|
||||||
private int inGameBit = 0;
|
private int inGameBit = 0;
|
||||||
|
|
||||||
private boolean syncd = true;
|
private boolean syncd = true;
|
||||||
|
|
||||||
private boolean tickReset = false;
|
private boolean tickReset = false;
|
||||||
|
|
||||||
private boolean hornCalled = false;
|
private boolean hornCalled = false;
|
||||||
|
|
||||||
private boolean hornListened = false;
|
private boolean hornListened = false;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
@Getter
|
|
||||||
private boolean usingGloryHorn = false;
|
private boolean usingGloryHorn = false;
|
||||||
|
|
||||||
private boolean shiftDown = false;
|
private boolean shiftDown = false;
|
||||||
|
|
||||||
private boolean controlDown = false;
|
private boolean controlDown = false;
|
||||||
|
|
||||||
private BufferedImage torsoImage, fighterImage, healerImage, rangerImage, runnerImage;
|
private BufferedImage torsoImage, fighterImage, healerImage, rangerImage, runnerImage;
|
||||||
|
|
||||||
private final List<TimerBox> deathTimes = new ArrayList<>();
|
|
||||||
|
|
||||||
private final Map<Integer, Projectile> projectiles = new HashMap<>();
|
|
||||||
|
|
||||||
private TimerBox tickCounter;
|
private TimerBox tickCounter;
|
||||||
|
|
||||||
private String poisonUsed = null;
|
private String poisonUsed = null;
|
||||||
|
|
||||||
@Provides
|
|
||||||
BarbarianAssaultConfig provideConfig(ConfigManager configManager)
|
|
||||||
{
|
|
||||||
return configManager.getConfig(BarbarianAssaultConfig.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
// save config values
|
// save config values
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private boolean swapLadder;
|
private boolean swapLadder;
|
||||||
@@ -302,8 +271,14 @@ public class BarbarianAssaultPlugin extends Plugin implements KeyListener
|
|||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private boolean showEggCountOverlay;
|
private boolean showEggCountOverlay;
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
BarbarianAssaultConfig provideConfig(ConfigManager configManager)
|
||||||
|
{
|
||||||
|
return configManager.getConfig(BarbarianAssaultConfig.class);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp()
|
||||||
{
|
{
|
||||||
updateConfig();
|
updateConfig();
|
||||||
|
|
||||||
@@ -321,7 +296,7 @@ public class BarbarianAssaultPlugin extends Plugin implements KeyListener
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void shutDown() throws Exception
|
protected void shutDown()
|
||||||
{
|
{
|
||||||
overlayManager.remove(widgetsOverlay);
|
overlayManager.remove(widgetsOverlay);
|
||||||
overlayManager.remove(sceneOverlay);
|
overlayManager.remove(sceneOverlay);
|
||||||
@@ -399,7 +374,7 @@ public class BarbarianAssaultPlugin extends Plugin implements KeyListener
|
|||||||
case "swapLadder":
|
case "swapLadder":
|
||||||
case "swapCollectorBag":
|
case "swapCollectorBag":
|
||||||
case "swapDestroyEggs":
|
case "swapDestroyEggs":
|
||||||
if (Boolean.valueOf(configChanged.getNewValue()))
|
if (Boolean.parseBoolean(configChanged.getNewValue()))
|
||||||
{
|
{
|
||||||
menu.enableSwaps();
|
menu.enableSwaps();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
package net.runelite.client.plugins.barbarianassault;
|
package net.runelite.client.plugins.barbarianassault;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.MenuOpcode;
|
import net.runelite.api.MenuOpcode;
|
||||||
@@ -86,10 +87,10 @@ public enum Menus
|
|||||||
MEDIC_HORN(null, newBaseComparableEntry("medic", "r horn", -1, -1, true, false)),
|
MEDIC_HORN(null, newBaseComparableEntry("medic", "r horn", -1, -1, true, false)),
|
||||||
USE_HORN(null, newBaseComparableEntry("use", "r horn", -1, -1, true, false));
|
USE_HORN(null, newBaseComparableEntry("use", "r horn", -1, -1, true, false));
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private final Role role;
|
private final Role role;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private final BaseComparableEntry entry;
|
private final BaseComparableEntry entry;
|
||||||
|
|
||||||
private static final ImmutableSet<Menus> ALL = ImmutableSet.copyOf(Menus.values());
|
private static final ImmutableSet<Menus> ALL = ImmutableSet.copyOf(Menus.values());
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
package net.runelite.client.plugins.barbarianassault;
|
package net.runelite.client.plugins.barbarianassault;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableMap;
|
import com.google.common.collect.ImmutableMap;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
@@ -51,19 +52,19 @@ enum Role
|
|||||||
WidgetInfo.BA_HEAL_CALL_TEXT, WidgetInfo.BA_DEF_HORN_LISTEN_TEXT, WidgetInfo.BA_HEAL_ROLE_TEXT,
|
WidgetInfo.BA_HEAL_CALL_TEXT, WidgetInfo.BA_DEF_HORN_LISTEN_TEXT, WidgetInfo.BA_HEAL_ROLE_TEXT,
|
||||||
WidgetInfo.BA_HEAL_ROLE_SPRITE);
|
WidgetInfo.BA_HEAL_ROLE_SPRITE);
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private final WidgetInfo wave;
|
private final WidgetInfo wave;
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private final WidgetInfo listen;
|
private final WidgetInfo listen;
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private final WidgetInfo gloryListen;
|
private final WidgetInfo gloryListen;
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private final WidgetInfo call;
|
private final WidgetInfo call;
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private final WidgetInfo gloryCall;
|
private final WidgetInfo gloryCall;
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private final WidgetInfo roleText;
|
private final WidgetInfo roleText;
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private final WidgetInfo roleSprite;
|
private final WidgetInfo roleSprite;
|
||||||
|
|
||||||
// Duplicate* entries are to catch instances where the horn of glory has
|
// Duplicate* entries are to catch instances where the horn of glory has
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ public class BarrowsPlugin extends Plugin
|
|||||||
private LoopTimer barrowsPrayerDrainTimer;
|
private LoopTimer barrowsPrayerDrainTimer;
|
||||||
private boolean wasInCrypt = false;
|
private boolean wasInCrypt = false;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private Widget puzzleAnswer;
|
private Widget puzzleAnswer;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
@@ -125,12 +125,6 @@ public class BarrowsPlugin extends Plugin
|
|||||||
@Inject
|
@Inject
|
||||||
private BarrowsConfig config;
|
private BarrowsConfig config;
|
||||||
|
|
||||||
@Provides
|
|
||||||
BarrowsConfig provideConfig(ConfigManager configManager)
|
|
||||||
{
|
|
||||||
return configManager.getConfig(BarrowsConfig.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private boolean showMinimap;
|
private boolean showMinimap;
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
@@ -143,8 +137,14 @@ public class BarrowsPlugin extends Plugin
|
|||||||
private boolean showPuzzleAnswer;
|
private boolean showPuzzleAnswer;
|
||||||
private boolean showPrayerDrainTimer;
|
private boolean showPrayerDrainTimer;
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
BarrowsConfig provideConfig(ConfigManager configManager)
|
||||||
|
{
|
||||||
|
return configManager.getConfig(BarrowsConfig.class);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp()
|
||||||
{
|
{
|
||||||
updateConfig();
|
updateConfig();
|
||||||
|
|
||||||
|
|||||||
@@ -81,12 +81,16 @@ public class BlackjackPlugin extends Plugin
|
|||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private Client client;
|
private Client client;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private BlackjackConfig config;
|
private BlackjackConfig config;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private EventBus eventBus;
|
private EventBus eventBus;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private MenuManager menuManager;
|
private MenuManager menuManager;
|
||||||
|
|
||||||
private boolean pickpocketOnAggro;
|
private boolean pickpocketOnAggro;
|
||||||
private boolean random;
|
private boolean random;
|
||||||
private long nextKnockOutTick = 0;
|
private long nextKnockOutTick = 0;
|
||||||
@@ -98,7 +102,7 @@ public class BlackjackPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp()
|
||||||
{
|
{
|
||||||
menuManager.addPriorityEntry(KNOCKOUT_BANDIT);
|
menuManager.addPriorityEntry(KNOCKOUT_BANDIT);
|
||||||
menuManager.addPriorityEntry(KNOCKOUT_MENAPHITE);
|
menuManager.addPriorityEntry(KNOCKOUT_MENAPHITE);
|
||||||
@@ -106,7 +110,7 @@ public class BlackjackPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void shutDown() throws Exception
|
protected void shutDown()
|
||||||
{
|
{
|
||||||
menuManager.removePriorityEntry(PICKPOCKET_BANDIT);
|
menuManager.removePriorityEntry(PICKPOCKET_BANDIT);
|
||||||
menuManager.removePriorityEntry(PICKPOCKET_MENAPHITE);
|
menuManager.removePriorityEntry(PICKPOCKET_MENAPHITE);
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ package net.runelite.client.plugins.blastfurnace;
|
|||||||
|
|
||||||
import com.google.common.collect.ImmutableMap;
|
import com.google.common.collect.ImmutableMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.ItemID;
|
import net.runelite.api.ItemID;
|
||||||
import net.runelite.api.Varbits;
|
import net.runelite.api.Varbits;
|
||||||
@@ -64,9 +65,9 @@ public enum BarsOres
|
|||||||
VARBIT = builder.build();
|
VARBIT = builder.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private final Varbits varbit;
|
private final Varbits varbit;
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private final int itemID;
|
private final int itemID;
|
||||||
|
|
||||||
BarsOres(Varbits varbit, int itemID)
|
BarsOres(Varbits varbit, int itemID)
|
||||||
|
|||||||
@@ -38,8 +38,8 @@ import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE;
|
|||||||
import net.runelite.client.ui.overlay.OverlayMenuEntry;
|
import net.runelite.client.ui.overlay.OverlayMenuEntry;
|
||||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||||
import net.runelite.client.ui.overlay.components.table.TableComponent;
|
|
||||||
import net.runelite.client.ui.overlay.components.table.TableAlignment;
|
import net.runelite.client.ui.overlay.components.table.TableAlignment;
|
||||||
|
import net.runelite.client.ui.overlay.components.table.TableComponent;
|
||||||
import net.runelite.client.util.QuantityFormatter;
|
import net.runelite.client.util.QuantityFormatter;
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ public class BlastFurnacePlugin extends Plugin
|
|||||||
private boolean showBarDispenser;
|
private boolean showBarDispenser;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp()
|
||||||
{
|
{
|
||||||
updateConfig();
|
updateConfig();
|
||||||
|
|
||||||
|
|||||||
@@ -73,12 +73,6 @@ public class BlastMinePlugin extends Plugin
|
|||||||
@Inject
|
@Inject
|
||||||
private BlastMinePluginConfig config;
|
private BlastMinePluginConfig config;
|
||||||
|
|
||||||
@Provides
|
|
||||||
BlastMinePluginConfig getConfig(ConfigManager configManager)
|
|
||||||
{
|
|
||||||
return configManager.getConfig(BlastMinePluginConfig.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private boolean showOreOverlay;
|
private boolean showOreOverlay;
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
@@ -92,8 +86,14 @@ public class BlastMinePlugin extends Plugin
|
|||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private Color warningColor;
|
private Color warningColor;
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
BlastMinePluginConfig getConfig(ConfigManager configManager)
|
||||||
|
{
|
||||||
|
return configManager.getConfig(BlastMinePluginConfig.class);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp()
|
||||||
{
|
{
|
||||||
updateConfig();
|
updateConfig();
|
||||||
|
|
||||||
@@ -102,7 +102,7 @@ public class BlastMinePlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void shutDown() throws Exception
|
protected void shutDown()
|
||||||
{
|
{
|
||||||
overlayManager.remove(blastMineRockOverlay);
|
overlayManager.remove(blastMineRockOverlay);
|
||||||
overlayManager.remove(blastMineOreCountOverlay);
|
overlayManager.remove(blastMineOreCountOverlay);
|
||||||
|
|||||||
@@ -73,6 +73,11 @@ public class BoostsPlugin extends Plugin
|
|||||||
Skill.COOKING, Skill.CRAFTING, Skill.FIREMAKING, Skill.FLETCHING, Skill.WOODCUTTING, Skill.RUNECRAFT,
|
Skill.COOKING, Skill.CRAFTING, Skill.FIREMAKING, Skill.FLETCHING, Skill.WOODCUTTING, Skill.RUNECRAFT,
|
||||||
Skill.SLAYER, Skill.FARMING, Skill.CONSTRUCTION, Skill.HUNTER);
|
Skill.SLAYER, Skill.FARMING, Skill.CONSTRUCTION, Skill.HUNTER);
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
private final Set<Skill> shownSkills = new LinkedHashSet<>();
|
||||||
|
private final int[] lastSkillLevels = new int[Skill.values().length - 1];
|
||||||
|
private final List<String> boostedSkillsChanged = new ArrayList<>();
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private Notifier notifier;
|
private Notifier notifier;
|
||||||
|
|
||||||
@@ -88,26 +93,21 @@ public class BoostsPlugin extends Plugin
|
|||||||
@Inject
|
@Inject
|
||||||
private BoostsOverlay boostsOverlay;
|
private BoostsOverlay boostsOverlay;
|
||||||
|
|
||||||
//made this a LinkedHashSet so the order stays consistent for my OCD
|
|
||||||
@Getter
|
|
||||||
private final Set<Skill> shownSkills = new LinkedHashSet<>();
|
|
||||||
@Inject
|
@Inject
|
||||||
private BoostsConfig config;
|
private BoostsConfig config;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private SkillIconManager skillIconManager;
|
private SkillIconManager skillIconManager;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private CombatIconsOverlay combatIconsOverlay;
|
private CombatIconsOverlay combatIconsOverlay;
|
||||||
|
|
||||||
private boolean isChangedDown = false;
|
private boolean isChangedDown = false;
|
||||||
private boolean isChangedUp = false;
|
private boolean isChangedUp = false;
|
||||||
private final int[] lastSkillLevels = new int[Skill.values().length - 1];
|
|
||||||
private int lastChangeDown = -1;
|
private int lastChangeDown = -1;
|
||||||
private int lastChangeUp = -1;
|
private int lastChangeUp = -1;
|
||||||
private boolean preserveBeenActive = false;
|
private boolean preserveBeenActive = false;
|
||||||
private long lastTickMillis;
|
private long lastTickMillis;
|
||||||
private final List<String> boostedSkillsChanged = new ArrayList<>();
|
|
||||||
|
|
||||||
private BoostsConfig.DisplayBoosts displayBoosts;
|
private BoostsConfig.DisplayBoosts displayBoosts;
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private boolean useRelativeBoost;
|
private boolean useRelativeBoost;
|
||||||
@@ -130,7 +130,7 @@ public class BoostsPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp()
|
||||||
{
|
{
|
||||||
updateConfig();
|
updateConfig();
|
||||||
|
|
||||||
@@ -154,7 +154,7 @@ public class BoostsPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void shutDown() throws Exception
|
protected void shutDown()
|
||||||
{
|
{
|
||||||
overlayManager.remove(boostsOverlay);
|
overlayManager.remove(boostsOverlay);
|
||||||
overlayManager.remove(combatIconsOverlay);
|
overlayManager.remove(combatIconsOverlay);
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import net.runelite.api.Client;
|
|||||||
import static net.runelite.api.MenuOpcode.RUNELITE_OVERLAY_CONFIG;
|
import static net.runelite.api.MenuOpcode.RUNELITE_OVERLAY_CONFIG;
|
||||||
import net.runelite.api.Skill;
|
import net.runelite.api.Skill;
|
||||||
import net.runelite.client.game.SkillIconManager;
|
import net.runelite.client.game.SkillIconManager;
|
||||||
|
import net.runelite.client.ui.FontManager;
|
||||||
import net.runelite.client.ui.overlay.Overlay;
|
import net.runelite.client.ui.overlay.Overlay;
|
||||||
import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE;
|
import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE;
|
||||||
import net.runelite.client.ui.overlay.OverlayMenuEntry;
|
import net.runelite.client.ui.overlay.OverlayMenuEntry;
|
||||||
@@ -20,7 +21,6 @@ import net.runelite.client.ui.overlay.components.ComponentOrientation;
|
|||||||
import net.runelite.client.ui.overlay.components.ImageComponent;
|
import net.runelite.client.ui.overlay.components.ImageComponent;
|
||||||
import net.runelite.client.ui.overlay.components.LineComponent;
|
import net.runelite.client.ui.overlay.components.LineComponent;
|
||||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||||
import net.runelite.client.ui.FontManager;
|
|
||||||
import net.runelite.client.util.ColorUtil;
|
import net.runelite.client.util.ColorUtil;
|
||||||
import net.runelite.client.util.ImageUtil;
|
import net.runelite.client.util.ImageUtil;
|
||||||
|
|
||||||
|
|||||||
@@ -52,12 +52,7 @@ public class BossTimersPlugin extends Plugin
|
|||||||
private ItemManager itemManager;
|
private ItemManager itemManager;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void shutDown()
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void shutDown() throws Exception
|
|
||||||
{
|
{
|
||||||
infoBoxManager.removeIf(t -> t instanceof RespawnTimer);
|
infoBoxManager.removeIf(t -> t instanceof RespawnTimer);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public class BossTimeTracker extends InfoBox
|
|||||||
{
|
{
|
||||||
private final Instant startTime;
|
private final Instant startTime;
|
||||||
private LocalTime time;
|
private LocalTime time;
|
||||||
private Instant lastTime;
|
private final Instant lastTime;
|
||||||
|
|
||||||
public BossTimeTracker(BufferedImage image, BossTimeTrackerPlugin plugin, Instant startTime, Instant lastTime)
|
public BossTimeTracker(BufferedImage image, BossTimeTrackerPlugin plugin, Instant startTime, Instant lastTime)
|
||||||
{
|
{
|
||||||
@@ -80,10 +80,7 @@ public class BossTimeTracker extends InfoBox
|
|||||||
@Override
|
@Override
|
||||||
public String getTooltip()
|
public String getTooltip()
|
||||||
{
|
{
|
||||||
StringBuilder builder = new StringBuilder();
|
return "Elapsed time: " +
|
||||||
builder.append("Elapsed time: ");
|
time.format(DateTimeFormatter.ofPattern("HH:mm:ss"));
|
||||||
builder.append(time.format(DateTimeFormatter.ofPattern("HH:mm:ss")));
|
|
||||||
|
|
||||||
return builder.toString();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import java.util.Arrays;
|
|||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.ChatMessageType;
|
import net.runelite.api.ChatMessageType;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
@@ -76,7 +77,7 @@ public class BossTimeTrackerPlugin extends Plugin
|
|||||||
@Inject
|
@Inject
|
||||||
private ConfigManager configManager;
|
private ConfigManager configManager;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private BossTimeTracker timer;
|
private BossTimeTracker timer;
|
||||||
|
|
||||||
private Instant startTime;
|
private Instant startTime;
|
||||||
@@ -84,11 +85,6 @@ public class BossTimeTrackerPlugin extends Plugin
|
|||||||
private Boolean started = false;
|
private Boolean started = false;
|
||||||
private boolean loggingIn;
|
private boolean loggingIn;
|
||||||
|
|
||||||
@Override
|
|
||||||
public void startUp()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void onGameStateChanged(GameStateChanged event)
|
public void onGameStateChanged(GameStateChanged event)
|
||||||
{
|
{
|
||||||
@@ -238,7 +234,7 @@ public class BossTimeTrackerPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void shutDown() throws Exception
|
protected void shutDown()
|
||||||
{
|
{
|
||||||
removeTimer();
|
removeTimer();
|
||||||
resetConfig();
|
resetConfig();
|
||||||
|
|||||||
@@ -2,15 +2,15 @@ package net.runelite.client.plugins.bronzeman;
|
|||||||
|
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
|
import java.awt.image.BufferedImage;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.concurrent.CopyOnWriteArrayList;
|
||||||
|
import javax.inject.Inject;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
import net.runelite.api.GameState;
|
import net.runelite.api.GameState;
|
||||||
import net.runelite.client.game.ItemManager;
|
import net.runelite.client.game.ItemManager;
|
||||||
import net.runelite.client.ui.overlay.Overlay;
|
import net.runelite.client.ui.overlay.Overlay;
|
||||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||||
import javax.inject.Inject;
|
|
||||||
import java.awt.image.BufferedImage;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.concurrent.CopyOnWriteArrayList;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
@@ -60,7 +61,7 @@ public class BronzemanPlugin extends Plugin
|
|||||||
|
|
||||||
private List<Integer> unlockedItems;
|
private List<Integer> unlockedItems;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private BufferedImage unlockImage = null;
|
private BufferedImage unlockImage = null;
|
||||||
/**
|
/**
|
||||||
* Loads GrandExchange widgets for further manipulation of the interface
|
* Loads GrandExchange widgets for further manipulation of the interface
|
||||||
@@ -69,7 +70,7 @@ public class BronzemanPlugin extends Plugin
|
|||||||
private Widget grandExchangeChatBox;
|
private Widget grandExchangeChatBox;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp()
|
||||||
{
|
{
|
||||||
loadUnlockImage();
|
loadUnlockImage();
|
||||||
unlockedItems = new ArrayList<>();
|
unlockedItems = new ArrayList<>();
|
||||||
@@ -77,7 +78,7 @@ public class BronzemanPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void shutDown() throws Exception
|
protected void shutDown()
|
||||||
{
|
{
|
||||||
unlockedItems = null;
|
unlockedItems = null;
|
||||||
overlayManager.remove(bronzemanOverlay);
|
overlayManager.remove(bronzemanOverlay);
|
||||||
@@ -178,7 +179,7 @@ public class BronzemanPlugin extends Plugin
|
|||||||
/**
|
/**
|
||||||
* Queues a new unlock to be properly displayed
|
* Queues a new unlock to be properly displayed
|
||||||
**/
|
**/
|
||||||
public void queueItemUnlock(int itemId)
|
private void queueItemUnlock(int itemId)
|
||||||
{
|
{
|
||||||
unlockedItems.add(itemId);
|
unlockedItems.add(itemId);
|
||||||
bronzemanOverlay.addItemUnlock(itemId);
|
bronzemanOverlay.addItemUnlock(itemId);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package net.runelite.client.plugins.bronzeman;
|
package net.runelite.client.plugins.bronzeman;
|
||||||
|
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
@@ -11,14 +12,14 @@ import lombok.Setter;
|
|||||||
public class ItemUnlock
|
public class ItemUnlock
|
||||||
{
|
{
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private final int itemId;
|
private final int itemId;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private long initTime;
|
private long initTime;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
@Setter
|
@Setter(AccessLevel.PACKAGE)
|
||||||
private int locationY;
|
private int locationY;
|
||||||
|
|
||||||
ItemUnlock(int itemId)
|
ItemUnlock(int itemId)
|
||||||
|
|||||||
@@ -79,34 +79,49 @@ public class CannonPlugin extends Plugin
|
|||||||
);
|
);
|
||||||
private CannonCounter counter;
|
private CannonCounter counter;
|
||||||
private boolean skipProjectileCheckThisTick;
|
private boolean skipProjectileCheckThisTick;
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private int cballsLeft;
|
private int cballsLeft;
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private boolean cannonPlaced;
|
private boolean cannonPlaced;
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private WorldPoint cannonPosition;
|
private WorldPoint cannonPosition;
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private GameObject cannon;
|
private GameObject cannon;
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private List<WorldPoint> spotPoints = new ArrayList<>();
|
private List<WorldPoint> spotPoints = new ArrayList<>();
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private ItemManager itemManager;
|
private ItemManager itemManager;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private InfoBoxManager infoBoxManager;
|
private InfoBoxManager infoBoxManager;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private Notifier notifier;
|
private Notifier notifier;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private OverlayManager overlayManager;
|
private OverlayManager overlayManager;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private CannonOverlay cannonOverlay;
|
private CannonOverlay cannonOverlay;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private CannonSpotOverlay cannonSpotOverlay;
|
private CannonSpotOverlay cannonSpotOverlay;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private CannonConfig config;
|
private CannonConfig config;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private Client client;
|
private Client client;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private ClientThread clientThread;
|
private ClientThread clientThread;
|
||||||
|
|
||||||
private boolean lock;
|
private boolean lock;
|
||||||
private boolean showEmptyCannonNotification;
|
private boolean showEmptyCannonNotification;
|
||||||
private boolean showInfobox;
|
private boolean showInfobox;
|
||||||
@@ -126,7 +141,7 @@ public class CannonPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp()
|
||||||
{
|
{
|
||||||
updateConfig();
|
updateConfig();
|
||||||
|
|
||||||
@@ -136,7 +151,7 @@ public class CannonPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void shutDown() throws Exception
|
protected void shutDown()
|
||||||
{
|
{
|
||||||
cannonSpotOverlay.setHidden(true);
|
cannonSpotOverlay.setHidden(true);
|
||||||
overlayManager.remove(cannonOverlay);
|
overlayManager.remove(cannonOverlay);
|
||||||
@@ -271,7 +286,7 @@ public class CannonPlugin extends Plugin
|
|||||||
// counter doesn't decrease if the player has been too far away
|
// counter doesn't decrease if the player has been too far away
|
||||||
// from the cannon due to the projectiels not being in memory,
|
// from the cannon due to the projectiels not being in memory,
|
||||||
// so our counter can be higher than it is supposed to be.
|
// so our counter can be higher than it is supposed to be.
|
||||||
int amt = Integer.valueOf(m.group());
|
int amt = Integer.parseInt(m.group());
|
||||||
if (cballsLeft + amt >= MAX_CBALLS)
|
if (cballsLeft + amt >= MAX_CBALLS)
|
||||||
{
|
{
|
||||||
skipProjectileCheckThisTick = true;
|
skipProjectileCheckThisTick = true;
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ package net.runelite.client.plugins.cannon;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.coords.WorldPoint;
|
import net.runelite.api.coords.WorldPoint;
|
||||||
|
|
||||||
@@ -67,7 +68,7 @@ public enum CannonSpots
|
|||||||
ICE_WARRIOR(new WorldPoint(2955, 3876, 0)),
|
ICE_WARRIOR(new WorldPoint(2955, 3876, 0)),
|
||||||
BANDIT(new WorldPoint(3037, 3700, 0));
|
BANDIT(new WorldPoint(3037, 3700, 0));
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private static final List<WorldPoint> cannonSpots = new ArrayList<>();
|
private static final List<WorldPoint> cannonSpots = new ArrayList<>();
|
||||||
|
|
||||||
static
|
static
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.GameState;
|
import net.runelite.api.GameState;
|
||||||
import net.runelite.api.NPC;
|
import net.runelite.api.NPC;
|
||||||
@@ -50,7 +51,7 @@ import net.runelite.client.ui.overlay.OverlayManager;
|
|||||||
@Singleton
|
@Singleton
|
||||||
public class CerberusPlugin extends Plugin
|
public class CerberusPlugin extends Plugin
|
||||||
{
|
{
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private final List<NPC> ghosts = new ArrayList<>();
|
private final List<NPC> ghosts = new ArrayList<>();
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
@@ -60,13 +61,13 @@ public class CerberusPlugin extends Plugin
|
|||||||
private CerberusOverlay overlay;
|
private CerberusOverlay overlay;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp()
|
||||||
{
|
{
|
||||||
overlayManager.add(overlay);
|
overlayManager.add(overlay);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void shutDown() throws Exception
|
protected void shutDown()
|
||||||
{
|
{
|
||||||
overlayManager.remove(overlay);
|
overlayManager.remove(overlay);
|
||||||
ghosts.clear();
|
ghosts.clear();
|
||||||
|
|||||||
@@ -148,6 +148,192 @@ public class ChatCommandsPlugin extends Plugin
|
|||||||
@Inject
|
@Inject
|
||||||
private ChatKeyboardListener chatKeyboardListener;
|
private ChatKeyboardListener chatKeyboardListener;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the ironman status based on the symbol in the name of the player.
|
||||||
|
*
|
||||||
|
* @param name player name
|
||||||
|
* @return hiscore endpoint
|
||||||
|
*/
|
||||||
|
private static HiscoreEndpoint getHiscoreEndpointByName(final String name)
|
||||||
|
{
|
||||||
|
if (name.contains(IconID.IRONMAN.toString()))
|
||||||
|
{
|
||||||
|
return toEndPoint(AccountType.IRONMAN);
|
||||||
|
}
|
||||||
|
else if (name.contains(IconID.ULTIMATE_IRONMAN.toString()))
|
||||||
|
{
|
||||||
|
return toEndPoint(AccountType.ULTIMATE_IRONMAN);
|
||||||
|
}
|
||||||
|
else if (name.contains(IconID.HARDCORE_IRONMAN.toString()))
|
||||||
|
{
|
||||||
|
return toEndPoint(AccountType.HARDCORE_IRONMAN);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return toEndPoint(AccountType.NORMAL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts account type to hiscore endpoint
|
||||||
|
*
|
||||||
|
* @param accountType account type
|
||||||
|
* @return hiscore endpoint
|
||||||
|
*/
|
||||||
|
private static HiscoreEndpoint toEndPoint(final AccountType accountType)
|
||||||
|
{
|
||||||
|
switch (accountType)
|
||||||
|
{
|
||||||
|
case IRONMAN:
|
||||||
|
return HiscoreEndpoint.IRONMAN;
|
||||||
|
case ULTIMATE_IRONMAN:
|
||||||
|
return HiscoreEndpoint.ULTIMATE_IRONMAN;
|
||||||
|
case HARDCORE_IRONMAN:
|
||||||
|
return HiscoreEndpoint.HARDCORE_IRONMAN;
|
||||||
|
default:
|
||||||
|
return HiscoreEndpoint.NORMAL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String longBossName(String boss)
|
||||||
|
{
|
||||||
|
switch (boss.toLowerCase())
|
||||||
|
{
|
||||||
|
case "corp":
|
||||||
|
return "Corporeal Beast";
|
||||||
|
|
||||||
|
case "jad":
|
||||||
|
return "TzTok-Jad";
|
||||||
|
|
||||||
|
case "kq":
|
||||||
|
return "Kalphite Queen";
|
||||||
|
|
||||||
|
case "chaos ele":
|
||||||
|
return "Chaos Elemental";
|
||||||
|
|
||||||
|
case "dusk":
|
||||||
|
case "dawn":
|
||||||
|
case "gargs":
|
||||||
|
return "Grotesque Guardians";
|
||||||
|
|
||||||
|
case "crazy arch":
|
||||||
|
return "Crazy Archaeologist";
|
||||||
|
|
||||||
|
case "deranged arch":
|
||||||
|
return "Deranged Archaeologist";
|
||||||
|
|
||||||
|
case "mole":
|
||||||
|
return "Giant Mole";
|
||||||
|
|
||||||
|
case "vetion":
|
||||||
|
return "Vet'ion";
|
||||||
|
|
||||||
|
case "vene":
|
||||||
|
return "Venenatis";
|
||||||
|
|
||||||
|
case "kbd":
|
||||||
|
return "King Black Dragon";
|
||||||
|
|
||||||
|
case "vork":
|
||||||
|
return "Vorkath";
|
||||||
|
|
||||||
|
case "sire":
|
||||||
|
return "Abyssal Sire";
|
||||||
|
|
||||||
|
case "smoke devil":
|
||||||
|
case "thermy":
|
||||||
|
return "Thermonuclear Smoke Devil";
|
||||||
|
|
||||||
|
case "cerb":
|
||||||
|
return "Cerberus";
|
||||||
|
|
||||||
|
case "zuk":
|
||||||
|
case "inferno":
|
||||||
|
return "TzKal-Zuk";
|
||||||
|
|
||||||
|
case "hydra":
|
||||||
|
return "Alchemical Hydra";
|
||||||
|
|
||||||
|
// gwd
|
||||||
|
case "sara":
|
||||||
|
case "saradomin":
|
||||||
|
case "zilyana":
|
||||||
|
case "zily":
|
||||||
|
return "Commander Zilyana";
|
||||||
|
case "zammy":
|
||||||
|
case "zamorak":
|
||||||
|
case "kril":
|
||||||
|
case "kril trutsaroth":
|
||||||
|
return "K'ril Tsutsaroth";
|
||||||
|
case "arma":
|
||||||
|
case "kree":
|
||||||
|
case "kreearra":
|
||||||
|
case "armadyl":
|
||||||
|
return "Kree'arra";
|
||||||
|
case "bando":
|
||||||
|
case "bandos":
|
||||||
|
case "graardor":
|
||||||
|
return "General Graardor";
|
||||||
|
|
||||||
|
// dks
|
||||||
|
case "supreme":
|
||||||
|
return "Dagannoth Supreme";
|
||||||
|
case "rex":
|
||||||
|
return "Dagannoth Rex";
|
||||||
|
case "prime":
|
||||||
|
return "Dagannoth Prime";
|
||||||
|
|
||||||
|
case "wt":
|
||||||
|
return "Wintertodt";
|
||||||
|
case "barrows":
|
||||||
|
return "Barrows Chests";
|
||||||
|
case "herbi":
|
||||||
|
return "Herbiboar";
|
||||||
|
|
||||||
|
// cox
|
||||||
|
case "cox":
|
||||||
|
case "xeric":
|
||||||
|
case "chambers":
|
||||||
|
case "olm":
|
||||||
|
case "raids":
|
||||||
|
return "Chambers of Xeric";
|
||||||
|
|
||||||
|
// cox cm
|
||||||
|
case "cox cm":
|
||||||
|
case "xeric cm":
|
||||||
|
case "chambers cm":
|
||||||
|
case "olm cm":
|
||||||
|
case "raids cm":
|
||||||
|
return "Chambers of Xeric Challenge Mode";
|
||||||
|
|
||||||
|
// tob
|
||||||
|
case "tob":
|
||||||
|
case "theatre":
|
||||||
|
case "verzik":
|
||||||
|
case "verzik vitur":
|
||||||
|
case "raids 2":
|
||||||
|
return "Theatre of Blood";
|
||||||
|
|
||||||
|
// agility course
|
||||||
|
case "prif":
|
||||||
|
case "prifddinas":
|
||||||
|
return "Prifddinas Agility Course";
|
||||||
|
|
||||||
|
// The Gauntlet
|
||||||
|
case "gaunt":
|
||||||
|
case "gauntlet":
|
||||||
|
return "Gauntlet";
|
||||||
|
|
||||||
|
// Corrupted Gauntlet
|
||||||
|
case "cgaunt":
|
||||||
|
case "cgauntlet":
|
||||||
|
return "Corrupted Gauntlet";
|
||||||
|
|
||||||
|
default:
|
||||||
|
return WordUtils.capitalize(boss);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void startUp()
|
public void startUp()
|
||||||
{
|
{
|
||||||
@@ -721,7 +907,6 @@ public class ChatCommandsPlugin extends Plugin
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void personalBestLookup(ChatMessage chatMessage, String message)
|
private void personalBestLookup(ChatMessage chatMessage, String message)
|
||||||
{
|
{
|
||||||
if (!config.pb())
|
if (!config.pb())
|
||||||
@@ -1219,196 +1404,10 @@ public class ChatCommandsPlugin extends Plugin
|
|||||||
return toEndPoint(client.getAccountType());
|
return toEndPoint(client.getAccountType());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the ironman status based on the symbol in the name of the player.
|
|
||||||
*
|
|
||||||
* @param name player name
|
|
||||||
* @return hiscore endpoint
|
|
||||||
*/
|
|
||||||
private static HiscoreEndpoint getHiscoreEndpointByName(final String name)
|
|
||||||
{
|
|
||||||
if (name.contains(IconID.IRONMAN.toString()))
|
|
||||||
{
|
|
||||||
return toEndPoint(AccountType.IRONMAN);
|
|
||||||
}
|
|
||||||
else if (name.contains(IconID.ULTIMATE_IRONMAN.toString()))
|
|
||||||
{
|
|
||||||
return toEndPoint(AccountType.ULTIMATE_IRONMAN);
|
|
||||||
}
|
|
||||||
else if (name.contains(IconID.HARDCORE_IRONMAN.toString()))
|
|
||||||
{
|
|
||||||
return toEndPoint(AccountType.HARDCORE_IRONMAN);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return toEndPoint(AccountType.NORMAL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts account type to hiscore endpoint
|
|
||||||
*
|
|
||||||
* @param accountType account type
|
|
||||||
* @return hiscore endpoint
|
|
||||||
*/
|
|
||||||
private static HiscoreEndpoint toEndPoint(final AccountType accountType)
|
|
||||||
{
|
|
||||||
switch (accountType)
|
|
||||||
{
|
|
||||||
case IRONMAN:
|
|
||||||
return HiscoreEndpoint.IRONMAN;
|
|
||||||
case ULTIMATE_IRONMAN:
|
|
||||||
return HiscoreEndpoint.ULTIMATE_IRONMAN;
|
|
||||||
case HARDCORE_IRONMAN:
|
|
||||||
return HiscoreEndpoint.HARDCORE_IRONMAN;
|
|
||||||
default:
|
|
||||||
return HiscoreEndpoint.NORMAL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Value
|
@Value
|
||||||
private static class HiscoreLookup
|
private static class HiscoreLookup
|
||||||
{
|
{
|
||||||
private final String name;
|
private final String name;
|
||||||
private final HiscoreEndpoint endpoint;
|
private final HiscoreEndpoint endpoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String longBossName(String boss)
|
|
||||||
{
|
|
||||||
switch (boss.toLowerCase())
|
|
||||||
{
|
|
||||||
case "corp":
|
|
||||||
return "Corporeal Beast";
|
|
||||||
|
|
||||||
case "jad":
|
|
||||||
return "TzTok-Jad";
|
|
||||||
|
|
||||||
case "kq":
|
|
||||||
return "Kalphite Queen";
|
|
||||||
|
|
||||||
case "chaos ele":
|
|
||||||
return "Chaos Elemental";
|
|
||||||
|
|
||||||
case "dusk":
|
|
||||||
case "dawn":
|
|
||||||
case "gargs":
|
|
||||||
return "Grotesque Guardians";
|
|
||||||
|
|
||||||
case "crazy arch":
|
|
||||||
return "Crazy Archaeologist";
|
|
||||||
|
|
||||||
case "deranged arch":
|
|
||||||
return "Deranged Archaeologist";
|
|
||||||
|
|
||||||
case "mole":
|
|
||||||
return "Giant Mole";
|
|
||||||
|
|
||||||
case "vetion":
|
|
||||||
return "Vet'ion";
|
|
||||||
|
|
||||||
case "vene":
|
|
||||||
return "Venenatis";
|
|
||||||
|
|
||||||
case "kbd":
|
|
||||||
return "King Black Dragon";
|
|
||||||
|
|
||||||
case "vork":
|
|
||||||
return "Vorkath";
|
|
||||||
|
|
||||||
case "sire":
|
|
||||||
return "Abyssal Sire";
|
|
||||||
|
|
||||||
case "smoke devil":
|
|
||||||
case "thermy":
|
|
||||||
return "Thermonuclear Smoke Devil";
|
|
||||||
|
|
||||||
case "cerb":
|
|
||||||
return "Cerberus";
|
|
||||||
|
|
||||||
case "zuk":
|
|
||||||
case "inferno":
|
|
||||||
return "TzKal-Zuk";
|
|
||||||
|
|
||||||
case "hydra":
|
|
||||||
return "Alchemical Hydra";
|
|
||||||
|
|
||||||
// gwd
|
|
||||||
case "sara":
|
|
||||||
case "saradomin":
|
|
||||||
case "zilyana":
|
|
||||||
case "zily":
|
|
||||||
return "Commander Zilyana";
|
|
||||||
case "zammy":
|
|
||||||
case "zamorak":
|
|
||||||
case "kril":
|
|
||||||
case "kril trutsaroth":
|
|
||||||
return "K'ril Tsutsaroth";
|
|
||||||
case "arma":
|
|
||||||
case "kree":
|
|
||||||
case "kreearra":
|
|
||||||
case "armadyl":
|
|
||||||
return "Kree'arra";
|
|
||||||
case "bando":
|
|
||||||
case "bandos":
|
|
||||||
case "graardor":
|
|
||||||
return "General Graardor";
|
|
||||||
|
|
||||||
// dks
|
|
||||||
case "supreme":
|
|
||||||
return "Dagannoth Supreme";
|
|
||||||
case "rex":
|
|
||||||
return "Dagannoth Rex";
|
|
||||||
case "prime":
|
|
||||||
return "Dagannoth Prime";
|
|
||||||
|
|
||||||
case "wt":
|
|
||||||
return "Wintertodt";
|
|
||||||
case "barrows":
|
|
||||||
return "Barrows Chests";
|
|
||||||
case "herbi":
|
|
||||||
return "Herbiboar";
|
|
||||||
|
|
||||||
// cox
|
|
||||||
case "cox":
|
|
||||||
case "xeric":
|
|
||||||
case "chambers":
|
|
||||||
case "olm":
|
|
||||||
case "raids":
|
|
||||||
return "Chambers of Xeric";
|
|
||||||
|
|
||||||
// cox cm
|
|
||||||
case "cox cm":
|
|
||||||
case "xeric cm":
|
|
||||||
case "chambers cm":
|
|
||||||
case "olm cm":
|
|
||||||
case "raids cm":
|
|
||||||
return "Chambers of Xeric Challenge Mode";
|
|
||||||
|
|
||||||
// tob
|
|
||||||
case "tob":
|
|
||||||
case "theatre":
|
|
||||||
case "verzik":
|
|
||||||
case "verzik vitur":
|
|
||||||
case "raids 2":
|
|
||||||
return "Theatre of Blood";
|
|
||||||
|
|
||||||
// agility course
|
|
||||||
case "prif":
|
|
||||||
case "prifddinas":
|
|
||||||
return "Prifddinas Agility Course";
|
|
||||||
|
|
||||||
// The Gauntlet
|
|
||||||
case "gaunt":
|
|
||||||
case "gauntlet":
|
|
||||||
return "Gauntlet";
|
|
||||||
|
|
||||||
// Corrupted Gauntlet
|
|
||||||
case "cgaunt":
|
|
||||||
case "cgauntlet":
|
|
||||||
return "Corrupted Gauntlet";
|
|
||||||
|
|
||||||
default:
|
|
||||||
return WordUtils.capitalize(boss);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -28,8 +28,8 @@ import java.awt.event.KeyEvent;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
import net.runelite.api.ScriptID;
|
|
||||||
import net.runelite.api.GameState;
|
import net.runelite.api.GameState;
|
||||||
|
import net.runelite.api.ScriptID;
|
||||||
import net.runelite.api.VarClientStr;
|
import net.runelite.api.VarClientStr;
|
||||||
import net.runelite.client.callback.ClientThread;
|
import net.runelite.client.callback.ClientThread;
|
||||||
import net.runelite.client.input.KeyListener;
|
import net.runelite.client.input.KeyListener;
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ public class ChatFilterPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp()
|
||||||
{
|
{
|
||||||
updateConfig();
|
updateConfig();
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ public class ChatFilterPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void shutDown() throws Exception
|
protected void shutDown()
|
||||||
{
|
{
|
||||||
filteredPatterns.clear();
|
filteredPatterns.clear();
|
||||||
client.refreshChat();
|
client.refreshChat();
|
||||||
|
|||||||
@@ -88,6 +88,24 @@ public class ChatHistoryPlugin extends Plugin implements KeyListener
|
|||||||
private boolean retainChatHistory;
|
private boolean retainChatHistory;
|
||||||
private boolean pmTargetCycling;
|
private boolean pmTargetCycling;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Small hack to prevent plugins checking for specific messages to match. This works because the "—" character
|
||||||
|
* cannot be seen in-game. This replacement preserves wrapping on chat history messages.
|
||||||
|
*
|
||||||
|
* @param message message
|
||||||
|
* @return message with invisible character before every space
|
||||||
|
*/
|
||||||
|
private static String tweakSpaces(final String message)
|
||||||
|
{
|
||||||
|
if (message != null)
|
||||||
|
{
|
||||||
|
// First replacement cleans up prior applications of this so as not to keep extending the message
|
||||||
|
return message.replace("— ", " ").replace(" ", "— ");
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
ChatHistoryConfig getConfig(ConfigManager configManager)
|
ChatHistoryConfig getConfig(ConfigManager configManager)
|
||||||
{
|
{
|
||||||
@@ -191,22 +209,9 @@ public class ChatHistoryPlugin extends Plugin implements KeyListener
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
@Override
|
||||||
* Small hack to prevent plugins checking for specific messages to match. This works because the "—" character
|
public void keyTyped(KeyEvent e)
|
||||||
* cannot be seen in-game. This replacement preserves wrapping on chat history messages.
|
|
||||||
*
|
|
||||||
* @param message message
|
|
||||||
* @return message with invisible character before every space
|
|
||||||
*/
|
|
||||||
private static String tweakSpaces(final String message)
|
|
||||||
{
|
{
|
||||||
if (message != null)
|
|
||||||
{
|
|
||||||
// First replacement cleans up prior applications of this so as not to keep extending the message
|
|
||||||
return message.replace("— ", " ").replace(" ", "— ");
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -239,11 +244,6 @@ public class ChatHistoryPlugin extends Plugin implements KeyListener
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void keyTyped(KeyEvent e)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void keyReleased(KeyEvent e)
|
public void keyReleased(KeyEvent e)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -61,6 +61,9 @@ import net.runelite.client.plugins.PluginDescriptor;
|
|||||||
@Singleton
|
@Singleton
|
||||||
public class ChatNotificationsPlugin extends Plugin
|
public class ChatNotificationsPlugin extends Plugin
|
||||||
{
|
{
|
||||||
|
// Private message cache used to avoid duplicate notifications from ChatHistory.
|
||||||
|
private final Set<Integer> privateMessageHashes = new HashSet<>();
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private Client client;
|
private Client client;
|
||||||
|
|
||||||
@@ -77,10 +80,6 @@ public class ChatNotificationsPlugin extends Plugin
|
|||||||
private Pattern usernameMatcher = null;
|
private Pattern usernameMatcher = null;
|
||||||
private String usernameReplacer = "";
|
private String usernameReplacer = "";
|
||||||
private Pattern highlightMatcher = null;
|
private Pattern highlightMatcher = null;
|
||||||
|
|
||||||
// Private message cache used to avoid duplicate notifications from ChatHistory.
|
|
||||||
private final Set<Integer> privateMessageHashes = new HashSet<>();
|
|
||||||
|
|
||||||
private boolean highlightOwnName;
|
private boolean highlightOwnName;
|
||||||
private String highlightWordsString;
|
private String highlightWordsString;
|
||||||
private boolean notifyOnOwnName;
|
private boolean notifyOnOwnName;
|
||||||
@@ -89,6 +88,49 @@ public class ChatNotificationsPlugin extends Plugin
|
|||||||
private boolean notifyOnDuel;
|
private boolean notifyOnDuel;
|
||||||
private boolean notifyOnPm;
|
private boolean notifyOnPm;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the last color tag from a string, or null if there was none
|
||||||
|
*
|
||||||
|
* @param str
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private static String getLastColor(String str)
|
||||||
|
{
|
||||||
|
int colIdx = str.lastIndexOf("<col=");
|
||||||
|
int colEndIdx = str.lastIndexOf("</col>");
|
||||||
|
|
||||||
|
if (colEndIdx > colIdx)
|
||||||
|
{
|
||||||
|
// ends in a </col> which resets the color to normal
|
||||||
|
return "<col" + ChatColorType.NORMAL + ">";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (colIdx == -1)
|
||||||
|
{
|
||||||
|
return null; // no color
|
||||||
|
}
|
||||||
|
|
||||||
|
int closeIdx = str.indexOf('>', colIdx);
|
||||||
|
if (closeIdx == -1)
|
||||||
|
{
|
||||||
|
return null; // unclosed col tag
|
||||||
|
}
|
||||||
|
|
||||||
|
return str.substring(colIdx, closeIdx + 1); // include the >
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Strip color tags from a string.
|
||||||
|
*
|
||||||
|
* @param str
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@VisibleForTesting
|
||||||
|
static String stripColor(String str)
|
||||||
|
{
|
||||||
|
return str.replaceAll("(<col=[0-9a-f]+>|</col>)", "");
|
||||||
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
ChatNotificationsConfig provideConfig(ConfigManager configManager)
|
ChatNotificationsConfig provideConfig(ConfigManager configManager)
|
||||||
{
|
{
|
||||||
@@ -315,47 +357,4 @@ public class ChatNotificationsPlugin extends Plugin
|
|||||||
|
|
||||||
return stringBuilder.toString();
|
return stringBuilder.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the last color tag from a string, or null if there was none
|
|
||||||
*
|
|
||||||
* @param str
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
private static String getLastColor(String str)
|
|
||||||
{
|
|
||||||
int colIdx = str.lastIndexOf("<col=");
|
|
||||||
int colEndIdx = str.lastIndexOf("</col>");
|
|
||||||
|
|
||||||
if (colEndIdx > colIdx)
|
|
||||||
{
|
|
||||||
// ends in a </col> which resets the color to normal
|
|
||||||
return "<col" + ChatColorType.NORMAL + ">";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (colIdx == -1)
|
|
||||||
{
|
|
||||||
return null; // no color
|
|
||||||
}
|
|
||||||
|
|
||||||
int closeIdx = str.indexOf('>', colIdx);
|
|
||||||
if (closeIdx == -1)
|
|
||||||
{
|
|
||||||
return null; // unclosed col tag
|
|
||||||
}
|
|
||||||
|
|
||||||
return str.substring(colIdx, closeIdx + 1); // include the >
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Strip color tags from a string.
|
|
||||||
*
|
|
||||||
* @param str
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@VisibleForTesting
|
|
||||||
static String stripColor(String str)
|
|
||||||
{
|
|
||||||
return str.replaceAll("(<col=[0-9a-f]+>|</col>)", "");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ public class ChatTranslationPlugin extends Plugin implements KeyListener
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp()
|
||||||
{
|
{
|
||||||
translator.setInLang(config.publicTargetLanguage());
|
translator.setInLang(config.publicTargetLanguage());
|
||||||
translator.setOutLang(config.playerTargetLanguage());
|
translator.setOutLang(config.playerTargetLanguage());
|
||||||
@@ -112,7 +112,7 @@ public class ChatTranslationPlugin extends Plugin implements KeyListener
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void shutDown() throws Exception
|
protected void shutDown()
|
||||||
{
|
{
|
||||||
eventBus.unregister(OPTION);
|
eventBus.unregister(OPTION);
|
||||||
eventBus.unregister(PUBLIC);
|
eventBus.unregister(PUBLIC);
|
||||||
@@ -265,6 +265,12 @@ public class ChatTranslationPlugin extends Plugin implements KeyListener
|
|||||||
client.refreshChat();
|
client.refreshChat();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void keyTyped(KeyEvent e)
|
||||||
|
{
|
||||||
|
// Nothing.
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void keyPressed(KeyEvent event)
|
public void keyPressed(KeyEvent event)
|
||||||
{
|
{
|
||||||
@@ -313,10 +319,4 @@ public class ChatTranslationPlugin extends Plugin implements KeyListener
|
|||||||
{
|
{
|
||||||
// Nothing.
|
// Nothing.
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void keyTyped(KeyEvent e)
|
|
||||||
{
|
|
||||||
// Nothing.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package net.runelite.client.plugins.chattranslation;
|
package net.runelite.client.plugins.chattranslation;
|
||||||
|
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
// TODO: Doesn't Locale pretty much do this as well?
|
// TODO: Doesn't Locale pretty much do this as well?
|
||||||
@@ -12,7 +13,7 @@ public enum Languages
|
|||||||
FRENCH("French", "fr"),
|
FRENCH("French", "fr"),
|
||||||
GERMAN("German", "de");
|
GERMAN("German", "de");
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private final String name;
|
private final String name;
|
||||||
private final String shortName;
|
private final String shortName;
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ class Translator
|
|||||||
{
|
{
|
||||||
incomingUrlBase = BASE_URL + SOURCE + CENT_URL + lang.toShortString() + LAST_URL;
|
incomingUrlBase = BASE_URL + SOURCE + CENT_URL + lang.toShortString() + LAST_URL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setOutLang(Languages lang)
|
void setOutLang(Languages lang)
|
||||||
{
|
{
|
||||||
outgoingUrlBase = BASE_URL + SOURCE + CENT_URL + lang.toShortString() + LAST_URL;
|
outgoingUrlBase = BASE_URL + SOURCE + CENT_URL + lang.toShortString() + LAST_URL;
|
||||||
@@ -40,7 +41,7 @@ class Translator
|
|||||||
return translate(new URL(url));
|
return translate(new URL(url));
|
||||||
}
|
}
|
||||||
|
|
||||||
public String translate(URL url) throws IOException
|
private String translate(URL url) throws IOException
|
||||||
{
|
{
|
||||||
HttpURLConnection con = (HttpURLConnection) url.openConnection();
|
HttpURLConnection con = (HttpURLConnection) url.openConnection();
|
||||||
con.setRequestProperty("User-Agent", "Mozilla/5.0");
|
con.setRequestProperty("User-Agent", "Mozilla/5.0");
|
||||||
@@ -57,10 +58,6 @@ class Translator
|
|||||||
|
|
||||||
return parseResult(response.toString());
|
return parseResult(response.toString());
|
||||||
}
|
}
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String parseResult(String inputJson)
|
private String parseResult(String inputJson)
|
||||||
|
|||||||
@@ -95,6 +95,12 @@ public class ClanChatPlugin extends Plugin
|
|||||||
private static final String RECENT_TITLE = "Recent CCs";
|
private static final String RECENT_TITLE = "Recent CCs";
|
||||||
private static final int JOIN_LEAVE_DURATION = 20;
|
private static final int JOIN_LEAVE_DURATION = 20;
|
||||||
private static final int MESSAGE_DELAY = 10;
|
private static final int MESSAGE_DELAY = 10;
|
||||||
|
private static final CopyOnWriteArrayList<Player> clanMembers = new CopyOnWriteArrayList<>();
|
||||||
|
/**
|
||||||
|
* queue of temporary messages added to the client
|
||||||
|
*/
|
||||||
|
private final Deque<ClanJoinMessage> clanJoinMessages = new ArrayDeque<>();
|
||||||
|
private final Map<String, ClanMemberActivity> activityBuffer = new HashMap<>();
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private Client client;
|
private Client client;
|
||||||
@@ -115,22 +121,8 @@ public class ClanChatPlugin extends Plugin
|
|||||||
private ClientThread clientThread;
|
private ClientThread clientThread;
|
||||||
|
|
||||||
private List<String> chats = new ArrayList<>();
|
private List<String> chats = new ArrayList<>();
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
public static CopyOnWriteArrayList<Player> getClanMembers()
|
|
||||||
{
|
|
||||||
return (CopyOnWriteArrayList<Player>) clanMembers.clone();
|
|
||||||
}
|
|
||||||
|
|
||||||
private static final CopyOnWriteArrayList<Player> clanMembers = new CopyOnWriteArrayList<>();
|
|
||||||
private ClanChatIndicator clanMemberCounter;
|
private ClanChatIndicator clanMemberCounter;
|
||||||
/**
|
|
||||||
* queue of temporary messages added to the client
|
|
||||||
*/
|
|
||||||
private final Deque<ClanJoinMessage> clanJoinMessages = new ArrayDeque<>();
|
|
||||||
private final Map<String, ClanMemberActivity> activityBuffer = new HashMap<>();
|
|
||||||
private int clanJoinedTick;
|
private int clanJoinedTick;
|
||||||
|
|
||||||
private boolean clanChatIcons;
|
private boolean clanChatIcons;
|
||||||
private boolean recentChats;
|
private boolean recentChats;
|
||||||
private boolean showClanCounter;
|
private boolean showClanCounter;
|
||||||
@@ -142,6 +134,12 @@ public class ClanChatPlugin extends Plugin
|
|||||||
private boolean clanTabChat;
|
private boolean clanTabChat;
|
||||||
private String clanname;
|
private String clanname;
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public static CopyOnWriteArrayList<Player> getClanMembers()
|
||||||
|
{
|
||||||
|
return (CopyOnWriteArrayList<Player>) clanMembers.clone();
|
||||||
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
ClanChatConfig getConfig(ConfigManager configManager)
|
ClanChatConfig getConfig(ConfigManager configManager)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -34,6 +34,13 @@ import net.runelite.client.ui.overlay.OverlayManager;
|
|||||||
@Singleton
|
@Singleton
|
||||||
public class ClanManModePlugin extends Plugin
|
public class ClanManModePlugin extends Plugin
|
||||||
{
|
{
|
||||||
|
final Map<String, Integer> clan = new HashMap<>();
|
||||||
|
int wildernessLevel;
|
||||||
|
int clanmin;
|
||||||
|
int clanmax;
|
||||||
|
int inwildy;
|
||||||
|
int ticks;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private OverlayManager overlayManager;
|
private OverlayManager overlayManager;
|
||||||
|
|
||||||
@@ -89,15 +96,8 @@ public class ClanManModePlugin extends Plugin
|
|||||||
return configManager.getConfig(ClanManModeConfig.class);
|
return configManager.getConfig(ClanManModeConfig.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
int wildernessLevel;
|
|
||||||
int clanmin;
|
|
||||||
int clanmax;
|
|
||||||
int inwildy;
|
|
||||||
int ticks;
|
|
||||||
final Map<String, Integer> clan = new HashMap<>();
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp()
|
||||||
{
|
{
|
||||||
updateConfig();
|
updateConfig();
|
||||||
|
|
||||||
@@ -107,7 +107,7 @@ public class ClanManModePlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void shutDown() throws Exception
|
protected void shutDown()
|
||||||
{
|
{
|
||||||
overlayManager.remove(ClanManModeOverlay);
|
overlayManager.remove(ClanManModeOverlay);
|
||||||
overlayManager.remove(ClanManModeTileOverlay);
|
overlayManager.remove(ClanManModeTileOverlay);
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ import java.util.List;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import net.runelite.api.ChatMessageType;
|
import net.runelite.api.ChatMessageType;
|
||||||
@@ -122,24 +123,24 @@ public class ClueScrollPlugin extends Plugin
|
|||||||
13150, 9011,
|
13150, 9011,
|
||||||
13151, 9012
|
13151, 9012
|
||||||
};
|
};
|
||||||
|
@Getter(AccessLevel.PUBLIC)
|
||||||
@Getter
|
|
||||||
private ClueScroll clue;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
private final List<NPC> npcsToMark = new ArrayList<>();
|
private final List<NPC> npcsToMark = new ArrayList<>();
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PUBLIC)
|
||||||
private final List<TileObject> objectsToMark = new ArrayList<>();
|
private final List<TileObject> objectsToMark = new ArrayList<>();
|
||||||
|
private final TextComponent textComponent = new TextComponent();
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private ClueScroll clue;
|
||||||
|
|
||||||
|
@Getter(AccessLevel.PUBLIC)
|
||||||
private Item[] equippedItems;
|
private Item[] equippedItems;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PUBLIC)
|
||||||
private Item[] inventoryItems;
|
private Item[] inventoryItems;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
@Getter
|
@Getter(AccessLevel.PUBLIC)
|
||||||
private Client client;
|
private Client client;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
@@ -170,11 +171,33 @@ public class ClueScrollPlugin extends Plugin
|
|||||||
private BufferedImage mapArrow;
|
private BufferedImage mapArrow;
|
||||||
private Integer clueItemId;
|
private Integer clueItemId;
|
||||||
private boolean worldMapPointsSet = false;
|
private boolean worldMapPointsSet = false;
|
||||||
|
|
||||||
private final TextComponent textComponent = new TextComponent();
|
|
||||||
|
|
||||||
private boolean displayHintArrows;
|
private boolean displayHintArrows;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Translate a coordinate either between overworld and real, or real and overworld
|
||||||
|
*
|
||||||
|
* @param worldPoint
|
||||||
|
* @param toOverworld whether to convert to overworld coordinates, or to real coordinates
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static WorldPoint getMirrorPoint(WorldPoint worldPoint, boolean toOverworld)
|
||||||
|
{
|
||||||
|
int region = worldPoint.getRegionID();
|
||||||
|
for (int i = 0; i < REGION_MIRRORS.length; i += 2)
|
||||||
|
{
|
||||||
|
int real = REGION_MIRRORS[i];
|
||||||
|
int overworld = REGION_MIRRORS[i + 1];
|
||||||
|
|
||||||
|
// Test against what we are converting from
|
||||||
|
if (region == (toOverworld ? real : overworld))
|
||||||
|
{
|
||||||
|
return WorldPoint.fromRegion(toOverworld ? overworld : real,
|
||||||
|
worldPoint.getRegionX(), worldPoint.getRegionY(), worldPoint.getPlane());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return worldPoint;
|
||||||
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
ClueScrollConfig getConfig(ConfigManager configManager)
|
ClueScrollConfig getConfig(ConfigManager configManager)
|
||||||
{
|
{
|
||||||
@@ -188,7 +211,7 @@ public class ClueScrollPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp()
|
||||||
{
|
{
|
||||||
|
|
||||||
this.displayHintArrows = config.displayHintArrows();
|
this.displayHintArrows = config.displayHintArrows();
|
||||||
@@ -199,7 +222,7 @@ public class ClueScrollPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void shutDown() throws Exception
|
protected void shutDown()
|
||||||
{
|
{
|
||||||
overlayManager.remove(clueScrollOverlay);
|
overlayManager.remove(clueScrollOverlay);
|
||||||
overlayManager.remove(clueScrollEmoteOverlay);
|
overlayManager.remove(clueScrollEmoteOverlay);
|
||||||
@@ -834,29 +857,4 @@ public class ClueScrollPlugin extends Plugin
|
|||||||
newScroll
|
newScroll
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Translate a coordinate either between overworld and real, or real and overworld
|
|
||||||
*
|
|
||||||
* @param worldPoint
|
|
||||||
* @param toOverworld whether to convert to overworld coordinates, or to real coordinates
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public static WorldPoint getMirrorPoint(WorldPoint worldPoint, boolean toOverworld)
|
|
||||||
{
|
|
||||||
int region = worldPoint.getRegionID();
|
|
||||||
for (int i = 0; i < REGION_MIRRORS.length; i += 2)
|
|
||||||
{
|
|
||||||
int real = REGION_MIRRORS[i];
|
|
||||||
int overworld = REGION_MIRRORS[i + 1];
|
|
||||||
|
|
||||||
// Test against what we are converting from
|
|
||||||
if (region == (toOverworld ? real : overworld))
|
|
||||||
{
|
|
||||||
return WorldPoint.fromRegion(toOverworld ? overworld : real,
|
|
||||||
worldPoint.getRegionX(), worldPoint.getRegionY(), worldPoint.getPlane());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return worldPoint;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import com.google.common.collect.ImmutableSet;
|
|||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.NPC;
|
import net.runelite.api.NPC;
|
||||||
import net.runelite.api.ObjectID;
|
import net.runelite.api.ObjectID;
|
||||||
@@ -44,7 +45,7 @@ import net.runelite.client.ui.overlay.components.LineComponent;
|
|||||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||||
import net.runelite.client.ui.overlay.components.TitleComponent;
|
import net.runelite.client.ui.overlay.components.TitleComponent;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PUBLIC)
|
||||||
public class AnagramClue extends ClueScroll implements TextClueScroll, NpcClueScroll, ObjectClueScroll
|
public class AnagramClue extends ClueScroll implements TextClueScroll, NpcClueScroll, ObjectClueScroll
|
||||||
{
|
{
|
||||||
private static final String ANAGRAM_TEXT = "This anagram reveals who to speak to next: ";
|
private static final String ANAGRAM_TEXT = "This anagram reveals who to speak to next: ";
|
||||||
|
|||||||
@@ -25,11 +25,12 @@
|
|||||||
package net.runelite.client.plugins.cluescrolls.clues;
|
package net.runelite.client.plugins.cluescrolls.clues;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.coords.WorldPoint;
|
import net.runelite.api.coords.WorldPoint;
|
||||||
import net.runelite.api.widgets.WidgetID;
|
import net.runelite.api.widgets.WidgetID;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PUBLIC)
|
||||||
public class BeginnerMapClue extends MapClue implements LocationClueScroll
|
public class BeginnerMapClue extends MapClue implements LocationClueScroll
|
||||||
{
|
{
|
||||||
private static final ImmutableList<BeginnerMapClue> CLUES = ImmutableList.of(
|
private static final ImmutableList<BeginnerMapClue> CLUES = ImmutableList.of(
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import com.google.common.collect.ImmutableSet;
|
|||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.NPC;
|
import net.runelite.api.NPC;
|
||||||
import net.runelite.api.coords.WorldPoint;
|
import net.runelite.api.coords.WorldPoint;
|
||||||
@@ -39,7 +40,7 @@ import net.runelite.client.ui.overlay.components.LineComponent;
|
|||||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||||
import net.runelite.client.ui.overlay.components.TitleComponent;
|
import net.runelite.client.ui.overlay.components.TitleComponent;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PUBLIC)
|
||||||
public class CipherClue extends ClueScroll implements TextClueScroll, NpcClueScroll, LocationClueScroll
|
public class CipherClue extends ClueScroll implements TextClueScroll, NpcClueScroll, LocationClueScroll
|
||||||
{
|
{
|
||||||
private static final Set<CipherClue> CLUES = ImmutableSet.of(
|
private static final Set<CipherClue> CLUES = ImmutableSet.of(
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import com.google.common.collect.ImmutableMap;
|
|||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.coords.LocalPoint;
|
import net.runelite.api.coords.LocalPoint;
|
||||||
import net.runelite.api.coords.WorldPoint;
|
import net.runelite.api.coords.WorldPoint;
|
||||||
@@ -37,7 +38,7 @@ import net.runelite.client.ui.overlay.components.LineComponent;
|
|||||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||||
import net.runelite.client.ui.overlay.components.TitleComponent;
|
import net.runelite.client.ui.overlay.components.TitleComponent;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PUBLIC)
|
||||||
public class CoordinateClue extends ClueScroll implements TextClueScroll, LocationClueScroll
|
public class CoordinateClue extends ClueScroll implements TextClueScroll, LocationClueScroll
|
||||||
{
|
{
|
||||||
private static final ImmutableMap<WorldPoint, String> CLUES = new ImmutableMap.Builder<WorldPoint, String>()
|
private static final ImmutableMap<WorldPoint, String> CLUES = new ImmutableMap.Builder<WorldPoint, String>()
|
||||||
@@ -206,7 +207,7 @@ public class CoordinateClue extends ClueScroll implements TextClueScroll, Locati
|
|||||||
@Nullable
|
@Nullable
|
||||||
private final WorldPoint mirrorLocation;
|
private final WorldPoint mirrorLocation;
|
||||||
|
|
||||||
public CoordinateClue(String text, WorldPoint location, WorldPoint mirrorLocation)
|
public CoordinateClue(String text, WorldPoint location, @Nullable WorldPoint mirrorLocation)
|
||||||
{
|
{
|
||||||
this.text = text;
|
this.text = text;
|
||||||
this.location = location;
|
this.location = location;
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import com.google.common.collect.ImmutableSet;
|
|||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.NPC;
|
import net.runelite.api.NPC;
|
||||||
import static net.runelite.api.NullObjectID.NULL_1293;
|
import static net.runelite.api.NullObjectID.NULL_1293;
|
||||||
@@ -47,7 +48,7 @@ import net.runelite.client.ui.overlay.components.LineComponent;
|
|||||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||||
import net.runelite.client.ui.overlay.components.TitleComponent;
|
import net.runelite.client.ui.overlay.components.TitleComponent;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PUBLIC)
|
||||||
public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueScroll, ObjectClueScroll
|
public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueScroll, ObjectClueScroll
|
||||||
{
|
{
|
||||||
public static final Set<CrypticClue> CLUES = ImmutableSet.of(
|
public static final Set<CrypticClue> CLUES = ImmutableSet.of(
|
||||||
|
|||||||
@@ -31,10 +31,11 @@ import java.awt.Polygon;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
import static net.runelite.api.EquipmentInventorySlot.*;
|
|
||||||
import static net.runelite.api.EquipmentInventorySlot.LEGS;
|
import static net.runelite.api.EquipmentInventorySlot.LEGS;
|
||||||
|
import static net.runelite.api.EquipmentInventorySlot.*;
|
||||||
import net.runelite.api.Item;
|
import net.runelite.api.Item;
|
||||||
import net.runelite.api.ItemID;
|
import net.runelite.api.ItemID;
|
||||||
import static net.runelite.api.ItemID.*;
|
import static net.runelite.api.ItemID.*;
|
||||||
@@ -45,19 +46,23 @@ import net.runelite.api.coords.WorldPoint;
|
|||||||
import static net.runelite.client.plugins.cluescrolls.ClueScrollOverlay.TITLED_CONTENT_COLOR;
|
import static net.runelite.client.plugins.cluescrolls.ClueScrollOverlay.TITLED_CONTENT_COLOR;
|
||||||
import net.runelite.client.plugins.cluescrolls.ClueScrollPlugin;
|
import net.runelite.client.plugins.cluescrolls.ClueScrollPlugin;
|
||||||
import net.runelite.client.plugins.cluescrolls.clues.emote.Emote;
|
import net.runelite.client.plugins.cluescrolls.clues.emote.Emote;
|
||||||
import static net.runelite.client.plugins.cluescrolls.clues.emote.Emote.*;
|
|
||||||
import static net.runelite.client.plugins.cluescrolls.clues.emote.Emote.BULL_ROARER;
|
import static net.runelite.client.plugins.cluescrolls.clues.emote.Emote.BULL_ROARER;
|
||||||
|
import static net.runelite.client.plugins.cluescrolls.clues.emote.Emote.*;
|
||||||
import net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit;
|
import net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit;
|
||||||
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.*;
|
|
||||||
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.SHANTAY_PASS;
|
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.SHANTAY_PASS;
|
||||||
|
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.*;
|
||||||
import net.runelite.client.plugins.cluescrolls.clues.item.ItemRequirement;
|
import net.runelite.client.plugins.cluescrolls.clues.item.ItemRequirement;
|
||||||
import static net.runelite.client.plugins.cluescrolls.clues.item.ItemRequirements.*;
|
import static net.runelite.client.plugins.cluescrolls.clues.item.ItemRequirements.all;
|
||||||
|
import static net.runelite.client.plugins.cluescrolls.clues.item.ItemRequirements.any;
|
||||||
|
import static net.runelite.client.plugins.cluescrolls.clues.item.ItemRequirements.emptySlot;
|
||||||
|
import static net.runelite.client.plugins.cluescrolls.clues.item.ItemRequirements.item;
|
||||||
|
import static net.runelite.client.plugins.cluescrolls.clues.item.ItemRequirements.range;
|
||||||
import net.runelite.client.ui.overlay.OverlayUtil;
|
import net.runelite.client.ui.overlay.OverlayUtil;
|
||||||
import net.runelite.client.ui.overlay.components.LineComponent;
|
import net.runelite.client.ui.overlay.components.LineComponent;
|
||||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||||
import net.runelite.client.ui.overlay.components.TitleComponent;
|
import net.runelite.client.ui.overlay.components.TitleComponent;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PUBLIC)
|
||||||
public class EmoteClue extends ClueScroll implements TextClueScroll, LocationClueScroll
|
public class EmoteClue extends ClueScroll implements TextClueScroll, LocationClueScroll
|
||||||
{
|
{
|
||||||
private static final Set<EmoteClue> CLUES = ImmutableSet.of(
|
private static final Set<EmoteClue> CLUES = ImmutableSet.of(
|
||||||
@@ -195,7 +200,7 @@ public class EmoteClue extends ClueScroll implements TextClueScroll, LocationClu
|
|||||||
this(text, locationName, stashUnit, location, firstEmote, null, itemRequirements);
|
this(text, locationName, stashUnit, location, firstEmote, null, itemRequirements);
|
||||||
}
|
}
|
||||||
|
|
||||||
private EmoteClue(String text, String locationName, STASHUnit stashUnit, WorldPoint location, Emote firstEmote, Emote secondEmote, @Nonnull ItemRequirement... itemRequirements)
|
private EmoteClue(String text, String locationName, @Nullable STASHUnit stashUnit, WorldPoint location, Emote firstEmote, Emote secondEmote, @Nonnull ItemRequirement... itemRequirements)
|
||||||
{
|
{
|
||||||
this.text = text;
|
this.text = text;
|
||||||
this.locationName = locationName;
|
this.locationName = locationName;
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import com.google.common.collect.ImmutableSet;
|
|||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.coords.LocalPoint;
|
import net.runelite.api.coords.LocalPoint;
|
||||||
import net.runelite.api.coords.WorldPoint;
|
import net.runelite.api.coords.WorldPoint;
|
||||||
@@ -38,7 +39,7 @@ import net.runelite.client.ui.overlay.components.LineComponent;
|
|||||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||||
import net.runelite.client.ui.overlay.components.TitleComponent;
|
import net.runelite.client.ui.overlay.components.TitleComponent;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PUBLIC)
|
||||||
public class FairyRingClue extends ClueScroll implements TextClueScroll, LocationClueScroll
|
public class FairyRingClue extends ClueScroll implements TextClueScroll, LocationClueScroll
|
||||||
{
|
{
|
||||||
private static final Set<FairyRingClue> CLUES = ImmutableSet.of(
|
private static final Set<FairyRingClue> CLUES = ImmutableSet.of(
|
||||||
|
|||||||
@@ -29,11 +29,12 @@ import java.awt.Color;
|
|||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.Item;
|
import net.runelite.api.Item;
|
||||||
|
import static net.runelite.api.ItemID.*;
|
||||||
import net.runelite.api.NPC;
|
import net.runelite.api.NPC;
|
||||||
import net.runelite.api.coords.WorldPoint;
|
import net.runelite.api.coords.WorldPoint;
|
||||||
import static net.runelite.api.ItemID.*;
|
|
||||||
import static net.runelite.client.plugins.cluescrolls.ClueScrollOverlay.TITLED_CONTENT_COLOR;
|
import static net.runelite.client.plugins.cluescrolls.ClueScrollOverlay.TITLED_CONTENT_COLOR;
|
||||||
import net.runelite.client.plugins.cluescrolls.ClueScrollPlugin;
|
import net.runelite.client.plugins.cluescrolls.ClueScrollPlugin;
|
||||||
import static net.runelite.client.plugins.cluescrolls.ClueScrollWorldOverlay.IMAGE_Z_OFFSET;
|
import static net.runelite.client.plugins.cluescrolls.ClueScrollWorldOverlay.IMAGE_Z_OFFSET;
|
||||||
@@ -46,7 +47,7 @@ import net.runelite.client.ui.overlay.components.LineComponent;
|
|||||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||||
import net.runelite.client.ui.overlay.components.TitleComponent;
|
import net.runelite.client.ui.overlay.components.TitleComponent;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PUBLIC)
|
||||||
public class FaloTheBardClue extends ClueScroll implements TextClueScroll, NpcClueScroll
|
public class FaloTheBardClue extends ClueScroll implements TextClueScroll, NpcClueScroll
|
||||||
{
|
{
|
||||||
private static final List<FaloTheBardClue> CLUES = ImmutableList.of(
|
private static final List<FaloTheBardClue> CLUES = ImmutableList.of(
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ import java.util.Map;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -55,7 +56,7 @@ import net.runelite.client.ui.overlay.components.PanelComponent;
|
|||||||
import net.runelite.client.ui.overlay.components.TitleComponent;
|
import net.runelite.client.ui.overlay.components.TitleComponent;
|
||||||
|
|
||||||
@EqualsAndHashCode(callSuper = false, exclude = {"hotColdSolver", "location"})
|
@EqualsAndHashCode(callSuper = false, exclude = {"hotColdSolver", "location"})
|
||||||
@Getter
|
@Getter(AccessLevel.PUBLIC)
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class HotColdClue extends ClueScroll implements LocationClueScroll, LocationsClueScroll, TextClueScroll, NpcClueScroll
|
public class HotColdClue extends ClueScroll implements LocationClueScroll, LocationsClueScroll, TextClueScroll, NpcClueScroll
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import com.google.common.collect.ImmutableSet;
|
|||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import static net.runelite.api.ItemID.*;
|
import static net.runelite.api.ItemID.*;
|
||||||
import net.runelite.api.ObjectDefinition;
|
import net.runelite.api.ObjectDefinition;
|
||||||
@@ -49,7 +50,7 @@ import net.runelite.client.ui.overlay.components.LineComponent;
|
|||||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||||
import net.runelite.client.ui.overlay.components.TitleComponent;
|
import net.runelite.client.ui.overlay.components.TitleComponent;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PUBLIC)
|
||||||
public class MapClue extends ClueScroll implements ObjectClueScroll
|
public class MapClue extends ClueScroll implements ObjectClueScroll
|
||||||
{
|
{
|
||||||
private static final Set<MapClue> CLUES = ImmutableSet.of(
|
private static final Set<MapClue> CLUES = ImmutableSet.of(
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ import net.runelite.client.ui.overlay.components.PanelComponent;
|
|||||||
import net.runelite.client.ui.overlay.components.TitleComponent;
|
import net.runelite.client.ui.overlay.components.TitleComponent;
|
||||||
|
|
||||||
@AllArgsConstructor(access = AccessLevel.PRIVATE)
|
@AllArgsConstructor(access = AccessLevel.PRIVATE)
|
||||||
@Getter
|
@Getter(AccessLevel.PUBLIC)
|
||||||
public class MusicClue extends ClueScroll implements NpcClueScroll
|
public class MusicClue extends ClueScroll implements NpcClueScroll
|
||||||
{
|
{
|
||||||
private static final WorldPoint LOCATION = new WorldPoint(2990, 3384, 0);
|
private static final WorldPoint LOCATION = new WorldPoint(2990, 3384, 0);
|
||||||
|
|||||||
@@ -25,6 +25,12 @@
|
|||||||
package net.runelite.client.plugins.cluescrolls.clues;
|
package net.runelite.client.plugins.cluescrolls.clues;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
||||||
|
import java.awt.Color;
|
||||||
|
import java.awt.Graphics2D;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
@@ -32,28 +38,28 @@ import net.runelite.api.EquipmentInventorySlot;
|
|||||||
import net.runelite.api.Item;
|
import net.runelite.api.Item;
|
||||||
import net.runelite.api.ItemID;
|
import net.runelite.api.ItemID;
|
||||||
import net.runelite.api.NPC;
|
import net.runelite.api.NPC;
|
||||||
|
import static net.runelite.client.plugins.cluescrolls.ClueScrollOverlay.TITLED_CONTENT_COLOR;
|
||||||
import net.runelite.client.plugins.cluescrolls.ClueScrollPlugin;
|
import net.runelite.client.plugins.cluescrolls.ClueScrollPlugin;
|
||||||
|
import static net.runelite.client.plugins.cluescrolls.ClueScrollWorldOverlay.IMAGE_Z_OFFSET;
|
||||||
import net.runelite.client.plugins.cluescrolls.clues.item.AnyRequirementCollection;
|
import net.runelite.client.plugins.cluescrolls.clues.item.AnyRequirementCollection;
|
||||||
import static net.runelite.client.plugins.cluescrolls.clues.item.ItemRequirements.*;
|
|
||||||
import net.runelite.client.plugins.cluescrolls.clues.item.ItemRequirement;
|
import net.runelite.client.plugins.cluescrolls.clues.item.ItemRequirement;
|
||||||
|
import static net.runelite.client.plugins.cluescrolls.clues.item.ItemRequirements.all;
|
||||||
|
import static net.runelite.client.plugins.cluescrolls.clues.item.ItemRequirements.any;
|
||||||
|
import static net.runelite.client.plugins.cluescrolls.clues.item.ItemRequirements.emptySlot;
|
||||||
|
import static net.runelite.client.plugins.cluescrolls.clues.item.ItemRequirements.item;
|
||||||
|
import static net.runelite.client.plugins.cluescrolls.clues.item.ItemRequirements.range;
|
||||||
|
import static net.runelite.client.plugins.cluescrolls.clues.item.ItemRequirements.xOfItem;
|
||||||
import net.runelite.client.plugins.cluescrolls.clues.item.SingleItemRequirement;
|
import net.runelite.client.plugins.cluescrolls.clues.item.SingleItemRequirement;
|
||||||
import net.runelite.client.ui.overlay.OverlayUtil;
|
import net.runelite.client.ui.overlay.OverlayUtil;
|
||||||
import net.runelite.client.ui.overlay.components.LineComponent;
|
import net.runelite.client.ui.overlay.components.LineComponent;
|
||||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||||
import net.runelite.client.ui.overlay.components.TitleComponent;
|
import net.runelite.client.ui.overlay.components.TitleComponent;
|
||||||
import java.awt.Color;
|
|
||||||
import java.awt.Graphics2D;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
import static net.runelite.client.plugins.cluescrolls.ClueScrollOverlay.TITLED_CONTENT_COLOR;
|
|
||||||
import static net.runelite.client.plugins.cluescrolls.ClueScrollWorldOverlay.IMAGE_Z_OFFSET;
|
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PUBLIC)
|
||||||
public class SkillChallengeClue extends ClueScroll implements NpcClueScroll
|
public class SkillChallengeClue extends ClueScroll implements NpcClueScroll
|
||||||
{
|
{
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Getter
|
@Getter(AccessLevel.PRIVATE)
|
||||||
enum ChallengeType
|
enum ChallengeType
|
||||||
{
|
{
|
||||||
CHARLIE("Charlie the Tramp", "Southern Entrance to Varrock"),
|
CHARLIE("Charlie the Tramp", "Southern Entrance to Varrock"),
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ import java.util.Arrays;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
@@ -42,15 +43,15 @@ import static net.runelite.api.ItemID.TORN_CLUE_SCROLL_PART_2;
|
|||||||
import static net.runelite.api.ItemID.TORN_CLUE_SCROLL_PART_3;
|
import static net.runelite.api.ItemID.TORN_CLUE_SCROLL_PART_3;
|
||||||
import net.runelite.api.coords.WorldPoint;
|
import net.runelite.api.coords.WorldPoint;
|
||||||
import net.runelite.api.events.ItemContainerChanged;
|
import net.runelite.api.events.ItemContainerChanged;
|
||||||
|
import net.runelite.api.util.Text;
|
||||||
import net.runelite.client.game.ItemManager;
|
import net.runelite.client.game.ItemManager;
|
||||||
import static net.runelite.client.plugins.cluescrolls.ClueScrollOverlay.TITLED_CONTENT_COLOR;
|
import static net.runelite.client.plugins.cluescrolls.ClueScrollOverlay.TITLED_CONTENT_COLOR;
|
||||||
import net.runelite.client.plugins.cluescrolls.ClueScrollPlugin;
|
import net.runelite.client.plugins.cluescrolls.ClueScrollPlugin;
|
||||||
import net.runelite.client.ui.overlay.components.LineComponent;
|
import net.runelite.client.ui.overlay.components.LineComponent;
|
||||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||||
import net.runelite.client.ui.overlay.components.TitleComponent;
|
import net.runelite.client.ui.overlay.components.TitleComponent;
|
||||||
import net.runelite.api.util.Text;
|
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PUBLIC)
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class ThreeStepCrypticClue extends ClueScroll implements TextClueScroll, ObjectClueScroll, NpcClueScroll, LocationsClueScroll
|
public class ThreeStepCrypticClue extends ClueScroll implements TextClueScroll, ObjectClueScroll, NpcClueScroll, LocationsClueScroll
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,10 +24,11 @@
|
|||||||
*/
|
*/
|
||||||
package net.runelite.client.plugins.cluescrolls.clues.emote;
|
package net.runelite.client.plugins.cluescrolls.clues.emote;
|
||||||
|
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import static net.runelite.api.SpriteID.*;
|
import static net.runelite.api.SpriteID.*;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PUBLIC)
|
||||||
public enum Emote
|
public enum Emote
|
||||||
{
|
{
|
||||||
BULL_ROARER("Bull Roarer", -1),
|
BULL_ROARER("Bull Roarer", -1),
|
||||||
|
|||||||
@@ -24,11 +24,12 @@
|
|||||||
*/
|
*/
|
||||||
package net.runelite.client.plugins.cluescrolls.clues.emote;
|
package net.runelite.client.plugins.cluescrolls.clues.emote;
|
||||||
|
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.NullObjectID;
|
import net.runelite.api.NullObjectID;
|
||||||
import net.runelite.api.coords.WorldPoint;
|
import net.runelite.api.coords.WorldPoint;
|
||||||
|
|
||||||
@Getter
|
@Getter(AccessLevel.PUBLIC)
|
||||||
public enum STASHUnit
|
public enum STASHUnit
|
||||||
{
|
{
|
||||||
NEAR_A_SHED_IN_LUMBRIDGE_SWAMP(NullObjectID.NULL_28958, new WorldPoint(3201, 3171, 0)),
|
NEAR_A_SHED_IN_LUMBRIDGE_SWAMP(NullObjectID.NULL_28958, new WorldPoint(3201, 3171, 0)),
|
||||||
|
|||||||
@@ -24,11 +24,12 @@
|
|||||||
*/
|
*/
|
||||||
package net.runelite.client.plugins.cluescrolls.clues.hotcold;
|
package net.runelite.client.plugins.cluescrolls.clues.hotcold;
|
||||||
|
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Getter
|
@Getter(AccessLevel.PUBLIC)
|
||||||
public enum HotColdArea
|
public enum HotColdArea
|
||||||
{
|
{
|
||||||
ASGARNIA("Asgarnia"),
|
ASGARNIA("Asgarnia"),
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user