plugins checkstyle

This commit is contained in:
Lucas
2019-05-17 04:10:20 +02:00
parent 34b16cf300
commit 11543b5739
347 changed files with 49724 additions and 46654 deletions

View File

@@ -27,7 +27,6 @@ package net.runelite.client.plugins;
import com.google.inject.Binder; import com.google.inject.Binder;
import com.google.inject.Injector; import com.google.inject.Injector;
import com.google.inject.Module; import com.google.inject.Module;
import java.io.File; import java.io.File;
public abstract class Plugin implements Module public abstract class Plugin implements Module

View File

@@ -59,5 +59,5 @@ public @interface PluginDescriptor
boolean loadWhenOutdated() default false; boolean loadWhenOutdated() default false;
PluginType type() default PluginType.GENERAL_USE; PluginType type() default PluginType.GENERAL_USE;
} }

View File

@@ -57,8 +57,6 @@ import javax.inject.Singleton;
import javax.swing.SwingUtilities; import javax.swing.SwingUtilities;
import lombok.Setter; import lombok.Setter;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.runelite.client.events.SessionClose;
import net.runelite.client.events.SessionOpen;
import net.runelite.client.RuneLite; import net.runelite.client.RuneLite;
import net.runelite.client.config.Config; import net.runelite.client.config.Config;
import net.runelite.client.config.ConfigGroup; import net.runelite.client.config.ConfigGroup;
@@ -67,6 +65,8 @@ import net.runelite.client.config.RuneLiteConfig;
import net.runelite.client.eventbus.EventBus; import net.runelite.client.eventbus.EventBus;
import net.runelite.client.eventbus.Subscribe; import net.runelite.client.eventbus.Subscribe;
import net.runelite.client.events.PluginChanged; import net.runelite.client.events.PluginChanged;
import net.runelite.client.events.SessionClose;
import net.runelite.client.events.SessionOpen;
import net.runelite.client.task.Schedule; import net.runelite.client.task.Schedule;
import net.runelite.client.task.ScheduledMethod; import net.runelite.client.task.ScheduledMethod;
import net.runelite.client.task.Scheduler; import net.runelite.client.task.Scheduler;
@@ -90,7 +90,7 @@ public class PluginManager
private final List<Plugin> plugins = new CopyOnWriteArrayList<>(); private final List<Plugin> plugins = new CopyOnWriteArrayList<>();
private final List<Plugin> activePlugins = new CopyOnWriteArrayList<>(); private final List<Plugin> activePlugins = new CopyOnWriteArrayList<>();
private final String runeliteGroupName = RuneLiteConfig.class private final String runeliteGroupName = RuneLiteConfig.class
.getAnnotation(ConfigGroup.class).value(); .getAnnotation(ConfigGroup.class).value();
@Inject @Inject
PluginWatcher pluginWatcher; PluginWatcher pluginWatcher;
@@ -116,7 +116,7 @@ public class PluginManager
this.sceneTileManager = sceneTileManager; this.sceneTileManager = sceneTileManager;
} }
public void watch() public void watch()
{ {
pluginWatcher.start(); pluginWatcher.start();
} }
@@ -243,7 +243,7 @@ public class PluginManager
if (clazz.getSuperclass() == Plugin.class) if (clazz.getSuperclass() == Plugin.class)
{ {
log.warn("Class {} is a plugin, but has no plugin descriptor", log.warn("Class {} is a plugin, but has no plugin descriptor",
clazz); clazz);
} }
continue; continue;
} }
@@ -251,7 +251,7 @@ public class PluginManager
if (clazz.getSuperclass() != Plugin.class) if (clazz.getSuperclass() != Plugin.class)
{ {
log.warn("Class {} has plugin descriptor, but is not a plugin", log.warn("Class {} has plugin descriptor, but is not a plugin",
clazz); clazz);
continue; continue;
} }
@@ -516,6 +516,7 @@ public class PluginManager
/** /**
* Topologically sort a graph. Uses Kahn's algorithm. * Topologically sort a graph. Uses Kahn's algorithm.
*
* @param graph * @param graph
* @param <T> * @param <T>
* @return * @return

View File

@@ -1,6 +1,7 @@
package net.runelite.client.plugins; package net.runelite.client.plugins;
public enum PluginType { public enum PluginType
{
PVM, PVM,
PVP, PVP,

View File

@@ -89,7 +89,7 @@ public class PluginWatcher extends Thread
scan(); scan();
} }
for (;;) for (; ; )
{ {
try try
{ {

View File

@@ -21,7 +21,8 @@
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/package net.runelite.client.plugins.achievementdiary; */
package net.runelite.client.plugins.achievementdiary;
public interface Requirement public interface Requirement
{ {

View File

@@ -27,10 +27,10 @@ package net.runelite.client.plugins.achievementdiary.diaries;
import net.runelite.api.Favour; import net.runelite.api.Favour;
import net.runelite.api.Quest; import net.runelite.api.Quest;
import net.runelite.api.Skill; import net.runelite.api.Skill;
import net.runelite.client.plugins.achievementdiary.GenericDiaryRequirement;
import net.runelite.client.plugins.achievementdiary.SkillRequirement;
import net.runelite.client.plugins.achievementdiary.QuestRequirement;
import net.runelite.client.plugins.achievementdiary.FavourRequirement; import net.runelite.client.plugins.achievementdiary.FavourRequirement;
import net.runelite.client.plugins.achievementdiary.GenericDiaryRequirement;
import net.runelite.client.plugins.achievementdiary.QuestRequirement;
import net.runelite.client.plugins.achievementdiary.SkillRequirement;
public class KourendDiaryRequirement extends GenericDiaryRequirement public class KourendDiaryRequirement extends GenericDiaryRequirement
{ {

View File

@@ -71,7 +71,7 @@ class AgilityOverlay extends Overlay
plugin.getObstacles().forEach((object, obstacle) -> plugin.getObstacles().forEach((object, obstacle) ->
{ {
if (Obstacles.SHORTCUT_OBSTACLE_IDS.containsKey(object.getId()) && !config.highlightShortcuts() || if (Obstacles.SHORTCUT_OBSTACLE_IDS.containsKey(object.getId()) && !config.highlightShortcuts() ||
Obstacles.TRAP_OBSTACLE_IDS.contains(object.getId()) && !config.showTrapOverlay()) Obstacles.TRAP_OBSTACLE_IDS.contains(object.getId()) && !config.showTrapOverlay())
{ {
return; return;
} }
@@ -122,7 +122,7 @@ class AgilityOverlay extends Overlay
for (Tile markOfGraceTile : marksOfGrace) for (Tile markOfGraceTile : marksOfGrace)
{ {
if (markOfGraceTile.getPlane() == client.getPlane() && markOfGraceTile.getItemLayer() != null if (markOfGraceTile.getPlane() == client.getPlane() && markOfGraceTile.getItemLayer() != null
&& markOfGraceTile.getLocalLocation().distanceTo(playerLocation) < MAX_DISTANCE) && markOfGraceTile.getLocalLocation().distanceTo(playerLocation) < MAX_DISTANCE)
{ {
final Polygon poly = markOfGraceTile.getItemLayer().getCanvasTilePoly(); final Polygon poly = markOfGraceTile.getItemLayer().getCanvasTilePoly();

View File

@@ -25,6 +25,7 @@
package net.runelite.client.plugins.agility; package net.runelite.client.plugins.agility;
import com.google.inject.Provides; import com.google.inject.Provides;
import java.awt.Color;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
@@ -37,6 +38,8 @@ import net.runelite.api.Client;
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.AGILITY_ARENA_TICKET; import static net.runelite.api.ItemID.AGILITY_ARENA_TICKET;
import net.runelite.api.MenuAction;
import net.runelite.api.MenuEntry;
import net.runelite.api.Player; import net.runelite.api.Player;
import net.runelite.api.Skill; import net.runelite.api.Skill;
import static net.runelite.api.Skill.AGILITY; import static net.runelite.api.Skill.AGILITY;
@@ -72,10 +75,7 @@ import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.ui.overlay.OverlayManager; import net.runelite.client.ui.overlay.OverlayManager;
import net.runelite.client.ui.overlay.infobox.InfoBoxManager; import net.runelite.client.ui.overlay.infobox.InfoBoxManager;
import net.runelite.api.MenuEntry;
import net.runelite.client.util.ColorUtil; import net.runelite.client.util.ColorUtil;
import net.runelite.api.MenuAction;
import java.awt.Color;
@PluginDescriptor( @PluginDescriptor(
name = "Agility", name = "Agility",
@@ -447,7 +447,8 @@ public class AgilityPlugin extends Plugin
for (Obstacle nearbyObstacle : getObstacles().values()) for (Obstacle nearbyObstacle : getObstacles().values())
{ {
AgilityShortcut shortcut = nearbyObstacle.getShortcut(); AgilityShortcut shortcut = nearbyObstacle.getShortcut();
if (shortcut != null && Arrays.stream(shortcut.getObstacleIds()).anyMatch(i -> i == entryId)) { if (shortcut != null && Arrays.stream(shortcut.getObstacleIds()).anyMatch(i -> i == entryId))
{
MenuEntry entry = menuEntries[menuEntries.length - 1]; MenuEntry entry = menuEntries[menuEntries.length - 1];
int level = shortcut.getLevel(); int level = shortcut.getLevel();
Color color = level <= getAgilityLevel() ? Color.GREEN : Color.RED; Color color = level <= getAgilityLevel() ? Color.GREEN : Color.RED;

View File

@@ -44,7 +44,210 @@ import static net.runelite.api.NullObjectID.NULL_18133;
import static net.runelite.api.NullObjectID.NULL_18135; import static net.runelite.api.NullObjectID.NULL_18135;
import static net.runelite.api.NullObjectID.NULL_18136; import static net.runelite.api.NullObjectID.NULL_18136;
import static net.runelite.api.NullObjectID.NULL_3550; import static net.runelite.api.NullObjectID.NULL_3550;
import static net.runelite.api.ObjectID.*; import static net.runelite.api.ObjectID.BALANCING_LEDGE;
import static net.runelite.api.ObjectID.BALANCING_LEDGE_23547;
import static net.runelite.api.ObjectID.BALANCING_LEDGE_3561;
import static net.runelite.api.ObjectID.BALANCING_ROPE;
import static net.runelite.api.ObjectID.BALANCING_ROPE_23557;
import static net.runelite.api.ObjectID.BANNER_11382;
import static net.runelite.api.ObjectID.BASKET_11380;
import static net.runelite.api.ObjectID.BOAT_17961;
import static net.runelite.api.ObjectID.BOILER_22635;
import static net.runelite.api.ObjectID.CABLE;
import static net.runelite.api.ObjectID.CABLE_22569;
import static net.runelite.api.ObjectID.CABLE_22572;
import static net.runelite.api.ObjectID.CLIMBING_ROCKS_10851;
import static net.runelite.api.ObjectID.CLOTHES_LINE;
import static net.runelite.api.ObjectID.CONSOLE;
import static net.runelite.api.ObjectID.CRATE_10086;
import static net.runelite.api.ObjectID.CRUMBLING_WALL_1948;
import static net.runelite.api.ObjectID.DOORWAY_10855;
import static net.runelite.api.ObjectID.DOOR_18091;
import static net.runelite.api.ObjectID.DRYING_LINE;
import static net.runelite.api.ObjectID.EDGE;
import static net.runelite.api.ObjectID.EDGE_11371;
import static net.runelite.api.ObjectID.EDGE_11377;
import static net.runelite.api.ObjectID.FLOORBOARDS;
import static net.runelite.api.ObjectID.FLOORBOARDS_18071;
import static net.runelite.api.ObjectID.FLOORBOARDS_18072;
import static net.runelite.api.ObjectID.FLOORBOARDS_18073;
import static net.runelite.api.ObjectID.FLOORBOARDS_18089;
import static net.runelite.api.ObjectID.FLOORBOARDS_18090;
import static net.runelite.api.ObjectID.FLOORBOARDS_18093;
import static net.runelite.api.ObjectID.FLOORBOARDS_18094;
import static net.runelite.api.ObjectID.FLOORBOARDS_18097;
import static net.runelite.api.ObjectID.FLOORBOARDS_18098;
import static net.runelite.api.ObjectID.FLOORBOARDS_18109;
import static net.runelite.api.ObjectID.FLOORBOARDS_18110;
import static net.runelite.api.ObjectID.FLOORBOARDS_18111;
import static net.runelite.api.ObjectID.FLOORBOARDS_18112;
import static net.runelite.api.ObjectID.FLOORBOARDS_18113;
import static net.runelite.api.ObjectID.FLOORBOARDS_18114;
import static net.runelite.api.ObjectID.FLOORBOARDS_18117;
import static net.runelite.api.ObjectID.FLOORBOARDS_18118;
import static net.runelite.api.ObjectID.GAP_10085;
import static net.runelite.api.ObjectID.GAP_10352;
import static net.runelite.api.ObjectID.GAP_10642;
import static net.runelite.api.ObjectID.GAP_10778;
import static net.runelite.api.ObjectID.GAP_10779;
import static net.runelite.api.ObjectID.GAP_10780;
import static net.runelite.api.ObjectID.GAP_10820;
import static net.runelite.api.ObjectID.GAP_10821;
import static net.runelite.api.ObjectID.GAP_10822;
import static net.runelite.api.ObjectID.GAP_10823;
import static net.runelite.api.ObjectID.GAP_10828;
import static net.runelite.api.ObjectID.GAP_10832;
import static net.runelite.api.ObjectID.GAP_10859;
import static net.runelite.api.ObjectID.GAP_10861;
import static net.runelite.api.ObjectID.GAP_10882;
import static net.runelite.api.ObjectID.GAP_10884;
import static net.runelite.api.ObjectID.GAP_11161;
import static net.runelite.api.ObjectID.GAP_11360;
import static net.runelite.api.ObjectID.GAP_11365;
import static net.runelite.api.ObjectID.GAP_11374;
import static net.runelite.api.ObjectID.GAP_11375;
import static net.runelite.api.ObjectID.GAP_11376;
import static net.runelite.api.ObjectID.GAP_11383;
import static net.runelite.api.ObjectID.GAP_11392;
import static net.runelite.api.ObjectID.GAP_11395;
import static net.runelite.api.ObjectID.GAP_11396;
import static net.runelite.api.ObjectID.GAP_11406;
import static net.runelite.api.ObjectID.GAP_11429;
import static net.runelite.api.ObjectID.GAP_11430;
import static net.runelite.api.ObjectID.GAP_11630;
import static net.runelite.api.ObjectID.HAND_HOLDS_10836;
import static net.runelite.api.ObjectID.HAND_HOLDS_3583;
import static net.runelite.api.ObjectID.HURDLE;
import static net.runelite.api.ObjectID.HURDLE_11639;
import static net.runelite.api.ObjectID.HURDLE_11640;
import static net.runelite.api.ObjectID.ICE;
import static net.runelite.api.ObjectID.ICE_21149;
import static net.runelite.api.ObjectID.ICE_21150;
import static net.runelite.api.ObjectID.ICE_21151;
import static net.runelite.api.ObjectID.ICE_21152;
import static net.runelite.api.ObjectID.ICE_21153;
import static net.runelite.api.ObjectID.ICE_21154;
import static net.runelite.api.ObjectID.ICE_21155;
import static net.runelite.api.ObjectID.ICE_21156;
import static net.runelite.api.ObjectID.ICICLES;
import static net.runelite.api.ObjectID.JUTTING_WALL_22552;
import static net.runelite.api.ObjectID.LADDER_16682;
import static net.runelite.api.ObjectID.LADDER_22564;
import static net.runelite.api.ObjectID.LEDGE_10781;
import static net.runelite.api.ObjectID.LEDGE_10860;
import static net.runelite.api.ObjectID.LEDGE_10886;
import static net.runelite.api.ObjectID.LEDGE_10888;
import static net.runelite.api.ObjectID.LEDGE_11366;
import static net.runelite.api.ObjectID.LEDGE_11367;
import static net.runelite.api.ObjectID.LEDGE_11369;
import static net.runelite.api.ObjectID.LEDGE_11370;
import static net.runelite.api.ObjectID.LOG_BALANCE;
import static net.runelite.api.ObjectID.LOG_BALANCE_23144;
import static net.runelite.api.ObjectID.LOG_BALANCE_23145;
import static net.runelite.api.ObjectID.LOG_BALANCE_23542;
import static net.runelite.api.ObjectID.LOG_BALANCE_3557;
import static net.runelite.api.ObjectID.LOW_WALL;
import static net.runelite.api.ObjectID.LOW_WALL_10865;
import static net.runelite.api.ObjectID.MARKET_STALL_11381;
import static net.runelite.api.ObjectID.MONKEYBARS;
import static net.runelite.api.ObjectID.MONKEYBARS_15417;
import static net.runelite.api.ObjectID.MONKEY_BARS_3564;
import static net.runelite.api.ObjectID.NARROW_WALL;
import static net.runelite.api.ObjectID.OBSTACLE_NET_20211;
import static net.runelite.api.ObjectID.OBSTACLE_NET_23134;
import static net.runelite.api.ObjectID.OBSTACLE_NET_23135;
import static net.runelite.api.ObjectID.OBSTACLE_PIPE_23137;
import static net.runelite.api.ObjectID.OBSTACLE_PIPE_23138;
import static net.runelite.api.ObjectID.OBSTACLE_PIPE_23139;
import static net.runelite.api.ObjectID.PILE_OF_FISH;
import static net.runelite.api.ObjectID.PILLAR_3578;
import static net.runelite.api.ObjectID.PIPE_11657;
import static net.runelite.api.ObjectID.PLANK_10868;
import static net.runelite.api.ObjectID.PLANK_11631;
import static net.runelite.api.ObjectID.PLANK_3570;
import static net.runelite.api.ObjectID.PLANK_3571;
import static net.runelite.api.ObjectID.PLANK_3572;
import static net.runelite.api.ObjectID.POLEVAULT;
import static net.runelite.api.ObjectID.PYLON_22664;
import static net.runelite.api.ObjectID.ROCKS_23640;
import static net.runelite.api.ObjectID.ROCK_17958;
import static net.runelite.api.ObjectID.ROCK_17959;
import static net.runelite.api.ObjectID.ROCK_17960;
import static net.runelite.api.ObjectID.ROOF_TOP_BEAMS;
import static net.runelite.api.ObjectID.ROPESWING_23131;
import static net.runelite.api.ObjectID.ROPESWING_23132;
import static net.runelite.api.ObjectID.ROPE_15487;
import static net.runelite.api.ObjectID.ROPE_SWING;
import static net.runelite.api.ObjectID.ROUGH_WALL;
import static net.runelite.api.ObjectID.ROUGH_WALL_10093;
import static net.runelite.api.ObjectID.ROUGH_WALL_10586;
import static net.runelite.api.ObjectID.ROUGH_WALL_10833;
import static net.runelite.api.ObjectID.ROUGH_WALL_11385;
import static net.runelite.api.ObjectID.ROUGH_WALL_11391;
import static net.runelite.api.ObjectID.SHELF_18086;
import static net.runelite.api.ObjectID.SHELF_18087;
import static net.runelite.api.ObjectID.SHELF_18095;
import static net.runelite.api.ObjectID.SHELF_18096;
import static net.runelite.api.ObjectID.SHELF_18105;
import static net.runelite.api.ObjectID.SHELF_18106;
import static net.runelite.api.ObjectID.SHELF_18107;
import static net.runelite.api.ObjectID.SHELF_18108;
import static net.runelite.api.ObjectID.SKULL_SLOPE;
import static net.runelite.api.ObjectID.SKULL_SLOPE_15483;
import static net.runelite.api.ObjectID.STAIRS_10857;
import static net.runelite.api.ObjectID.STAIRS_22608;
import static net.runelite.api.ObjectID.STAIRS_22609;
import static net.runelite.api.ObjectID.STAIRS_22650;
import static net.runelite.api.ObjectID.STAIRS_22651;
import static net.runelite.api.ObjectID.STAIRS_DOWN;
import static net.runelite.api.ObjectID.STEEP_ROOF;
import static net.runelite.api.ObjectID.STEPPING_STONE_11643;
import static net.runelite.api.ObjectID.STEPPING_STONE_15412;
import static net.runelite.api.ObjectID.STEPPING_STONE_21120;
import static net.runelite.api.ObjectID.STEPPING_STONE_21126;
import static net.runelite.api.ObjectID.STEPPING_STONE_21128;
import static net.runelite.api.ObjectID.STEPPING_STONE_21129;
import static net.runelite.api.ObjectID.STEPPING_STONE_21130;
import static net.runelite.api.ObjectID.STEPPING_STONE_21131;
import static net.runelite.api.ObjectID.STEPPING_STONE_21132;
import static net.runelite.api.ObjectID.STEPPING_STONE_21133;
import static net.runelite.api.ObjectID.STEPPING_STONE_23556;
import static net.runelite.api.ObjectID.STILE_7527;
import static net.runelite.api.ObjectID.TALL_TREE_10819;
import static net.runelite.api.ObjectID.TIGHTROPE;
import static net.runelite.api.ObjectID.TIGHTROPE_10075;
import static net.runelite.api.ObjectID.TIGHTROPE_10284;
import static net.runelite.api.ObjectID.TIGHTROPE_10583;
import static net.runelite.api.ObjectID.TIGHTROPE_10834;
import static net.runelite.api.ObjectID.TIGHTROPE_11361;
import static net.runelite.api.ObjectID.TIGHTROPE_11364;
import static net.runelite.api.ObjectID.TIGHTROPE_11378;
import static net.runelite.api.ObjectID.TIGHTROPE_11393;
import static net.runelite.api.ObjectID.TIGHTROPE_11397;
import static net.runelite.api.ObjectID.TREE_11384;
import static net.runelite.api.ObjectID.TREE_11389;
import static net.runelite.api.ObjectID.TREE_BRANCH_23559;
import static net.runelite.api.ObjectID.TREE_BRANCH_23560;
import static net.runelite.api.ObjectID.TROPICAL_TREE_10357;
import static net.runelite.api.ObjectID.TROPICAL_TREE_15414;
import static net.runelite.api.ObjectID.TROPICAL_TREE_16062;
import static net.runelite.api.ObjectID.TUNNEL_18085;
import static net.runelite.api.ObjectID.TUNNEL_22557;
import static net.runelite.api.ObjectID.WALL_10084;
import static net.runelite.api.ObjectID.WALL_10777;
import static net.runelite.api.ObjectID.WALL_11373;
import static net.runelite.api.ObjectID.WALL_17980;
import static net.runelite.api.ObjectID.WALL_18078;
import static net.runelite.api.ObjectID.WALL_18088;
import static net.runelite.api.ObjectID.WALL_RUBBLE;
import static net.runelite.api.ObjectID.WALL_RUBBLE_18038;
import static net.runelite.api.ObjectID.WASHING_LINE_18099;
import static net.runelite.api.ObjectID.WASHING_LINE_18100;
import static net.runelite.api.ObjectID.WOODEN_BEAMS;
import static net.runelite.api.ObjectID.ZIP_LINE;
import static net.runelite.api.ObjectID.ZIP_LINE_11644;
import static net.runelite.api.ObjectID.ZIP_LINE_11645;
import static net.runelite.api.ObjectID.ZIP_LINE_11646;
import net.runelite.client.game.AgilityShortcut; import net.runelite.client.game.AgilityShortcut;
class Obstacles class Obstacles

View File

@@ -32,10 +32,10 @@ import net.runelite.api.coords.WorldPoint;
enum HydraPhase enum HydraPhase
{ // Sorry for the autism { // Sorry for the autism
ONE (3, AnimationID.HYDRA_1_1, AnimationID.HYDRA_1_2, ProjectileID.HYDRA_POISON, 0, SpriteID.BIG_ASS_GUTHIX_SPELL, new WorldPoint(1371, 10263, 0)), ONE(3, AnimationID.HYDRA_1_1, AnimationID.HYDRA_1_2, ProjectileID.HYDRA_POISON, 0, SpriteID.BIG_ASS_GUTHIX_SPELL, new WorldPoint(1371, 10263, 0)),
TWO (3, AnimationID.HYDRA_2_1, AnimationID.HYDRA_2_2, 0, AnimationID.HYDRA_LIGHTNING, SpriteID.BIG_SPEC_TRANSFER, new WorldPoint(1371, 10272, 0)), TWO(3, AnimationID.HYDRA_2_1, AnimationID.HYDRA_2_2, 0, AnimationID.HYDRA_LIGHTNING, SpriteID.BIG_SPEC_TRANSFER, new WorldPoint(1371, 10272, 0)),
THREE (3, AnimationID.HYDRA_3_1, AnimationID.HYDRA_3_2, 0, AnimationID.HYDRA_FIRE, SpriteID.BIG_SUPERHEAT, new WorldPoint(1362, 10272, 0)), THREE(3, AnimationID.HYDRA_3_1, AnimationID.HYDRA_3_2, 0, AnimationID.HYDRA_FIRE, SpriteID.BIG_SUPERHEAT, new WorldPoint(1362, 10272, 0)),
FOUR (1, AnimationID.HYDRA_4_1, AnimationID.HYDRA_4_2, ProjectileID.HYDRA_POISON, 0, SpriteID.BIG_ASS_GUTHIX_SPELL, null); FOUR(1, AnimationID.HYDRA_4_1, AnimationID.HYDRA_4_2, ProjectileID.HYDRA_POISON, 0, SpriteID.BIG_ASS_GUTHIX_SPELL, null);
@Getter @Getter
private final int attacksPerSwitch; private final int attacksPerSwitch;

View File

@@ -117,9 +117,9 @@ public class HydraPlugin extends Plugin
{ {
if (hydra != null) if (hydra != null)
{ {
removeOverlays(); removeOverlays();
hydra = null; hydra = null;
} }
return; return;
} }
@@ -305,8 +305,8 @@ public class HydraPlugin extends Plugin
} }
else else
{ {
hydra.setNextSwitch(hydra.getNextSwitch() - 1); hydra.setNextSwitch(hydra.getNextSwitch() - 1);
hydra.setLastAttack(hydra.getNextAttack()); hydra.setLastAttack(hydra.getNextAttack());
} }
hydra.setAttackCount(hydra.getAttackCount() + 1); hydra.setAttackCount(hydra.getAttackCount() + 1);

View File

@@ -93,8 +93,8 @@ class HydraPoisonOverlay extends Overlay
if (poly != null) if (poly != null)
{ {
poisonTiles.add(new Area(poly)); poisonTiles.add(new Area(poly));
} }
} }
graphics.setPaintMode(); graphics.setPaintMode();
@@ -134,8 +134,8 @@ class HydraPoisonOverlay extends Overlay
Color color = new Color(255, 0, 0, 100); // like Color color = new Color(255, 0, 0, 100); // like
if (hydra.getNpc().getWorldArea().intersectsWith(new WorldArea(wp, 1, 1))) // coords if (hydra.getNpc().getWorldArea().intersectsWith(new WorldArea(wp, 1, 1))) // coords
{ // WHICH FUCKING RETARD DID X, Y, dX, dY, Z???? IT'S XYZdXdY REEEEEEEEEE { // WHICH FUCKING RETARD DID X, Y, dX, dY, Z???? IT'S XYZdXdY REEEEEEEEEE
color = new Color(0, 255, 0, 100); color = new Color(0, 255, 0, 100);
} }

View File

@@ -26,8 +26,8 @@ package net.runelite.client.plugins.antidrag;
import java.awt.Color; import java.awt.Color;
import java.awt.event.KeyEvent; import java.awt.event.KeyEvent;
import net.runelite.client.config.Alpha;
import net.runelite.api.Constants; import net.runelite.api.Constants;
import net.runelite.client.config.Alpha;
import net.runelite.client.config.Config; import net.runelite.client.config.Config;
import net.runelite.client.config.ConfigGroup; import net.runelite.client.config.ConfigGroup;
import net.runelite.client.config.ConfigItem; import net.runelite.client.config.ConfigItem;

View File

@@ -32,7 +32,6 @@ import java.util.Map;
import net.runelite.api.ProjectileID; import net.runelite.api.ProjectileID;
public enum AoeProjectileInfo public enum AoeProjectileInfo
{ {
LIZARDMAN_SHAMAN_AOE(ProjectileID.LIZARDMAN_SHAMAN_AOE, 5), LIZARDMAN_SHAMAN_AOE(ProjectileID.LIZARDMAN_SHAMAN_AOE, 5),
@@ -108,8 +107,8 @@ public enum AoeProjectileInfo
ADDY_DRAG_POISON(ProjectileID.ADDY_DRAG_POISON, 1), ADDY_DRAG_POISON(ProjectileID.ADDY_DRAG_POISON, 1),
/** /**
* the Breath of the Drake * the Breath of the Drake
*/ */
DRAKE_BREATH(ProjectileID.DRAKE_BREATH, 1), DRAKE_BREATH(ProjectileID.DRAKE_BREATH, 1),
/** /**

View File

@@ -71,7 +71,7 @@ public class AoeWarningOverlay extends Overlay
{ {
for (WorldPoint point : plugin.getLightningTrail()) for (WorldPoint point : plugin.getLightningTrail())
{ {
drawTile(graphics, point, new Color(0,150,200), 2, 150, 50); drawTile(graphics, point, new Color(0, 150, 200), 2, 150, 50);
} }
for (WorldPoint point : plugin.getAcidTrail()) for (WorldPoint point : plugin.getAcidTrail())
{ {
@@ -84,7 +84,7 @@ public class AoeWarningOverlay extends Overlay
Instant now = Instant.now(); Instant now = Instant.now();
Map<Projectile, AoeProjectile> projectiles = plugin.getProjectiles(); Map<Projectile, AoeProjectile> projectiles = plugin.getProjectiles();
for (Iterator<AoeProjectile> it = projectiles.values().iterator(); it.hasNext();) for (Iterator<AoeProjectile> it = projectiles.values().iterator(); it.hasNext(); )
{ {
AoeProjectile aoeProjectile = it.next(); AoeProjectile aoeProjectile = it.next();
@@ -145,18 +145,22 @@ public class AoeWarningOverlay extends Overlay
return null; return null;
} }
private void drawTile(Graphics2D graphics, WorldPoint point, Color color, int strokeWidth, int outlineAlpha, int fillAlpha) { private void drawTile(Graphics2D graphics, WorldPoint point, Color color, int strokeWidth, int outlineAlpha, int fillAlpha)
{
WorldPoint playerLocation = client.getLocalPlayer().getWorldLocation(); WorldPoint playerLocation = client.getLocalPlayer().getWorldLocation();
if (point.distanceTo(playerLocation) >= 32) { if (point.distanceTo(playerLocation) >= 32)
{
return; return;
} }
LocalPoint lp = LocalPoint.fromWorld(client, point); LocalPoint lp = LocalPoint.fromWorld(client, point);
if (lp == null) { if (lp == null)
{
return; return;
} }
Polygon poly = Perspective.getCanvasTilePoly(client, lp); Polygon poly = Perspective.getCanvasTilePoly(client, lp);
if (poly == null) { if (poly == null)
{
return; return;
} }
//OverlayUtil.renderPolygon(graphics, poly, color); //OverlayUtil.renderPolygon(graphics, poly, color);

View File

@@ -301,8 +301,8 @@ public class AoeWarningPlugin extends Plugin
return config.isXarpusEnabled(); return config.isXarpusEnabled();
case ADDY_DRAG_POISON: case ADDY_DRAG_POISON:
return config.addyDrags(); return config.addyDrags();
case DRAKE_BREATH: case DRAKE_BREATH:
return config.isDrakeEnabled(); return config.isDrakeEnabled();
case CERB_FIRE: case CERB_FIRE:
return config.isCerbFireEnabled(); return config.isCerbFireEnabled();
} }

View File

@@ -73,7 +73,7 @@ public class BombOverlay extends Overlay
//Utilized from the npc highlight code for formatting text being displayed on the client canvas. //Utilized from the npc highlight code for formatting text being displayed on the client canvas.
private static final NumberFormat TIME_LEFT_FORMATTER = private static final NumberFormat TIME_LEFT_FORMATTER =
DecimalFormat.getInstance(Locale.US); DecimalFormat.getInstance(Locale.US);
static static
{ {
@@ -157,22 +157,22 @@ public class BombOverlay extends Overlay
Instant now = Instant.now(); Instant now = Instant.now();
double timeLeft = ((BOMB_DETONATE_TIME - (client.getTickCount() - double timeLeft = ((BOMB_DETONATE_TIME - (client.getTickCount() -
bomb.getTickStarted())) * ESTIMATED_TICK_LENGTH) - bomb.getTickStarted())) * ESTIMATED_TICK_LENGTH) -
(now.toEpochMilli() - bomb.getLastClockUpdate().toEpochMilli()) / 1000.0; (now.toEpochMilli() - bomb.getLastClockUpdate().toEpochMilli()) / 1000.0;
//divided by 1000.00 because of milliseconds :) //divided by 1000.00 because of milliseconds :)
timeLeft = Math.max(0.0, timeLeft); timeLeft = Math.max(0.0, timeLeft);
String bombTimerString = TIME_LEFT_FORMATTER.format(timeLeft); String bombTimerString = TIME_LEFT_FORMATTER.format(timeLeft);
int textWidth = graphics.getFontMetrics().stringWidth(bombTimerString); int textWidth = graphics.getFontMetrics().stringWidth(bombTimerString);
int textHeight = graphics.getFontMetrics().getAscent(); int textHeight = graphics.getFontMetrics().getAscent();
Point canvasPoint = Perspective.localToCanvas(client, localLoc.getX(), Point canvasPoint = Perspective.localToCanvas(client, localLoc.getX(),
localLoc.getY(), bomb.getWorldLocation().getPlane()); localLoc.getY(), bomb.getWorldLocation().getPlane());
if (canvasPoint != null) if (canvasPoint != null)
{ {
Point canvasCenterPoint = new Point( Point canvasCenterPoint = new Point(
canvasPoint.getX() - textWidth / 2, canvasPoint.getX() - textWidth / 2,
canvasPoint.getY() + textHeight / 2); canvasPoint.getY() + textHeight / 2);
OverlayUtil.renderTextLocation(graphics, canvasCenterPoint, bombTimerString, color_code); OverlayUtil.renderTextLocation(graphics, canvasCenterPoint, bombTimerString, color_code);
} }

View File

@@ -65,10 +65,10 @@ public interface BankTagsConfig extends Config
} }
@ConfigItem( @ConfigItem(
keyName = "hidePlaceholders", keyName = "hidePlaceholders",
name = "Hide placeholders", name = "Hide placeholders",
description = "Hide placeholders in tag tabs or tag search.", description = "Hide placeholders in tag tabs or tag search.",
position = 4 position = 4
) )
default boolean hidePlaceholders() default boolean hidePlaceholders()
{ {

View File

@@ -24,7 +24,6 @@
*/ */
package net.runelite.client.plugins.barbarianassault; package net.runelite.client.plugins.barbarianassault;
import com.google.common.collect.ImmutableList;
import com.google.inject.Provides; import com.google.inject.Provides;
import java.awt.Color; import java.awt.Color;
import java.awt.Font; import java.awt.Font;

View File

@@ -33,10 +33,10 @@ import net.runelite.api.widgets.WidgetInfo;
@AllArgsConstructor @AllArgsConstructor
enum HealerTeam enum HealerTeam
{ {
TEAMMATE1(WidgetInfo.BA_HEAL_TEAMMATE1, new Point(28, 2), 115), TEAMMATE1(WidgetInfo.BA_HEAL_TEAMMATE1, new Point(28, 2), 115),
TEAMMATE2(WidgetInfo.BA_HEAL_TEAMMATE2, new Point(26, 2), 115), TEAMMATE2(WidgetInfo.BA_HEAL_TEAMMATE2, new Point(26, 2), 115),
TEAMMATE3(WidgetInfo.BA_HEAL_TEAMMATE3, new Point(26, 2), 115), TEAMMATE3(WidgetInfo.BA_HEAL_TEAMMATE3, new Point(26, 2), 115),
TEAMMATE4(WidgetInfo.BA_HEAL_TEAMMATE4, new Point(25, 2), 115); TEAMMATE4(WidgetInfo.BA_HEAL_TEAMMATE4, new Point(25, 2), 115);
private WidgetInfo teammate; private WidgetInfo teammate;
private Point offset; private Point offset;

View File

@@ -89,10 +89,10 @@ public class BarrowsBrotherSlainOverlay extends Overlay
float rewardPercent = client.getVar(Varbits.BARROWS_REWARD_POTENTIAL) / 10.0f; float rewardPercent = client.getVar(Varbits.BARROWS_REWARD_POTENTIAL) / 10.0f;
panelComponent.getChildren().add(LineComponent.builder() panelComponent.getChildren().add(LineComponent.builder()
.left("Potential") .left("Potential")
.right(rewardPercent != 0 ? rewardPercent + "%" : "0%") .right(rewardPercent != 0 ? rewardPercent + "%" : "0%")
.rightColor(rewardPercent >= 73.0f && rewardPercent <= 88.0f ? Color.GREEN : rewardPercent < 65.6f ? Color.WHITE : Color.YELLOW) .rightColor(rewardPercent >= 73.0f && rewardPercent <= 88.0f ? Color.GREEN : rewardPercent < 65.6f ? Color.WHITE : Color.YELLOW)
.build()); .build());
return panelComponent.render(graphics); return panelComponent.render(graphics);
} }

View File

@@ -180,6 +180,7 @@ class BarrowsOverlay extends Overlay
/** /**
* Get minimap dot color from client * Get minimap dot color from client
*
* @param typeIndex index of minimap dot type (1 npcs, 2 players) * @param typeIndex index of minimap dot type (1 npcs, 2 players)
* @return color * @return color
*/ */

View File

@@ -81,13 +81,13 @@ public class BarrowsPlugin extends Plugin
{ {
@Getter(AccessLevel.PACKAGE) @Getter(AccessLevel.PACKAGE)
private static final Set<Integer> BARROWS_WALLS = Sets.newHashSet private static final Set<Integer> BARROWS_WALLS = Sets.newHashSet
( (
ObjectID.DOOR_20678, NullObjectID.NULL_20681, NullObjectID.NULL_20682, NullObjectID.NULL_20683, NullObjectID.NULL_20684, NullObjectID.NULL_20685, NullObjectID.NULL_20686, NullObjectID.NULL_20687, ObjectID.DOOR_20678, NullObjectID.NULL_20681, NullObjectID.NULL_20682, NullObjectID.NULL_20683, NullObjectID.NULL_20684, NullObjectID.NULL_20685, NullObjectID.NULL_20686, NullObjectID.NULL_20687,
NullObjectID.NULL_20688, NullObjectID.NULL_20689, NullObjectID.NULL_20690, NullObjectID.NULL_20691, NullObjectID.NULL_20692, NullObjectID.NULL_20693, NullObjectID.NULL_20694, NullObjectID.NULL_20695, NullObjectID.NULL_20688, NullObjectID.NULL_20689, NullObjectID.NULL_20690, NullObjectID.NULL_20691, NullObjectID.NULL_20692, NullObjectID.NULL_20693, NullObjectID.NULL_20694, NullObjectID.NULL_20695,
NullObjectID.NULL_20696, ObjectID.DOOR_20697, NullObjectID.NULL_20700, NullObjectID.NULL_20701, NullObjectID.NULL_20702, NullObjectID.NULL_20703, NullObjectID.NULL_20704, NullObjectID.NULL_20705, NullObjectID.NULL_20696, ObjectID.DOOR_20697, NullObjectID.NULL_20700, NullObjectID.NULL_20701, NullObjectID.NULL_20702, NullObjectID.NULL_20703, NullObjectID.NULL_20704, NullObjectID.NULL_20705,
NullObjectID.NULL_20706, NullObjectID.NULL_20707, NullObjectID.NULL_20708, NullObjectID.NULL_20709, NullObjectID.NULL_20710, NullObjectID.NULL_20711, NullObjectID.NULL_20712, NullObjectID.NULL_20713, NullObjectID.NULL_20706, NullObjectID.NULL_20707, NullObjectID.NULL_20708, NullObjectID.NULL_20709, NullObjectID.NULL_20710, NullObjectID.NULL_20711, NullObjectID.NULL_20712, NullObjectID.NULL_20713,
NullObjectID.NULL_20714, NullObjectID.NULL_20715, NullObjectID.NULL_20728, NullObjectID.NULL_20730 NullObjectID.NULL_20714, NullObjectID.NULL_20715, NullObjectID.NULL_20728, NullObjectID.NULL_20730
); );
private static final Set<Integer> BARROWS_LADDERS = Sets.newHashSet(NullObjectID.NULL_20675, NullObjectID.NULL_20676, NullObjectID.NULL_20677); private static final Set<Integer> BARROWS_LADDERS = Sets.newHashSet(NullObjectID.NULL_20675, NullObjectID.NULL_20676, NullObjectID.NULL_20677);
private static final ImmutableList<WidgetInfo> POSSIBLE_SOLUTIONS = ImmutableList.of( private static final ImmutableList<WidgetInfo> POSSIBLE_SOLUTIONS = ImmutableList.of(

View File

@@ -31,8 +31,6 @@ import java.time.Duration;
import java.time.Instant; import java.time.Instant;
import javax.inject.Inject; import javax.inject.Inject;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.runelite.api.Client;
import net.runelite.api.NPCComposition;
import net.runelite.client.ui.overlay.Overlay; import net.runelite.client.ui.overlay.Overlay;
import net.runelite.client.ui.overlay.OverlayLayer; import net.runelite.client.ui.overlay.OverlayLayer;
import net.runelite.client.ui.overlay.OverlayPosition; import net.runelite.client.ui.overlay.OverlayPosition;

View File

@@ -63,7 +63,6 @@ import net.runelite.api.events.WidgetLoaded;
import net.runelite.api.widgets.Widget; import net.runelite.api.widgets.Widget;
import net.runelite.api.widgets.WidgetID; import net.runelite.api.widgets.WidgetID;
import net.runelite.api.widgets.WidgetInfo; import net.runelite.api.widgets.WidgetInfo;
import net.runelite.client.chat.ChatMessageManager;
import net.runelite.client.config.ConfigManager; import net.runelite.client.config.ConfigManager;
import net.runelite.client.eventbus.Subscribe; import net.runelite.client.eventbus.Subscribe;
import net.runelite.client.game.ItemManager; import net.runelite.client.game.ItemManager;
@@ -371,10 +370,7 @@ public class BAToolsPlugin extends Plugin implements KeyListener
@Subscribe @Subscribe
public void onNpcDespawned(NpcDespawned event) public void onNpcDespawned(NpcDespawned event)
{ {
if (healers.remove(event.getNpc()) != null && healers.isEmpty()) healers.remove(event.getNpc());
{
healers.clear();
}
} }
@Subscribe @Subscribe
@@ -450,7 +446,7 @@ public class BAToolsPlugin extends Plugin implements KeyListener
{ {
remove(new String[]{"take", "light"}, target, true); remove(new String[]{"take", "light"}, target, true);
} }
else//remove "Light" option (and "Take" option if not defender). else //remove "Light" option (and "Take" option if not defender).
{ {
remove("light", target, true); remove("light", target, true);
} }
@@ -466,7 +462,8 @@ public class BAToolsPlugin extends Plugin implements KeyListener
List<String> poison = Arrays.asList("poisoned tofu", "poisoned meat", "poisoned worms"); List<String> poison = Arrays.asList("poisoned tofu", "poisoned meat", "poisoned worms");
List<String> vials = Arrays.asList("healing vial", "healing vial(1)", "healing vial(2)", "healing vial(3)", "healing vial(4)");//"healing vial(4)" List<String> vials = Arrays.asList("healing vial", "healing vial(1)", "healing vial(2)", "healing vial(3)", "healing vial(4)");//"healing vial(4)"
if (poison.contains(item)) if (poison.contains(item))
{//if item is a poison item {
//if item is a poison item
int calledPoison = 0; int calledPoison = 0;
switch (healer.getText())//choose which poison to hide the use/destroy option for switch (healer.getText())//choose which poison to hide the use/destroy option for
{ {
@@ -509,11 +506,13 @@ public class BAToolsPlugin extends Plugin implements KeyListener
} }
} }
else if (option.equals("attack") && client.getWidget(WidgetInfo.BA_ATK_ROLE_TEXT) == null && !target.equals("queen spawn"))//if not attacker else if (option.equals("attack") && client.getWidget(WidgetInfo.BA_ATK_ROLE_TEXT) == null && !target.equals("queen spawn"))//if not attacker
{//remove attack option from everything but queen spawns {
//remove attack option from everything but queen spawns
remove(option, target, true); remove(option, target, true);
} }
else if ((option.equals("fix") || (option.equals("block") && target.equals("penance cave"))) && client.getWidget(WidgetInfo.BA_DEF_ROLE_TEXT) == null)//if not defender else if ((option.equals("fix") || (option.equals("block") && target.equals("penance cave"))) && client.getWidget(WidgetInfo.BA_DEF_ROLE_TEXT) == null)//if not defender
{//the check for option requires checking target as well because defensive attack style option is also called "block". {
//the check for option requires checking target as well because defensive attack style option is also called "block".
remove(option, target, true); remove(option, target, true);
} }
else if ((option.equals("load")) && client.getWidget(WidgetInfo.BA_COLL_ROLE_TEXT) == null)//if not collector, remove hopper options else if ((option.equals("load")) && client.getWidget(WidgetInfo.BA_COLL_ROLE_TEXT) == null)//if not collector, remove hopper options
@@ -632,7 +631,7 @@ public class BAToolsPlugin extends Plugin implements KeyListener
if (correctEgg != null) if (correctEgg != null)
{ {
entries.add(correctEgg); entries.add(correctEgg);
client.setMenuEntries(entries.toArray(new MenuEntry[entries.size()])); client.setMenuEntries(entries.toArray(new MenuEntry[0]));
} }
} }

View File

@@ -24,10 +24,10 @@
*/ */
package net.runelite.client.plugins.batools; package net.runelite.client.plugins.batools;
import lombok.Getter;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import lombok.Getter;
@Getter @Getter
public enum Calls public enum Calls
{ {

View File

@@ -24,11 +24,10 @@
*/ */
package net.runelite.client.plugins.batools; package net.runelite.client.plugins.batools;
import java.awt.image.BufferedImage;
import net.runelite.client.plugins.Plugin; import net.runelite.client.plugins.Plugin;
import net.runelite.client.ui.overlay.infobox.Counter; import net.runelite.client.ui.overlay.infobox.Counter;
import java.awt.image.BufferedImage;
class CycleCounter extends Counter class CycleCounter extends Counter
{ {
CycleCounter(BufferedImage img, Plugin plugin, int tick) CycleCounter(BufferedImage img, Plugin plugin, int tick)

View File

@@ -27,9 +27,7 @@ package net.runelite.client.plugins.batools;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import net.runelite.api.NPC; import net.runelite.api.NPC;
import net.runelite.api.Actor;
class Healer class Healer
@@ -75,7 +73,7 @@ class Healer
private HealerCode getCode(int wave) private HealerCode getCode(int wave)
{ {
switch(wave) switch (wave)
{ {
case 1: case 1:
return HealerCode.WAVEONE; return HealerCode.WAVEONE;
@@ -97,7 +95,8 @@ class Healer
return HealerCode.WAVENINE; return HealerCode.WAVENINE;
case 10: case 10:
return HealerCode.WAVETEN; return HealerCode.WAVETEN;
default: return null; default:
return null;
} }
} }
} }

View File

@@ -30,16 +30,16 @@ import lombok.Getter;
enum HealerCode enum HealerCode
{ {
WAVEONE(new int[] {1,1}, new int[] {0,0}, new int[] {0,0}), WAVEONE(new int[]{1, 1}, new int[]{0, 0}, new int[]{0, 0}),
WAVETWO(new int[] {1,1,2}, new int[] {0,0,0}, new int[] {0,0,21}), WAVETWO(new int[]{1, 1, 2}, new int[]{0, 0, 0}, new int[]{0, 0, 21}),
WAVETHREE(new int[] {1,6,2}, new int[] {0,0,0}, new int[] {0,0,0}), WAVETHREE(new int[]{1, 6, 2}, new int[]{0, 0, 0}, new int[]{0, 0, 0}),
WAVEFOUR(new int[] {2,5,2,0}, new int[] {0,0,7,10}, new int[] {0,0,0,0}), WAVEFOUR(new int[]{2, 5, 2, 0}, new int[]{0, 0, 7, 10}, new int[]{0, 0, 0, 0}),
WAVEFIVE(new int[] {2,5,2,3,0}, new int[] {0,0,0,0,7}, new int[] {0,0,21,30,0}), WAVEFIVE(new int[]{2, 5, 2, 3, 0}, new int[]{0, 0, 0, 0, 7}, new int[]{0, 0, 21, 30, 0}),
WAVESIX(new int[] {3,5,2,2,0,0}, new int[] {0,0,0,2,9,10}, new int[] {12,18,21,0,0,0}), WAVESIX(new int[]{3, 5, 2, 2, 0, 0}, new int[]{0, 0, 0, 2, 9, 10}, new int[]{12, 18, 21, 0, 0, 0}),
WAVESEVEN(new int[] {3,7,1,1,0,0,0}, new int[] {2,0,1,1,2,4,10}, new int[] {0,21,0,0,30,45,0}), WAVESEVEN(new int[]{3, 7, 1, 1, 0, 0, 0}, new int[]{2, 0, 1, 1, 2, 4, 10}, new int[]{0, 21, 0, 0, 30, 45, 0}),
WAVEEIGHT(new int[] {1,9,1,1,0,0,0}, new int[] {1,0,1,1,2,2,10}, new int[] {0,0,0,0,33,42,0}), WAVEEIGHT(new int[]{1, 9, 1, 1, 0, 0, 0}, new int[]{1, 0, 1, 1, 2, 2, 10}, new int[]{0, 0, 0, 0, 33, 42, 0}),
WAVENINE(new int[] {2,8,1,1,0,0,0,0}, new int[] {1,0,1,1,2,1,1,10}, new int[] {0,21,0,0,0,0,0,0,0}), WAVENINE(new int[]{2, 8, 1, 1, 0, 0, 0, 0}, new int[]{1, 0, 1, 1, 2, 1, 1, 10}, new int[]{0, 21, 0, 0, 0, 0, 0, 0, 0}),
WAVETEN(new int[] {2,5,1,1,0,0,0}, new int[] {1,0,1,1,4,4,8}, new int[] {21,33,0,33,30,45,0}); WAVETEN(new int[]{2, 5, 1, 1, 0, 0, 0}, new int[]{1, 0, 1, 1, 4, 4, 8}, new int[]{21, 33, 0, 33, 30, 45, 0});
@Getter @Getter

View File

@@ -36,7 +36,6 @@ import net.runelite.api.widgets.Widget;
import net.runelite.api.widgets.WidgetInfo; import net.runelite.api.widgets.WidgetInfo;
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 static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE; import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE;
import net.runelite.client.ui.overlay.OverlayMenuEntry; import net.runelite.client.ui.overlay.OverlayMenuEntry;
import net.runelite.client.ui.overlay.OverlayPosition; import net.runelite.client.ui.overlay.OverlayPosition;

View File

@@ -24,12 +24,11 @@
*/ */
package net.runelite.client.plugins.blastmine; package net.runelite.client.plugins.blastmine;
import java.awt.Color;
import net.runelite.client.config.Config; import net.runelite.client.config.Config;
import net.runelite.client.config.ConfigGroup; import net.runelite.client.config.ConfigGroup;
import net.runelite.client.config.ConfigItem; import net.runelite.client.config.ConfigItem;
import java.awt.Color;
@ConfigGroup("blastmine") @ConfigGroup("blastmine")
public interface BlastMinePluginConfig extends Config public interface BlastMinePluginConfig extends Config
{ {

View File

@@ -356,7 +356,7 @@ public class BoostsPlugin extends Plugin
* section it will "activate" adding an additional 15 second section * section it will "activate" adding an additional 15 second section
* to the boost timing. If again the preserve prayer is active for that * to the boost timing. If again the preserve prayer is active for that
* entire section a second 15 second section will be added. * entire section a second 15 second section will be added.
* * <p>
* Preserve is only required to be on for the 4th and 5th sections of the boost timer * Preserve is only required to be on for the 4th and 5th sections of the boost timer
* to gain full effect (seconds 45-75). * to gain full effect (seconds 45-75).
* *
@@ -365,8 +365,8 @@ public class BoostsPlugin extends Plugin
int getChangeDownTicks() int getChangeDownTicks()
{ {
if (lastChangeDown == -1 || if (lastChangeDown == -1 ||
config.displayNextBuffChange() == BoostsConfig.DisplayChangeMode.NEVER || config.displayNextBuffChange() == BoostsConfig.DisplayChangeMode.NEVER ||
(config.displayNextBuffChange() == BoostsConfig.DisplayChangeMode.BOOSTED && !isChangedUp)) (config.displayNextBuffChange() == BoostsConfig.DisplayChangeMode.BOOSTED && !isChangedUp))
{ {
return -1; return -1;
} }
@@ -393,8 +393,8 @@ public class BoostsPlugin extends Plugin
int getChangeUpTicks() int getChangeUpTicks()
{ {
if (lastChangeUp == -1 || if (lastChangeUp == -1 ||
config.displayNextDebuffChange() == BoostsConfig.DisplayChangeMode.NEVER || config.displayNextDebuffChange() == BoostsConfig.DisplayChangeMode.NEVER ||
(config.displayNextDebuffChange() == BoostsConfig.DisplayChangeMode.BOOSTED && !isChangedDown)) (config.displayNextDebuffChange() == BoostsConfig.DisplayChangeMode.BOOSTED && !isChangedDown))
{ {
return -1; return -1;
} }
@@ -406,12 +406,13 @@ public class BoostsPlugin extends Plugin
/** /**
* Converts tick-based time to accurate second time * Converts tick-based time to accurate second time
*
* @param time tick-based time * @param time tick-based time
* @return second-based time * @return second-based time
*/ */
int getChangeTime(final int time) int getChangeTime(final int time)
{ {
final long diff = System.currentTimeMillis() - lastTickMillis; final long diff = System.currentTimeMillis() - lastTickMillis;
return time != -1 ? (int)((time * Constants.GAME_TICK_LENGTH - diff) / 1000d) : time; return time != -1 ? (int) ((time * Constants.GAME_TICK_LENGTH - diff) / 1000d) : time;
} }
} }

View File

@@ -77,7 +77,7 @@ enum Boss
bosses = builder.build(); bosses = builder.build();
} }
private Boss(int id, long period, ChronoUnit unit, int itemSpriteId) Boss(int id, long period, ChronoUnit unit, int itemSpriteId)
{ {
this.id = id; this.id = id;
this.spawnTime = Duration.of(period, unit); this.spawnTime = Duration.of(period, unit);

View File

@@ -104,6 +104,7 @@ class CannonOverlay extends Overlay
/** /**
* Draw the double hit spots on a 6 by 6 grid around the cannon * Draw the double hit spots on a 6 by 6 grid around the cannon
*
* @param startTile The position of the cannon * @param startTile The position of the cannon
*/ */
private void drawDoubleHitSpots(Graphics2D graphics, LocalPoint startTile, Color color) private void drawDoubleHitSpots(Graphics2D graphics, LocalPoint startTile, Color color)

View File

@@ -60,6 +60,7 @@ public enum CerberusGhost
/** /**
* Try to identify if NPC is ghost * Try to identify if NPC is ghost
*
* @param npc npc * @param npc npc
* @return optional ghost * @return optional ghost
*/ */

View File

@@ -63,13 +63,13 @@ public class CerberusOverlay extends Overlay
// Ghosts are already sorted // Ghosts are already sorted
plugin.getGhosts().stream() plugin.getGhosts().stream()
// Iterate only through the correct amount of ghosts // Iterate only through the correct amount of ghosts
.limit(CerberusGhost.values().length) .limit(CerberusGhost.values().length)
.forEach(npc -> CerberusGhost .forEach(npc -> CerberusGhost
.fromNPC(npc) .fromNPC(npc)
.ifPresent(ghost -> panelComponent .ifPresent(ghost -> panelComponent
.getChildren() .getChildren()
.add(new ImageComponent(iconManager.getSkillImage(ghost.getType()))))); .add(new ImageComponent(iconManager.getSkillImage(ghost.getType())))));
return panelComponent.render(graphics); return panelComponent.render(graphics);

View File

@@ -26,12 +26,12 @@ package net.runelite.client.plugins.chatboxperformance;
import javax.inject.Inject; import javax.inject.Inject;
import net.runelite.api.Client; import net.runelite.api.Client;
import net.runelite.api.widgets.WidgetType;
import net.runelite.api.events.WidgetPositioned; import net.runelite.api.events.WidgetPositioned;
import net.runelite.api.widgets.Widget; import net.runelite.api.widgets.Widget;
import net.runelite.api.widgets.WidgetInfo; import net.runelite.api.widgets.WidgetInfo;
import net.runelite.api.widgets.WidgetPositionMode; import net.runelite.api.widgets.WidgetPositionMode;
import net.runelite.api.widgets.WidgetSizeMode; import net.runelite.api.widgets.WidgetSizeMode;
import net.runelite.api.widgets.WidgetType;
import net.runelite.client.eventbus.Subscribe; import net.runelite.client.eventbus.Subscribe;
import net.runelite.client.plugins.Plugin; import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginDescriptor;

View File

@@ -653,7 +653,7 @@ public class ChatCommandsPlugin extends Plugin
* response. * response.
* *
* @param chatMessage The chat message containing the command. * @param chatMessage The chat message containing the command.
* @param message The chat message * @param message The chat message
*/ */
private void itemPriceLookup(ChatMessage chatMessage, String message) private void itemPriceLookup(ChatMessage chatMessage, String message)
{ {
@@ -689,17 +689,17 @@ public class ChatCommandsPlugin extends Plugin
int itemPrice = item.getPrice(); int itemPrice = item.getPrice();
final ChatMessageBuilder builder = new ChatMessageBuilder(); final ChatMessageBuilder builder = new ChatMessageBuilder();
builder.append(ChatColorType.NORMAL); builder.append(ChatColorType.NORMAL);
builder.append(ChatColorType.HIGHLIGHT); builder.append(ChatColorType.HIGHLIGHT);
builder.append(item.getName()); builder.append(item.getName());
builder.append(ChatColorType.NORMAL); builder.append(ChatColorType.NORMAL);
builder.append(": GE "); builder.append(": GE ");
builder.append(ChatColorType.HIGHLIGHT); builder.append(ChatColorType.HIGHLIGHT);
builder.append(StackFormatter.formatNumber(itemPrice)); builder.append(StackFormatter.formatNumber(itemPrice));
builder.append(ChatColorType.NORMAL); builder.append(ChatColorType.NORMAL);
builder.append(": OSB "); builder.append(": OSB ");
builder.append(ChatColorType.HIGHLIGHT); builder.append(ChatColorType.HIGHLIGHT);
builder.append(StackFormatter.formatNumber(osbresult.getOverall_average())); builder.append(StackFormatter.formatNumber(osbresult.getOverall_average()));
ItemComposition itemComposition = itemManager.getItemComposition(itemId); ItemComposition itemComposition = itemManager.getItemComposition(itemId);
if (itemComposition != null) if (itemComposition != null)
@@ -726,7 +726,7 @@ public class ChatCommandsPlugin extends Plugin
* response. * response.
* *
* @param chatMessage The chat message containing the command. * @param chatMessage The chat message containing the command.
* @param message The chat message * @param message The chat message
*/ */
private void playerSkillLookup(ChatMessage chatMessage, String message) private void playerSkillLookup(ChatMessage chatMessage, String message)
{ {

View File

@@ -187,6 +187,7 @@ public class ChatHistoryPlugin extends Plugin implements KeyListener
/** /**
* Small hack to prevent plugins checking for specific messages to match * Small hack to prevent plugins checking for specific messages to match
*
* @param message message * @param message message
* @return message with nbsp * @return message with nbsp
*/ */

View File

@@ -33,13 +33,11 @@ import java.awt.Color;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.util.ArrayDeque; import java.util.ArrayDeque;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.Deque; import java.util.Deque;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.CopyOnWriteArrayList;
import javax.inject.Inject; import javax.inject.Inject;
import net.runelite.api.ChatLineBuffer; import net.runelite.api.ChatLineBuffer;
@@ -49,9 +47,7 @@ import net.runelite.api.ClanMemberRank;
import net.runelite.api.Client; import net.runelite.api.Client;
import net.runelite.api.GameState; import net.runelite.api.GameState;
import net.runelite.api.MessageNode; import net.runelite.api.MessageNode;
import net.runelite.api.Opcodes;
import net.runelite.api.Player; import net.runelite.api.Player;
import net.runelite.api.Script;
import net.runelite.api.ScriptID; import net.runelite.api.ScriptID;
import net.runelite.api.SpriteID; import net.runelite.api.SpriteID;
import net.runelite.api.VarClientStr; import net.runelite.api.VarClientStr;
@@ -65,10 +61,7 @@ import net.runelite.api.events.GameStateChanged;
import net.runelite.api.events.GameTick; import net.runelite.api.events.GameTick;
import net.runelite.api.events.PlayerDespawned; import net.runelite.api.events.PlayerDespawned;
import net.runelite.api.events.PlayerSpawned; import net.runelite.api.events.PlayerSpawned;
import net.runelite.api.events.ScriptCallbackEvent;
import net.runelite.api.events.VarClientStrChanged; import net.runelite.api.events.VarClientStrChanged;
import net.runelite.api.events.WidgetMenuOptionClicked;
import net.runelite.api.widgets.JavaScriptCallback;
import net.runelite.api.widgets.Widget; import net.runelite.api.widgets.Widget;
import net.runelite.api.widgets.WidgetInfo; import net.runelite.api.widgets.WidgetInfo;
import net.runelite.api.widgets.WidgetType; import net.runelite.api.widgets.WidgetType;
@@ -78,8 +71,6 @@ import net.runelite.client.config.ConfigManager;
import net.runelite.client.eventbus.Subscribe; import net.runelite.client.eventbus.Subscribe;
import net.runelite.client.game.ClanManager; import net.runelite.client.game.ClanManager;
import net.runelite.client.game.SpriteManager; import net.runelite.client.game.SpriteManager;
import net.runelite.client.menus.MenuManager;
import net.runelite.client.menus.WidgetMenuOption;
import net.runelite.client.plugins.Plugin; import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginDescriptor;
import static net.runelite.client.ui.JagexColors.CHAT_CLAN_NAME_OPAQUE_BACKGROUND; import static net.runelite.client.ui.JagexColors.CHAT_CLAN_NAME_OPAQUE_BACKGROUND;
@@ -120,9 +111,6 @@ public class ClanChatPlugin extends Plugin
@Inject @Inject
private ClientThread clientThread; private ClientThread clientThread;
@Inject
private MenuManager menuManager;
private List<String> chats = new ArrayList<>(); private List<String> chats = new ArrayList<>();
public static CopyOnWriteArrayList<Player> getClanMembers() public static CopyOnWriteArrayList<Player> getClanMembers()
@@ -139,8 +127,6 @@ public class ClanChatPlugin extends Plugin
private Map<String, ClanMemberActivity> activityBuffer = new HashMap<>(); private Map<String, ClanMemberActivity> activityBuffer = new HashMap<>();
private int clanJoinedTick; private int clanJoinedTick;
private ConcurrentHashMap<Widget, WidgetMenuOption> ccWidgetMap = new ConcurrentHashMap<Widget, WidgetMenuOption>();
@Provides @Provides
ClanChatConfig getConfig(ConfigManager configManager) ClanChatConfig getConfig(ConfigManager configManager)
{ {
@@ -561,13 +547,14 @@ public class ClanChatPlugin extends Plugin
private void loadClanChats() private void loadClanChats()
{ {
Widget clanChatList = client.getWidget(WidgetInfo.CLAN_CHAT_LIST); Widget clanChatList = client.getWidget(WidgetInfo.CLAN_CHAT_LIST);
clanChatList.setScrollHeight( 14 * chats.size());
clanChatList.revalidateScroll();
if (clanChatList == null) if (clanChatList == null)
{ {
return; return;
} }
clanChatList.setScrollHeight(14 * chats.size());
clanChatList.revalidateScroll();
int y = 2; int y = 2;
clanChatList.setChildren(null); clanChatList.setChildren(null);
for (String chat : Lists.reverse(chats)) for (String chat : Lists.reverse(chats))

View File

@@ -7,7 +7,6 @@ import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import net.runelite.api.Player; import net.runelite.api.Player;
import net.runelite.api.Point; import net.runelite.api.Point;
import net.runelite.client.game.ClanManager;
import net.runelite.client.ui.FontManager; import net.runelite.client.ui.FontManager;
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;
@@ -49,7 +48,8 @@ public class ClanManModeOverlay extends Overlay
if (textLocation != null) if (textLocation != null)
{ {
if (config.getClanAttackableColor().equals(color) && config.ShowBold()) { if (config.getClanAttackableColor().equals(color) && config.ShowBold())
{
graphics.setFont(FontManager.getRunescapeBoldFont()); graphics.setFont(FontManager.getRunescapeBoldFont());
} }
OverlayUtil.renderTextLocation(graphics, textLocation, name, color); OverlayUtil.renderTextLocation(graphics, textLocation, name, color);

View File

@@ -70,14 +70,16 @@ public class ClanManModePlugin extends Plugin
Map<String, Integer> clan = new HashMap<>(); Map<String, Integer> clan = new HashMap<>();
@Override @Override
protected void startUp() throws Exception { protected void startUp() throws Exception
{
overlayManager.add(ClanManModeOverlay); overlayManager.add(ClanManModeOverlay);
overlayManager.add(ClanManModeTileOverlay); overlayManager.add(ClanManModeTileOverlay);
overlayManager.add(ClanManModeMinimapOverlay); overlayManager.add(ClanManModeMinimapOverlay);
} }
@Override @Override
protected void shutDown() throws Exception { protected void shutDown() throws Exception
{
overlayManager.remove(ClanManModeOverlay); overlayManager.remove(ClanManModeOverlay);
overlayManager.remove(ClanManModeTileOverlay); overlayManager.remove(ClanManModeTileOverlay);
overlayManager.remove(ClanManModeMinimapOverlay); overlayManager.remove(ClanManModeMinimapOverlay);
@@ -90,17 +92,21 @@ public class ClanManModePlugin extends Plugin
} }
@Subscribe @Subscribe
public void onGameStateChanged(GameStateChanged gameStateChanged) { public void onGameStateChanged(GameStateChanged gameStateChanged)
if (gameStateChanged.getGameState() == GameState.LOGIN_SCREEN || gameStateChanged.getGameState() == GameState.HOPPING) { {
if (gameStateChanged.getGameState() == GameState.LOGIN_SCREEN || gameStateChanged.getGameState() == GameState.HOPPING)
{
ticks = 0; ticks = 0;
} }
} }
@Subscribe @Subscribe
public void onGameTick(GameTick event) { public void onGameTick(GameTick event)
{
ticks++; ticks++;
final Player localPlayer = client.getLocalPlayer(); final Player localPlayer = client.getLocalPlayer();
if (!clan.containsKey(localPlayer.getName())) { if (!clan.containsKey(localPlayer.getName()))
{
clan.put(localPlayer.getName(), localPlayer.getCombatLevel()); clan.put(localPlayer.getName(), localPlayer.getCombatLevel());
} }
WorldPoint a = localPlayer.getWorldLocation(); WorldPoint a = localPlayer.getWorldLocation();
@@ -108,30 +114,38 @@ public class ClanManModePlugin extends Plugin
int upperLevel = ((a.getY() - 3520) / 8) + 1; int upperLevel = ((a.getY() - 3520) / 8) + 1;
wildernessLevel = a.getY() > 6400 ? underLevel : upperLevel; wildernessLevel = a.getY() > 6400 ? underLevel : upperLevel;
inwildy = client.getVar(Varbits.IN_WILDERNESS); inwildy = client.getVar(Varbits.IN_WILDERNESS);
if (clan.size() > 0) { if (clan.size() > 0)
{
clanmin = Collections.min(clan.values()); clanmin = Collections.min(clan.values());
clanmax = Collections.max(clan.values()); clanmax = Collections.max(clan.values());
} }
} }
@Subscribe @Subscribe
public void onMenuEntryAdded(MenuEntryAdded event) { public void onMenuEntryAdded(MenuEntryAdded event)
if (!config.hideAtkOpt()) { {
if (!config.hideAtkOpt())
{
return; return;
} }
if (client.getGameState() != GameState.LOGGED_IN) { if (client.getGameState() != GameState.LOGGED_IN)
{
return; return;
} }
final String option = Text.removeTags(event.getOption()).toLowerCase(); final String option = Text.removeTags(event.getOption()).toLowerCase();
if (option.equals("attack")) { if (option.equals("attack"))
{
final Pattern ppattern = Pattern.compile("<col=ffffff>(.+?)<col="); final Pattern ppattern = Pattern.compile("<col=ffffff>(.+?)<col=");
final Matcher pmatch = ppattern.matcher(event.getTarget()); final Matcher pmatch = ppattern.matcher(event.getTarget());
if (pmatch.find() && pmatch.matches()) { if (pmatch.find() && pmatch.matches())
if (pmatch.group(1) != null) { {
if (clan.containsKey(pmatch.group(1).replace(" ", " "))) { if (pmatch.group(1) != null)
{
if (clan.containsKey(pmatch.group(1).replace(" ", " ")))
{
MenuEntry[] entries = client.getMenuEntries(); MenuEntry[] entries = client.getMenuEntries();
entries = ArrayUtils.removeElement(entries, entries[entries.length - 1]); entries = ArrayUtils.removeElement(entries, entries[entries.length - 1]);
client.setMenuEntries(entries); client.setMenuEntries(entries);

View File

@@ -39,52 +39,70 @@ public class ClanManModeService
int selfmax = localPlayer.getCombatLevel() + plugin.wildernessLevel; int selfmax = localPlayer.getCombatLevel() + plugin.wildernessLevel;
for (Player player : client.getPlayers()) for (Player player : client.getPlayers())
{ {
if (player == null || player.getName() == null) { if (player == null || player.getName() == null)
{
continue; continue;
} }
if (player == localPlayer) { if (player == localPlayer)
{
continue; continue;
} }
boolean isClanMember = player.isClanMember(); boolean isClanMember = player.isClanMember();
Actor interacting = player.getInteracting(); Actor interacting = player.getInteracting();
Player interactor = null; Player interactor = null;
if (interacting != null && !(interacting instanceof NPC)) { if (interacting != null && !(interacting instanceof NPC))
{
interactor = ((Player) interacting); interactor = ((Player) interacting);
} }
if (config.showAttackers()) { if (config.showAttackers())
if (interactor != null) { {
if (interactor.getName().equals(localName)) { if (interactor != null)
{
if (interactor.getName().equals(localName))
{
consumer.accept(player, config.getAttackerColor()); consumer.accept(player, config.getAttackerColor());
} }
} }
} }
if (plugin.inwildy == 1) { if (plugin.inwildy == 1)
if (isClanMember) { {
if (!plugin.clan.containsKey(player.getName())) { if (isClanMember)
{
if (!plugin.clan.containsKey(player.getName()))
{
plugin.clan.put(player.getName(), player.getCombatLevel()); plugin.clan.put(player.getName(), player.getCombatLevel());
} }
if (config.highlightAttacked()) { if (config.highlightAttacked())
if (interactor != null) { {
if (!interactors.containsKey(interactor.getName())) { if (interactor != null)
{
if (!interactors.containsKey(interactor.getName()))
{
WorldPoint a = interactor.getWorldLocation(); WorldPoint a = interactor.getWorldLocation();
int underLevel = ((a.getY() - 9920) / 8) + 1; int underLevel = ((a.getY() - 9920) / 8) + 1;
int upperLevel = ((a.getY() - 3520) / 8) + 1; int upperLevel = ((a.getY() - 3520) / 8) + 1;
int wildernessLevel = a.getY() > 6400 ? underLevel : upperLevel; int wildernessLevel = a.getY() > 6400 ? underLevel : upperLevel;
int wildydiff = plugin.wildernessLevel - wildernessLevel; int wildydiff = plugin.wildernessLevel - wildernessLevel;
if (wildydiff < 0) { if (wildydiff < 0)
{
wildydiff = 0; wildydiff = 0;
} }
if (config.CalcSelfCB()) { if (config.CalcSelfCB())
if (interacting.getCombatLevel() <= selfmax && interacting.getCombatLevel() - wildydiff >= selfmin && !interactor.isClanMember()) { {
if (interacting.getCombatLevel() <= selfmax && interacting.getCombatLevel() - wildydiff >= selfmin && !interactor.isClanMember())
{
interactors.put(interactor.getName(), player.getName()); interactors.put(interactor.getName(), player.getName());
consumer.accept(interactor, config.getClanAttackableColor()); consumer.accept(interactor, config.getClanAttackableColor());
} }
} else { }
if (interacting.getCombatLevel() <= maxatk && interacting.getCombatLevel() - wildydiff >= minatk && !interactor.isClanMember()) { else
{
if (interacting.getCombatLevel() <= maxatk && interacting.getCombatLevel() - wildydiff >= minatk && !interactor.isClanMember())
{
interactors.put(interactor.getName(), player.getName()); interactors.put(interactor.getName(), player.getName());
consumer.accept(interactor, config.getClanAttackableColor()); consumer.accept(interactor, config.getClanAttackableColor());
} }
@@ -92,43 +110,61 @@ public class ClanManModeService
} }
} }
} }
} else { }
if (config.PersistentClan()) { else
if (plugin.clan.containsKey(player.getName())) { {
if (config.PersistentClan())
{
if (plugin.clan.containsKey(player.getName()))
{
consumer.accept(player, config.getClanMemberColor()); consumer.accept(player, config.getClanMemberColor());
} }
} }
if (config.highlightAttacked()) { if (config.highlightAttacked())
if (interactors.containsKey(player.getName())) { {
if (interactors.containsKey(player.getName()))
{
String attackername = interactors.get(player.getName()); String attackername = interactors.get(player.getName());
boolean found = false; boolean found = false;
for (Player attacker : client.getPlayers()) { for (Player attacker : client.getPlayers())
if (attacker == null || attacker.getName() == null) { {
if (attacker == null || attacker.getName() == null)
{
continue; continue;
} }
if (attacker.getName().equals(attackername)) { if (attacker.getName().equals(attackername))
{
found = true; found = true;
Actor ainteract = attacker.getInteracting(); Actor ainteract = attacker.getInteracting();
if (ainteract != null) { if (ainteract != null)
if (ainteract.getName().equals(player.getName())) { {
if (ainteract.getName().equals(player.getName()))
{
consumer.accept(player, config.getClanAttackableColor()); consumer.accept(player, config.getClanAttackableColor());
} else { }
else
{
interactors.remove(player.getName()); interactors.remove(player.getName());
} }
} else { }
else
{
interactors.remove(player.getName()); interactors.remove(player.getName());
} }
break; break;
} }
} }
if (!found) { if (!found)
{
interactors.remove(player.getName()); interactors.remove(player.getName());
} }
continue; continue;
} }
} }
if (config.highlightAttackable()) { if (config.highlightAttackable())
if ((config.hideAttackable() && plugin.ticks >= config.hideTime()) || plugin.clan.containsKey(player.getName())) { {
if ((config.hideAttackable() && plugin.ticks >= config.hideTime()) || plugin.clan.containsKey(player.getName()))
{
continue; continue;
} }
WorldPoint a = player.getWorldLocation(); WorldPoint a = player.getWorldLocation();
@@ -136,15 +172,21 @@ public class ClanManModeService
int upperLevel = ((a.getY() - 3520) / 8) + 1; int upperLevel = ((a.getY() - 3520) / 8) + 1;
int wildernessLevel = a.getY() > 6400 ? underLevel : upperLevel; int wildernessLevel = a.getY() > 6400 ? underLevel : upperLevel;
int wildydiff = plugin.wildernessLevel - wildernessLevel; int wildydiff = plugin.wildernessLevel - wildernessLevel;
if (wildydiff < 0) { if (wildydiff < 0)
{
wildydiff = 0; wildydiff = 0;
} }
if (config.CalcSelfCB()) { if (config.CalcSelfCB())
if (player.getCombatLevel() <= selfmax && player.getCombatLevel() - wildydiff >= selfmin) { {
if (player.getCombatLevel() <= selfmax && player.getCombatLevel() - wildydiff >= selfmin)
{
consumer.accept(player, config.getAttackableColor()); consumer.accept(player, config.getAttackableColor());
} }
} else { }
if (player.getCombatLevel() <= maxatk && player.getCombatLevel() - wildydiff >= minatk) { else
{
if (player.getCombatLevel() <= maxatk && player.getCombatLevel() - wildydiff >= minatk)
{
consumer.accept(player, config.getAttackableColor()); consumer.accept(player, config.getAttackableColor());
} }
} }

View File

@@ -749,7 +749,7 @@ public class ClueScrollPlugin extends Plugin
textComponent.render(graphics); textComponent.render(graphics);
} }
void scrollToWidget(WidgetInfo list, WidgetInfo scrollbar, Widget ... toHighlight) void scrollToWidget(WidgetInfo list, WidgetInfo scrollbar, Widget... toHighlight)
{ {
final Widget parent = client.getWidget(list); final Widget parent = client.getWidget(list);
int averageCentralY = 0; int averageCentralY = 0;

View File

@@ -267,12 +267,12 @@ public class AnagramClue extends ClueScroll implements TextClueScroll, NpcClueSc
@Override @Override
public String[] getNpcs() public String[] getNpcs()
{ {
return new String[] {npc}; return new String[]{npc};
} }
@Override @Override
public int[] getObjectIds() public int[] getObjectIds()
{ {
return new int[] {objectId}; return new int[]{objectId};
} }
} }

View File

@@ -133,6 +133,6 @@ public class CipherClue extends ClueScroll implements TextClueScroll, NpcClueScr
public String[] getNpcs() public String[] getNpcs()
{ {
return new String[] {npc}; return new String[]{npc};
} }
} }

View File

@@ -32,7 +32,56 @@ 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;
import net.runelite.api.ObjectComposition; import net.runelite.api.ObjectComposition;
import static net.runelite.api.ObjectID.*; import static net.runelite.api.ObjectID.BOOKCASE_12539;
import static net.runelite.api.ObjectID.BOOKCASE_380;
import static net.runelite.api.ObjectID.BOOKCASE_394;
import static net.runelite.api.ObjectID.BOOKCASE_9523;
import static net.runelite.api.ObjectID.BOXES;
import static net.runelite.api.ObjectID.BOXES_360;
import static net.runelite.api.ObjectID.BOXES_361;
import static net.runelite.api.ObjectID.BOXES_3686;
import static net.runelite.api.ObjectID.BOXES_5111;
import static net.runelite.api.ObjectID.BOXES_6176;
import static net.runelite.api.ObjectID.BUCKET_9568;
import static net.runelite.api.ObjectID.BUSH_2357;
import static net.runelite.api.ObjectID.CLOSED_CHEST_25592;
import static net.runelite.api.ObjectID.CLOSED_CHEST_375;
import static net.runelite.api.ObjectID.CLOSED_CHEST_5108;
import static net.runelite.api.ObjectID.COFFIN;
import static net.runelite.api.ObjectID.CRATES_11600;
import static net.runelite.api.ObjectID.CRATES_24088;
import static net.runelite.api.ObjectID.CRATE_11485;
import static net.runelite.api.ObjectID.CRATE_12963;
import static net.runelite.api.ObjectID.CRATE_18204;
import static net.runelite.api.ObjectID.CRATE_18506;
import static net.runelite.api.ObjectID.CRATE_18889;
import static net.runelite.api.ObjectID.CRATE_24344;
import static net.runelite.api.ObjectID.CRATE_25775;
import static net.runelite.api.ObjectID.CRATE_26635;
import static net.runelite.api.ObjectID.CRATE_27532;
import static net.runelite.api.ObjectID.CRATE_27533;
import static net.runelite.api.ObjectID.CRATE_354;
import static net.runelite.api.ObjectID.CRATE_355;
import static net.runelite.api.ObjectID.CRATE_356;
import static net.runelite.api.ObjectID.CRATE_357;
import static net.runelite.api.ObjectID.CRATE_358;
import static net.runelite.api.ObjectID.CRATE_366;
import static net.runelite.api.ObjectID.CRATE_5106;
import static net.runelite.api.ObjectID.CRATE_5107;
import static net.runelite.api.ObjectID.CRATE_5113;
import static net.runelite.api.ObjectID.CRATE_9534;
import static net.runelite.api.ObjectID.DRAWERS;
import static net.runelite.api.ObjectID.DRAWERS_25766;
import static net.runelite.api.ObjectID.DRAWERS_350;
import static net.runelite.api.ObjectID.DRAWERS_352;
import static net.runelite.api.ObjectID.DRAWERS_5618;
import static net.runelite.api.ObjectID.DRAWERS_7194;
import static net.runelite.api.ObjectID.HAYSTACK;
import static net.runelite.api.ObjectID.JUNA;
import static net.runelite.api.ObjectID.MINE_CART_6045;
import static net.runelite.api.ObjectID.STONES_26633;
import static net.runelite.api.ObjectID.WARDROBE_5622;
import static net.runelite.api.ObjectID.WHEELBARROW_9625;
import net.runelite.api.TileObject; import net.runelite.api.TileObject;
import net.runelite.api.coords.LocalPoint; import net.runelite.api.coords.LocalPoint;
import net.runelite.api.coords.WorldPoint; import net.runelite.api.coords.WorldPoint;
@@ -116,7 +165,7 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc
new CrypticClue("Probably filled with wizards socks.", "Wizard", DRAWERS_350, new WorldPoint(3116, 9562, 0), "Search the drawers in the basement of the Wizard's Tower south of Draynor Village. Kill one of the Wizards for the key. Fairy ring DIS"), new CrypticClue("Probably filled with wizards socks.", "Wizard", DRAWERS_350, new WorldPoint(3116, 9562, 0), "Search the drawers in the basement of the Wizard's Tower south of Draynor Village. Kill one of the Wizards for the key. Fairy ring DIS"),
new CrypticClue("Even the seers say this clue goes right over their heads.", CRATE_26635, new WorldPoint(2707, 3488, 2), "Search the crate on the Seers Agility Course in Seers Village"), new CrypticClue("Even the seers say this clue goes right over their heads.", CRATE_26635, new WorldPoint(2707, 3488, 2), "Search the crate on the Seers Agility Course in Seers Village"),
new CrypticClue("Speak to a Wyse man.", "Wyson the gardener", new WorldPoint(3026, 3378, 0), "Talk to Wyson the gardener at Falador Park."), new CrypticClue("Speak to a Wyse man.", "Wyson the gardener", new WorldPoint(3026, 3378, 0), "Talk to Wyson the gardener at Falador Park."),
new CrypticClue("You'll need to look for a town with a central fountain. Look for a locked chest in the town's chapel.", "Monk" , CLOSED_CHEST_5108, new WorldPoint(3256, 3487, 0), "Search the chest by the stairs in the Varrock church. Kill a Monk in Ardougne Monastery to obtain the key."), new CrypticClue("You'll need to look for a town with a central fountain. Look for a locked chest in the town's chapel.", "Monk", CLOSED_CHEST_5108, new WorldPoint(3256, 3487, 0), "Search the chest by the stairs in the Varrock church. Kill a Monk in Ardougne Monastery to obtain the key."),
new CrypticClue("Talk to Ambassador Spanfipple in the White Knights Castle.", "Ambassador Spanfipple", new WorldPoint(2979, 3340, 0), "Ambassador Spanfipple can be found roaming on the first floor of the White Knights Castle."), new CrypticClue("Talk to Ambassador Spanfipple in the White Knights Castle.", "Ambassador Spanfipple", new WorldPoint(2979, 3340, 0), "Ambassador Spanfipple can be found roaming on the first floor of the White Knights Castle."),
new CrypticClue("Mine was the strangest birth under the sun. I left the crimson sack, yet life had not begun. Entered the world, and yet was seen by none.", new WorldPoint(2832, 9586, 0), "Inside Karamja Volcano, dig directly underneath the Red spiders' eggs respawn."), new CrypticClue("Mine was the strangest birth under the sun. I left the crimson sack, yet life had not begun. Entered the world, and yet was seen by none.", new WorldPoint(2832, 9586, 0), "Inside Karamja Volcano, dig directly underneath the Red spiders' eggs respawn."),
new CrypticClue("Search for a crate in Varrock Castle.", CRATE_5113, new WorldPoint(3224, 3492, 0), "Search the crate in the corner of the kitchen in Varrock Castle."), new CrypticClue("Search for a crate in Varrock Castle.", CRATE_5113, new WorldPoint(3224, 3492, 0), "Search the crate in the corner of the kitchen in Varrock Castle."),
@@ -196,13 +245,13 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc
new CrypticClue("Search a bookcase in Lumbridge swamp.", BOOKCASE_9523, new WorldPoint(3146, 3177, 0), "Located in Father Urhney's house."), new CrypticClue("Search a bookcase in Lumbridge swamp.", BOOKCASE_9523, new WorldPoint(3146, 3177, 0), "Located in Father Urhney's house."),
new CrypticClue("Surround my bones in fire, ontop the wooden pyre. Finally lay me to rest, before my one last test.", null, "Kill a confused/lost barbarian to receive mangled bones. Construct and burn a pyre ship. Kill the ferocious barbarian spirit that spawns to receive a clue casket."), new CrypticClue("Surround my bones in fire, ontop the wooden pyre. Finally lay me to rest, before my one last test.", null, "Kill a confused/lost barbarian to receive mangled bones. Construct and burn a pyre ship. Kill the ferocious barbarian spirit that spawns to receive a clue casket."),
new CrypticClue("Fiendish cooks probably won't dig the dirty dishes.", new WorldPoint(3043, 4974, 1), "Dig by the fire in the Rogues' Den."), new CrypticClue("Fiendish cooks probably won't dig the dirty dishes.", new WorldPoint(3043, 4974, 1), "Dig by the fire in the Rogues' Den."),
new CrypticClue("My life was spared but these voices remain, now guarding these iron gates is my bane.", "Key Master", new WorldPoint(1310, 1251, 0), "Speak to the Key Master in Cerberus' Lair."), new CrypticClue("My life was spared but these voices remain, now guarding these iron gates is my bane.", "Key Master", new WorldPoint(1310, 1251, 0), "Speak to the Key Master in Cerberus' Lair."),
new CrypticClue("Search the boxes in one of the tents in Al Kharid.", BOXES_361, new WorldPoint(3308, 3206, 0), "Search the boxes in the tent east of the Silk trader."), new CrypticClue("Search the boxes in one of the tents in Al Kharid.", BOXES_361, new WorldPoint(3308, 3206, 0), "Search the boxes in the tent east of the Silk trader."),
new CrypticClue("One of several rhyming brothers, in business attire with an obsession for paper work.", "Piles", new WorldPoint(3186, 3936, 0), "Speak to Piles in the Wilderness Resource Area. An entry fee of 7,500 coins is required, or less if Wilderness Diaries have been completed."), new CrypticClue("One of several rhyming brothers, in business attire with an obsession for paper work.", "Piles", new WorldPoint(3186, 3936, 0), "Speak to Piles in the Wilderness Resource Area. An entry fee of 7,500 coins is required, or less if Wilderness Diaries have been completed."),
new CrypticClue("Search the drawers on the first floor of a building overlooking Ardougne's Market.", DRAWERS_352, new WorldPoint(2657, 3322, 1), "Climb the ladder in the house north of the market."), new CrypticClue("Search the drawers on the first floor of a building overlooking Ardougne's Market.", DRAWERS_352, new WorldPoint(2657, 3322, 1), "Climb the ladder in the house north of the market."),
new CrypticClue("'A bag belt only?', he asked his balding brothers.", "Abbot Langley", new WorldPoint(3058, 3487, 0), "Talk-to Abbot Langley in Monastery west of Edgeville"), new CrypticClue("'A bag belt only?', he asked his balding brothers.", "Abbot Langley", new WorldPoint(3058, 3487, 0), "Talk-to Abbot Langley in Monastery west of Edgeville"),
new CrypticClue("Search the drawers upstairs in Falador's shield shop.", DRAWERS, new WorldPoint(2971, 3386, 1), "Cassie's Shield Shop at the northern Falador entrance."), new CrypticClue("Search the drawers upstairs in Falador's shield shop.", DRAWERS, new WorldPoint(2971, 3386, 1), "Cassie's Shield Shop at the northern Falador entrance."),
new CrypticClue("Go to this building to be illuminated, and check the drawers while you are there.", "Market Guard", DRAWERS_350 , new WorldPoint(2512, 3641, 1), "Search the drawers in the first floor of the Lighthouse. Kill a Rellekka marketplace guard to obtain the key."), new CrypticClue("Go to this building to be illuminated, and check the drawers while you are there.", "Market Guard", DRAWERS_350, new WorldPoint(2512, 3641, 1), "Search the drawers in the first floor of the Lighthouse. Kill a Rellekka marketplace guard to obtain the key."),
new CrypticClue("Dig near some giant mushrooms, behind the Grand Tree.", new WorldPoint(2458, 3504, 0), "Dig near the red mushrooms northwest of the Grand Tree."), new CrypticClue("Dig near some giant mushrooms, behind the Grand Tree.", new WorldPoint(2458, 3504, 0), "Dig near the red mushrooms northwest of the Grand Tree."),
new CrypticClue("Pentagrams and demons, burnt bones and remains, I wonder what the blood contains.", new WorldPoint(3297, 3890, 0), "Dig under the blood rune spawn next the the Demonic Ruins."), new CrypticClue("Pentagrams and demons, burnt bones and remains, I wonder what the blood contains.", new WorldPoint(3297, 3890, 0), "Dig under the blood rune spawn next the the Demonic Ruins."),
new CrypticClue("Search the drawers above Varrock's shops.", DRAWERS_7194, new WorldPoint(3206, 3419, 1), "Located upstairs in Thessalia's Fine Clothes shop in Varrock."), new CrypticClue("Search the drawers above Varrock's shops.", DRAWERS_7194, new WorldPoint(3206, 3419, 1), "Located upstairs in Thessalia's Fine Clothes shop in Varrock."),
@@ -276,7 +325,7 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc
new CrypticClue("Ghommal wishes to be impressed by how strong your equipment is.", "Ghommal", new WorldPoint(2878, 3546, 0), "Speak to Ghommal at the Warriors' Guild with a total Melee Strength bonus of over 100."), new CrypticClue("Ghommal wishes to be impressed by how strong your equipment is.", "Ghommal", new WorldPoint(2878, 3546, 0), "Speak to Ghommal at the Warriors' Guild with a total Melee Strength bonus of over 100."),
new CrypticClue("Shhhh!", "Logosia", new WorldPoint(1633, 3808, 0), "Speak to Logosia in the Arceuus Library's ground floor."), new CrypticClue("Shhhh!", "Logosia", new WorldPoint(1633, 3808, 0), "Speak to Logosia in the Arceuus Library's ground floor."),
new CrypticClue("Salty peter.", "Konoo", new WorldPoint(1703, 3524, 0), "Talk to Konoo who is digging saltpetre in Hosidius, south of the bank."), new CrypticClue("Salty peter.", "Konoo", new WorldPoint(1703, 3524, 0), "Talk to Konoo who is digging saltpetre in Hosidius, south of the bank."),
new CrypticClue("Talk to Zeke in Al Kharid.", "Zeke", new WorldPoint(3287, 3190, 0), "Zeke is the owner of the scimitar shop in Al Kharid."), new CrypticClue("Talk to Zeke in Al Kharid.", "Zeke", new WorldPoint(3287, 3190, 0), "Zeke is the owner of the scimitar shop in Al Kharid."),
new CrypticClue("Guthix left his mark in a fiery lake, dig at the tip of it.", new WorldPoint(3069, 3935, 0), "Dig at the tip of the lava lake that is shaped like a Guthixian symbol, west of the Mage Arena."), new CrypticClue("Guthix left his mark in a fiery lake, dig at the tip of it.", new WorldPoint(3069, 3935, 0), "Dig at the tip of the lava lake that is shaped like a Guthixian symbol, west of the Mage Arena."),
new CrypticClue("Search the drawers in the upstairs of a house in Catherby.", DRAWERS_350, new WorldPoint(2809, 3451, 1), "Perdu's house in Catherby."), new CrypticClue("Search the drawers in the upstairs of a house in Catherby.", DRAWERS_350, new WorldPoint(2809, 3451, 1), "Perdu's house in Catherby."),
new CrypticClue("Search a crate in the Haymaker's arms.", CRATE_27532, new WorldPoint(1720, 3652, 1), "Search the crate in the north-east corner of The Haymaker's Arms tavern east of Kourend Castle."), new CrypticClue("Search a crate in the Haymaker's arms.", CRATE_27532, new WorldPoint(1720, 3652, 1), "Search the crate in the north-east corner of The Haymaker's Arms tavern east of Kourend Castle."),
@@ -294,9 +343,9 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc
new CrypticClue("Dig in the centre of a great kingdom of 5 cities.", new WorldPoint(1639, 3673, 0), "Dig in front of the large statue in the centre of Great Kourend."), new CrypticClue("Dig in the centre of a great kingdom of 5 cities.", new WorldPoint(1639, 3673, 0), "Dig in front of the large statue in the centre of Great Kourend."),
new CrypticClue("Hopefully this set of armour will help you to keep surviving.", "Sir Vyvin", new WorldPoint(2982, 3336, 2), "Speak to Sir Vyvin while wearing a white platebody, and platelegs."), new CrypticClue("Hopefully this set of armour will help you to keep surviving.", "Sir Vyvin", new WorldPoint(2982, 3336, 2), "Speak to Sir Vyvin while wearing a white platebody, and platelegs."),
new CrypticClue("The beasts retreat, for their Queen is gone; the song of this town still plays on. Dig near the birthplace of a blade, be careful not to melt your spade.", new WorldPoint(2342, 3677, 0), "Dig in front of the small furnace in the Piscatoris Fishing Colony."), new CrypticClue("The beasts retreat, for their Queen is gone; the song of this town still plays on. Dig near the birthplace of a blade, be careful not to melt your spade.", new WorldPoint(2342, 3677, 0), "Dig in front of the small furnace in the Piscatoris Fishing Colony."),
new CrypticClue("Darkness wanders around me, but fills my mind with knowledge.", "Biblia", new WorldPoint(1633, 3825, 2), "Speak to Biblia on the Arceuus Library's top floor."), new CrypticClue("Darkness wanders around me, but fills my mind with knowledge.", "Biblia", new WorldPoint(1633, 3825, 2), "Speak to Biblia on the Arceuus Library's top floor."),
new CrypticClue("I would make a chemistry joke, but I'm afraid I wouldn't get a reaction.", "Chemist", new WorldPoint(2932, 3212, 0), "Talk to the Chemist in Rimmington"), new CrypticClue("I would make a chemistry joke, but I'm afraid I wouldn't get a reaction.", "Chemist", new WorldPoint(2932, 3212, 0), "Talk to the Chemist in Rimmington"),
new CrypticClue("Show this to Hazelmere.", "Hazelmere", new WorldPoint(2677, 3088, 1), "Hazelmere is found upstairs on the island located just east of Yanille."), new CrypticClue("Show this to Hazelmere.", "Hazelmere", new WorldPoint(2677, 3088, 1), "Hazelmere is found upstairs on the island located just east of Yanille."),
new CrypticClue("Does one really need a fire to stay warm here?", new WorldPoint(3816, 3810, 0), "Dig next to the fire near the Volcanic Mine entrance."), new CrypticClue("Does one really need a fire to stay warm here?", new WorldPoint(3816, 3810, 0), "Dig next to the fire near the Volcanic Mine entrance."),
new CrypticClue("Search the open crate found in a small farmhouse in Hosidius. Cabbages grow outside.", CRATE_27533, new WorldPoint(1687, 3628, 0), "The house is north-east of the general store in Hosidius."), new CrypticClue("Search the open crate found in a small farmhouse in Hosidius. Cabbages grow outside.", CRATE_27533, new WorldPoint(1687, 3628, 0), "The house is north-east of the general store in Hosidius."),
new CrypticClue("Dig under Ithoi's cabin.", new WorldPoint(2529, 2838, 0), "Dig under Ithoi's cabin in the Corsair Cove."), new CrypticClue("Dig under Ithoi's cabin.", new WorldPoint(2529, 2838, 0), "Dig under Ithoi's cabin in the Corsair Cove."),
@@ -428,7 +477,7 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc
for (TileObject gameObject : plugin.getObjectsToMark()) for (TileObject gameObject : plugin.getObjectsToMark())
{ {
OverlayUtil.renderHoverableArea(graphics, gameObject.getClickbox(), mousePosition, OverlayUtil.renderHoverableArea(graphics, gameObject.getClickbox(), mousePosition,
CLICKBOX_FILL_COLOR, CLICKBOX_BORDER_COLOR, CLICKBOX_HOVER_BORDER_COLOR); CLICKBOX_FILL_COLOR, CLICKBOX_BORDER_COLOR, CLICKBOX_HOVER_BORDER_COLOR);
OverlayUtil.renderImageLocation(plugin.getClient(), graphics, gameObject.getLocalLocation(), plugin.getClueScrollImage(), IMAGE_Z_OFFSET); OverlayUtil.renderImageLocation(plugin.getClient(), graphics, gameObject.getLocalLocation(), plugin.getClueScrollImage(), IMAGE_Z_OFFSET);
} }
@@ -452,12 +501,12 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc
@Override @Override
public int[] getObjectIds() public int[] getObjectIds()
{ {
return new int[] {objectId}; return new int[]{objectId};
} }
@Override @Override
public String[] getNpcs() public String[] getNpcs()
{ {
return new String[] {npc}; return new String[]{npc};
} }
} }

View File

@@ -31,11 +31,395 @@ import java.util.Set;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import lombok.Getter; import lombok.Getter;
import net.runelite.api.EquipmentInventorySlot; import net.runelite.api.EquipmentInventorySlot;
import static net.runelite.api.EquipmentInventorySlot.*; import static net.runelite.api.EquipmentInventorySlot.AMMO;
import static net.runelite.api.EquipmentInventorySlot.AMULET;
import static net.runelite.api.EquipmentInventorySlot.BODY;
import static net.runelite.api.EquipmentInventorySlot.BOOTS;
import static net.runelite.api.EquipmentInventorySlot.CAPE;
import static net.runelite.api.EquipmentInventorySlot.GLOVES;
import static net.runelite.api.EquipmentInventorySlot.HEAD;
import static net.runelite.api.EquipmentInventorySlot.LEGS; import static net.runelite.api.EquipmentInventorySlot.LEGS;
import static net.runelite.api.EquipmentInventorySlot.RING;
import static net.runelite.api.EquipmentInventorySlot.SHIELD;
import static net.runelite.api.EquipmentInventorySlot.WEAPON;
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.ABYSSAL_WHIP;
import static net.runelite.api.ItemID.ADAMANT_2H_SWORD;
import static net.runelite.api.ItemID.ADAMANT_BOOTS;
import static net.runelite.api.ItemID.ADAMANT_DAGGER;
import static net.runelite.api.ItemID.ADAMANT_FULL_HELM;
import static net.runelite.api.ItemID.ADAMANT_HALBERD;
import static net.runelite.api.ItemID.ADAMANT_MED_HELM;
import static net.runelite.api.ItemID.ADAMANT_PLATEBODY;
import static net.runelite.api.ItemID.ADAMANT_PLATELEGS;
import static net.runelite.api.ItemID.ADAMANT_PLATESKIRT;
import static net.runelite.api.ItemID.ADAMANT_SQ_SHIELD;
import static net.runelite.api.ItemID.ADAMANT_SWORD;
import static net.runelite.api.ItemID.ADAMANT_WARHAMMER;
import static net.runelite.api.ItemID.AHRIMS_HOOD_0;
import static net.runelite.api.ItemID.AHRIMS_HOOD_100;
import static net.runelite.api.ItemID.AHRIMS_ROBESKIRT_0;
import static net.runelite.api.ItemID.AHRIMS_ROBESKIRT_100;
import static net.runelite.api.ItemID.AHRIMS_ROBETOP_0;
import static net.runelite.api.ItemID.AHRIMS_ROBETOP_100;
import static net.runelite.api.ItemID.AHRIMS_STAFF_0;
import static net.runelite.api.ItemID.AHRIMS_STAFF_100;
import static net.runelite.api.ItemID.AIR_TIARA;
import static net.runelite.api.ItemID.AMULET_OF_GLORY;
import static net.runelite.api.ItemID.AMULET_OF_GLORY1;
import static net.runelite.api.ItemID.AMULET_OF_GLORY2;
import static net.runelite.api.ItemID.AMULET_OF_GLORY3;
import static net.runelite.api.ItemID.AMULET_OF_GLORY4;
import static net.runelite.api.ItemID.AMULET_OF_GLORY5;
import static net.runelite.api.ItemID.AMULET_OF_GLORY6;
import static net.runelite.api.ItemID.AMULET_OF_POWER;
import static net.runelite.api.ItemID.AMULET_OF_STRENGTH;
import static net.runelite.api.ItemID.AMULET_OF_THE_DAMNED;
import static net.runelite.api.ItemID.AMULET_OF_THE_DAMNED_FULL;
import static net.runelite.api.ItemID.ANCIENT_CROZIER;
import static net.runelite.api.ItemID.ANCIENT_MITRE;
import static net.runelite.api.ItemID.ANCIENT_STOLE;
import static net.runelite.api.ItemID.ARCLIGHT;
import static net.runelite.api.ItemID.ARMADYL_CROZIER;
import static net.runelite.api.ItemID.ARMADYL_MITRE;
import static net.runelite.api.ItemID.ARMADYL_STOLE;
import static net.runelite.api.ItemID.BANDOS_BOOTS;
import static net.runelite.api.ItemID.BANDOS_CLOAK;
import static net.runelite.api.ItemID.BANDOS_CROZIER;
import static net.runelite.api.ItemID.BANDOS_GODSWORD;
import static net.runelite.api.ItemID.BANDOS_MITRE;
import static net.runelite.api.ItemID.BANDOS_PLATEBODY;
import static net.runelite.api.ItemID.BANDOS_STOLE;
import static net.runelite.api.ItemID.BARROWS_GLOVES;
import static net.runelite.api.ItemID.BLACK_AXE;
import static net.runelite.api.ItemID.BLACK_BOATER;
import static net.runelite.api.ItemID.BLACK_CAPE;
import static net.runelite.api.ItemID.BLACK_DHIDE_BODY;
import static net.runelite.api.ItemID.BLACK_DHIDE_CHAPS;
import static net.runelite.api.ItemID.BLACK_DHIDE_VAMB;
import static net.runelite.api.ItemID.BLACK_DRAGON_MASK;
import static net.runelite.api.ItemID.BLACK_PLATEBODY;
import static net.runelite.api.ItemID.BLACK_SALAMANDER;
import static net.runelite.api.ItemID.BLACK_SLAYER_HELMET;
import static net.runelite.api.ItemID.BLACK_SLAYER_HELMET_I;
import static net.runelite.api.ItemID.BLUE_BOATER;
import static net.runelite.api.ItemID.BLUE_BOOTS;
import static net.runelite.api.ItemID.BLUE_DHIDE_BODY;
import static net.runelite.api.ItemID.BLUE_DHIDE_CHAPS;
import static net.runelite.api.ItemID.BLUE_DHIDE_VAMB;
import static net.runelite.api.ItemID.BLUE_ROBE_TOP;
import static net.runelite.api.ItemID.BLUE_WIZARD_HAT;
import static net.runelite.api.ItemID.BLUE_WIZARD_ROBE;
import static net.runelite.api.ItemID.BOBS_PURPLE_SHIRT;
import static net.runelite.api.ItemID.BOBS_RED_SHIRT;
import static net.runelite.api.ItemID.BODY_TIARA;
import static net.runelite.api.ItemID.BONE_DAGGER;
import static net.runelite.api.ItemID.BONE_SPEAR;
import static net.runelite.api.ItemID.BOOK_OF_BALANCE;
import static net.runelite.api.ItemID.BOOK_OF_DARKNESS;
import static net.runelite.api.ItemID.BOOK_OF_LAW;
import static net.runelite.api.ItemID.BOOK_OF_WAR;
import static net.runelite.api.ItemID.BRINE_SABRE;
import static net.runelite.api.ItemID.BRONZE_2H_SWORD;
import static net.runelite.api.ItemID.BRONZE_AXE;
import static net.runelite.api.ItemID.BRONZE_CHAINBODY;
import static net.runelite.api.ItemID.BRONZE_DAGGER;
import static net.runelite.api.ItemID.BRONZE_FULL_HELM;
import static net.runelite.api.ItemID.BRONZE_PLATELEGS;
import static net.runelite.api.ItemID.BRONZE_SPEAR;
import static net.runelite.api.ItemID.BRONZE_SQ_SHIELD;
import static net.runelite.api.ItemID.BROWN_APRON;
import static net.runelite.api.ItemID.BROWN_HEADBAND;
import static net.runelite.api.ItemID.BRUISE_BLUE_SNELM_3343;
import static net.runelite.api.ItemID.CAPE_OF_LEGENDS;
import static net.runelite.api.ItemID.CASTLE_WARS_BRACELET1;
import static net.runelite.api.ItemID.CASTLE_WARS_BRACELET3;
import static net.runelite.api.ItemID.CHEFS_HAT;
import static net.runelite.api.ItemID.CLIMBING_BOOTS;
import static net.runelite.api.ItemID.COIF;
import static net.runelite.api.ItemID.COMBAT_BRACELET;
import static net.runelite.api.ItemID.COMBAT_BRACELET4;
import static net.runelite.api.ItemID.CREAM_ROBE_TOP;
import static net.runelite.api.ItemID.CRYSTAL_BOW_110_I;
import static net.runelite.api.ItemID.CRYSTAL_BOW_210_I;
import static net.runelite.api.ItemID.CRYSTAL_BOW_310_I;
import static net.runelite.api.ItemID.CRYSTAL_BOW_410_I;
import static net.runelite.api.ItemID.CRYSTAL_BOW_510_I;
import static net.runelite.api.ItemID.CRYSTAL_BOW_610_I;
import static net.runelite.api.ItemID.CRYSTAL_BOW_710_I;
import static net.runelite.api.ItemID.CRYSTAL_BOW_810_I;
import static net.runelite.api.ItemID.CRYSTAL_BOW_910_I;
import static net.runelite.api.ItemID.CRYSTAL_BOW_FULL_I;
import static net.runelite.api.ItemID.DEATH_TIARA;
import static net.runelite.api.ItemID.DESERT_SHIRT;
import static net.runelite.api.ItemID.DHAROKS_GREATAXE_0;
import static net.runelite.api.ItemID.DHAROKS_GREATAXE_100;
import static net.runelite.api.ItemID.DHAROKS_HELM_0;
import static net.runelite.api.ItemID.DHAROKS_HELM_100;
import static net.runelite.api.ItemID.DHAROKS_PLATEBODY_0;
import static net.runelite.api.ItemID.DHAROKS_PLATEBODY_100;
import static net.runelite.api.ItemID.DHAROKS_PLATELEGS_0;
import static net.runelite.api.ItemID.DHAROKS_PLATELEGS_100;
import static net.runelite.api.ItemID.DIAMOND_BRACELET;
import static net.runelite.api.ItemID.DIAMOND_RING;
import static net.runelite.api.ItemID.DRAGONSTONE_AMULET;
import static net.runelite.api.ItemID.DRAGONSTONE_RING;
import static net.runelite.api.ItemID.DRAGON_2H_SWORD;
import static net.runelite.api.ItemID.DRAGON_AXE;
import static net.runelite.api.ItemID.DRAGON_BATTLEAXE;
import static net.runelite.api.ItemID.DRAGON_BOOTS;
import static net.runelite.api.ItemID.DRAGON_CHAINBODY_3140;
import static net.runelite.api.ItemID.DRAGON_DEFENDER;
import static net.runelite.api.ItemID.DRAGON_MED_HELM;
import static net.runelite.api.ItemID.DRAGON_NECKLACE;
import static net.runelite.api.ItemID.DRAGON_PICKAXE;
import static net.runelite.api.ItemID.DRAGON_PICKAXE_12797;
import static net.runelite.api.ItemID.DRAGON_PLATESKIRT;
import static net.runelite.api.ItemID.DRAGON_SPEAR;
import static net.runelite.api.ItemID.DRAGON_SQ_SHIELD;
import static net.runelite.api.ItemID.ELEMENTAL_SHIELD;
import static net.runelite.api.ItemID.EMERALD_AMULET;
import static net.runelite.api.ItemID.EMERALD_RING;
import static net.runelite.api.ItemID.FIRE_BATTLESTAFF;
import static net.runelite.api.ItemID.FIRE_CAPE;
import static net.runelite.api.ItemID.FIRE_MAX_CAPE;
import static net.runelite.api.ItemID.FLARED_TROUSERS;
import static net.runelite.api.ItemID.FROZEN_ABYSSAL_WHIP;
import static net.runelite.api.ItemID.GOLD_NECKLACE;
import static net.runelite.api.ItemID.GOLD_RING;
import static net.runelite.api.ItemID.GRANITE_SHIELD;
import static net.runelite.api.ItemID.GREEN_BOATER;
import static net.runelite.api.ItemID.GREEN_BOOTS;
import static net.runelite.api.ItemID.GREEN_DHIDE_BODY;
import static net.runelite.api.ItemID.GREEN_DHIDE_CHAPS;
import static net.runelite.api.ItemID.GREEN_HAT;
import static net.runelite.api.ItemID.GREEN_HEADBAND;
import static net.runelite.api.ItemID.GREEN_ROBE_BOTTOMS;
import static net.runelite.api.ItemID.GREEN_ROBE_TOP;
import static net.runelite.api.ItemID.GREEN_SLAYER_HELMET;
import static net.runelite.api.ItemID.GREEN_SLAYER_HELMET_I;
import static net.runelite.api.ItemID.GUTHANS_CHAINSKIRT_0;
import static net.runelite.api.ItemID.GUTHANS_CHAINSKIRT_100;
import static net.runelite.api.ItemID.GUTHANS_HELM_0;
import static net.runelite.api.ItemID.GUTHANS_HELM_100;
import static net.runelite.api.ItemID.GUTHANS_PLATEBODY_0;
import static net.runelite.api.ItemID.GUTHANS_PLATEBODY_100;
import static net.runelite.api.ItemID.GUTHANS_WARSPEAR_0;
import static net.runelite.api.ItemID.GUTHANS_WARSPEAR_100;
import static net.runelite.api.ItemID.GUTHIX_MITRE;
import static net.runelite.api.ItemID.GUTHIX_STOLE;
import static net.runelite.api.ItemID.HAM_BOOTS;
import static net.runelite.api.ItemID.HAM_ROBE;
import static net.runelite.api.ItemID.HARDLEATHER_BODY;
import static net.runelite.api.ItemID.HELM_OF_NEITIZNOT;
import static net.runelite.api.ItemID.HOLY_BOOK;
import static net.runelite.api.ItemID.HYDRA_SLAYER_HELMET;
import static net.runelite.api.ItemID.HYDRA_SLAYER_HELMET_I;
import static net.runelite.api.ItemID.IBANS_STAFF;
import static net.runelite.api.ItemID.IBANS_STAFF_U;
import static net.runelite.api.ItemID.INFERNAL_PICKAXE;
import static net.runelite.api.ItemID.INFERNAL_PICKAXE_UNCHARGED;
import static net.runelite.api.ItemID.IRON_2H_SWORD;
import static net.runelite.api.ItemID.IRON_CHAINBODY;
import static net.runelite.api.ItemID.IRON_FULL_HELM;
import static net.runelite.api.ItemID.IRON_KITESHIELD;
import static net.runelite.api.ItemID.IRON_MED_HELM;
import static net.runelite.api.ItemID.IRON_PICKAXE;
import static net.runelite.api.ItemID.IRON_PLATEBODY;
import static net.runelite.api.ItemID.IRON_PLATELEGS;
import static net.runelite.api.ItemID.IRON_PLATESKIRT;
import static net.runelite.api.ItemID.IRON_SCIMITAR;
import static net.runelite.api.ItemID.IRON_WARHAMMER;
import static net.runelite.api.ItemID.KARILS_COIF_0;
import static net.runelite.api.ItemID.KARILS_COIF_100;
import static net.runelite.api.ItemID.KARILS_CROSSBOW_0;
import static net.runelite.api.ItemID.KARILS_CROSSBOW_100;
import static net.runelite.api.ItemID.KARILS_LEATHERSKIRT_0;
import static net.runelite.api.ItemID.KARILS_LEATHERSKIRT_100;
import static net.runelite.api.ItemID.KARILS_LEATHERTOP_0;
import static net.runelite.api.ItemID.KARILS_LEATHERTOP_100;
import static net.runelite.api.ItemID.LAVA_BATTLESTAFF;
import static net.runelite.api.ItemID.LEATHER_BOOTS;
import static net.runelite.api.ItemID.LEATHER_CHAPS;
import static net.runelite.api.ItemID.LEATHER_COWL;
import static net.runelite.api.ItemID.LEATHER_GLOVES;
import static net.runelite.api.ItemID.LOCKPICK;
import static net.runelite.api.ItemID.LONGBOW;
import static net.runelite.api.ItemID.MAGIC_LONGBOW;
import static net.runelite.api.ItemID.MAPLE_LONGBOW;
import static net.runelite.api.ItemID.MAPLE_SHORTBOW;
import static net.runelite.api.ItemID.MENAPHITE_PURPLE_HAT;
import static net.runelite.api.ItemID.MENAPHITE_PURPLE_KILT;
import static net.runelite.api.ItemID.MENAPHITE_PURPLE_ROBE;
import static net.runelite.api.ItemID.MENAPHITE_PURPLE_TOP;
import static net.runelite.api.ItemID.MENAPHITE_RED_HAT;
import static net.runelite.api.ItemID.MENAPHITE_RED_KILT;
import static net.runelite.api.ItemID.MENAPHITE_RED_ROBE;
import static net.runelite.api.ItemID.MENAPHITE_RED_TOP;
import static net.runelite.api.ItemID.MIND_SHIELD;
import static net.runelite.api.ItemID.MITHRIL_BOOTS;
import static net.runelite.api.ItemID.MITHRIL_CHAINBODY;
import static net.runelite.api.ItemID.MITHRIL_FULL_HELM;
import static net.runelite.api.ItemID.MITHRIL_MED_HELM;
import static net.runelite.api.ItemID.MITHRIL_PICKAXE;
import static net.runelite.api.ItemID.MITHRIL_PLATEBODY;
import static net.runelite.api.ItemID.MITHRIL_PLATELEGS;
import static net.runelite.api.ItemID.MITHRIL_PLATESKIRT;
import static net.runelite.api.ItemID.MITHRIL_SCIMITAR;
import static net.runelite.api.ItemID.MYSTIC_FIRE_STAFF;
import static net.runelite.api.ItemID.MYSTIC_GLOVES;
import static net.runelite.api.ItemID.MYSTIC_HAT;
import static net.runelite.api.ItemID.MYSTIC_ROBE_BOTTOM;
import static net.runelite.api.ItemID.MYSTIC_ROBE_BOTTOM_DARK;
import static net.runelite.api.ItemID.MYSTIC_ROBE_TOP;
import static net.runelite.api.ItemID.MYSTIC_ROBE_TOP_DARK;
import static net.runelite.api.ItemID.NEW_CRYSTAL_BOW_I;
import static net.runelite.api.ItemID.OAK_LONGBOW;
import static net.runelite.api.ItemID.OAK_SHORTBOW;
import static net.runelite.api.ItemID.OBSIDIAN_CAPE;
import static net.runelite.api.ItemID.ORANGE_BOATER;
import static net.runelite.api.ItemID.PHARAOHS_SCEPTRE;
import static net.runelite.api.ItemID.PHARAOHS_SCEPTRE_1;
import static net.runelite.api.ItemID.PHARAOHS_SCEPTRE_2;
import static net.runelite.api.ItemID.PHARAOHS_SCEPTRE_3;
import static net.runelite.api.ItemID.PHARAOHS_SCEPTRE_4;
import static net.runelite.api.ItemID.PHARAOHS_SCEPTRE_5;
import static net.runelite.api.ItemID.PHARAOHS_SCEPTRE_6;
import static net.runelite.api.ItemID.PHARAOHS_SCEPTRE_7;
import static net.runelite.api.ItemID.PHARAOHS_SCEPTRE_8;
import static net.runelite.api.ItemID.PINK_BOATER;
import static net.runelite.api.ItemID.PINK_ROBE_TOP;
import static net.runelite.api.ItemID.PINK_SKIRT;
import static net.runelite.api.ItemID.PIRATE_BANDANA;
import static net.runelite.api.ItemID.PIRATE_BANDANA_7124;
import static net.runelite.api.ItemID.PIRATE_BANDANA_7130;
import static net.runelite.api.ItemID.PIRATE_BANDANA_7136;
import static net.runelite.api.ItemID.PROSELYTE_HAUBERK;
import static net.runelite.api.ItemID.PURPLE_BOATER;
import static net.runelite.api.ItemID.PURPLE_GLOVES;
import static net.runelite.api.ItemID.PURPLE_SLAYER_HELMET;
import static net.runelite.api.ItemID.PURPLE_SLAYER_HELMET_I;
import static net.runelite.api.ItemID.RED_BOATER;
import static net.runelite.api.ItemID.RED_CAPE;
import static net.runelite.api.ItemID.RED_DHIDE_CHAPS;
import static net.runelite.api.ItemID.RED_HEADBAND;
import static net.runelite.api.ItemID.RED_SLAYER_HELMET;
import static net.runelite.api.ItemID.RED_SLAYER_HELMET_I;
import static net.runelite.api.ItemID.RING_OF_DUELING1;
import static net.runelite.api.ItemID.RING_OF_DUELING2;
import static net.runelite.api.ItemID.RING_OF_DUELING3;
import static net.runelite.api.ItemID.RING_OF_DUELING4;
import static net.runelite.api.ItemID.RING_OF_DUELING5;
import static net.runelite.api.ItemID.RING_OF_DUELING6;
import static net.runelite.api.ItemID.RING_OF_DUELING7;
import static net.runelite.api.ItemID.RING_OF_DUELING8;
import static net.runelite.api.ItemID.RING_OF_FORGING;
import static net.runelite.api.ItemID.RING_OF_LIFE;
import static net.runelite.api.ItemID.RING_OF_VISIBILITY;
import static net.runelite.api.ItemID.RING_OF_WEALTH;
import static net.runelite.api.ItemID.RING_OF_WEALTH_1;
import static net.runelite.api.ItemID.RING_OF_WEALTH_2;
import static net.runelite.api.ItemID.RING_OF_WEALTH_3;
import static net.runelite.api.ItemID.RING_OF_WEALTH_4;
import static net.runelite.api.ItemID.RING_OF_WEALTH_5;
import static net.runelite.api.ItemID.RING_OF_WEALTH_I;
import static net.runelite.api.ItemID.RING_OF_WEALTH_I1;
import static net.runelite.api.ItemID.RING_OF_WEALTH_I2;
import static net.runelite.api.ItemID.RING_OF_WEALTH_I3;
import static net.runelite.api.ItemID.RING_OF_WEALTH_I4;
import static net.runelite.api.ItemID.RING_OF_WEALTH_I5;
import static net.runelite.api.ItemID.ROLLING_PIN;
import static net.runelite.api.ItemID.RUBY_AMULET;
import static net.runelite.api.ItemID.RUBY_RING;
import static net.runelite.api.ItemID.RUNE_AXE;
import static net.runelite.api.ItemID.RUNE_BOOTS;
import static net.runelite.api.ItemID.RUNE_CROSSBOW;
import static net.runelite.api.ItemID.RUNE_FULL_HELM;
import static net.runelite.api.ItemID.RUNE_HALBERD;
import static net.runelite.api.ItemID.RUNE_HELM_H1;
import static net.runelite.api.ItemID.RUNE_HELM_H5;
import static net.runelite.api.ItemID.RUNE_KITESHIELD;
import static net.runelite.api.ItemID.RUNE_LONGSWORD;
import static net.runelite.api.ItemID.RUNE_PICKAXE;
import static net.runelite.api.ItemID.RUNE_PLATEBODY;
import static net.runelite.api.ItemID.RUNE_PLATELEGS;
import static net.runelite.api.ItemID.RUNE_PLATESKIRT;
import static net.runelite.api.ItemID.RUNE_SHIELD_H1;
import static net.runelite.api.ItemID.RUNE_SHIELD_H2;
import static net.runelite.api.ItemID.RUNE_SHIELD_H3;
import static net.runelite.api.ItemID.RUNE_SHIELD_H4;
import static net.runelite.api.ItemID.RUNE_SHIELD_H5;
import static net.runelite.api.ItemID.RUNE_SPEAR;
import static net.runelite.api.ItemID.RUNE_WARHAMMER;
import static net.runelite.api.ItemID.SAPPHIRE_AMULET;
import static net.runelite.api.ItemID.SAPPHIRE_NECKLACE;
import static net.runelite.api.ItemID.SAPPHIRE_RING;
import static net.runelite.api.ItemID.SARADOMIN_CROZIER;
import static net.runelite.api.ItemID.SARADOMIN_MITRE;
import static net.runelite.api.ItemID.SARADOMIN_STOLE;
import static net.runelite.api.ItemID.SEERCULL;
import static net.runelite.api.ItemID.SHADOW_SWORD;
import static net.runelite.api.ItemID.SILVER_SICKLE;
import static net.runelite.api.ItemID.SLAYER_HELMET;
import static net.runelite.api.ItemID.SLAYER_HELMET_I;
import static net.runelite.api.ItemID.SLED_4084;
import static net.runelite.api.ItemID.SNAKESKIN_BOOTS;
import static net.runelite.api.ItemID.SNAKESKIN_CHAPS;
import static net.runelite.api.ItemID.SPINED_CHAPS;
import static net.runelite.api.ItemID.SPLITBARK_BODY;
import static net.runelite.api.ItemID.SPLITBARK_LEGS;
import static net.runelite.api.ItemID.SPOTTED_CAPE;
import static net.runelite.api.ItemID.SPOTTED_CAPE_10073;
import static net.runelite.api.ItemID.STAFF;
import static net.runelite.api.ItemID.STAFF_OF_AIR;
import static net.runelite.api.ItemID.STAFF_OF_WATER;
import static net.runelite.api.ItemID.STEEL_AXE;
import static net.runelite.api.ItemID.STEEL_FULL_HELM;
import static net.runelite.api.ItemID.STEEL_KITESHIELD;
import static net.runelite.api.ItemID.STEEL_LONGSWORD;
import static net.runelite.api.ItemID.STEEL_MACE;
import static net.runelite.api.ItemID.STEEL_MED_HELM;
import static net.runelite.api.ItemID.STEEL_PICKAXE;
import static net.runelite.api.ItemID.STEEL_PLATEBODY;
import static net.runelite.api.ItemID.STEEL_PLATESKIRT;
import static net.runelite.api.ItemID.STEEL_SQ_SHIELD;
import static net.runelite.api.ItemID.STUDDED_BODY;
import static net.runelite.api.ItemID.STUDDED_CHAPS;
import static net.runelite.api.ItemID.TEAM1_CAPE;
import static net.runelite.api.ItemID.TEAM50_CAPE;
import static net.runelite.api.ItemID.TIARA;
import static net.runelite.api.ItemID.TOKTZKETXIL;
import static net.runelite.api.ItemID.TOKTZXILUL;
import static net.runelite.api.ItemID.TORAGS_HAMMERS_0;
import static net.runelite.api.ItemID.TORAGS_HAMMERS_100;
import static net.runelite.api.ItemID.TORAGS_HELM_0;
import static net.runelite.api.ItemID.TORAGS_HELM_100;
import static net.runelite.api.ItemID.TORAGS_PLATEBODY_0;
import static net.runelite.api.ItemID.TORAGS_PLATEBODY_100;
import static net.runelite.api.ItemID.TORAGS_PLATELEGS_0;
import static net.runelite.api.ItemID.TORAGS_PLATELEGS_100;
import static net.runelite.api.ItemID.TURQUOISE_ROBE_BOTTOMS;
import static net.runelite.api.ItemID.TURQUOISE_SLAYER_HELMET;
import static net.runelite.api.ItemID.TURQUOISE_SLAYER_HELMET_I;
import static net.runelite.api.ItemID.UNHOLY_BOOK;
import static net.runelite.api.ItemID.VERACS_BRASSARD_0;
import static net.runelite.api.ItemID.VERACS_BRASSARD_100;
import static net.runelite.api.ItemID.VERACS_FLAIL_0;
import static net.runelite.api.ItemID.VERACS_FLAIL_100;
import static net.runelite.api.ItemID.VERACS_HELM_0;
import static net.runelite.api.ItemID.VERACS_HELM_100;
import static net.runelite.api.ItemID.VERACS_PLATESKIRT_0;
import static net.runelite.api.ItemID.VERACS_PLATESKIRT_100;
import static net.runelite.api.ItemID.VOLCANIC_ABYSSAL_WHIP;
import static net.runelite.api.ItemID.WHITE_APRON;
import static net.runelite.api.ItemID.WHITE_BOATER;
import static net.runelite.api.ItemID.WHITE_HEADBAND;
import static net.runelite.api.ItemID.ZAMORAK_CROZIER;
import static net.runelite.api.ItemID.ZAMORAK_FULL_HELM;
import static net.runelite.api.ItemID.ZAMORAK_GODSWORD;
import static net.runelite.api.ItemID.ZAMORAK_MITRE;
import static net.runelite.api.ItemID.ZAMORAK_STOLE;
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 static net.runelite.client.plugins.cluescrolls.ClueScrollOverlay.TITLED_CONTENT_COLOR; import static net.runelite.client.plugins.cluescrolls.ClueScrollOverlay.TITLED_CONTENT_COLOR;
@@ -43,12 +427,143 @@ import net.runelite.client.plugins.cluescrolls.ClueScrollPlugin;
import net.runelite.client.plugins.cluescrolls.clues.emote.AllRequirementsCollection; import net.runelite.client.plugins.cluescrolls.clues.emote.AllRequirementsCollection;
import net.runelite.client.plugins.cluescrolls.clues.emote.AnyRequirementCollection; import net.runelite.client.plugins.cluescrolls.clues.emote.AnyRequirementCollection;
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.ANGRY;
import static net.runelite.client.plugins.cluescrolls.clues.emote.Emote.BECKON;
import static net.runelite.client.plugins.cluescrolls.clues.emote.Emote.BLOW_KISS;
import static net.runelite.client.plugins.cluescrolls.clues.emote.Emote.BOW;
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.CHEER;
import static net.runelite.client.plugins.cluescrolls.clues.emote.Emote.CLAP;
import static net.runelite.client.plugins.cluescrolls.clues.emote.Emote.CRY;
import static net.runelite.client.plugins.cluescrolls.clues.emote.Emote.DANCE;
import static net.runelite.client.plugins.cluescrolls.clues.emote.Emote.FLAP;
import static net.runelite.client.plugins.cluescrolls.clues.emote.Emote.GOBLIN_SALUTE;
import static net.runelite.client.plugins.cluescrolls.clues.emote.Emote.HEADBANG;
import static net.runelite.client.plugins.cluescrolls.clues.emote.Emote.JIG;
import static net.runelite.client.plugins.cluescrolls.clues.emote.Emote.JUMP_FOR_JOY;
import static net.runelite.client.plugins.cluescrolls.clues.emote.Emote.LAUGH;
import static net.runelite.client.plugins.cluescrolls.clues.emote.Emote.NO;
import static net.runelite.client.plugins.cluescrolls.clues.emote.Emote.PANIC;
import static net.runelite.client.plugins.cluescrolls.clues.emote.Emote.PUSH_UP;
import static net.runelite.client.plugins.cluescrolls.clues.emote.Emote.RASPBERRY;
import static net.runelite.client.plugins.cluescrolls.clues.emote.Emote.SALUTE;
import static net.runelite.client.plugins.cluescrolls.clues.emote.Emote.SHRUG;
import static net.runelite.client.plugins.cluescrolls.clues.emote.Emote.SLAP_HEAD;
import static net.runelite.client.plugins.cluescrolls.clues.emote.Emote.SPIN;
import static net.runelite.client.plugins.cluescrolls.clues.emote.Emote.STOMP;
import static net.runelite.client.plugins.cluescrolls.clues.emote.Emote.THINK;
import static net.runelite.client.plugins.cluescrolls.clues.emote.Emote.WAVE;
import static net.runelite.client.plugins.cluescrolls.clues.emote.Emote.YAWN;
import static net.runelite.client.plugins.cluescrolls.clues.emote.Emote.YES;
import net.runelite.client.plugins.cluescrolls.clues.emote.ItemRequirement; import net.runelite.client.plugins.cluescrolls.clues.emote.ItemRequirement;
import net.runelite.client.plugins.cluescrolls.clues.emote.RangeItemRequirement; import net.runelite.client.plugins.cluescrolls.clues.emote.RangeItemRequirement;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.*; import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.AGILITY_PYRAMID;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.AL_KHARID_SCORPION_MINE;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.AUBURYS_SHOP_IN_VARROCK;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.BARBARIAN_OUTPOST_OBSTACLE_COURSE;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.BARROWS_CHEST;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.BEHIND_MISS_SCHISM_IN_DRAYNOR_VILLAGE;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.BOB_AXES_ENTRANCE;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.BY_THE_BEAR_CAGE_IN_VARROCK_PALACE_GARDENS;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.CASTLE_WARS_BANK;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.CATHERBY_BEEHIVE_FIELD;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.CENTRE_OF_CANIFIS;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.CENTRE_OF_THE_CATACOMBS_OF_KOUREND;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.CHAOS_TEMPLE_IN_THE_SOUTHEASTERN_WILDERNESS;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.CHAPEL_IN_WEST_ARDOUGNE;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.CROSSROADS_NORTH_OF_DRAYNOR_VILLAGE;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.DEATH_ALTAR;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.DIGSITE;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.DRAYNOR_MANOR_BY_THE_FOUNTAIN;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.DRAYNOR_VILLAGE_MARKET;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.EAST_OF_THE_BARBARIAN_VILLAGE_BRIDGE;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.ENTRANA_CHAPEL;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.ENTRANCE_OF_THE_ARCEUUS_LIBRARY;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.ENTRANCE_OF_THE_CAVERN_UNDER_THE_WHIRLPOOL;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.ENTRANCE_OF_THE_CAVE_OF_DAMIS;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.FINE_CLOTHES_ENTRANCE;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.FISHING_GUILD_BANK;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.FOUNTAIN_OF_HEROES;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.GNOME_GLIDER_ON_WHITE_WOLF_MOUNTAIN;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.GNOME_STRONGHOLD_BALANCING_ROPE;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.GYPSY_TENT_ENTRANCE;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.HALFWAY_DOWN_TROLLWEISS_MOUNTAIN;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.HICKTONS_ARCHERY_EMPORIUM;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.HOSIDIUS_MESS;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.INSIDE_THE_DIGSITE_EXAM_CENTRE;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.IN_THE_MIDDLE_OF_JIGGIG;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.KING_BLACK_DRAGONS_LAIR;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.LIMESTONE_MINE;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.LUMBRIDGE_SWAMP_CAVES;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.MAUSOLEUM_OFF_THE_MORYTANIA_COAST;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.MOUNTAIN_CAMP_GOAT_ENCLOSURE;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.MUBARIZS_ROOM_AT_THE_DUEL_ARENA;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.MUDSKIPPER_POINT;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.NEAR_A_LADDER_IN_THE_WILDERNESS_LAVA_MAZE;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.NEAR_A_RUNITE_ROCK_IN_THE_FREMENNIK_ISLES;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.NEAR_A_SHED_IN_LUMBRIDGE_SWAMP;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.NEAR_HERQUINS_SHOP_IN_FALADOR;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.NEAR_THE_ENTRANA_FERRY_IN_PORT_SARIM;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.NEAR_THE_GEM_STALL_IN_ARDOUGNE_MARKET;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.NEAR_THE_PARROTS_IN_ARDOUGNE_ZOO;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.NEAR_THE_PIER_IN_ZULANDRA;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.NEAR_THE_SAWMILL_OPERATORS_BOOTH;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.NORTHEAST_CORNER_OF_THE_KHARAZI_JUNGLE;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.NORTHERN_WALL_OF_CASTLE_DRAKAN;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.NORTHWESTERN_CORNER_OF_THE_ENCHANTED_VALLEY;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.NORTH_OF_EVIL_DAVES_HOUSE_IN_EDGEVILLE;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.NORTH_OF_MOUNT_KARUULM;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.NOTERAZZOS_SHOP_IN_THE_WILDERNESS;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.OBSERVATORY;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.OGRE_CAGE_IN_KING_LATHAS_TRAINING_CAMP;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.ON_THE_BRIDGE_TO_THE_MISTHALIN_WIZARDS_TOWER;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.ON_TOP_OF_TROLLHEIM_MOUNTAIN;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.OUTSIDE_CATHERBY_BANK;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.OUTSIDE_DRAYNOR_VILLAGE_JAIL;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.OUTSIDE_HARRYS_FISHING_SHOP_IN_CATHERBY;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.OUTSIDE_KEEP_LE_FAYE;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.OUTSIDE_KRIL_TSUTSAROTHS_ROOM;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.OUTSIDE_MUDKNUCKLES_HUT;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.OUTSIDE_THE_BAR_BY_THE_FIGHT_ARENA;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.OUTSIDE_THE_DIGSITE_EXAM_CENTRE;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.OUTSIDE_THE_FALADOR_PARTY_ROOM;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.OUTSIDE_THE_FISHING_GUILD;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.OUTSIDE_THE_GREAT_PYRAMID_OF_SOPHANEM;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.OUTSIDE_THE_LEGENDS_GUILD_DOOR;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.OUTSIDE_THE_LEGENDS_GUILD_GATES;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.OUTSIDE_THE_SEERS_VILLAGE_COURTHOUSE;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.OUTSIDE_THE_SLAYER_TOWER_GARGOYLE_ROOM;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.OUTSIDE_THE_WILDERNESS_AXE_HUT;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.OUTSIDE_VARROCK_PALACE_COURTYARD;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.OUTSIDE_YANILLE_BANK;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.RIMMINGTON_MINE;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.ROAD_JUNCTION_NORTH_OF_RIMMINGTON;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.ROAD_JUNCTION_SOUTH_OF_SINCLAIR_MANSION;
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.SHAYZIEN_WAR_TENT;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.SHILO_VILLAGE_BANK;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.SOUL_ALTAR;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.SOUTHEAST_CORNER_OF_LAVA_DRAGON_ISLE;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.SOUTHEAST_CORNER_OF_THE_FISHING_PLATFORM;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.SOUTHEAST_CORNER_OF_THE_MONASTERY;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.SOUTH_OF_THE_GRAND_EXCHANGE;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.SOUTH_OF_THE_SHRINE_IN_TAI_BWO_WANNAI_VILLAGE;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.TAVERLEY_STONE_CIRCLE;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.TENT_IN_LORD_IORWERTHS_ENCAMPMENT;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.TOP_FLOOR_OF_THE_LIGHTHOUSE;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.TOP_FLOOR_OF_THE_YANILLE_WATCHTOWER;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.TZHAAR_GEM_STORE;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.TZHAAR_WEAPONS_STORE;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.UPSTAIRS_IN_THE_ARDOUGNE_WINDMILL;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.VARROCK_PALACE_LIBRARY;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.VOLCANO_IN_THE_NORTHEASTERN_WILDERNESS;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.WARRIORS_GUILD_BANK;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.WARRIORS_GUILD_BANK_29047;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.WELL_OF_VOYAGE;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.WEST_OF_THE_SHAYZIEN_COMBAT_RING;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.WEST_SIDE_OF_THE_KARAMJA_BANANA_PLANTATION;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.WHEAT_FIELD_NEAR_THE_LUMBRIDGE_WINDMILL;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit._7TH_CHAMBER_OF_JALSAVRAH;
import net.runelite.client.plugins.cluescrolls.clues.emote.SingleItemRequirement; import net.runelite.client.plugins.cluescrolls.clues.emote.SingleItemRequirement;
import net.runelite.client.plugins.cluescrolls.clues.emote.SlotLimitationRequirement; import net.runelite.client.plugins.cluescrolls.clues.emote.SlotLimitationRequirement;
import net.runelite.client.ui.overlay.OverlayUtil; import net.runelite.client.ui.overlay.OverlayUtil;

View File

@@ -184,7 +184,7 @@ public class FaloTheBardClue extends ClueScroll implements TextClueScroll, NpcCl
@Override @Override
public String[] getNpcs() public String[] getNpcs()
{ {
return new String[] {FALO_THE_BARD}; return new String[]{FALO_THE_BARD};
} }
public static FaloTheBardClue forText(String text) public static FaloTheBardClue forText(String text)

View File

@@ -380,7 +380,7 @@ public class HotColdClue extends ClueScroll implements LocationClueScroll, Locat
return false; return false;
} }
WorldPoint p3 = new WorldPoint((int) r.getMinX(), (int)r.getMaxY(), 0); WorldPoint p3 = new WorldPoint((int) r.getMinX(), (int) r.getMaxY(), 0);
if (!isFirstPointCloser(firstWp, secondWp, p3)) if (!isFirstPointCloser(firstWp, secondWp, p3))
{ {
@@ -406,6 +406,6 @@ public class HotColdClue extends ClueScroll implements LocationClueScroll, Locat
public String[] getNpcs() public String[] getNpcs()
{ {
return new String[] {npc}; return new String[]{npc};
} }
} }

View File

@@ -29,7 +29,38 @@ import java.awt.Color;
import java.awt.Graphics2D; import java.awt.Graphics2D;
import java.util.Set; import java.util.Set;
import lombok.Getter; import lombok.Getter;
import static net.runelite.api.ItemID.*; import static net.runelite.api.ItemID.CLUE_SCROLL_EASY_12179;
import static net.runelite.api.ItemID.CLUE_SCROLL_EASY_2713;
import static net.runelite.api.ItemID.CLUE_SCROLL_EASY_2716;
import static net.runelite.api.ItemID.CLUE_SCROLL_EASY_2719;
import static net.runelite.api.ItemID.CLUE_SCROLL_EASY_3516;
import static net.runelite.api.ItemID.CLUE_SCROLL_EASY_3518;
import static net.runelite.api.ItemID.CLUE_SCROLL_EASY_7236;
import static net.runelite.api.ItemID.CLUE_SCROLL_ELITE_12130;
import static net.runelite.api.ItemID.CLUE_SCROLL_ELITE_19782;
import static net.runelite.api.ItemID.CLUE_SCROLL_ELITE_19783;
import static net.runelite.api.ItemID.CLUE_SCROLL_ELITE_19784;
import static net.runelite.api.ItemID.CLUE_SCROLL_ELITE_19785;
import static net.runelite.api.ItemID.CLUE_SCROLL_ELITE_19786;
import static net.runelite.api.ItemID.CLUE_SCROLL_HARD;
import static net.runelite.api.ItemID.CLUE_SCROLL_HARD_2729;
import static net.runelite.api.ItemID.CLUE_SCROLL_HARD_3520;
import static net.runelite.api.ItemID.CLUE_SCROLL_HARD_3522;
import static net.runelite.api.ItemID.CLUE_SCROLL_HARD_3524;
import static net.runelite.api.ItemID.CLUE_SCROLL_HARD_3525;
import static net.runelite.api.ItemID.CLUE_SCROLL_HARD_7239;
import static net.runelite.api.ItemID.CLUE_SCROLL_HARD_7241;
import static net.runelite.api.ItemID.CLUE_SCROLL_MEDIUM_2827;
import static net.runelite.api.ItemID.CLUE_SCROLL_MEDIUM_3596;
import static net.runelite.api.ItemID.CLUE_SCROLL_MEDIUM_3598;
import static net.runelite.api.ItemID.CLUE_SCROLL_MEDIUM_3599;
import static net.runelite.api.ItemID.CLUE_SCROLL_MEDIUM_3601;
import static net.runelite.api.ItemID.CLUE_SCROLL_MEDIUM_3602;
import static net.runelite.api.ItemID.CLUE_SCROLL_MEDIUM_7286;
import static net.runelite.api.ItemID.CLUE_SCROLL_MEDIUM_7288;
import static net.runelite.api.ItemID.CLUE_SCROLL_MEDIUM_7290;
import static net.runelite.api.ItemID.CLUE_SCROLL_MEDIUM_7292;
import static net.runelite.api.ItemID.CLUE_SCROLL_MEDIUM_7294;
import net.runelite.api.ObjectComposition; import net.runelite.api.ObjectComposition;
import static net.runelite.api.ObjectID.CRATE_18506; import static net.runelite.api.ObjectID.CRATE_18506;
import static net.runelite.api.ObjectID.CRATE_2620; import static net.runelite.api.ObjectID.CRATE_2620;
@@ -204,6 +235,6 @@ public class MapClue extends ClueScroll implements ObjectClueScroll
public int[] getObjectIds() public int[] getObjectIds()
{ {
return new int[] {objectId}; return new int[]{objectId};
} }
} }

View File

@@ -91,7 +91,7 @@ public class MusicClue extends ClueScroll implements NpcClueScroll
@Override @Override
public String[] getNpcs() public String[] getNpcs()
{ {
return new String[] {CECILIA}; return new String[]{CECILIA};
} }
public static MusicClue forText(String text) public static MusicClue forText(String text)

View File

@@ -25,7 +25,33 @@
package net.runelite.client.plugins.cluescrolls.clues.emote; package net.runelite.client.plugins.cluescrolls.clues.emote;
import lombok.Getter; import lombok.Getter;
import static net.runelite.api.SpriteID.*; import static net.runelite.api.SpriteID.EMOTE_ANGRY;
import static net.runelite.api.SpriteID.EMOTE_BECKON;
import static net.runelite.api.SpriteID.EMOTE_BLOW_KISS;
import static net.runelite.api.SpriteID.EMOTE_BOW;
import static net.runelite.api.SpriteID.EMOTE_CHEER;
import static net.runelite.api.SpriteID.EMOTE_CLAP;
import static net.runelite.api.SpriteID.EMOTE_CRY;
import static net.runelite.api.SpriteID.EMOTE_DANCE;
import static net.runelite.api.SpriteID.EMOTE_FLAP;
import static net.runelite.api.SpriteID.EMOTE_GOBLIN_SALUTE;
import static net.runelite.api.SpriteID.EMOTE_HEADBANG;
import static net.runelite.api.SpriteID.EMOTE_JIG;
import static net.runelite.api.SpriteID.EMOTE_JUMP_FOR_JOY;
import static net.runelite.api.SpriteID.EMOTE_LAUGH;
import static net.runelite.api.SpriteID.EMOTE_NO;
import static net.runelite.api.SpriteID.EMOTE_PANIC;
import static net.runelite.api.SpriteID.EMOTE_PUSH_UP;
import static net.runelite.api.SpriteID.EMOTE_RASPBERRY;
import static net.runelite.api.SpriteID.EMOTE_SALUTE;
import static net.runelite.api.SpriteID.EMOTE_SHRUG;
import static net.runelite.api.SpriteID.EMOTE_SLAP_HEAD;
import static net.runelite.api.SpriteID.EMOTE_SPIN;
import static net.runelite.api.SpriteID.EMOTE_STOMP;
import static net.runelite.api.SpriteID.EMOTE_THINK;
import static net.runelite.api.SpriteID.EMOTE_WAVE;
import static net.runelite.api.SpriteID.EMOTE_YAWN;
import static net.runelite.api.SpriteID.EMOTE_YES;
@Getter @Getter
public enum Emote public enum Emote

View File

@@ -25,6 +25,11 @@
package net.runelite.client.plugins.combatlevel; package net.runelite.client.plugins.combatlevel;
import com.google.common.annotations.VisibleForTesting; import com.google.common.annotations.VisibleForTesting;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics2D;
import java.awt.Rectangle;
import javax.inject.Inject;
import net.runelite.api.Client; import net.runelite.api.Client;
import net.runelite.api.Experience; import net.runelite.api.Experience;
import net.runelite.api.Skill; import net.runelite.api.Skill;
@@ -34,11 +39,6 @@ import net.runelite.client.ui.overlay.Overlay;
import net.runelite.client.ui.overlay.tooltip.Tooltip; import net.runelite.client.ui.overlay.tooltip.Tooltip;
import net.runelite.client.ui.overlay.tooltip.TooltipManager; import net.runelite.client.ui.overlay.tooltip.TooltipManager;
import net.runelite.client.util.ColorUtil; import net.runelite.client.util.ColorUtil;
import javax.inject.Inject;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics2D;
import java.awt.Rectangle;
class CombatLevelOverlay extends Overlay class CombatLevelOverlay extends Overlay
{ {
@@ -143,10 +143,11 @@ class CombatLevelOverlay extends Overlay
/** /**
* Calculate skill levels required for increasing combat level, meant * Calculate skill levels required for increasing combat level, meant
* for all combat skills besides prayer, ranged, and magic. * for all combat skills besides prayer, ranged, and magic.
* @param start initial value *
* @param end ending value (combat level + 1) * @param start initial value
* @param multiple how much adding one skill level will change combat * @param end ending value (combat level + 1)
* @return levels required for a specific skill to level up combat * @param multiple how much adding one skill level will change combat
* @return levels required for a specific skill to level up combat
*/ */
@VisibleForTesting @VisibleForTesting
static int calcLevels(double start, int end, double multiple) static int calcLevels(double start, int end, double multiple)
@@ -158,8 +159,9 @@ class CombatLevelOverlay extends Overlay
* Calculate skill levels for increasing combat level, meant ONLY for the Prayer skill. * Calculate skill levels for increasing combat level, meant ONLY for the Prayer skill.
* <p> * <p>
* Note: Prayer is a special case, only leveling up upon even level numbers. This is accounted * Note: Prayer is a special case, only leveling up upon even level numbers. This is accounted
* for in this function. * for in this function.
* </p> * </p>
*
* @param start current combat level * @param start current combat level
* @param end ending value (combat level + 1) * @param end ending value (combat level + 1)
* @param prayerLevel the player's current prayer level * @param prayerLevel the player's current prayer level
@@ -191,10 +193,11 @@ class CombatLevelOverlay extends Overlay
/** /**
* Calculate skill levels required for increasing combat level, meant * Calculate skill levels required for increasing combat level, meant
* ONLY for Ranged and Magic skills. * ONLY for Ranged and Magic skills.
* @param start either the current ranged or magic level *
* @param end ending value (combat level + 1) * @param start either the current ranged or magic level
* @param dhp defence, hitpoints, and prayer; this is the initial calculated "base" value * @param end ending value (combat level + 1)
* @return levels required for a specific skill to level up combat * @param dhp defence, hitpoints, and prayer; this is the initial calculated "base" value
* @return levels required for a specific skill to level up combat
*/ */
@VisibleForTesting @VisibleForTesting
static int calcLevelsRM(double start, int end, double dhp) static int calcLevelsRM(double start, int end, double dhp)

View File

@@ -131,13 +131,13 @@ public class CombatLevelPlugin extends Plugin
} }
double combatLevelPrecise = Experience.getCombatLevelPrecise( double combatLevelPrecise = Experience.getCombatLevelPrecise(
client.getRealSkillLevel(Skill.ATTACK), client.getRealSkillLevel(Skill.ATTACK),
client.getRealSkillLevel(Skill.STRENGTH), client.getRealSkillLevel(Skill.STRENGTH),
client.getRealSkillLevel(Skill.DEFENCE), client.getRealSkillLevel(Skill.DEFENCE),
client.getRealSkillLevel(Skill.HITPOINTS), client.getRealSkillLevel(Skill.HITPOINTS),
client.getRealSkillLevel(Skill.MAGIC), client.getRealSkillLevel(Skill.MAGIC),
client.getRealSkillLevel(Skill.RANGED), client.getRealSkillLevel(Skill.RANGED),
client.getRealSkillLevel(Skill.PRAYER) client.getRealSkillLevel(Skill.PRAYER)
); );
combatLevelWidget.setText("Combat Lvl: " + DECIMAL_FORMAT.format(combatLevelPrecise)); combatLevelWidget.setText("Combat Lvl: " + DECIMAL_FORMAT.format(combatLevelPrecise));

View File

@@ -83,7 +83,6 @@ import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.plugins.PluginInstantiationException; import net.runelite.client.plugins.PluginInstantiationException;
import net.runelite.client.plugins.PluginManager; import net.runelite.client.plugins.PluginManager;
import net.runelite.client.plugins.PluginType; import net.runelite.client.plugins.PluginType;
import net.runelite.client.plugins.pluginsorter.PluginSorterPlugin;
import net.runelite.client.ui.ColorScheme; import net.runelite.client.ui.ColorScheme;
import net.runelite.client.ui.DynamicGridLayout; import net.runelite.client.ui.DynamicGridLayout;
import net.runelite.client.ui.PluginPanel; import net.runelite.client.ui.PluginPanel;
@@ -197,8 +196,8 @@ public class ConfigPanel extends PluginPanel
// set RuneLite config on top, as it should always have been // set RuneLite config on top, as it should always have been
final PluginListItem runeLite = new PluginListItem(this, configManager, runeLiteConfig, final PluginListItem runeLite = new PluginListItem(this, configManager, runeLiteConfig,
configManager.getConfigDescriptor(runeLiteConfig), configManager.getConfigDescriptor(runeLiteConfig),
RUNELITE_PLUGIN, "RuneLite client settings", "client"); RUNELITE_PLUGIN, "RuneLite client settings", "client");
runeLite.setPinned(pinnedPlugins.contains(RUNELITE_PLUGIN)); runeLite.setPinned(pinnedPlugins.contains(RUNELITE_PLUGIN));
runeLite.nameLabel.setForeground(Color.WHITE); runeLite.nameLabel.setForeground(Color.WHITE);
pluginList.add(runeLite); pluginList.add(runeLite);
@@ -279,13 +278,13 @@ public class ConfigPanel extends PluginPanel
// populate pluginList with all vanilla RL plugins // populate pluginList with all vanilla RL plugins
List<PluginListItem> vanillaPlugins = new ArrayList<>(); List<PluginListItem> vanillaPlugins = new ArrayList<>();
pluginManager.getPlugins().stream() pluginManager.getPlugins().stream()
.filter(plugin -> !plugin.getClass().getAnnotation(PluginDescriptor.class).hidden()) .filter(plugin -> !plugin.getClass().getAnnotation(PluginDescriptor.class).hidden())
.filter(plugin -> !plugin.getClass().getAnnotation(PluginDescriptor.class).type().equals(PluginType.PVM)) .filter(plugin -> !plugin.getClass().getAnnotation(PluginDescriptor.class).type().equals(PluginType.PVM))
.filter(plugin -> !plugin.getClass().getAnnotation(PluginDescriptor.class).type().equals(PluginType.PVP)) .filter(plugin -> !plugin.getClass().getAnnotation(PluginDescriptor.class).type().equals(PluginType.PVP))
.filter(plugin -> !plugin.getClass().getAnnotation(PluginDescriptor.class).type().equals(PluginType.UTILITY)) .filter(plugin -> !plugin.getClass().getAnnotation(PluginDescriptor.class).type().equals(PluginType.UTILITY))
.filter(plugin -> !plugin.getClass().getAnnotation(PluginDescriptor.class).type().equals(PluginType.PLUGIN_ORGANIZER)) .filter(plugin -> !plugin.getClass().getAnnotation(PluginDescriptor.class).type().equals(PluginType.PLUGIN_ORGANIZER))
.filter(plugin -> !plugin.getClass().getAnnotation(PluginDescriptor.class).type().equals(PluginType.EXTERNAL)) .filter(plugin -> !plugin.getClass().getAnnotation(PluginDescriptor.class).type().equals(PluginType.EXTERNAL))
.forEach(plugin -> .forEach(plugin ->
{ {
final PluginDescriptor descriptor = plugin.getClass().getAnnotation(PluginDescriptor.class); final PluginDescriptor descriptor = plugin.getClass().getAnnotation(PluginDescriptor.class);
final Config config = pluginManager.getPluginConfigProxy(plugin); final Config config = pluginManager.getPluginConfigProxy(plugin);
@@ -295,11 +294,11 @@ public class ConfigPanel extends PluginPanel
listItem.setPinned(pinnedPlugins.contains(listItem.getName())); listItem.setPinned(pinnedPlugins.contains(listItem.getName()));
vanillaPlugins.add(listItem); vanillaPlugins.add(listItem);
} }
); );
final PluginListItem chatColor = new PluginListItem(this, configManager, chatColorConfig, final PluginListItem chatColor = new PluginListItem(this, configManager, chatColorConfig,
configManager.getConfigDescriptor(chatColorConfig), configManager.getConfigDescriptor(chatColorConfig),
CHAT_COLOR_PLUGIN, "Recolor chat text", "colour", "messages"); CHAT_COLOR_PLUGIN, "Recolor chat text", "colour", "messages");
chatColor.setPinned(pinnedPlugins.contains(CHAT_COLOR_PLUGIN)); chatColor.setPinned(pinnedPlugins.contains(CHAT_COLOR_PLUGIN));
chatColor.nameLabel.setForeground(Color.WHITE); chatColor.nameLabel.setForeground(Color.WHITE);
vanillaPlugins.add(chatColor); vanillaPlugins.add(chatColor);
@@ -404,7 +403,9 @@ public class ConfigPanel extends PluginPanel
topPanel.add(topPanelBackButton, BorderLayout.WEST); topPanel.add(topPanelBackButton, BorderLayout.WEST);
if (!listItem.getName().equals("RuneLitePlus")) if (!listItem.getName().equals("RuneLitePlus"))
topPanel.add(listItem.createToggleButton(), BorderLayout.EAST); {
topPanel.add(listItem.createToggleButton(), BorderLayout.EAST);
}
String name = listItem.getName(); String name = listItem.getName();
JLabel title = new JLabel(name); JLabel title = new JLabel(name);
@@ -520,7 +521,7 @@ public class ConfigPanel extends PluginPanel
public void mouseClicked(MouseEvent e) public void mouseClicked(MouseEvent e)
{ {
RuneliteColorPicker colorPicker = new RuneliteColorPicker(SwingUtilities.windowForComponent(ConfigPanel.this), RuneliteColorPicker colorPicker = new RuneliteColorPicker(SwingUtilities.windowForComponent(ConfigPanel.this),
colorPickerBtn.getBackground(), cid.getItem().name(), cid.getAlpha() == null); colorPickerBtn.getBackground(), cid.getItem().name(), cid.getAlpha() == null);
colorPicker.setLocation(getLocationOnScreen()); colorPicker.setLocation(getLocationOnScreen());
colorPicker.setOnColorChange(c -> colorPicker.setOnColorChange(c ->
{ {
@@ -566,7 +567,7 @@ public class ConfigPanel extends PluginPanel
heightSpinnerTextField.setColumns(4); heightSpinnerTextField.setColumns(4);
ChangeListener listener = e -> ChangeListener listener = e ->
configManager.setConfiguration(cd.getGroup().value(), cid.getItem().keyName(), widthSpinner.getValue() + "x" + heightSpinner.getValue()); configManager.setConfiguration(cd.getGroup().value(), cid.getItem().keyName(), widthSpinner.getValue() + "x" + heightSpinner.getValue());
widthSpinner.addChangeListener(listener); widthSpinner.addChangeListener(listener);
heightSpinner.addChangeListener(listener); heightSpinner.addChangeListener(listener);
@@ -611,8 +612,8 @@ public class ConfigPanel extends PluginPanel
if (cid.getType() == Keybind.class || cid.getType() == ModifierlessKeybind.class) if (cid.getType() == Keybind.class || cid.getType() == ModifierlessKeybind.class)
{ {
Keybind startingValue = configManager.getConfiguration(cd.getGroup().value(), Keybind startingValue = configManager.getConfiguration(cd.getGroup().value(),
cid.getItem().keyName(), cid.getItem().keyName(),
(Class<? extends Keybind>) cid.getType()); (Class<? extends Keybind>) cid.getType());
HotkeyButton button = new HotkeyButton(startingValue, cid.getType() == ModifierlessKeybind.class); HotkeyButton button = new HotkeyButton(startingValue, cid.getType() == ModifierlessKeybind.class);
@@ -635,8 +636,8 @@ public class ConfigPanel extends PluginPanel
resetButton.addActionListener((e) -> resetButton.addActionListener((e) ->
{ {
final int result = JOptionPane.showOptionDialog(resetButton, "Are you sure you want to reset this plugin's configuration?", final int result = JOptionPane.showOptionDialog(resetButton, "Are you sure you want to reset this plugin's configuration?",
"Are you sure?", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE, "Are you sure?", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE,
null, new String[]{"Yes", "No"}, "No"); null, new String[]{"Yes", "No"}, "No");
if (result == JOptionPane.YES_OPTION) if (result == JOptionPane.YES_OPTION)
{ {
@@ -663,8 +664,8 @@ public class ConfigPanel extends PluginPanel
if (!Strings.isNullOrEmpty(configItem.warning())) if (!Strings.isNullOrEmpty(configItem.warning()))
{ {
final int result = JOptionPane.showOptionDialog(component, configItem.warning(), final int result = JOptionPane.showOptionDialog(component, configItem.warning(),
"Are you sure?", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE, "Are you sure?", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE,
null, new String[]{"Yes", "No"}, "No"); null, new String[]{"Yes", "No"}, "No");
if (result != JOptionPane.YES_OPTION) if (result != JOptionPane.YES_OPTION)
{ {
@@ -758,9 +759,9 @@ public class ConfigPanel extends PluginPanel
void savePinnedPlugins() void savePinnedPlugins()
{ {
final String value = pluginList.stream() final String value = pluginList.stream()
.filter(PluginListItem::isPinned) .filter(PluginListItem::isPinned)
.map(PluginListItem::getName) .map(PluginListItem::getName)
.collect(Collectors.joining(",")); .collect(Collectors.joining(","));
configManager.setConfiguration(RUNELITE_GROUP_NAME, PINNED_PLUGINS_CONFIG_KEY, value); configManager.setConfiguration(RUNELITE_GROUP_NAME, PINNED_PLUGINS_CONFIG_KEY, value);
} }

View File

@@ -25,7 +25,6 @@
package net.runelite.client.plugins.config; package net.runelite.client.plugins.config;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.GridLayout; import java.awt.GridLayout;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
@@ -33,7 +32,6 @@ import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import javax.inject.Inject;
import javax.swing.ImageIcon; import javax.swing.ImageIcon;
import javax.swing.JLabel; import javax.swing.JLabel;
import javax.swing.JPanel; import javax.swing.JPanel;
@@ -41,13 +39,11 @@ import lombok.AccessLevel;
import lombok.Getter; import lombok.Getter;
import net.runelite.client.config.Config; import net.runelite.client.config.Config;
import net.runelite.client.config.ConfigDescriptor; import net.runelite.client.config.ConfigDescriptor;
import net.runelite.client.config.ConfigItemDescriptor;
import net.runelite.client.config.ConfigManager; import net.runelite.client.config.ConfigManager;
import net.runelite.client.plugins.Plugin; import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.ui.PluginPanel; import net.runelite.client.ui.PluginPanel;
import net.runelite.client.ui.components.IconButton; import net.runelite.client.ui.components.IconButton;
import net.runelite.client.util.ColorUtil;
import net.runelite.client.util.ImageUtil; import net.runelite.client.util.ImageUtil;
import org.apache.commons.text.similarity.JaroWinklerDistance; import org.apache.commons.text.similarity.JaroWinklerDistance;
@@ -105,17 +101,17 @@ public class PluginListItem extends JPanel
ON_STAR = new ImageIcon(onStar); ON_STAR = new ImageIcon(onStar);
CONFIG_ICON_HOVER = new ImageIcon(ImageUtil.grayscaleOffset(configIcon, -100)); CONFIG_ICON_HOVER = new ImageIcon(ImageUtil.grayscaleOffset(configIcon, -100));
BufferedImage offSwitcherImage = ImageUtil.flipImage( BufferedImage offSwitcherImage = ImageUtil.flipImage(
ImageUtil.grayscaleOffset( ImageUtil.grayscaleOffset(
ImageUtil.grayscaleImage(onSwitcher), ImageUtil.grayscaleImage(onSwitcher),
0.61f 0.61f
), ),
true, true,
false false
); );
OFF_SWITCHER = new ImageIcon(offSwitcherImage); OFF_SWITCHER = new ImageIcon(offSwitcherImage);
BufferedImage offStar = ImageUtil.grayscaleOffset( BufferedImage offStar = ImageUtil.grayscaleOffset(
ImageUtil.grayscaleImage(onStar), ImageUtil.grayscaleImage(onStar),
0.77f 0.77f
); );
OFF_STAR = new ImageIcon(offStar); OFF_STAR = new ImageIcon(offStar);
} }
@@ -130,7 +126,7 @@ public class PluginListItem extends JPanel
@Nullable Config config, @Nullable ConfigDescriptor configDescriptor) @Nullable Config config, @Nullable ConfigDescriptor configDescriptor)
{ {
this(configPanel, configManager, plugin, config, configDescriptor, this(configPanel, configManager, plugin, config, configDescriptor,
descriptor.name(), descriptor.description(), descriptor.tags()); descriptor.name(), descriptor.description(), descriptor.tags());
} }
/** /**
@@ -179,27 +175,28 @@ public class PluginListItem extends JPanel
}); });
final JPanel buttonPanel = new JPanel(); final JPanel buttonPanel = new JPanel();
buttonPanel.setLayout(new GridLayout(1, 2)); buttonPanel.setLayout(new GridLayout(1, 2));
add(buttonPanel, BorderLayout.LINE_END); add(buttonPanel, BorderLayout.LINE_END);
configButton.setPreferredSize(new Dimension(25, 0)); configButton.setPreferredSize(new Dimension(25, 0));
configButton.setVisible(false); configButton.setVisible(false);
buttonPanel.add(configButton); buttonPanel.add(configButton);
// add a listener to configButton only if there are config items to show // add a listener to configButton only if there are config items to show
if (config != null && !configDescriptor.getItems().stream().allMatch(item -> item.getItem().hidden())) if (config != null && !configDescriptor.getItems().stream().allMatch(item -> item.getItem().hidden()))
{
configButton.addActionListener(e ->
{ {
configButton.addActionListener(e -> configButton.setIcon(CONFIG_ICON);
{ configPanel.openGroupConfigPanel(PluginListItem.this, config, configDescriptor);
configButton.setIcon(CONFIG_ICON); });
configPanel.openGroupConfigPanel(PluginListItem.this, config, configDescriptor);
});
configButton.setVisible(true); configButton.setVisible(true);
configButton.setToolTipText("Edit plugin configuration"); configButton.setToolTipText("Edit plugin configuration");
} }
if (!name.equals("RuneLitePlus")) { if (!name.equals("RuneLitePlus"))
{
toggleButton.setPreferredSize(new Dimension(25, 0)); toggleButton.setPreferredSize(new Dimension(25, 0));
attachToggleButtonListener(toggleButton); attachToggleButtonListener(toggleButton);
buttonPanel.add(toggleButton); buttonPanel.add(toggleButton);
@@ -261,6 +258,7 @@ public class PluginListItem extends JPanel
/** /**
* Checks if all the search terms in the given list matches at least one keyword. * Checks if all the search terms in the given list matches at least one keyword.
*
* @return true if all search terms matches at least one keyword, or false if otherwise. * @return true if all search terms matches at least one keyword, or false if otherwise.
*/ */
boolean matchesSearchTerms(String[] searchTerms) boolean matchesSearchTerms(String[] searchTerms)
@@ -268,7 +266,7 @@ public class PluginListItem extends JPanel
for (String term : searchTerms) for (String term : searchTerms)
{ {
if (keywords.stream().noneMatch((t) -> t.contains(term) || if (keywords.stream().noneMatch((t) -> t.contains(term) ||
DISTANCE.apply(t, term) > 0.9)) DISTANCE.apply(t, term) > 0.9))
{ {
return false; return false;
} }

View File

@@ -251,7 +251,7 @@ public class DailyTasksPlugin extends Plugin
max += BONEMEAL_PER_DIARY; max += BONEMEAL_PER_DIARY;
} }
} }
if (dailyReset || collected < max) if (dailyReset || collected < max)
{ {
sendChatMessage(BONEMEAL_MESSAGE); sendChatMessage(BONEMEAL_MESSAGE);
} }

View File

@@ -31,9 +31,9 @@ import lombok.extern.slf4j.Slf4j;
import net.runelite.api.Client; import net.runelite.api.Client;
import net.runelite.api.GameState; import net.runelite.api.GameState;
import net.runelite.api.events.GameStateChanged; import net.runelite.api.events.GameStateChanged;
import net.runelite.client.events.SessionOpen;
import net.runelite.client.config.ConfigManager; import net.runelite.client.config.ConfigManager;
import net.runelite.client.eventbus.Subscribe; import net.runelite.client.eventbus.Subscribe;
import net.runelite.client.events.SessionOpen;
import net.runelite.client.plugins.Plugin; import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.util.WorldUtil; import net.runelite.client.util.WorldUtil;

View File

@@ -70,9 +70,12 @@ public class DemonicGorillaOverlay extends Overlay
{ {
switch (attackStyle) switch (attackStyle)
{ {
case MELEE: return iconManager.getSkillImage(Skill.ATTACK); case MELEE:
case RANGED: return iconManager.getSkillImage(Skill.RANGED); return iconManager.getSkillImage(Skill.ATTACK);
case MAGIC: return iconManager.getSkillImage(Skill.MAGIC); case RANGED:
return iconManager.getSkillImage(Skill.RANGED);
case MAGIC:
return iconManager.getSkillImage(Skill.MAGIC);
} }
return null; return null;
} }

View File

@@ -156,7 +156,7 @@ public class DemonicGorillaPlugin extends Plugin
} }
private void checkGorillaAttackStyleSwitch(DemonicGorilla gorilla, private void checkGorillaAttackStyleSwitch(DemonicGorilla gorilla,
final DemonicGorilla.AttackStyle... protectedStyles) final DemonicGorilla.AttackStyle... protectedStyles)
{ {
if (gorilla.getAttacksUntilSwitch() <= 0 || if (gorilla.getAttacksUntilSwitch() <= 0 ||
gorilla.getNextPosibleAttackStyles().isEmpty()) gorilla.getNextPosibleAttackStyles().isEmpty())
@@ -194,7 +194,7 @@ public class DemonicGorillaPlugin extends Plugin
{ {
gorilla.setInitiatedCombat(true); gorilla.setInitiatedCombat(true);
Player target = (Player)gorilla.getNpc().getInteracting(); Player target = (Player) gorilla.getNpc().getInteracting();
DemonicGorilla.AttackStyle protectedStyle = null; DemonicGorilla.AttackStyle protectedStyle = null;
if (target != null) if (target != null)
@@ -285,7 +285,7 @@ public class DemonicGorillaPlugin extends Plugin
int tickCounter = client.getTickCount(); int tickCounter = client.getTickCount();
for (DemonicGorilla gorilla : gorillas.values()) for (DemonicGorilla gorilla : gorillas.values())
{ {
Player interacting = (Player)gorilla.getNpc().getInteracting(); Player interacting = (Player) gorilla.getNpc().getInteracting();
MemorizedPlayer mp = memorizedPlayers.get(interacting); MemorizedPlayer mp = memorizedPlayers.get(interacting);
if (gorilla.getLastTickInteracting() != null && interacting == null) if (gorilla.getLastTickInteracting() != null && interacting == null)
@@ -625,7 +625,7 @@ public class DemonicGorillaPlugin extends Plugin
if (event.getActor() instanceof Player) if (event.getActor() instanceof Player)
{ {
Player player = (Player)event.getActor(); Player player = (Player) event.getActor();
MemorizedPlayer mp = memorizedPlayers.get(player); MemorizedPlayer mp = memorizedPlayers.get(player);
if (mp != null) if (mp != null)
{ {

View File

@@ -60,38 +60,38 @@ public class CameraOverlay extends Overlay
panelComponent.getChildren().clear(); panelComponent.getChildren().clear();
panelComponent.getChildren().add(TitleComponent.builder() panelComponent.getChildren().add(TitleComponent.builder()
.text("Camera") .text("Camera")
.build()); .build());
panelComponent.getChildren().add(LineComponent.builder() panelComponent.getChildren().add(LineComponent.builder()
.left("X") .left("X")
.right("" + client.getCameraX()) .right("" + client.getCameraX())
.build()); .build());
panelComponent.getChildren().add(LineComponent.builder() panelComponent.getChildren().add(LineComponent.builder()
.left("Y") .left("Y")
.right("" + client.getCameraY()) .right("" + client.getCameraY())
.build()); .build());
panelComponent.getChildren().add(LineComponent.builder() panelComponent.getChildren().add(LineComponent.builder()
.left("Z") .left("Z")
.right("" + client.getCameraZ()) .right("" + client.getCameraZ())
.build()); .build());
panelComponent.getChildren().add(LineComponent.builder() panelComponent.getChildren().add(LineComponent.builder()
.left("Pitch") .left("Pitch")
.right("" + client.getCameraPitch()) .right("" + client.getCameraPitch())
.build()); .build());
panelComponent.getChildren().add(LineComponent.builder() panelComponent.getChildren().add(LineComponent.builder()
.left("Yaw") .left("Yaw")
.right("" + client.getCameraYaw()) .right("" + client.getCameraYaw())
.build()); .build());
panelComponent.getChildren().add(LineComponent.builder() panelComponent.getChildren().add(LineComponent.builder()
.left("Scale") .left("Scale")
.right("" + client.getScale()) .right("" + client.getScale())
.build()); .build());
return panelComponent.render(graphics); return panelComponent.render(graphics);
} }

View File

@@ -122,7 +122,7 @@ class DevToolsPanel extends PluginPanel
container.add(plugin.getLogMenuActions()); container.add(plugin.getLogMenuActions());
plugin.getLogMenuActions().addActionListener((ev) -> plugin.getLogMenuActions().addActionListener((ev) ->
{ {
if(plugin.getLogMenuActions().isActive()) if (plugin.getLogMenuActions().isActive())
{ {
client.setPrintMenuActions(false); client.setPrintMenuActions(false);
} }

View File

@@ -71,7 +71,7 @@ import org.slf4j.LoggerFactory;
public class DevToolsPlugin extends Plugin public class DevToolsPlugin extends Plugin
{ {
private static final List<MenuAction> EXAMINE_MENU_ACTIONS = ImmutableList.of(MenuAction.EXAMINE_ITEM, private static final List<MenuAction> EXAMINE_MENU_ACTIONS = ImmutableList.of(MenuAction.EXAMINE_ITEM,
MenuAction.EXAMINE_ITEM_GROUND, MenuAction.EXAMINE_NPC, MenuAction.EXAMINE_OBJECT); MenuAction.EXAMINE_ITEM_GROUND, MenuAction.EXAMINE_NPC, MenuAction.EXAMINE_OBJECT);
@Inject @Inject
private Client client; private Client client;
@@ -119,7 +119,7 @@ public class DevToolsPlugin extends Plugin
private DevToolsButton validMovement; private DevToolsButton validMovement;
private DevToolsButton lineOfSight; private DevToolsButton lineOfSight;
private DevToolsButton cameraPosition; private DevToolsButton cameraPosition;
private DevToolsButton worldMapLocation ; private DevToolsButton worldMapLocation;
private DevToolsButton tileLocation; private DevToolsButton tileLocation;
private DevToolsButton interacting; private DevToolsButton interacting;
private DevToolsButton examine; private DevToolsButton examine;

View File

@@ -87,19 +87,19 @@ public class LocationOverlay extends Overlay
} }
panelComponent.getChildren().add(LineComponent.builder() panelComponent.getChildren().add(LineComponent.builder()
.left("Base") .left("Base")
.right(client.getBaseX() + ", " + client.getBaseY()) .right(client.getBaseX() + ", " + client.getBaseY())
.build()); .build());
panelComponent.getChildren().add(LineComponent.builder() panelComponent.getChildren().add(LineComponent.builder()
.left("Local") .left("Local")
.right(localPoint.getX() + ", " + localPoint.getY()) .right(localPoint.getX() + ", " + localPoint.getY())
.build()); .build());
panelComponent.getChildren().add(LineComponent.builder() panelComponent.getChildren().add(LineComponent.builder()
.left("Scene") .left("Scene")
.right(localPoint.getSceneX() + ", " + localPoint.getSceneY()) .right(localPoint.getSceneX() + ", " + localPoint.getSceneY())
.build()); .build());
panelComponent.getChildren().add(LineComponent.builder() panelComponent.getChildren().add(LineComponent.builder()
.left("Tile") .left("Tile")

View File

@@ -96,7 +96,7 @@ public class WorldMapLocationOverlay extends Overlay
FontMetrics fm = graphics.getFontMetrics(); FontMetrics fm = graphics.getFontMetrics();
int height = fm.getHeight(); int height = fm.getHeight();
int width = fm.stringWidth(output); int width = fm.stringWidth(output);
graphics.fillRect((int)worldMapRectangle.getX(), (int)worldMapRectangle.getY() + worldMapRectangle.height - height, (int)worldMapRectangle.getX() + width, (int)worldMapRectangle.getY() + worldMapRectangle.height); graphics.fillRect((int) worldMapRectangle.getX(), (int) worldMapRectangle.getY() + worldMapRectangle.height - height, (int) worldMapRectangle.getX() + width, (int) worldMapRectangle.getY() + worldMapRectangle.height);
graphics.setColor(Color.BLACK); graphics.setColor(Color.BLACK);
graphics.drawString(output, (int) worldMapRectangle.getX(), (int) worldMapRectangle.getY() + worldMapRectangle.height); graphics.drawString(output, (int) worldMapRectangle.getX(), (int) worldMapRectangle.getY() + worldMapRectangle.height);

View File

@@ -86,68 +86,68 @@ enum DiscordGameEventType
BOSS_ZULRAH("Zulrah", DiscordAreaType.BOSSES, 9007), BOSS_ZULRAH("Zulrah", DiscordAreaType.BOSSES, 9007),
// Cities // Cities
CITY_AL_KHARID("Al Kharid" , DiscordAreaType.CITIES, 13105, 13106), CITY_AL_KHARID("Al Kharid", DiscordAreaType.CITIES, 13105, 13106),
CITY_APE_ATOLL("Ape Atoll" , DiscordAreaType.CITIES, 10795, 11051, 10974, 11050), CITY_APE_ATOLL("Ape Atoll", DiscordAreaType.CITIES, 10795, 11051, 10974, 11050),
CITY_ARCEUUS_HOUSE("Arceuus" , DiscordAreaType.CITIES, 6459, 6715, 6458, 6714), CITY_ARCEUUS_HOUSE("Arceuus", DiscordAreaType.CITIES, 6459, 6715, 6458, 6714),
CITY_ARDOUGNE("Ardougne" , DiscordAreaType.CITIES, 10548, 10547, 10292, 10291, 10036, 10035, 9780, 9779), CITY_ARDOUGNE("Ardougne", DiscordAreaType.CITIES, 10548, 10547, 10292, 10291, 10036, 10035, 9780, 9779),
CITY_BARBARIAN_VILLAGE("Barbarian Village" , DiscordAreaType.CITIES, 12341), CITY_BARBARIAN_VILLAGE("Barbarian Village", DiscordAreaType.CITIES, 12341),
CITY_BANDIT_CAMP("Bandit Camp" , DiscordAreaType.CITIES, 12591), CITY_BANDIT_CAMP("Bandit Camp", DiscordAreaType.CITIES, 12591),
CITY_BEDABIN_CAMP("Bedabin Camp" , DiscordAreaType.CITIES, 12590), CITY_BEDABIN_CAMP("Bedabin Camp", DiscordAreaType.CITIES, 12590),
CITY_BRIMHAVEN("Brimhaven" , DiscordAreaType.CITIES, 11057, 11058), CITY_BRIMHAVEN("Brimhaven", DiscordAreaType.CITIES, 11057, 11058),
CITY_BURGH_DE_ROTT("Burgh de Rott" , DiscordAreaType.CITIES, 13874, 13873, 14130, 14129), CITY_BURGH_DE_ROTT("Burgh de Rott", DiscordAreaType.CITIES, 13874, 13873, 14130, 14129),
CITY_BURTHORPE("Burthorpe" , DiscordAreaType.CITIES, 11319, 11575), CITY_BURTHORPE("Burthorpe", DiscordAreaType.CITIES, 11319, 11575),
CITY_CANIFIS("Canifis" , DiscordAreaType.CITIES, 13878), CITY_CANIFIS("Canifis", DiscordAreaType.CITIES, 13878),
CITY_CATHERBY("Catherby" , DiscordAreaType.CITIES, 11317, 11318, 11061), CITY_CATHERBY("Catherby", DiscordAreaType.CITIES, 11317, 11318, 11061),
CITY_CORSAIR_CAVE("Corsair Cove" , DiscordAreaType.CITIES, 10028, 10284), CITY_CORSAIR_CAVE("Corsair Cove", DiscordAreaType.CITIES, 10028, 10284),
CITY_DORGESH_KAAN("Dorgesh-Kaan" , DiscordAreaType.CITIES, 10835, 10834), CITY_DORGESH_KAAN("Dorgesh-Kaan", DiscordAreaType.CITIES, 10835, 10834),
CITY_DRAYNOR("Draynor" , DiscordAreaType.CITIES, 12338), CITY_DRAYNOR("Draynor", DiscordAreaType.CITIES, 12338),
CITY_EDGEVILLE("Edgeville" , DiscordAreaType.CITIES, 12342), CITY_EDGEVILLE("Edgeville", DiscordAreaType.CITIES, 12342),
CITY_ENTRANA("Entrana" , DiscordAreaType.CITIES, 11060, 11316), CITY_ENTRANA("Entrana", DiscordAreaType.CITIES, 11060, 11316),
CITY_FALADOR("Falador" , DiscordAreaType.CITIES, 11828, 11572, 11571, 11827, 12084), CITY_FALADOR("Falador", DiscordAreaType.CITIES, 11828, 11572, 11571, 11827, 12084),
CITY_GOBLIN_VILLAGE("Goblin Village" , DiscordAreaType.CITIES, 11830), CITY_GOBLIN_VILLAGE("Goblin Village", DiscordAreaType.CITIES, 11830),
CITY_GUTANOTH("Gu'Tanoth" , DiscordAreaType.CITIES, 10031), CITY_GUTANOTH("Gu'Tanoth", DiscordAreaType.CITIES, 10031),
CITY_HOSIDIUS_HOUSE("Hosidius" , DiscordAreaType.CITIES, 6713, 6712, 6455, 6711, 6710, 6965, 6966, 7222, 7223, 6967), CITY_HOSIDIUS_HOUSE("Hosidius", DiscordAreaType.CITIES, 6713, 6712, 6455, 6711, 6710, 6965, 6966, 7222, 7223, 6967),
CITY_JATISZO("Jatizso" , DiscordAreaType.CITIES, 9531), CITY_JATISZO("Jatizso", DiscordAreaType.CITIES, 9531),
CITY_JIGGIG("Jiggig" , DiscordAreaType.CITIES, 9775), CITY_JIGGIG("Jiggig", DiscordAreaType.CITIES, 9775),
CITY_KARAMJA("Karamja" , DiscordAreaType.CITIES, 11569, 11568, 11567, 11566, 11313, 11312, 11311), CITY_KARAMJA("Karamja", DiscordAreaType.CITIES, 11569, 11568, 11567, 11566, 11313, 11312, 11311),
CITY_KELDAGRIM("Keldagrim" , DiscordAreaType.CITIES, 11423, 11422, 11679, 11678), CITY_KELDAGRIM("Keldagrim", DiscordAreaType.CITIES, 11423, 11422, 11679, 11678),
CITY_LLETYA("Lletya" , DiscordAreaType.CITIES, 9265), CITY_LLETYA("Lletya", DiscordAreaType.CITIES, 9265),
CITY_LOVAKENGJ_HOUSE("Lovakengj" , DiscordAreaType.CITIES, 5692, 5948, 5691, 5947, 6203, 6202, 5690, 5946), CITY_LOVAKENGJ_HOUSE("Lovakengj", DiscordAreaType.CITIES, 5692, 5948, 5691, 5947, 6203, 6202, 5690, 5946),
CITY_LUMBRIDGE("Lumbridge" , DiscordAreaType.CITIES, 12850), CITY_LUMBRIDGE("Lumbridge", DiscordAreaType.CITIES, 12850),
CITY_LUNAR_ISLE("Lunar Isle" , DiscordAreaType.CITIES, 8253, 8252, 8509, 8508), CITY_LUNAR_ISLE("Lunar Isle", DiscordAreaType.CITIES, 8253, 8252, 8509, 8508),
CITY_MEIYERDITCH("Meiyerditch" , DiscordAreaType.CITIES, 14132, 14388, 14387, 14386, 14385), CITY_MEIYERDITCH("Meiyerditch", DiscordAreaType.CITIES, 14132, 14388, 14387, 14386, 14385),
CITY_MISCELLANIA("Miscellania" , DiscordAreaType.CITIES, 10044, 10300), CITY_MISCELLANIA("Miscellania", DiscordAreaType.CITIES, 10044, 10300),
CITY_MOS_LE_HARMLESS("Mos Le'Harmless" , DiscordAreaType.CITIES, 14638), CITY_MOS_LE_HARMLESS("Mos Le'Harmless", DiscordAreaType.CITIES, 14638),
CITY_MORTTON("Mort'ton" , DiscordAreaType.CITIES, 13875), CITY_MORTTON("Mort'ton", DiscordAreaType.CITIES, 13875),
CITY_MOR_UI_REK("Mor UI Rek" , DiscordAreaType.CITIES, 9808, 9807, 10064, 10063), CITY_MOR_UI_REK("Mor UI Rek", DiscordAreaType.CITIES, 9808, 9807, 10064, 10063),
CITY_MOUNT_KARUULM("Mount Karuulm", DiscordAreaType.CITIES, 5179, 4923, 5180), CITY_MOUNT_KARUULM("Mount Karuulm", DiscordAreaType.CITIES, 5179, 4923, 5180),
CITY_NARDAH("Nardah" , DiscordAreaType.CITIES, 13613), CITY_NARDAH("Nardah", DiscordAreaType.CITIES, 13613),
CITY_NEITIZNOT("Neitiznot" , DiscordAreaType.CITIES, 9275), CITY_NEITIZNOT("Neitiznot", DiscordAreaType.CITIES, 9275),
CITY_PISCATORIS("Piscatoris" , DiscordAreaType.CITIES, 9273), CITY_PISCATORIS("Piscatoris", DiscordAreaType.CITIES, 9273),
CITY_POLLNIVNEACH("Pollnivneach" , DiscordAreaType.CITIES, 13358), CITY_POLLNIVNEACH("Pollnivneach", DiscordAreaType.CITIES, 13358),
CITY_PORT_KHAZARD("Port Khazard" , DiscordAreaType.CITIES, 10545), CITY_PORT_KHAZARD("Port Khazard", DiscordAreaType.CITIES, 10545),
CITY_PORT_PHASMATYS("Port Phasmatys" , DiscordAreaType.CITIES, 14646), CITY_PORT_PHASMATYS("Port Phasmatys", DiscordAreaType.CITIES, 14646),
CITY_PORT_SARIM("Port Sarim" , DiscordAreaType.CITIES, 12082), CITY_PORT_SARIM("Port Sarim", DiscordAreaType.CITIES, 12082),
CITY_PISCARILIUS_HOUSE("Port Piscarilius" , DiscordAreaType.CITIES, 6971, 7227, 6970, 7226), CITY_PISCARILIUS_HOUSE("Port Piscarilius", DiscordAreaType.CITIES, 6971, 7227, 6970, 7226),
CITY_RELLEKKA("Rellekka" , DiscordAreaType.CITIES, 10553), CITY_RELLEKKA("Rellekka", DiscordAreaType.CITIES, 10553),
CITY_RIMMINGTON("Rimmington" , DiscordAreaType.CITIES, 11826, 11570), CITY_RIMMINGTON("Rimmington", DiscordAreaType.CITIES, 11826, 11570),
CITY_SEERS_VILLAGE("Seers' Village" , DiscordAreaType.CITIES, 10806), CITY_SEERS_VILLAGE("Seers' Village", DiscordAreaType.CITIES, 10806),
CITY_SHAYZIEN_HOUSE("Shayzien" , DiscordAreaType.CITIES, 5944, 5943, 6200, 6199, 5688), CITY_SHAYZIEN_HOUSE("Shayzien", DiscordAreaType.CITIES, 5944, 5943, 6200, 6199, 5688),
CITY_SHILO_VILLAGE("Shilo Village" , DiscordAreaType.CITIES, 11310), CITY_SHILO_VILLAGE("Shilo Village", DiscordAreaType.CITIES, 11310),
CITY_SOPHANEM("Sophanem" , DiscordAreaType.CITIES, 13099), CITY_SOPHANEM("Sophanem", DiscordAreaType.CITIES, 13099),
CITY_TAI_BWO_WANNAI("Tai Bwo Wannai" , DiscordAreaType.CITIES, 11056, 11055), CITY_TAI_BWO_WANNAI("Tai Bwo Wannai", DiscordAreaType.CITIES, 11056, 11055),
CITY_TAVERLEY("Taverley" , DiscordAreaType.CITIES, 11574, 11573), CITY_TAVERLEY("Taverley", DiscordAreaType.CITIES, 11574, 11573),
CITY_TREE_GNOME_STRONGHOLD("Tree Gnome Stronghold" , DiscordAreaType.CITIES, 9782, 9781), CITY_TREE_GNOME_STRONGHOLD("Tree Gnome Stronghold", DiscordAreaType.CITIES, 9782, 9781),
CITY_TREE_GNOME_VILLAGE("Tree Gnome Village" , DiscordAreaType.CITIES, 10033), CITY_TREE_GNOME_VILLAGE("Tree Gnome Village", DiscordAreaType.CITIES, 10033),
CITY_TROLL_STRONGHOLD("Troll Stronghold" , DiscordAreaType.CITIES, 11321), CITY_TROLL_STRONGHOLD("Troll Stronghold", DiscordAreaType.CITIES, 11321),
CITY_TYRAS_CAMP("Tyras Camp" , DiscordAreaType.CITIES, 8753, 8752), CITY_TYRAS_CAMP("Tyras Camp", DiscordAreaType.CITIES, 8753, 8752),
CITY_UZER("Uzer" , DiscordAreaType.CITIES, 13872), CITY_UZER("Uzer", DiscordAreaType.CITIES, 13872),
CITY_VARROCK("Varrock" , DiscordAreaType.CITIES, 12596, 12597, 12598, 12852, 12853, 12854, 13108, 13109, 13110), CITY_VARROCK("Varrock", DiscordAreaType.CITIES, 12596, 12597, 12598, 12852, 12853, 12854, 13108, 13109, 13110),
CITY_WITCHHAVEN("Witchaven" , DiscordAreaType.CITIES, 10803), CITY_WITCHHAVEN("Witchaven", DiscordAreaType.CITIES, 10803),
CITY_WOODCUTTING_GUILD("Woodcutting Guild", DiscordAreaType.CITIES, 6454, 6198, 6298), CITY_WOODCUTTING_GUILD("Woodcutting Guild", DiscordAreaType.CITIES, 6454, 6198, 6298),
CITY_YANILLE("Yanille" , DiscordAreaType.CITIES, 10288, 10032), CITY_YANILLE("Yanille", DiscordAreaType.CITIES, 10288, 10032),
CITY_ZANARIS("Zanaris" , DiscordAreaType.CITIES, 9285, 9541, 9540, 9797), CITY_ZANARIS("Zanaris", DiscordAreaType.CITIES, 9285, 9541, 9540, 9797),
CITY_ZULANDRA("Zul-Andra" , DiscordAreaType.CITIES, 8751), CITY_ZULANDRA("Zul-Andra", DiscordAreaType.CITIES, 8751),
// Dungeons // Dungeons
DUNGEON_ABANDONED_MINE("Abandoned Mine", DiscordAreaType.DUNGEONS, 13718, 11079, 11078, 11077, 10823, 10822, 10821), DUNGEON_ABANDONED_MINE("Abandoned Mine", DiscordAreaType.DUNGEONS, 13718, 11079, 11078, 11077, 10823, 10822, 10821),
@@ -358,29 +358,52 @@ enum DiscordGameEventType
{ {
switch (skill) switch (skill)
{ {
case ATTACK: return TRAINING_ATTACK; case ATTACK:
case DEFENCE: return TRAINING_DEFENCE; return TRAINING_ATTACK;
case STRENGTH: return TRAINING_STRENGTH; case DEFENCE:
case RANGED: return TRAINING_RANGED; return TRAINING_DEFENCE;
case PRAYER: return TRAINING_PRAYER; case STRENGTH:
case MAGIC: return TRAINING_MAGIC; return TRAINING_STRENGTH;
case COOKING: return TRAINING_COOKING; case RANGED:
case WOODCUTTING: return TRAINING_WOODCUTTING; return TRAINING_RANGED;
case FLETCHING: return TRAINING_FLETCHING; case PRAYER:
case FISHING: return TRAINING_FISHING; return TRAINING_PRAYER;
case FIREMAKING: return TRAINING_FIREMAKING; case MAGIC:
case CRAFTING: return TRAINING_CRAFTING; return TRAINING_MAGIC;
case SMITHING: return TRAINING_SMITHING; case COOKING:
case MINING: return TRAINING_MINING; return TRAINING_COOKING;
case HERBLORE: return TRAINING_HERBLORE; case WOODCUTTING:
case AGILITY: return TRAINING_AGILITY; return TRAINING_WOODCUTTING;
case THIEVING: return TRAINING_THIEVING; case FLETCHING:
case SLAYER: return TRAINING_SLAYER; return TRAINING_FLETCHING;
case FARMING: return TRAINING_FARMING; case FISHING:
case RUNECRAFT: return TRAINING_RUNECRAFT; return TRAINING_FISHING;
case HUNTER: return TRAINING_HUNTER; case FIREMAKING:
case CONSTRUCTION: return TRAINING_CONSTRUCTION; return TRAINING_FIREMAKING;
default: return null; case CRAFTING:
return TRAINING_CRAFTING;
case SMITHING:
return TRAINING_SMITHING;
case MINING:
return TRAINING_MINING;
case HERBLORE:
return TRAINING_HERBLORE;
case AGILITY:
return TRAINING_AGILITY;
case THIEVING:
return TRAINING_THIEVING;
case SLAYER:
return TRAINING_SLAYER;
case FARMING:
return TRAINING_FARMING;
case RUNECRAFT:
return TRAINING_RUNECRAFT;
case HUNTER:
return TRAINING_HUNTER;
case CONSTRUCTION:
return TRAINING_CONSTRUCTION;
default:
return null;
} }
} }

View File

@@ -417,10 +417,14 @@ public class DiscordPlugin extends Plugin
switch (event.getDiscordAreaType()) switch (event.getDiscordAreaType())
{ {
case BOSSES: return config.showBossActivity(); case BOSSES:
case CITIES: return config.showCityActivity(); return config.showBossActivity();
case DUNGEONS: return config.showDungeonActivity(); case CITIES:
case MINIGAMES: return config.showMinigameActivity(); return config.showCityActivity();
case DUNGEONS:
return config.showDungeonActivity();
case MINIGAMES:
return config.showMinigameActivity();
} }
return false; return false;

View File

@@ -24,19 +24,22 @@
*/ */
package net.runelite.client.plugins.easyscape; package net.runelite.client.plugins.easyscape;
public enum DuelingRingMode { public enum DuelingRingMode
DUEL_ARENA("Duel Arena"), {
CASTLE_WARS("Castle Wars"), DUEL_ARENA("Duel Arena"),
CLAN_WARS("Clan Wars"); CASTLE_WARS("Castle Wars"),
CLAN_WARS("Clan Wars");
private final String name; private final String name;
DuelingRingMode(String name) { DuelingRingMode(String name)
this.name = name; {
} this.name = name;
}
@Override @Override
public String toString() { public String toString()
return name; {
} return name;
}
} }

View File

@@ -25,10 +25,13 @@
package net.runelite.client.plugins.easyscape; package net.runelite.client.plugins.easyscape;
import com.google.inject.Provides; import com.google.inject.Provides;
import javax.inject.Inject;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.runelite.api.Client; import net.runelite.api.Client;
import net.runelite.api.GameState; import net.runelite.api.GameState;
import net.runelite.api.MenuAction; import net.runelite.api.MenuAction;
import static net.runelite.api.MenuAction.MENU_ACTION_DEPRIORITIZE_OFFSET;
import static net.runelite.api.MenuAction.WALK;
import net.runelite.api.MenuEntry; import net.runelite.api.MenuEntry;
import net.runelite.api.Player; import net.runelite.api.Player;
import net.runelite.api.coords.WorldPoint; import net.runelite.api.coords.WorldPoint;
@@ -43,322 +46,390 @@ import net.runelite.client.plugins.PluginType;
import static net.runelite.client.util.MenuUtil.swap; import static net.runelite.client.util.MenuUtil.swap;
import net.runelite.client.util.Text; import net.runelite.client.util.Text;
import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.ArrayUtils;
import javax.inject.Inject;
import static net.runelite.api.MenuAction.MENU_ACTION_DEPRIORITIZE_OFFSET;
import static net.runelite.api.MenuAction.WALK;
@PluginDescriptor( @PluginDescriptor(
name = "Easyscape", name = "Easyscape",
description = "Easyscape.", description = "Easyscape.",
tags = {"Easyscape"}, tags = {"Easyscape"},
enabledByDefault = false, enabledByDefault = false,
type = PluginType.UTILITY type = PluginType.UTILITY
) )
@Slf4j @Slf4j
public class EasyscapePlugin extends Plugin { public class EasyscapePlugin extends Plugin
{
private static final int PURO_PURO_REGION_ID = 10307; private static final int PURO_PURO_REGION_ID = 10307;
private static final int HOUSE_REGION_ID = 7513; private static final int HOUSE_REGION_ID = 7513;
private MenuEntry[] entries; private MenuEntry[] entries;
@Inject @Inject
private Client client; private Client client;
@Inject @Inject
private EasyscapePluginConfig config; private EasyscapePluginConfig config;
@Provides @Provides
EasyscapePluginConfig provideConfig(ConfigManager configManager) { EasyscapePluginConfig provideConfig(ConfigManager configManager)
return configManager.getConfig(EasyscapePluginConfig.class); {
} return configManager.getConfig(EasyscapePluginConfig.class);
}
@Override @Override
public void startUp() { public void startUp()
log.debug("Easyscape Started."); {
} log.debug("Easyscape Started.");
}
@Override @Override
public void shutDown() { public void shutDown()
log.debug("Easyscape Stopped."); {
} log.debug("Easyscape Stopped.");
}
@Subscribe @Subscribe
public void onMenuEntryAdded(MenuEntryAdded event) { public void onMenuEntryAdded(MenuEntryAdded event)
{
if (client.getGameState() != GameState.LOGGED_IN) { if (client.getGameState() != GameState.LOGGED_IN)
return; {
} return;
}
Widget loginScreenOne = client.getWidget(WidgetInfo.LOGIN_CLICK_TO_PLAY_SCREEN); Widget loginScreenOne = client.getWidget(WidgetInfo.LOGIN_CLICK_TO_PLAY_SCREEN);
Widget loginScreenTwo = client.getWidget(WidgetInfo.LOGIN_CLICK_TO_PLAY_SCREEN_MESSAGE_OF_THE_DAY); Widget loginScreenTwo = client.getWidget(WidgetInfo.LOGIN_CLICK_TO_PLAY_SCREEN_MESSAGE_OF_THE_DAY);
if (loginScreenOne != null || loginScreenTwo != null) { if (loginScreenOne != null || loginScreenTwo != null)
return; {
} return;
}
final String option = Text.removeTags(event.getOption()).toLowerCase(); final String option = Text.removeTags(event.getOption()).toLowerCase();
final String target = Text.removeTags(event.getTarget()).toLowerCase(); final String target = Text.removeTags(event.getTarget()).toLowerCase();
entries = client.getMenuEntries(); entries = client.getMenuEntries();
if (config.getRemoveExamine()) { if (config.getRemoveExamine())
for (int i = entries.length - 1; i >= 0; i--) { {
if (entries[i].getOption().equals("Examine")) { for (int i = entries.length - 1; i >= 0; i--)
entries = ArrayUtils.remove(entries, i); {
i--; if (entries[i].getOption().equals("Examine"))
} {
} entries = ArrayUtils.remove(entries, i);
client.setMenuEntries(entries); i--;
} }
}
client.setMenuEntries(entries);
}
if (config.getRemoveObjects() && !config.getRemovedObjects().equals("")) { if (config.getRemoveObjects() && !config.getRemovedObjects().equals(""))
for (String removed : config.getRemovedObjects().split(",")) { {
removed = removed.trim(); for (String removed : config.getRemovedObjects().split(","))
if (target.contains("->")) { {
String trimmed = target.split("->")[1].trim(); removed = removed.trim();
if (trimmed.length() >= removed.length() && trimmed.substring(0, removed.length()).equalsIgnoreCase(removed)) { if (target.contains("->"))
delete(event.getIdentifier()); {
break; String trimmed = target.split("->")[1].trim();
} if (trimmed.length() >= removed.length() && trimmed.substring(0, removed.length()).equalsIgnoreCase(removed))
} {
if (target.length() >= removed.length() && target.substring(0, removed.length()).equalsIgnoreCase(removed)) { delete(event.getIdentifier());
delete(event.getIdentifier()); break;
break; }
} }
} if (target.length() >= removed.length() && target.substring(0, removed.length()).equalsIgnoreCase(removed))
} {
delete(event.getIdentifier());
break;
}
}
}
if (config.getSwapPuro() && isPuroPuro()) { if (config.getSwapPuro() && isPuroPuro())
if (event.getType() == WALK.getId()) { {
MenuEntry menuEntry = entries[entries.length - 1]; if (event.getType() == WALK.getId())
menuEntry.setType(MenuAction.WALK.getId() + MENU_ACTION_DEPRIORITIZE_OFFSET); {
client.setMenuEntries(entries); MenuEntry menuEntry = entries[entries.length - 1];
} menuEntry.setType(MenuAction.WALK.getId() + MENU_ACTION_DEPRIORITIZE_OFFSET);
else if (option.equalsIgnoreCase("examine")) { client.setMenuEntries(entries);
swap(client, "push-through", option, target); }
} else if (option.equalsIgnoreCase("examine"))
else if (option.equalsIgnoreCase("use")) { {
swap(client, "escape", option, target); swap(client, "push-through", option, target);
} }
} else if (option.equalsIgnoreCase("use"))
{
swap(client, "escape", option, target);
}
}
if (config.getEasyConstruction() && !config.getConstructionItems().equals("")) { if (config.getEasyConstruction() && !config.getConstructionItems().equals(""))
if (event.getType() == WALK.getId()) { {
MenuEntry menuEntry = entries[entries.length - 1]; if (event.getType() == WALK.getId())
menuEntry.setType(MenuAction.WALK.getId() + MENU_ACTION_DEPRIORITIZE_OFFSET); {
client.setMenuEntries(entries); MenuEntry menuEntry = entries[entries.length - 1];
} menuEntry.setType(MenuAction.WALK.getId() + MENU_ACTION_DEPRIORITIZE_OFFSET);
client.setMenuEntries(entries);
}
swap(client, "Build", option, target); swap(client, "Build", option, target);
for (int i = entries.length - 1; i >= 0; i--) { for (int i = entries.length - 1; i >= 0; i--)
for (String item : config.getConstructionItems().split(",")) { {
if (item.trim().equalsIgnoreCase(Text.removeTags(entries[i].getTarget()))) { for (String item : config.getConstructionItems().split(","))
if (!entries[i].getOption().equalsIgnoreCase("remove")) { {
entries = ArrayUtils.remove(entries, i); if (item.trim().equalsIgnoreCase(Text.removeTags(entries[i].getTarget())))
i--; {
} if (!entries[i].getOption().equalsIgnoreCase("remove"))
} {
} entries = ArrayUtils.remove(entries, i);
} i--;
}
}
}
}
client.setMenuEntries(entries); client.setMenuEntries(entries);
} }
if (config.getSwapShop() && !config.getSwappedItems().equals("")) { if (config.getSwapShop() && !config.getSwappedItems().equals(""))
for (String item : config.getSwappedItems().split(",")) { {
if (target.equalsIgnoreCase(item.trim())) { for (String item : config.getSwappedItems().split(","))
swap(client, "Buy 50", option, target); {
} if (target.equalsIgnoreCase(item.trim()))
} {
} swap(client, "Buy 50", option, target);
}
}
}
if (config.getSwapSmithing()) { if (config.getSwapSmithing())
if (option.equalsIgnoreCase("Smith 1")) { {
swap(client, "Smith All", option, target); if (option.equalsIgnoreCase("Smith 1"))
} else if (option.equalsIgnoreCase("Smith 1 Set")) { {
swap(client, "Smith All Sets", option, target); swap(client, "Smith All", option, target);
} }
} else if (option.equalsIgnoreCase("Smith 1 Set"))
{
swap(client, "Smith All Sets", option, target);
}
}
if (config.getSwapTanning() && option.equalsIgnoreCase("Tan 1")) { if (config.getSwapTanning() && option.equalsIgnoreCase("Tan 1"))
swap(client, "Tan All", option, target); {
} swap(client, "Tan All", option, target);
}
if (config.getSwapCrafting() && option.equalsIgnoreCase("Make-1")) { if (config.getSwapCrafting() && option.equalsIgnoreCase("Make-1"))
swap(client, "Make-All", option, target); {
} swap(client, "Make-All", option, target);
}
if (config.getSwapSawmill() && target.equalsIgnoreCase("Sawmill operator")) { if (config.getSwapSawmill() && target.equalsIgnoreCase("Sawmill operator"))
swap(client, "Buy-plank", option, target); {
} swap(client, "Buy-plank", option, target);
}
if (config.getSwapSawmillPlanks() && option.equalsIgnoreCase("Buy 1")) { if (config.getSwapSawmillPlanks() && option.equalsIgnoreCase("Buy 1"))
swap(client, "Buy All", option, target); {
} swap(client, "Buy All", option, target);
}
if (config.getSwapStairs() && option.equalsIgnoreCase("Climb Stairs")) { if (config.getSwapStairs() && option.equalsIgnoreCase("Climb Stairs"))
swap(client, "Climb Up Stairs", option, target); {
} swap(client, "Climb Up Stairs", option, target);
}
if (option.equalsIgnoreCase("Clear-All") && target.equalsIgnoreCase("Bank Filler")) { if (option.equalsIgnoreCase("Clear-All") && target.equalsIgnoreCase("Bank Filler"))
swap(client, "Clear", option, target); {
} swap(client, "Clear", option, target);
}
if (target.toLowerCase().contains("ardougne cloak") && config.getSwapArdougneCape()) { if (target.toLowerCase().contains("ardougne cloak") && config.getSwapArdougneCape())
swap(client, "Kandarin Monastery", option, target); {
swap(client, "Monastery Teleport", option, target); swap(client, "Kandarin Monastery", option, target);
} swap(client, "Monastery Teleport", option, target);
}
if (config.getSwapEssencePouch()) { if (config.getSwapEssencePouch())
if (isEssencePouch(target)) { {
Widget widgetBankTitleBar = client.getWidget(WidgetInfo.BANK_TITLE_BAR); if (isEssencePouch(target))
switch (config.getEssenceMode()) { {
case RUNECRAFTING: Widget widgetBankTitleBar = client.getWidget(WidgetInfo.BANK_TITLE_BAR);
if (widgetBankTitleBar == null || widgetBankTitleBar.isHidden()) { switch (config.getEssenceMode())
swap(client, "Empty", option, target); {
} else { case RUNECRAFTING:
swap(client, "Fill", option, target); if (widgetBankTitleBar == null || widgetBankTitleBar.isHidden())
} {
break; swap(client, "Empty", option, target);
case ESSENCE_MINING: }
if (widgetBankTitleBar == null || widgetBankTitleBar.isHidden()) { else
swap(client, "Fill", option, target); {
} else { swap(client, "Fill", option, target);
swap(client, "Empty", option, target); }
} break;
break; case ESSENCE_MINING:
default: if (widgetBankTitleBar == null || widgetBankTitleBar.isHidden())
break; {
} swap(client, "Fill", option, target);
} }
} else
{
swap(client, "Empty", option, target);
}
break;
default:
break;
}
}
}
if (config.getGamesNecklace()) { if (config.getGamesNecklace())
if (target.toLowerCase().contains("games necklace")) { {
switch (config.getGamesNecklaceMode()) { if (target.toLowerCase().contains("games necklace"))
case BURTHORPE: {
swap(client, GamesNecklaceMode.BURTHORPE.toString(), option, target); switch (config.getGamesNecklaceMode())
break; {
case BARBARIAN_OUTPOST: case BURTHORPE:
swap(client, GamesNecklaceMode.BARBARIAN_OUTPOST.toString(), option, target); swap(client, GamesNecklaceMode.BURTHORPE.toString(), option, target);
break; break;
case CORPOREAL_BEAST: case BARBARIAN_OUTPOST:
swap(client, GamesNecklaceMode.CORPOREAL_BEAST.toString(), option, target); swap(client, GamesNecklaceMode.BARBARIAN_OUTPOST.toString(), option, target);
break; break;
case TEARS_OF_GUTHIX: case CORPOREAL_BEAST:
swap(client, GamesNecklaceMode.TEARS_OF_GUTHIX.toString(), option, target); swap(client, GamesNecklaceMode.CORPOREAL_BEAST.toString(), option, target);
break; break;
case WINTERTODT: case TEARS_OF_GUTHIX:
swap(client, GamesNecklaceMode.WINTERTODT.toString(), option, target); swap(client, GamesNecklaceMode.TEARS_OF_GUTHIX.toString(), option, target);
break; break;
default: case WINTERTODT:
break; swap(client, GamesNecklaceMode.WINTERTODT.toString(), option, target);
} break;
} default:
} break;
}
}
}
if (config.getDuelingRing()) { if (config.getDuelingRing())
if (target.toLowerCase().contains("ring of dueling")) { {
switch (config.getDuelingRingMode()) { if (target.toLowerCase().contains("ring of dueling"))
case DUEL_ARENA: {
swap(client, DuelingRingMode.DUEL_ARENA.toString(), option, target); switch (config.getDuelingRingMode())
break; {
case CASTLE_WARS: case DUEL_ARENA:
swap(client, DuelingRingMode.CASTLE_WARS.toString(), option, target); swap(client, DuelingRingMode.DUEL_ARENA.toString(), option, target);
break; break;
case CLAN_WARS: case CASTLE_WARS:
swap(client, DuelingRingMode.CLAN_WARS.toString(), option, target); swap(client, DuelingRingMode.CASTLE_WARS.toString(), option, target);
break; break;
default: case CLAN_WARS:
break; swap(client, DuelingRingMode.CLAN_WARS.toString(), option, target);
} break;
} default:
} break;
}
}
}
if (config.getWealthRing()) { if (config.getWealthRing())
if (target.toLowerCase().contains("ring of wealth")) { {
switch (config.getWealthRingMode()) { if (target.toLowerCase().contains("ring of wealth"))
case MISCELLANIA: {
swap(client, WealthRingMode.MISCELLANIA.toString(), option, target); switch (config.getWealthRingMode())
break; {
case GRAND_EXCHANGE: case MISCELLANIA:
swap(client, WealthRingMode.GRAND_EXCHANGE.toString(), option, target); swap(client, WealthRingMode.MISCELLANIA.toString(), option, target);
break; break;
case FALADOR: case GRAND_EXCHANGE:
swap(client, WealthRingMode.FALADOR.toString(), option, target); swap(client, WealthRingMode.GRAND_EXCHANGE.toString(), option, target);
break; break;
case FALADOR:
swap(client, WealthRingMode.FALADOR.toString(), option, target);
break;
case DONDAKAN: case DONDAKAN:
swap(client, WealthRingMode.DONDAKAN.toString(), option, target); swap(client, WealthRingMode.DONDAKAN.toString(), option, target);
break; break;
default: default:
break; break;
} }
} }
} }
if (config.getGlory()) { if (config.getGlory())
if (target.toLowerCase().contains("amulet of glory") || target.toLowerCase().contains("amulet of eternal glory")) { {
switch (config.getGloryMode()) { if (target.toLowerCase().contains("amulet of glory") || target.toLowerCase().contains("amulet of eternal glory"))
case EDGEVILLE: {
swap(client, GloryMode.EDGEVILLE.toString(), option, target); switch (config.getGloryMode())
break; {
case KARAMJA: case EDGEVILLE:
swap(client, GloryMode.KARAMJA.toString(), option, target); swap(client, GloryMode.EDGEVILLE.toString(), option, target);
break; break;
case DRAYNOR_VILLAGE: case KARAMJA:
swap(client, GloryMode.DRAYNOR_VILLAGE.toString(), option, target); swap(client, GloryMode.KARAMJA.toString(), option, target);
break; break;
case AL_KHARID: case DRAYNOR_VILLAGE:
swap(client, GloryMode.AL_KHARID.toString(), option, target); swap(client, GloryMode.DRAYNOR_VILLAGE.toString(), option, target);
break; break;
default: case AL_KHARID:
break; swap(client, GloryMode.AL_KHARID.toString(), option, target);
} break;
} default:
} break;
}
}
}
if (target.toLowerCase().contains("crafting cape") && config.getSwapCraftingCape()) { if (target.toLowerCase().contains("crafting cape") && config.getSwapCraftingCape())
swap(client, "Teleport", option, target); {
swap(client, "Teleport", option, target);
} }
if (target.toLowerCase().contains("construct. cape") && config.getSwapConstructionCape()) { if (target.toLowerCase().contains("construct. cape") && config.getSwapConstructionCape())
swap(client, "Tele to poh", option, target); {
swap(client, "Tele to poh", option, target);
} }
} }
private void delete(int target) { private void delete(int target)
for (int i = entries.length - 1; i >= 0; i--) { {
if (entries[i].getIdentifier() == target) { for (int i = entries.length - 1; i >= 0; i--)
entries = ArrayUtils.remove(entries, i); {
i--; if (entries[i].getIdentifier() == target)
} {
} entries = ArrayUtils.remove(entries, i);
client.setMenuEntries(entries); i--;
} }
}
client.setMenuEntries(entries);
}
private boolean isEssencePouch(String target) { private boolean isEssencePouch(String target)
return (target.equalsIgnoreCase("Small Pouch") || target.equalsIgnoreCase("Medium Pouch") || target.equalsIgnoreCase("Large Pouch") || target.equalsIgnoreCase("Giant Pouch")); {
} return (target.equalsIgnoreCase("Small Pouch") || target.equalsIgnoreCase("Medium Pouch") || target.equalsIgnoreCase("Large Pouch") || target.equalsIgnoreCase("Giant Pouch"));
}
private boolean isHouse() { private boolean isHouse()
return client.getMapRegions()[0] == HOUSE_REGION_ID; {
} return client.getMapRegions()[0] == HOUSE_REGION_ID;
}
private boolean isPuroPuro() { private boolean isPuroPuro()
Player player = client.getLocalPlayer(); {
Player player = client.getLocalPlayer();
if (player == null) { if (player == null)
return false; {
} else { return false;
WorldPoint location = player.getWorldLocation(); }
return location.getRegionID() == PURO_PURO_REGION_ID; else
} {
} WorldPoint location = player.getWorldLocation();
return location.getRegionID() == PURO_PURO_REGION_ID;
}
}
} }

View File

@@ -29,285 +29,313 @@ import net.runelite.client.config.ConfigGroup;
import net.runelite.client.config.ConfigItem; import net.runelite.client.config.ConfigItem;
@ConfigGroup("easyscape") @ConfigGroup("easyscape")
public interface EasyscapePluginConfig extends Config { public interface EasyscapePluginConfig extends Config
{
@ConfigItem( @ConfigItem(
keyName = "removeExamine", keyName = "removeExamine",
name = "Remove Examine", name = "Remove Examine",
description = "", description = "",
position = 0 position = 0
) )
default boolean getRemoveExamine() { default boolean getRemoveExamine()
return true; {
} return true;
}
@ConfigItem( @ConfigItem(
keyName = "swapShop", keyName = "swapShop",
name = "Easy Shop", name = "Easy Shop",
description = "Enables swapping of items in the shop with their buy-50 option.", description = "Enables swapping of items in the shop with their buy-50 option.",
position = 1 position = 1
) )
default boolean getSwapShop() { default boolean getSwapShop()
return true; {
} return true;
}
@ConfigItem( @ConfigItem(
keyName = "swappedItems", keyName = "swappedItems",
name = "Shop Items", name = "Shop Items",
description = "Items listed here will have their value and buy-50 options swapped.", description = "Items listed here will have their value and buy-50 options swapped.",
position = 2 position = 2
) )
default String getSwappedItems() { default String getSwappedItems()
return ""; {
} return "";
}
@ConfigItem( @ConfigItem(
keyName = "easyConstruction", keyName = "easyConstruction",
name = "Easy Construction", name = "Easy Construction",
description = "", description = "",
position = 3 position = 3
) )
default boolean getEasyConstruction() { default boolean getEasyConstruction()
return true; {
} return true;
}
@ConfigItem( @ConfigItem(
keyName = "constructionItems", keyName = "constructionItems",
name = "Construction Items", name = "Construction Items",
description = "", description = "",
position = 4 position = 4
) )
default String getConstructionItems() { default String getConstructionItems()
return ""; {
} return "";
}
@ConfigItem( @ConfigItem(
keyName = "removeObjects", keyName = "removeObjects",
name = "Remove Objects", name = "Remove Objects",
description = "", description = "",
position = 5 position = 5
) )
default boolean getRemoveObjects() { default boolean getRemoveObjects()
return true; {
} return true;
}
@ConfigItem( @ConfigItem(
keyName = "removedObjects", keyName = "removedObjects",
name = "Removed Objects", name = "Removed Objects",
description = "", description = "",
position = 6 position = 6
) )
default String getRemovedObjects() { default String getRemovedObjects()
return ""; {
} return "";
}
@ConfigItem( @ConfigItem(
keyName = "swapSmithing", keyName = "swapSmithing",
name = "Swap Smithing", name = "Swap Smithing",
description = "Enables swapping of smith-1 and smith-all options.", description = "Enables swapping of smith-1 and smith-all options.",
position = 7 position = 7
) )
default boolean getSwapSmithing() { default boolean getSwapSmithing()
return true; {
} return true;
}
@ConfigItem( @ConfigItem(
keyName = "swapTanning", keyName = "swapTanning",
name = "Swap Tanning", name = "Swap Tanning",
description = "Enables swapping of tan-1 and tan-all options.", description = "Enables swapping of tan-1 and tan-all options.",
position = 8 position = 8
) )
default boolean getSwapTanning() { default boolean getSwapTanning()
return true; {
} return true;
}
@ConfigItem( @ConfigItem(
keyName = "swapCrafting", keyName = "swapCrafting",
name = "Swap Crafting", name = "Swap Crafting",
description = "", description = "",
position = 9 position = 9
) )
default boolean getSwapCrafting() { default boolean getSwapCrafting()
return true; {
} return true;
}
@ConfigItem( @ConfigItem(
keyName = "swapArdougneCape", keyName = "swapArdougneCape",
name = "Swap Ardougne Cape", name = "Swap Ardougne Cape",
description = "Enables swapping of teleport and wear.", description = "Enables swapping of teleport and wear.",
position = 10 position = 10
) )
default boolean getSwapArdougneCape() { default boolean getSwapArdougneCape()
return true; {
} return true;
}
@ConfigItem( @ConfigItem(
keyName = "swapStairs", keyName = "swapStairs",
name = "Swap Stairs", name = "Swap Stairs",
description = "", description = "",
position = 11 position = 11
) )
default boolean getSwapStairs() { default boolean getSwapStairs()
return true; {
} return true;
}
@ConfigItem( @ConfigItem(
keyName = "swapSawmill", keyName = "swapSawmill",
name = "Swap Sawmill Operator", name = "Swap Sawmill Operator",
description = "", description = "",
position = 12 position = 12
) )
default boolean getSwapSawmill() { default boolean getSwapSawmill()
return true; {
} return true;
}
@ConfigItem( @ConfigItem(
keyName = "swapSawmillPlanks", keyName = "swapSawmillPlanks",
name = "Swap Buy Planks", name = "Swap Buy Planks",
description = "", description = "",
position = 13 position = 13
) )
default boolean getSwapSawmillPlanks() { default boolean getSwapSawmillPlanks()
return true; {
} return true;
}
@ConfigItem( @ConfigItem(
keyName = "swapPuroPuro", keyName = "swapPuroPuro",
name = "Swap Puro Puro Wheat", name = "Swap Puro Puro Wheat",
description = "", description = "",
position = 14 position = 14
) )
default boolean getSwapPuro() { default boolean getSwapPuro()
return true; {
} return true;
}
@ConfigItem( @ConfigItem(
keyName = "swapEssencePounch", keyName = "swapEssencePounch",
name = "Swap Essence Pouch", name = "Swap Essence Pouch",
description = "Enables swapping of fill and empty for essence pounch.", description = "Enables swapping of fill and empty for essence pounch.",
position = 15 position = 15
) )
default boolean getSwapEssencePouch() { default boolean getSwapEssencePouch()
return true; {
} return true;
}
@ConfigItem( @ConfigItem(
keyName = "essenceMode", keyName = "essenceMode",
name = "Essence Pouch Mode", name = "Essence Pouch Mode",
description = "Runecrafting or essence mining mode.", description = "Runecrafting or essence mining mode.",
position = 16 position = 16
) )
default EssenceMode getEssenceMode() { default EssenceMode getEssenceMode()
return EssenceMode.RUNECRAFTING; {
} return EssenceMode.RUNECRAFTING;
}
@ConfigItem( @ConfigItem(
keyName = "swapGamesNecklace", keyName = "swapGamesNecklace",
name = "Swap Games Necklace", name = "Swap Games Necklace",
description = "Enables swapping of games necklace.", description = "Enables swapping of games necklace.",
position = 17 position = 17
) )
default boolean getGamesNecklace() { default boolean getGamesNecklace()
return true; {
} return true;
}
@ConfigItem( @ConfigItem(
keyName = "gamesNecklaceMode", keyName = "gamesNecklaceMode",
name = "Games Necklace Mode", name = "Games Necklace Mode",
description = "Teleport location mode.", description = "Teleport location mode.",
position = 18 position = 18
) )
default GamesNecklaceMode getGamesNecklaceMode() { default GamesNecklaceMode getGamesNecklaceMode()
return GamesNecklaceMode.BURTHORPE; {
} return GamesNecklaceMode.BURTHORPE;
}
@ConfigItem( @ConfigItem(
keyName = "swapDuelingRing", keyName = "swapDuelingRing",
name = "Swap Dueling Ring", name = "Swap Dueling Ring",
description = "Enables swapping of dueling ring.", description = "Enables swapping of dueling ring.",
position = 19 position = 19
) )
default boolean getDuelingRing() { default boolean getDuelingRing()
return true; {
} return true;
}
@ConfigItem( @ConfigItem(
keyName = "duelingRingMode", keyName = "duelingRingMode",
name = "Dueling Ring Mode", name = "Dueling Ring Mode",
description = "Teleport location mode.", description = "Teleport location mode.",
position = 20 position = 20
) )
default DuelingRingMode getDuelingRingMode() { default DuelingRingMode getDuelingRingMode()
return DuelingRingMode.DUEL_ARENA; {
} return DuelingRingMode.DUEL_ARENA;
}
@ConfigItem( @ConfigItem(
keyName = "swapGlory", keyName = "swapGlory",
name = "Swap Glory", name = "Swap Glory",
description = "Enables swapping of Amulet of Glory.", description = "Enables swapping of Amulet of Glory.",
position = 21 position = 21
) )
default boolean getGlory() { default boolean getGlory()
return true; {
} return true;
}
@ConfigItem( @ConfigItem(
keyName = "gloryMode", keyName = "gloryMode",
name = "Glory Mode", name = "Glory Mode",
description = "Teleport location mode.", description = "Teleport location mode.",
position = 22 position = 22
) )
default GloryMode getGloryMode() { default GloryMode getGloryMode()
return GloryMode.EDGEVILLE; {
} return GloryMode.EDGEVILLE;
}
@ConfigItem( @ConfigItem(
keyName = "swapWealthRing", keyName = "swapWealthRing",
name = "Swap Ring of Wealth", name = "Swap Ring of Wealth",
description = "Enables swapping of Ring of Wealth.", description = "Enables swapping of Ring of Wealth.",
position = 23 position = 23
) )
default boolean getWealthRing() { default boolean getWealthRing()
return true; {
} return true;
}
@ConfigItem( @ConfigItem(
keyName = "WealthRingMode", keyName = "WealthRingMode",
name = "Wealth Ring Mode", name = "Wealth Ring Mode",
description = "Teleport location mode.", description = "Teleport location mode.",
position = 24 position = 24
) )
default WealthRingMode getWealthRingMode() { default WealthRingMode getWealthRingMode()
return WealthRingMode.GRAND_EXCHANGE; {
} return WealthRingMode.GRAND_EXCHANGE;
}
@ConfigItem( @ConfigItem(
keyName = "swapConstructionCape", keyName = "swapConstructionCape",
name = "Swap Construction Cape", name = "Swap Construction Cape",
description = "Enables swapping of teleport and wear.", description = "Enables swapping of teleport and wear.",
position = 25 position = 25
) )
default boolean getSwapConstructionCape() { default boolean getSwapConstructionCape()
return true; {
} return true;
}
@ConfigItem( @ConfigItem(
keyName = "swapCraftingCape", keyName = "swapCraftingCape",
name = "Swap Crafting Cape", name = "Swap Crafting Cape",
description = "Enables swapping of teleport and wear.", description = "Enables swapping of teleport and wear.",
position = 26 position = 26
) )
default boolean getSwapCraftingCape() { default boolean getSwapCraftingCape()
return true; {
} return true;
}
} }

View File

@@ -24,18 +24,21 @@
*/ */
package net.runelite.client.plugins.easyscape; package net.runelite.client.plugins.easyscape;
public enum EssenceMode { public enum EssenceMode
RUNECRAFTING("Runecrafting"), {
ESSENCE_MINING("Essence Mining"); RUNECRAFTING("Runecrafting"),
ESSENCE_MINING("Essence Mining");
private final String name; private final String name;
EssenceMode(String name) { EssenceMode(String name)
this.name = name; {
} this.name = name;
}
@Override @Override
public String toString() { public String toString()
return name; {
} return name;
}
} }

View File

@@ -24,21 +24,24 @@
*/ */
package net.runelite.client.plugins.easyscape; package net.runelite.client.plugins.easyscape;
public enum GamesNecklaceMode { public enum GamesNecklaceMode
BURTHORPE("Burthorpe"), {
BARBARIAN_OUTPOST("Barbarian Outpost"), BURTHORPE("Burthorpe"),
CORPOREAL_BEAST("Corporeal Beast"), BARBARIAN_OUTPOST("Barbarian Outpost"),
TEARS_OF_GUTHIX("Tears of Guthix"), CORPOREAL_BEAST("Corporeal Beast"),
WINTERTODT("Wintertodt Camp"); TEARS_OF_GUTHIX("Tears of Guthix"),
WINTERTODT("Wintertodt Camp");
private final String name; private final String name;
GamesNecklaceMode(String name) { GamesNecklaceMode(String name)
this.name = name; {
} this.name = name;
}
@Override @Override
public String toString() { public String toString()
return name; {
} return name;
}
} }

View File

@@ -24,20 +24,23 @@
*/ */
package net.runelite.client.plugins.easyscape; package net.runelite.client.plugins.easyscape;
public enum GloryMode { public enum GloryMode
EDGEVILLE("Edgeville"), {
KARAMJA("Karamja"), EDGEVILLE("Edgeville"),
DRAYNOR_VILLAGE("Draynor Village"), KARAMJA("Karamja"),
AL_KHARID("Al Kharid"); DRAYNOR_VILLAGE("Draynor Village"),
AL_KHARID("Al Kharid");
private final String name; private final String name;
GloryMode(String name) { GloryMode(String name)
this.name = name; {
} this.name = name;
}
@Override @Override
public String toString() { public String toString()
return name; {
} return name;
}
} }

View File

@@ -24,20 +24,23 @@
*/ */
package net.runelite.client.plugins.easyscape; package net.runelite.client.plugins.easyscape;
public enum WealthRingMode { public enum WealthRingMode
MISCELLANIA ("Miscellania"), {
GRAND_EXCHANGE ("Grand Exchange"), MISCELLANIA("Miscellania"),
FALADOR ("Falador"), GRAND_EXCHANGE("Grand Exchange"),
DONDAKAN ("Dondakan"); FALADOR("Falador"),
DONDAKAN("Dondakan");
private final String name; private final String name;
WealthRingMode(String name) { WealthRingMode(String name)
this.name = name; {
} this.name = name;
}
@Override @Override
public String toString() { public String toString()
return name; {
} return name;
}
} }

View File

@@ -40,7 +40,7 @@ class ItemPanel extends JPanel
ItemPanel(ItemComposition item, KitType kitType, AsyncBufferedImage icon) ItemPanel(ItemComposition item, KitType kitType, AsyncBufferedImage icon)
{ {
setBorder(new EmptyBorder(3, 3, 3, 3)); setBorder(new EmptyBorder(3, 3, 3, 3));
setBackground(ColorScheme.DARK_GRAY_COLOR); setBackground(ColorScheme.DARK_GRAY_COLOR);
GroupLayout layout = new GroupLayout(this); GroupLayout layout = new GroupLayout(this);
@@ -55,20 +55,20 @@ class ItemPanel extends JPanel
icon.addTo(imageLabel); icon.addTo(imageLabel);
layout.setVerticalGroup(layout.createParallelGroup() layout.setVerticalGroup(layout.createParallelGroup()
.addComponent(imageLabel) .addComponent(imageLabel)
.addGroup(layout.createSequentialGroup() .addGroup(layout.createSequentialGroup()
.addComponent(name) .addComponent(name)
.addComponent(location) .addComponent(location)
) )
); );
layout.setHorizontalGroup(layout.createSequentialGroup() layout.setHorizontalGroup(layout.createSequentialGroup()
.addComponent(imageLabel) .addComponent(imageLabel)
.addGap(8) .addGap(8)
.addGroup(layout.createParallelGroup() .addGroup(layout.createParallelGroup()
.addComponent(name) .addComponent(name)
.addComponent(location) .addComponent(location)
) )
); );
// AWT's Z order is weird. This put image at the back of the stack // AWT's Z order is weird. This put image at the back of the stack

View File

@@ -66,10 +66,6 @@ class CacheKey
{ {
return false; return false;
} }
if (this.type != other.type) return this.type == other.type;
{
return false;
}
return true;
} }
} }

View File

@@ -29,5 +29,5 @@ public enum ExamineType
ITEM, ITEM,
ITEM_BANK_EQ, ITEM_BANK_EQ,
NPC, NPC,
OBJECT; OBJECT
} }

View File

@@ -28,5 +28,5 @@ enum PrayerType
{ {
MELEE, MELEE,
RANGE, RANGE,
MAGIC; MAGIC
} }

View File

@@ -88,10 +88,10 @@ public interface XpDropConfig extends Config
} }
@ConfigItem( @ConfigItem(
keyName = "showDamage", keyName = "showDamage",
name = "Show Damage on XP Drop", name = "Show Damage on XP Drop",
description = "Show what you hit next to the XP drop", description = "Show what you hit next to the XP drop",
position = 5 position = 5
) )
default boolean showDamage() default boolean showDamage()
{ {

View File

@@ -27,7 +27,6 @@ package net.runelite.client.plugins.experiencedrop;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.Graphics2D; import java.awt.Graphics2D;
import javax.inject.Inject; import javax.inject.Inject;
import net.runelite.api.Actor; import net.runelite.api.Actor;
import net.runelite.api.Point; import net.runelite.api.Point;
import net.runelite.client.ui.overlay.Overlay; import net.runelite.client.ui.overlay.Overlay;
@@ -61,7 +60,7 @@ class XpDropOverlay extends Overlay
String damageStr = String.valueOf(this.plugin.getDamage()); String damageStr = String.valueOf(this.plugin.getDamage());
Point textLocation = opponent.getCanvasTextLocation(graphics, damageStr, offset); Point textLocation = opponent.getCanvasTextLocation(graphics, damageStr, offset);
if (textLocation != null && this.plugin.getDamage() != 0) if (textLocation != null && this.plugin.getDamage() != 0)
{ {
OverlayUtil.renderTextLocation(graphics, textLocation, damageStr, config.getDamageColor()); OverlayUtil.renderTextLocation(graphics, textLocation, damageStr, config.getDamageColor());
} }

View File

@@ -25,7 +25,6 @@
package net.runelite.client.plugins.experiencedrop; package net.runelite.client.plugins.experiencedrop;
import com.google.inject.Provides; import com.google.inject.Provides;
import java.time.Duration; import java.time.Duration;
import java.time.Instant; import java.time.Instant;
import java.util.Arrays; import java.util.Arrays;
@@ -33,15 +32,23 @@ import java.util.EnumMap;
import java.util.Map; import java.util.Map;
import java.util.stream.IntStream; import java.util.stream.IntStream;
import javax.inject.Inject; import javax.inject.Inject;
import lombok.AccessLevel; import lombok.AccessLevel;
import lombok.Getter; import lombok.Getter;
import net.runelite.api.*; import net.runelite.api.Actor;
import net.runelite.api.Client;
import net.runelite.api.GameState;
import net.runelite.api.NPC;
import net.runelite.api.Player;
import static net.runelite.api.ScriptID.XPDROP_DISABLED; import static net.runelite.api.ScriptID.XPDROP_DISABLED;
import static net.runelite.client.plugins.attackstyles.AttackStyle.*; import net.runelite.api.Skill;
import net.runelite.api.SpriteID;
import net.runelite.api.events.*; import net.runelite.api.VarPlayer;
import net.runelite.api.Varbits;
import net.runelite.api.events.ExperienceChanged;
import net.runelite.api.events.GameTick;
import net.runelite.api.events.InteractingChanged;
import net.runelite.api.events.VarbitChanged;
import net.runelite.api.events.WidgetHiddenChanged;
import net.runelite.api.widgets.Widget; import net.runelite.api.widgets.Widget;
import net.runelite.api.widgets.WidgetID; import net.runelite.api.widgets.WidgetID;
import net.runelite.api.widgets.WidgetInfo; import net.runelite.api.widgets.WidgetInfo;
@@ -52,6 +59,15 @@ import net.runelite.client.game.NPCManager;
import net.runelite.client.plugins.Plugin; import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.plugins.attackstyles.AttackStyle; import net.runelite.client.plugins.attackstyles.AttackStyle;
import static net.runelite.client.plugins.attackstyles.AttackStyle.ACCURATE;
import static net.runelite.client.plugins.attackstyles.AttackStyle.AGGRESSIVE;
import static net.runelite.client.plugins.attackstyles.AttackStyle.CASTING;
import static net.runelite.client.plugins.attackstyles.AttackStyle.CONTROLLED;
import static net.runelite.client.plugins.attackstyles.AttackStyle.DEFENSIVE;
import static net.runelite.client.plugins.attackstyles.AttackStyle.DEFENSIVE_CASTING;
import static net.runelite.client.plugins.attackstyles.AttackStyle.LONGRANGE;
import static net.runelite.client.plugins.attackstyles.AttackStyle.OTHER;
import static net.runelite.client.plugins.attackstyles.AttackStyle.RANGING;
import net.runelite.client.plugins.attackstyles.WeaponType; import net.runelite.client.plugins.attackstyles.WeaponType;
import net.runelite.client.ui.overlay.OverlayManager; import net.runelite.client.ui.overlay.OverlayManager;
import net.runelite.client.util.Text; import net.runelite.client.util.Text;
@@ -127,9 +143,9 @@ public class XpDropPlugin extends Plugin
equippedWeaponTypeVarbit = client.getVar(Varbits.EQUIPPED_WEAPON_TYPE); equippedWeaponTypeVarbit = client.getVar(Varbits.EQUIPPED_WEAPON_TYPE);
castingModeVarbit = client.getVar(Varbits.DEFENSIVE_CASTING_MODE); castingModeVarbit = client.getVar(Varbits.DEFENSIVE_CASTING_MODE);
updateAttackStyle( updateAttackStyle(
equippedWeaponTypeVarbit, equippedWeaponTypeVarbit,
attackStyleVarbit, attackStyleVarbit,
castingModeVarbit); castingModeVarbit);
} }
} }
@@ -212,8 +228,8 @@ public class XpDropPlugin extends Plugin
{ {
case MELEE: case MELEE:
if (spriteIDs.anyMatch(id -> if (spriteIDs.anyMatch(id ->
id == SpriteID.SKILL_ATTACK || id == SpriteID.SKILL_STRENGTH || id == SpriteID.SKILL_DEFENCE id == SpriteID.SKILL_ATTACK || id == SpriteID.SKILL_STRENGTH || id == SpriteID.SKILL_DEFENCE
|| correctPrayer)) || correctPrayer))
{ {
color = config.getMeleePrayerColor().getRGB(); color = config.getMeleePrayerColor().getRGB();
correctPrayer = true; correctPrayer = true;
@@ -423,7 +439,7 @@ public class XpDropPlugin extends Plugin
return -1; return -1;
} }
return (int)((maxHealth * healthRatio / healthScale) + 0.5f); return (int) ((maxHealth * healthRatio / healthScale) + 0.5f);
} }
@Subscribe @Subscribe
@@ -433,21 +449,21 @@ public class XpDropPlugin extends Plugin
{ {
attackStyleVarbit = client.getVar(VarPlayer.ATTACK_STYLE); attackStyleVarbit = client.getVar(VarPlayer.ATTACK_STYLE);
updateAttackStyle(client.getVar(Varbits.EQUIPPED_WEAPON_TYPE), attackStyleVarbit, updateAttackStyle(client.getVar(Varbits.EQUIPPED_WEAPON_TYPE), attackStyleVarbit,
client.getVar(Varbits.DEFENSIVE_CASTING_MODE)); client.getVar(Varbits.DEFENSIVE_CASTING_MODE));
} }
if (equippedWeaponTypeVarbit == -1 || equippedWeaponTypeVarbit != client.getVar(Varbits.EQUIPPED_WEAPON_TYPE)) if (equippedWeaponTypeVarbit == -1 || equippedWeaponTypeVarbit != client.getVar(Varbits.EQUIPPED_WEAPON_TYPE))
{ {
equippedWeaponTypeVarbit = client.getVar(Varbits.EQUIPPED_WEAPON_TYPE); equippedWeaponTypeVarbit = client.getVar(Varbits.EQUIPPED_WEAPON_TYPE);
updateAttackStyle(equippedWeaponTypeVarbit, client.getVar(VarPlayer.ATTACK_STYLE), updateAttackStyle(equippedWeaponTypeVarbit, client.getVar(VarPlayer.ATTACK_STYLE),
client.getVar(Varbits.DEFENSIVE_CASTING_MODE)); client.getVar(Varbits.DEFENSIVE_CASTING_MODE));
} }
if (castingModeVarbit == -1 || castingModeVarbit != client.getVar(Varbits.DEFENSIVE_CASTING_MODE)) if (castingModeVarbit == -1 || castingModeVarbit != client.getVar(Varbits.DEFENSIVE_CASTING_MODE))
{ {
castingModeVarbit = client.getVar(Varbits.DEFENSIVE_CASTING_MODE); castingModeVarbit = client.getVar(Varbits.DEFENSIVE_CASTING_MODE);
updateAttackStyle(client.getVar(Varbits.EQUIPPED_WEAPON_TYPE), client.getVar(VarPlayer.ATTACK_STYLE), updateAttackStyle(client.getVar(Varbits.EQUIPPED_WEAPON_TYPE), client.getVar(VarPlayer.ATTACK_STYLE),
castingModeVarbit); castingModeVarbit);
} }
} }
} }

View File

@@ -26,7 +26,22 @@ package net.runelite.client.plugins.experiencedrop;
import lombok.Getter; import lombok.Getter;
import net.runelite.api.Prayer; import net.runelite.api.Prayer;
import static net.runelite.api.Prayer.*; import static net.runelite.api.Prayer.AUGURY;
import static net.runelite.api.Prayer.BURST_OF_STRENGTH;
import static net.runelite.api.Prayer.CHIVALRY;
import static net.runelite.api.Prayer.CLARITY_OF_THOUGHT;
import static net.runelite.api.Prayer.EAGLE_EYE;
import static net.runelite.api.Prayer.HAWK_EYE;
import static net.runelite.api.Prayer.IMPROVED_REFLEXES;
import static net.runelite.api.Prayer.INCREDIBLE_REFLEXES;
import static net.runelite.api.Prayer.MYSTIC_LORE;
import static net.runelite.api.Prayer.MYSTIC_MIGHT;
import static net.runelite.api.Prayer.MYSTIC_WILL;
import static net.runelite.api.Prayer.PIETY;
import static net.runelite.api.Prayer.RIGOUR;
import static net.runelite.api.Prayer.SHARP_EYE;
import static net.runelite.api.Prayer.SUPERHUMAN_STRENGTH;
import static net.runelite.api.Prayer.ULTIMATE_STRENGTH;
import static net.runelite.client.plugins.experiencedrop.PrayerType.MAGIC; import static net.runelite.client.plugins.experiencedrop.PrayerType.MAGIC;
import static net.runelite.client.plugins.experiencedrop.PrayerType.MELEE; import static net.runelite.client.plugins.experiencedrop.PrayerType.MELEE;
import static net.runelite.client.plugins.experiencedrop.PrayerType.RANGE; import static net.runelite.client.plugins.experiencedrop.PrayerType.RANGE;

View File

@@ -43,7 +43,6 @@ import net.runelite.api.ScriptID;
import net.runelite.api.SoundEffectID; import net.runelite.api.SoundEffectID;
import net.runelite.api.SpriteID; import net.runelite.api.SpriteID;
import net.runelite.api.Varbits; import net.runelite.api.Varbits;
import net.runelite.api.widgets.WidgetType;
import net.runelite.api.events.GameTick; import net.runelite.api.events.GameTick;
import net.runelite.api.events.VarbitChanged; import net.runelite.api.events.VarbitChanged;
import net.runelite.api.events.WidgetLoaded; import net.runelite.api.events.WidgetLoaded;
@@ -51,6 +50,7 @@ import net.runelite.api.widgets.JavaScriptCallback;
import net.runelite.api.widgets.Widget; import net.runelite.api.widgets.Widget;
import net.runelite.api.widgets.WidgetID; import net.runelite.api.widgets.WidgetID;
import net.runelite.api.widgets.WidgetInfo; import net.runelite.api.widgets.WidgetInfo;
import net.runelite.api.widgets.WidgetType;
import net.runelite.client.callback.ClientThread; import net.runelite.client.callback.ClientThread;
import net.runelite.client.config.ConfigManager; import net.runelite.client.config.ConfigManager;
import net.runelite.client.eventbus.Subscribe; import net.runelite.client.eventbus.Subscribe;

View File

@@ -29,25 +29,25 @@ import net.runelite.api.Prayer;
public enum JadAttack public enum JadAttack
{ {
MAGIC(AnimationID.TZTOK_JAD_MAGIC_ATTACK, Prayer.PROTECT_FROM_MAGIC), MAGIC(AnimationID.TZTOK_JAD_MAGIC_ATTACK, Prayer.PROTECT_FROM_MAGIC),
RANGE(AnimationID.TZTOK_JAD_RANGE_ATTACK, Prayer.PROTECT_FROM_MISSILES); RANGE(AnimationID.TZTOK_JAD_RANGE_ATTACK, Prayer.PROTECT_FROM_MISSILES);
private final int animation; private final int animation;
private final Prayer prayer; private final Prayer prayer;
JadAttack(int animation, Prayer prayer) JadAttack(int animation, Prayer prayer)
{ {
this.animation = animation; this.animation = animation;
this.prayer = prayer; this.prayer = prayer;
} }
public int getAnimation() public int getAnimation()
{ {
return animation; return animation;
} }
public Prayer getPrayer() public Prayer getPrayer()
{ {
return prayer; return prayer;
} }
} }

View File

@@ -41,47 +41,47 @@ import net.runelite.client.ui.overlay.components.PanelComponent;
public class JadOverlay extends Overlay public class JadOverlay extends Overlay
{ {
private static final Color NOT_ACTIVATED_BACKGROUND_COLOR = new Color(150, 0, 0, 150); private static final Color NOT_ACTIVATED_BACKGROUND_COLOR = new Color(150, 0, 0, 150);
private final Client client; private final Client client;
private final FightCavePlugin plugin; private final FightCavePlugin plugin;
private final SpriteManager spriteManager; private final SpriteManager spriteManager;
private final PanelComponent imagePanelComponent = new PanelComponent(); private final PanelComponent imagePanelComponent = new PanelComponent();
@Inject @Inject
private JadOverlay(Client client, FightCavePlugin plugin, SpriteManager spriteManager) private JadOverlay(Client client, FightCavePlugin plugin, SpriteManager spriteManager)
{ {
setPosition(OverlayPosition.BOTTOM_RIGHT); setPosition(OverlayPosition.BOTTOM_RIGHT);
setPriority(OverlayPriority.HIGH); setPriority(OverlayPriority.HIGH);
this.client = client; this.client = client;
this.plugin = plugin; this.plugin = plugin;
this.spriteManager = spriteManager; this.spriteManager = spriteManager;
} }
@Override @Override
public Dimension render(Graphics2D graphics) public Dimension render(Graphics2D graphics)
{ {
final JadAttack attack = plugin.getAttack(); final JadAttack attack = plugin.getAttack();
if (attack == null) if (attack == null)
{ {
return null; return null;
} }
final BufferedImage prayerImage = getPrayerImage(attack); final BufferedImage prayerImage = getPrayerImage(attack);
imagePanelComponent.getChildren().clear(); imagePanelComponent.getChildren().clear();
imagePanelComponent.getChildren().add(new ImageComponent(prayerImage)); imagePanelComponent.getChildren().add(new ImageComponent(prayerImage));
imagePanelComponent.setBackgroundColor(client.isPrayerActive(attack.getPrayer()) imagePanelComponent.setBackgroundColor(client.isPrayerActive(attack.getPrayer())
? ComponentConstants.STANDARD_BACKGROUND_COLOR ? ComponentConstants.STANDARD_BACKGROUND_COLOR
: NOT_ACTIVATED_BACKGROUND_COLOR); : NOT_ACTIVATED_BACKGROUND_COLOR);
return imagePanelComponent.render(graphics); return imagePanelComponent.render(graphics);
} }
private BufferedImage getPrayerImage(JadAttack attack) private BufferedImage getPrayerImage(JadAttack attack)
{ {
final int prayerSpriteID = attack == JadAttack.MAGIC ? SpriteID.PRAYER_PROTECT_FROM_MAGIC : SpriteID.PRAYER_PROTECT_FROM_MISSILES; final int prayerSpriteID = attack == JadAttack.MAGIC ? SpriteID.PRAYER_PROTECT_FROM_MAGIC : SpriteID.PRAYER_PROTECT_FROM_MISSILES;
return spriteManager.getSprite(prayerSpriteID, 0); return spriteManager.getSprite(prayerSpriteID, 0);
} }
} }

View File

@@ -89,6 +89,7 @@ class WaveOverlay extends Overlay
return panelComponent.render(graphics); return panelComponent.render(graphics);
} }
private void addWaveInfo(final String headerText, final Map<WaveMonster, Integer> waveContents) private void addWaveInfo(final String headerText, final Map<WaveMonster, Integer> waveContents)
{ {
panelComponent.getChildren().add(TitleComponent.builder() panelComponent.getChildren().add(TitleComponent.builder()

View File

@@ -141,7 +141,7 @@ class FishingSpotOverlay extends Overlay
if (config.showSpotIcons()) if (config.showSpotIcons())
{ {
BufferedImage fishImage = itemManager.getImage(spot.getFishSpriteId());; BufferedImage fishImage = itemManager.getImage(spot.getFishSpriteId());
if (spot == FishingSpot.COMMON_TENCH if (spot == FishingSpot.COMMON_TENCH
&& npc.getWorldLocation().distanceTo2D(client.getLocalPlayer().getWorldLocation()) <= ONE_TICK_AERIAL_FISHING) && npc.getWorldLocation().distanceTo2D(client.getLocalPlayer().getWorldLocation()) <= ONE_TICK_AERIAL_FISHING)

View File

@@ -34,9 +34,7 @@ import java.awt.Point;
import java.awt.Rectangle; import java.awt.Rectangle;
import java.awt.geom.Line2D; import java.awt.geom.Line2D;
import java.util.ArrayList; import java.util.ArrayList;
import javax.annotation.Nullable;
import javax.inject.Inject; import javax.inject.Inject;
import net.runelite.api.Client;
import net.runelite.client.ui.overlay.Overlay; import net.runelite.client.ui.overlay.Overlay;
import net.runelite.client.ui.overlay.OverlayLayer; import net.runelite.client.ui.overlay.OverlayLayer;
import net.runelite.client.ui.overlay.OverlayPosition; import net.runelite.client.ui.overlay.OverlayPosition;

View File

@@ -36,7 +36,7 @@ import net.runelite.api.events.FocusChanged;
* For low powered computers, the RS client is often throttled by the hardware or OS and draws at 25-30 fps. * For low powered computers, the RS client is often throttled by the hardware or OS and draws at 25-30 fps.
* The nano timer is not used in this scenario. * The nano timer is not used in this scenario.
* Instead to catch up the RS client runs several cycles before drawing, thus maintaining 50 cycles / second. * Instead to catch up the RS client runs several cycles before drawing, thus maintaining 50 cycles / second.
* * <p>
* Enforcing FPS in the draw code does not impact the client engine's ability to run including its audio, * Enforcing FPS in the draw code does not impact the client engine's ability to run including its audio,
* even when forced to 1 FPS with this plugin. * even when forced to 1 FPS with this plugin.
*/ */

View File

@@ -57,10 +57,12 @@ public enum PlayerSpellEffect
public static PlayerSpellEffect getFromSpotAnim(int spotAnim) public static PlayerSpellEffect getFromSpotAnim(int spotAnim)
{ {
for(PlayerSpellEffect effect : values()) for (PlayerSpellEffect effect : values())
{ {
if(effect.getSpotAnimId() == spotAnim) if (effect.getSpotAnimId() == spotAnim)
{
return effect; return effect;
}
} }
return NONE; return NONE;
} }

View File

@@ -11,8 +11,7 @@ package net.runelite.client.plugins.friendtagging;
import com.google.common.base.Strings; import com.google.common.base.Strings;
import com.google.common.collect.ObjectArrays; import com.google.common.collect.ObjectArrays;
import java.awt.Toolkit;
import java.awt.*;
import java.awt.datatransfer.StringSelection; import java.awt.datatransfer.StringSelection;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashSet; import java.util.HashSet;
@@ -21,8 +20,17 @@ import java.util.concurrent.ConcurrentHashMap;
import javax.inject.Inject; import javax.inject.Inject;
import lombok.NonNull; import lombok.NonNull;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.runelite.api.*; import net.runelite.api.Client;
import net.runelite.api.events.*; import net.runelite.api.Friend;
import net.runelite.api.Ignore;
import net.runelite.api.MenuAction;
import net.runelite.api.MenuEntry;
import net.runelite.api.Nameable;
import net.runelite.api.events.MenuEntryAdded;
import net.runelite.api.events.MenuOptionClicked;
import net.runelite.api.events.NameableNameChanged;
import net.runelite.api.events.RemovedFriend;
import net.runelite.api.events.WidgetMenuOptionClicked;
import net.runelite.api.widgets.WidgetInfo; import net.runelite.api.widgets.WidgetInfo;
import net.runelite.client.config.ConfigManager; import net.runelite.client.config.ConfigManager;
import net.runelite.client.eventbus.Subscribe; import net.runelite.client.eventbus.Subscribe;
@@ -40,8 +48,8 @@ import org.apache.commons.lang3.ArrayUtils;
@PluginDescriptor( @PluginDescriptor(
name = "Friend Tagging", name = "Friend Tagging",
description = "Tag people on your friends list.", description = "Tag people on your friends list.",
tags = {"PVP", "friend", "finder", "pk", "pklite"}, tags = {"PVP", "friend", "finder", "pk", "pklite"},
type = PluginType.UTILITY type = PluginType.UTILITY
) )
public class FriendTaggingPlugin extends Plugin public class FriendTaggingPlugin extends Plugin
{ {
@@ -267,8 +275,8 @@ public class FriendTaggingPlugin extends Plugin
} }
/** /**
* This method combines the list of usernames on local players friend/ignore list into a comma delimited string * This method combines the list of usernames on local players friend/ignore list into a comma delimited string
* and then copies it to the clipboard. * and then copies it to the clipboard.
*/ */
private void friendIgnoreToClipboard() private void friendIgnoreToClipboard()
{ {

View File

@@ -74,7 +74,18 @@ import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.plugins.PluginInstantiationException; import net.runelite.client.plugins.PluginInstantiationException;
import net.runelite.client.plugins.PluginManager; import net.runelite.client.plugins.PluginManager;
import static net.runelite.client.plugins.gpu.GLUtil.*; import static net.runelite.client.plugins.gpu.GLUtil.glDeleteBuffer;
import static net.runelite.client.plugins.gpu.GLUtil.glDeleteFrameBuffer;
import static net.runelite.client.plugins.gpu.GLUtil.glDeleteRenderbuffers;
import static net.runelite.client.plugins.gpu.GLUtil.glDeleteTexture;
import static net.runelite.client.plugins.gpu.GLUtil.glDeleteVertexArrays;
import static net.runelite.client.plugins.gpu.GLUtil.glGenBuffers;
import static net.runelite.client.plugins.gpu.GLUtil.glGenFrameBuffer;
import static net.runelite.client.plugins.gpu.GLUtil.glGenRenderbuffer;
import static net.runelite.client.plugins.gpu.GLUtil.glGenTexture;
import static net.runelite.client.plugins.gpu.GLUtil.glGenVertexArrays;
import static net.runelite.client.plugins.gpu.GLUtil.glGetInteger;
import static net.runelite.client.plugins.gpu.GLUtil.inputStreamToString;
import net.runelite.client.plugins.gpu.config.AntiAliasingMode; import net.runelite.client.plugins.gpu.config.AntiAliasingMode;
import net.runelite.client.plugins.gpu.template.Template; import net.runelite.client.plugins.gpu.template.Template;
import net.runelite.client.ui.DrawManager; import net.runelite.client.ui.DrawManager;
@@ -414,8 +425,8 @@ public class GpuPlugin extends Plugin implements DrawCallbacks
{ {
glVersionHeader = glVersionHeader =
"#version 420\n" + "#version 420\n" +
"#extension GL_ARB_compute_shader : require\n" + "#extension GL_ARB_compute_shader : require\n" +
"#extension GL_ARB_shader_storage_buffer_object : require\n"; "#extension GL_ARB_shader_storage_buffer_object : require\n";
} }
else else
{ {
@@ -707,8 +718,8 @@ public class GpuPlugin extends Plugin implements DrawCallbacks
} }
public void drawScenePaint(int orientation, int pitchSin, int pitchCos, int yawSin, int yawCos, int x, int y, int z, public void drawScenePaint(int orientation, int pitchSin, int pitchCos, int yawSin, int yawCos, int x, int y, int z,
SceneTilePaint paint, int tileZ, int tileX, int tileY, SceneTilePaint paint, int tileZ, int tileX, int tileY,
int zoom, int centerX, int centerY) int zoom, int centerX, int centerY)
{ {
if (paint.getBufferLen() > 0) if (paint.getBufferLen() > 0)
{ {
@@ -733,8 +744,8 @@ public class GpuPlugin extends Plugin implements DrawCallbacks
} }
public void drawSceneModel(int orientation, int pitchSin, int pitchCos, int yawSin, int yawCos, int x, int y, int z, public void drawSceneModel(int orientation, int pitchSin, int pitchCos, int yawSin, int yawCos, int x, int y, int z,
SceneTileModel model, int tileZ, int tileX, int tileY, SceneTileModel model, int tileZ, int tileX, int tileY,
int zoom, int centerX, int centerY) int zoom, int centerX, int centerY)
{ {
if (model.getBufferLen() > 0) if (model.getBufferLen() > 0)
{ {
@@ -980,18 +991,18 @@ public class GpuPlugin extends Plugin implements DrawCallbacks
renderCanvasHeight = dim.height; renderCanvasHeight = dim.height;
double scaleFactorY = dim.getHeight() / canvasHeight; double scaleFactorY = dim.getHeight() / canvasHeight;
double scaleFactorX = dim.getWidth() / canvasWidth; double scaleFactorX = dim.getWidth() / canvasWidth;
// Pad the viewport a little because having ints for our viewport dimensions can introduce off-by-one errors. // Pad the viewport a little because having ints for our viewport dimensions can introduce off-by-one errors.
final int padding = 1; final int padding = 1;
// Ceil the sizes because even if the size is 599.1 we want to treat it as size 600 (i.e. render to the x=599 pixel). // Ceil the sizes because even if the size is 599.1 we want to treat it as size 600 (i.e. render to the x=599 pixel).
renderViewportHeight = (int) Math.ceil(scaleFactorY * (renderViewportHeight)) + padding * 2; renderViewportHeight = (int) Math.ceil(scaleFactorY * (renderViewportHeight)) + padding * 2;
renderViewportWidth = (int) Math.ceil(scaleFactorX * (renderViewportWidth )) + padding * 2; renderViewportWidth = (int) Math.ceil(scaleFactorX * (renderViewportWidth)) + padding * 2;
// Floor the offsets because even if the offset is 4.9, we want to render to the x=4 pixel anyway. // Floor the offsets because even if the offset is 4.9, we want to render to the x=4 pixel anyway.
renderHeightOff = (int) Math.floor(scaleFactorY * (renderHeightOff)) - padding; renderHeightOff = (int) Math.floor(scaleFactorY * (renderHeightOff)) - padding;
renderWidthOff = (int) Math.floor(scaleFactorX * (renderWidthOff )) - padding; renderWidthOff = (int) Math.floor(scaleFactorX * (renderWidthOff)) - padding;
} }
glDpiAwareViewport(renderWidthOff, renderCanvasHeight - renderViewportHeight - renderHeightOff, renderViewportWidth, renderViewportHeight); glDpiAwareViewport(renderWidthOff, renderCanvasHeight - renderViewportHeight - renderHeightOff, renderViewportWidth, renderViewportHeight);
@@ -1169,13 +1180,13 @@ public class GpuPlugin extends Plugin implements DrawCallbacks
*/ */
private Image screenshot() private Image screenshot()
{ {
int width = client.getCanvasWidth(); int width = client.getCanvasWidth();
int height = client.getCanvasHeight(); int height = client.getCanvasHeight();
if (client.isStretchedEnabled()) if (client.isStretchedEnabled())
{ {
Dimension dim = client.getStretchedDimensions(); Dimension dim = client.getStretchedDimensions();
width = dim.width; width = dim.width;
height = dim.height; height = dim.height;
} }
@@ -1295,10 +1306,7 @@ public class GpuPlugin extends Plugin implements DrawCallbacks
{ {
int var21 = (pitchCos * modelHeight >> 16) + var19; int var21 = (pitchCos * modelHeight >> 16) + var19;
int var22 = (var18 - var21) * zoom; int var22 = (var18 - var21) * zoom;
if (var22 / var14 < Rasterizer3D_clipMidY2) return var22 / var14 < Rasterizer3D_clipMidY2;
{
return true;
}
} }
} }
} }

View File

@@ -28,9 +28,9 @@ import net.runelite.client.config.Config;
import net.runelite.client.config.ConfigGroup; import net.runelite.client.config.ConfigGroup;
import net.runelite.client.config.ConfigItem; import net.runelite.client.config.ConfigItem;
import net.runelite.client.config.Range; import net.runelite.client.config.Range;
import static net.runelite.client.plugins.gpu.GpuPlugin.MAX_DISTANCE;
import static net.runelite.client.plugins.gpu.GpuPlugin.MAX_FOG_DEPTH; import static net.runelite.client.plugins.gpu.GpuPlugin.MAX_FOG_DEPTH;
import net.runelite.client.plugins.gpu.config.AntiAliasingMode; import net.runelite.client.plugins.gpu.config.AntiAliasingMode;
import static net.runelite.client.plugins.gpu.GpuPlugin.MAX_DISTANCE;
@ConfigGroup("gpu") @ConfigGroup("gpu")
public interface GpuPluginConfig extends Config public interface GpuPluginConfig extends Config

View File

@@ -80,7 +80,7 @@ public class GrandExchangeOfferSlot extends JPanel
{ {
final BufferedImage rightArrow = ImageUtil.alphaOffset(ImageUtil.getResourceStreamFromClass(GrandExchangeOfferSlot.class, "/util/arrow_right.png"), 0.25f); final BufferedImage rightArrow = ImageUtil.alphaOffset(ImageUtil.getResourceStreamFromClass(GrandExchangeOfferSlot.class, "/util/arrow_right.png"), 0.25f);
RIGHT_ARROW_ICON = new ImageIcon(rightArrow); RIGHT_ARROW_ICON = new ImageIcon(rightArrow);
LEFT_ARROW_ICON = new ImageIcon(ImageUtil.flipImage(rightArrow, true, false)); LEFT_ARROW_ICON = new ImageIcon(ImageUtil.flipImage(rightArrow, true, false));
} }
/** /**

View File

@@ -57,8 +57,6 @@ import net.runelite.api.events.GameStateChanged;
import net.runelite.api.events.GameTick; import net.runelite.api.events.GameTick;
import net.runelite.api.events.GrandExchangeOfferChanged; import net.runelite.api.events.GrandExchangeOfferChanged;
import net.runelite.api.events.MenuEntryAdded; import net.runelite.api.events.MenuEntryAdded;
import net.runelite.client.events.SessionClose;
import net.runelite.client.events.SessionOpen;
import net.runelite.api.events.WidgetLoaded; import net.runelite.api.events.WidgetLoaded;
import net.runelite.api.widgets.Widget; import net.runelite.api.widgets.Widget;
import net.runelite.api.widgets.WidgetID; import net.runelite.api.widgets.WidgetID;
@@ -68,6 +66,8 @@ import net.runelite.client.account.AccountSession;
import net.runelite.client.account.SessionManager; import net.runelite.client.account.SessionManager;
import net.runelite.client.config.ConfigManager; import net.runelite.client.config.ConfigManager;
import net.runelite.client.eventbus.Subscribe; import net.runelite.client.eventbus.Subscribe;
import net.runelite.client.events.SessionClose;
import net.runelite.client.events.SessionOpen;
import net.runelite.client.game.ItemManager; import net.runelite.client.game.ItemManager;
import net.runelite.client.input.KeyManager; import net.runelite.client.input.KeyManager;
import net.runelite.client.input.MouseManager; import net.runelite.client.input.MouseManager;

View File

@@ -34,7 +34,7 @@ import net.runelite.client.ui.overlay.OverlayManager;
name = "Grotesque Guardians", name = "Grotesque Guardians",
description = "Display tile indicators for the Grotesque Guardian special attacks", description = "Display tile indicators for the Grotesque Guardian special attacks",
tags = {"grotesque", "guardians", "gargoyle", "garg"}, tags = {"grotesque", "guardians", "gargoyle", "garg"},
type = PluginType.PVM type = PluginType.PVM
) )
public class GrotesqueGuardiansPlugin extends Plugin public class GrotesqueGuardiansPlugin extends Plugin
{ {

View File

@@ -360,10 +360,10 @@ public interface GroundItemsConfig extends Config
} }
@ConfigItem( @ConfigItem(
position = 27, position = 27,
keyName = "removeIgnored", keyName = "removeIgnored",
name = "Hide Ignored", name = "Hide Ignored",
description = "Remove take option for items that are on the hidden items list." description = "Remove take option for items that are on the hidden items list."
) )
default boolean removeIgnored() default boolean removeIgnored()
{ {

View File

@@ -106,7 +106,7 @@ public class GroundItemsOverlay extends Overlay
offsetMap.clear(); offsetMap.clear();
final LocalPoint localLocation = player.getLocalLocation(); final LocalPoint localLocation = player.getLocalLocation();
final Point mousePos = client.getMouseCanvasPosition(); final Point mousePos = client.getMouseCanvasPosition();
Collection<GroundItem> groundItemList = plugin.getCollectedGroundItems().values(); Collection<GroundItem> groundItemList = GroundItemsPlugin.getCollectedGroundItems().values();
GroundItem topGroundItem = null; GroundItem topGroundItem = null;
if (plugin.isHotKeyPressed()) if (plugin.isHotKeyPressed())
@@ -336,10 +336,10 @@ public class GroundItemsOverlay extends Overlay
if (config.toggleOutline()) if (config.toggleOutline())
{ {
graphics.setColor(Color.BLACK); graphics.setColor(Color.BLACK);
graphics.drawString(itemString, textX + 1, textY + 1); graphics.drawString(itemString, textX + 1, textY + 1);
graphics.drawString(itemString, textX - 1, textY - 1); graphics.drawString(itemString, textX - 1, textY - 1);
graphics.drawString(itemString, textX - 1, textY + 1); graphics.drawString(itemString, textX - 1, textY + 1);
graphics.drawString(itemString, textX + 1, textY - 1); graphics.drawString(itemString, textX + 1, textY - 1);
} }
textComponent.setText(itemString); textComponent.setText(itemString);

Some files were not shown because too many files have changed in this diff Show More