Kyleeld patch 1 (#151)
* safespot * Update Player.java int getRsOverheadIcon(); * FreezeTimers FreezeTimers * various updates (#150) updates to pvp tools, wilderness locations & location chatter * Update WildernessLocation.java * Update Client.java void toggleRenderSelf(); * Update RSClient.java * Update Player.java remove change
This commit is contained in:
@@ -1612,6 +1612,8 @@ public interface Client extends GameEngine
|
|||||||
|
|
||||||
NodeCache getHealthBarCache();
|
NodeCache getHealthBarCache();
|
||||||
|
|
||||||
|
void toggleRenderSelf();
|
||||||
|
|
||||||
void invokeMenuAction(int var1, int var2, int var3, int var4, String var5, String var6, int var7, int var8);
|
void invokeMenuAction(int var1, int var2, int var3, int var4, String var5, String var6, int var7, int var8);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package net.runelite.client.plugins.freezetimers;
|
||||||
|
|
||||||
|
import net.runelite.client.config.Config;
|
||||||
|
import net.runelite.client.config.ConfigGroup;
|
||||||
|
import net.runelite.client.config.ConfigItem;
|
||||||
|
|
||||||
|
@ConfigGroup("freezetimers")
|
||||||
|
public interface FreezeTimersConfig extends Config
|
||||||
|
{
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
keyName = "showOverlay",
|
||||||
|
name = "Show Players",
|
||||||
|
description = "Configure if the player overlay should be shown",
|
||||||
|
position = 1
|
||||||
|
)
|
||||||
|
default boolean showPlayers()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
keyName = "showNpcs",
|
||||||
|
name = "Show NPCs",
|
||||||
|
description = "Configure if the npc overlay should be shown",
|
||||||
|
position = 2
|
||||||
|
)
|
||||||
|
default boolean showNpcs()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,170 @@
|
|||||||
|
package net.runelite.client.plugins.freezetimers;
|
||||||
|
|
||||||
|
import net.runelite.api.Actor;
|
||||||
|
import net.runelite.api.Client;
|
||||||
|
import net.runelite.api.GraphicID;
|
||||||
|
import net.runelite.api.Player;
|
||||||
|
import net.runelite.api.Point;
|
||||||
|
import net.runelite.client.ui.FontManager;
|
||||||
|
import net.runelite.client.ui.overlay.Overlay;
|
||||||
|
import net.runelite.client.ui.overlay.OverlayLayer;
|
||||||
|
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||||
|
import net.runelite.client.ui.overlay.OverlayPriority;
|
||||||
|
import net.runelite.client.ui.overlay.OverlayUtil;
|
||||||
|
import net.runelite.client.util.ImageUtil;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
import java.awt.*;
|
||||||
|
import java.awt.geom.Rectangle2D;
|
||||||
|
import java.awt.image.BufferedImage;
|
||||||
|
|
||||||
|
import static java.awt.Color.RED;
|
||||||
|
import static java.awt.Color.WHITE;
|
||||||
|
import static java.awt.Color.green;
|
||||||
|
|
||||||
|
public class FreezeTimersOverlay extends Overlay
|
||||||
|
{
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Timers timers;
|
||||||
|
|
||||||
|
private final FreezeTimersConfig config;
|
||||||
|
private final Client client;
|
||||||
|
private final Font timerFont = FontManager.getRunescapeBoldFont().deriveFont(14.0f);
|
||||||
|
private final BufferedImage FREEZE_IMAGE = ImageUtil.getResourceStreamFromClass(getClass(), "freeze.png");
|
||||||
|
private final BufferedImage TB_IMAGE = ImageUtil.getResourceStreamFromClass(getClass(), "teleblock.png");
|
||||||
|
private final BufferedImage VENG_IMAGE = ImageUtil.getResourceStreamFromClass(getClass(), "veng.png");
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
public FreezeTimersOverlay(FreezeTimersConfig config, Client client)
|
||||||
|
{
|
||||||
|
this.config = config;
|
||||||
|
this.client = client;
|
||||||
|
setPriority(OverlayPriority.HIGHEST);
|
||||||
|
setPosition(OverlayPosition.DYNAMIC);
|
||||||
|
setLayer(OverlayLayer.UNDER_WIDGETS);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Dimension render(Graphics2D graphics)
|
||||||
|
{
|
||||||
|
if (config.showPlayers())
|
||||||
|
{
|
||||||
|
client.getPlayers().forEach((p) -> renderOverlayFor(graphics, p));
|
||||||
|
}
|
||||||
|
if (config.showNpcs())
|
||||||
|
{
|
||||||
|
client.getNpcs().forEach((npc) -> renderOverlayFor(graphics, npc));
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void renderOverlayFor(Graphics2D g, Actor actor)
|
||||||
|
{
|
||||||
|
if (timers.areAllTimersZero(actor))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int overlaysDrawn = 0;
|
||||||
|
|
||||||
|
if (drawFreezeOverlay(g, actor, overlaysDrawn))
|
||||||
|
{
|
||||||
|
overlaysDrawn++;
|
||||||
|
}
|
||||||
|
if (drawTBOverlay(g, actor, overlaysDrawn))
|
||||||
|
{
|
||||||
|
overlaysDrawn++;
|
||||||
|
}
|
||||||
|
if (drawVengOverlay(g, actor, overlaysDrawn))
|
||||||
|
{
|
||||||
|
overlaysDrawn++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean drawFreezeOverlay(Graphics2D g, Actor actor, int overlaysDrawn)
|
||||||
|
{
|
||||||
|
long currentTick = System.currentTimeMillis();
|
||||||
|
if (timers.getTimerEnd(actor, TimerType.FREEZE) <= currentTick)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
long finishedAt = timers.getTimerEnd(actor, TimerType.FREEZE);
|
||||||
|
|
||||||
|
String text = processTickCounter(finishedAt);
|
||||||
|
|
||||||
|
renderActorText(g, actor, text, overlaysDrawn, FREEZE_IMAGE);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean drawTBOverlay(Graphics2D g, Actor actor, int overlaysDrawn)
|
||||||
|
{
|
||||||
|
long currentTick = System.currentTimeMillis();
|
||||||
|
if (timers.getTimerEnd(actor, TimerType.TELEBLOCK) <= currentTick)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
long finishedAt = timers.getTimerEnd(actor, TimerType.TELEBLOCK);
|
||||||
|
|
||||||
|
String text = processTickCounter(finishedAt);
|
||||||
|
|
||||||
|
renderActorText(g, actor, text, overlaysDrawn, TB_IMAGE);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean drawVengOverlay(Graphics2D g, Actor actor, int overlaysDrawn)
|
||||||
|
{
|
||||||
|
long currentTick = System.currentTimeMillis();
|
||||||
|
if (timers.getTimerEnd(actor, TimerType.VENG) <= currentTick)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
long finishedAt = timers.getTimerEnd(actor, TimerType.VENG);
|
||||||
|
|
||||||
|
String text = processTickCounter(finishedAt);
|
||||||
|
|
||||||
|
renderActorText(g, actor, text, overlaysDrawn, VENG_IMAGE);
|
||||||
|
if (actor.getGraphic() == GraphicID.VENGEANCE || actor.getGraphic() == GraphicID.VENGEANCE_OTHER)
|
||||||
|
{
|
||||||
|
|
||||||
|
g.setColor(RED);
|
||||||
|
Polygon poly = actor.getCanvasTilePoly();
|
||||||
|
if (poly != null)
|
||||||
|
{
|
||||||
|
OverlayUtil.renderPolygon(g, poly, RED);
|
||||||
|
}
|
||||||
|
OverlayUtil.renderTextLocation(g, new Point((int)poly.getBounds2D().getCenterX(),
|
||||||
|
(int)poly.getBounds2D().getCenterY()), actor.getName(), RED);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void renderActorText(Graphics2D g, Actor actor, String text, int overlaysDrawn, BufferedImage image)
|
||||||
|
{
|
||||||
|
int yOffset = (overlaysDrawn * 18);
|
||||||
|
g.setFont(timerFont);
|
||||||
|
g.setColor(WHITE);
|
||||||
|
Rectangle rect = actor.getConvexHull().getBounds();
|
||||||
|
int xOffset = (int) rect.getWidth();
|
||||||
|
OverlayUtil.renderActorTextAndImage(g, actor, text, Color.WHITE, image, yOffset,
|
||||||
|
xOffset);
|
||||||
|
g.setColor(RED);
|
||||||
|
g.draw(actor.getConvexHull().getBounds());
|
||||||
|
}
|
||||||
|
|
||||||
|
private String processTickCounter(long finishedAt)
|
||||||
|
{
|
||||||
|
long currentTick = System.currentTimeMillis();
|
||||||
|
long tickDifference = finishedAt - currentTick;
|
||||||
|
long seconds = tickDifference / 1000;
|
||||||
|
seconds++;
|
||||||
|
int minutes = (int) (seconds / 60);
|
||||||
|
seconds = seconds % 60;
|
||||||
|
String text = seconds > 9 ? seconds + "" : "0" + seconds;
|
||||||
|
if (minutes > 0)
|
||||||
|
{
|
||||||
|
text = minutes + ":" + text;
|
||||||
|
}
|
||||||
|
return text + "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
package net.runelite.client.plugins.freezetimers;
|
||||||
|
|
||||||
|
import com.google.inject.Provides;
|
||||||
|
import net.runelite.api.Client;
|
||||||
|
import net.runelite.api.events.GameTick;
|
||||||
|
import net.runelite.api.events.GraphicChanged;
|
||||||
|
import net.runelite.client.config.ConfigManager;
|
||||||
|
import net.runelite.client.eventbus.Subscribe;
|
||||||
|
import net.runelite.client.plugins.Plugin;
|
||||||
|
import net.runelite.client.plugins.PluginDescriptor;
|
||||||
|
import net.runelite.client.plugins.PluginManager;
|
||||||
|
import net.runelite.client.plugins.PluginType;
|
||||||
|
import net.runelite.client.ui.overlay.OverlayManager;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
@PluginDescriptor(
|
||||||
|
name = "Freeze Timers",
|
||||||
|
description = "Shows a freeze timer overlay on players",
|
||||||
|
tags = {"freeze", "timers", "barrage", "teleblock", "pklite"},
|
||||||
|
type = PluginType.PVP
|
||||||
|
)
|
||||||
|
public class FreezeTimersPlugin extends Plugin
|
||||||
|
{
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Client client;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private OverlayManager overlayManager;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Timers timers;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private PrayerTracker prayerTracker;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private FreezeTimersOverlay overlay;
|
||||||
|
|
||||||
|
public void startUp()
|
||||||
|
{
|
||||||
|
overlayManager.add(overlay);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void shutDown()
|
||||||
|
{
|
||||||
|
overlayManager.remove(overlay);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
public FreezeTimersConfig getConfig(ConfigManager configManager)
|
||||||
|
{
|
||||||
|
return configManager.getConfig(FreezeTimersConfig.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Subscribe
|
||||||
|
public void onGraphicChanged(GraphicChanged graphicChanged)
|
||||||
|
{
|
||||||
|
int oldGraphic = prayerTracker.getSpotanimLastTick(graphicChanged.getActor());
|
||||||
|
int newGraphic = graphicChanged.getActor().getGraphic();
|
||||||
|
if (oldGraphic == newGraphic)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
PlayerSpellEffect effect = PlayerSpellEffect.getFromSpotAnim(newGraphic);
|
||||||
|
if (effect == PlayerSpellEffect.NONE)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
long length = effect.getTimerLengthTicks();
|
||||||
|
if (effect.isHalvable() && prayerTracker.getPrayerIconLastTick(graphicChanged.getActor()) == 2)
|
||||||
|
{
|
||||||
|
length /= 2;
|
||||||
|
}
|
||||||
|
timers.setTimerEnd(graphicChanged.getActor(), effect.getType(),
|
||||||
|
System.currentTimeMillis() + length);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Subscribe
|
||||||
|
public void onGameTick(GameTick tickEvent)
|
||||||
|
{
|
||||||
|
timers.gameTick();
|
||||||
|
prayerTracker.gameTick();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package net.runelite.client.plugins.freezetimers;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@AllArgsConstructor
|
||||||
|
public enum PlayerSpellEffect
|
||||||
|
{
|
||||||
|
BIND("Bind", 181,5000, true, 0, TimerType.FREEZE),
|
||||||
|
SNARE("Snare", 180, 10000, true, 1, TimerType.FREEZE),
|
||||||
|
ENTANGLE("Entangle", 179, 15000, true, 2, TimerType.FREEZE),
|
||||||
|
RUSH("Ice Rush", 361, 5000, false, 3, TimerType.FREEZE),
|
||||||
|
BURST("Ice Burst", 363, 10000, false, 4, TimerType.FREEZE),
|
||||||
|
BLITZ("Ice Blitz", 367, 15000, false, 5, TimerType.FREEZE),
|
||||||
|
BARRAGE("Ice Barrage", 369, 20000, false, 6, TimerType.FREEZE),
|
||||||
|
TELEBLOCK("Teleblock", 345, 300000, true, 7, TimerType.TELEBLOCK),
|
||||||
|
VENG("Vengeance", 726, 30000, false, 8, TimerType.VENG),
|
||||||
|
VENG_OTHER("Vengeance Other", 725, 30000, false, 9, TimerType.VENG),
|
||||||
|
NONE("Nothing", -69, 420, true, 9999, TimerType.THIS_SHIT_BROKE);
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
private final String name;
|
||||||
|
@Getter
|
||||||
|
private final int spotAnimId;
|
||||||
|
@Getter
|
||||||
|
private final int timerLengthTicks;
|
||||||
|
@Getter
|
||||||
|
private boolean halvable;
|
||||||
|
@Getter
|
||||||
|
private final int spriteIdx;
|
||||||
|
@Getter
|
||||||
|
private final TimerType type;
|
||||||
|
|
||||||
|
public static PlayerSpellEffect getFromSpotAnim(int spotAnim)
|
||||||
|
{
|
||||||
|
for(PlayerSpellEffect effect : values())
|
||||||
|
{
|
||||||
|
if(effect.getSpotAnimId() == spotAnim)
|
||||||
|
return effect;
|
||||||
|
}
|
||||||
|
return NONE;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
package net.runelite.client.plugins.freezetimers;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.runelite.api.Actor;
|
||||||
|
import net.runelite.api.Client;
|
||||||
|
import net.runelite.api.NPC;
|
||||||
|
import net.runelite.api.Player;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
import javax.inject.Singleton;
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Singleton
|
||||||
|
public class PrayerTracker
|
||||||
|
{
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Client client;
|
||||||
|
|
||||||
|
private HashMap<Actor, HashMap<String, Integer>> lastTick = new HashMap<>();
|
||||||
|
private HashMap<Actor, HashMap<String, Integer>> newTick = new HashMap<>();
|
||||||
|
|
||||||
|
public void gameTick()
|
||||||
|
{
|
||||||
|
lastTick.clear();
|
||||||
|
lastTick.putAll(newTick);
|
||||||
|
newTick.clear();
|
||||||
|
for (Player p : client.getPlayers())
|
||||||
|
{
|
||||||
|
processActor(p);
|
||||||
|
}
|
||||||
|
for (NPC npc : client.getNpcs())
|
||||||
|
{
|
||||||
|
processActor(npc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void processActor(Actor actor)
|
||||||
|
{
|
||||||
|
if (!newTick.containsKey(actor))
|
||||||
|
{
|
||||||
|
newTick.put(actor, new HashMap<>());
|
||||||
|
}
|
||||||
|
if (actor instanceof Player)
|
||||||
|
{
|
||||||
|
newTick.get(actor).put("PrayerIcon", ((Player) actor).getOverheadIcon().ordinal());
|
||||||
|
}
|
||||||
|
newTick.get(actor).put("SpotAnim", actor.getGraphic());
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getPrayerIconLastTick(Actor p)
|
||||||
|
{
|
||||||
|
return lastTick.getOrDefault(p, new HashMap<>()).getOrDefault("PrayerIcon", -1337);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSpotanimLastTick(Actor p)
|
||||||
|
{
|
||||||
|
return lastTick.getOrDefault(p, new HashMap<>()).getOrDefault("SpotAnim", -1337);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package net.runelite.client.plugins.freezetimers;
|
||||||
|
|
||||||
|
public enum TimerType
|
||||||
|
{
|
||||||
|
FREEZE,
|
||||||
|
VENG,
|
||||||
|
TELEBLOCK,
|
||||||
|
THIS_SHIT_BROKE;
|
||||||
|
}
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
package net.runelite.client.plugins.freezetimers;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.runelite.api.Actor;
|
||||||
|
import net.runelite.api.Client;
|
||||||
|
import net.runelite.api.Player;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
import javax.inject.Singleton;
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Singleton
|
||||||
|
public class Timers
|
||||||
|
{
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Client client;
|
||||||
|
|
||||||
|
private HashMap<Actor, HashMap<TimerType, Long>> timerMap = new HashMap<>();
|
||||||
|
|
||||||
|
public void gameTick()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTimerEnd(Actor actor, TimerType type, long n)
|
||||||
|
{
|
||||||
|
if (!timerMap.containsKey(actor))
|
||||||
|
{
|
||||||
|
timerMap.put(actor, new HashMap<>());
|
||||||
|
}
|
||||||
|
timerMap.get(actor).put(type, n);
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getTimerEnd(Actor actor, TimerType type)
|
||||||
|
{
|
||||||
|
if (!timerMap.containsKey(actor))
|
||||||
|
{
|
||||||
|
timerMap.put(actor, new HashMap<>());
|
||||||
|
}
|
||||||
|
return timerMap.get(actor).getOrDefault(type, (long)0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean areAllTimersZero(Actor actor)
|
||||||
|
{
|
||||||
|
for (TimerType type : TimerType.values())
|
||||||
|
{
|
||||||
|
if (getTimerEnd(actor, type) != 0)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -153,6 +153,11 @@ public class LocationChatterPlugin extends Plugin
|
|||||||
|
|
||||||
private void sendLocToCC()
|
private void sendLocToCC()
|
||||||
{
|
{
|
||||||
|
if (currentCooldown != 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
String location = wildyLocsPlugin.getLocationString();
|
String location = wildyLocsPlugin.getLocationString();
|
||||||
if (location.equals(""))
|
if (location.equals(""))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -64,11 +64,22 @@ public interface PvpToolsConfig extends Config
|
|||||||
return Keybind.NOT_SET;
|
return Keybind.NOT_SET;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
keyName = "renderSelfHotkey",
|
||||||
|
name = "Render Self Hotkey",
|
||||||
|
description = "Toggles renderself when you press the hotkey",
|
||||||
|
position = 7
|
||||||
|
)
|
||||||
|
default Keybind renderSelf()
|
||||||
|
{
|
||||||
|
return Keybind.NOT_SET;
|
||||||
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "attackOptionsClan",
|
keyName = "attackOptionsClan",
|
||||||
name = "Move CC Attack Option",
|
name = "Move CC Attack Option",
|
||||||
description = "Moves the attack option for people in the same CC",
|
description = "Moves the attack option for people in the same CC",
|
||||||
position = 7,
|
position = 8,
|
||||||
group = "Right-Click Attack Options"
|
group = "Right-Click Attack Options"
|
||||||
)
|
)
|
||||||
default boolean attackOptionsClan()
|
default boolean attackOptionsClan()
|
||||||
@@ -80,7 +91,7 @@ public interface PvpToolsConfig extends Config
|
|||||||
keyName = "attackOptionsFriend",
|
keyName = "attackOptionsFriend",
|
||||||
name = "Move Friend Attack Options",
|
name = "Move Friend Attack Options",
|
||||||
description = "Moves the attack option for people on your friends list",
|
description = "Moves the attack option for people on your friends list",
|
||||||
position = 8,
|
position = 9,
|
||||||
group = "Right-Click Attack Options"
|
group = "Right-Click Attack Options"
|
||||||
)
|
)
|
||||||
default boolean attackOptionsFriend()
|
default boolean attackOptionsFriend()
|
||||||
@@ -92,7 +103,7 @@ public interface PvpToolsConfig extends Config
|
|||||||
keyName = "levelRangeAttackOptions",
|
keyName = "levelRangeAttackOptions",
|
||||||
name = "Moves Other Attack Options",
|
name = "Moves Other Attack Options",
|
||||||
description = "Moves the attack option for people that are outside your level range",
|
description = "Moves the attack option for people that are outside your level range",
|
||||||
position = 9,
|
position = 10,
|
||||||
group = "Right-Click Attack Options"
|
group = "Right-Click Attack Options"
|
||||||
)
|
)
|
||||||
default boolean levelRangeAttackOptions()
|
default boolean levelRangeAttackOptions()
|
||||||
@@ -104,7 +115,7 @@ public interface PvpToolsConfig extends Config
|
|||||||
keyName = "riskCalculator",
|
keyName = "riskCalculator",
|
||||||
name = "Risk Calculator",
|
name = "Risk Calculator",
|
||||||
description = "Enables a panel in the PvP Tools Panel that shows the players current risk",
|
description = "Enables a panel in the PvP Tools Panel that shows the players current risk",
|
||||||
position = 13
|
position = 14
|
||||||
)
|
)
|
||||||
default boolean riskCalculatorEnabled()
|
default boolean riskCalculatorEnabled()
|
||||||
{
|
{
|
||||||
@@ -116,7 +127,7 @@ public interface PvpToolsConfig extends Config
|
|||||||
name = "Missing CC Players",
|
name = "Missing CC Players",
|
||||||
description = "Adds a button to the PvP Tools panel that opens a window showing which CC members are not at" +
|
description = "Adds a button to the PvP Tools panel that opens a window showing which CC members are not at" +
|
||||||
" the current players location",
|
" the current players location",
|
||||||
position = 14
|
position = 15
|
||||||
)
|
)
|
||||||
default boolean missingPlayersEnabled() { return true; }
|
default boolean missingPlayersEnabled() { return true; }
|
||||||
|
|
||||||
@@ -125,7 +136,7 @@ public interface PvpToolsConfig extends Config
|
|||||||
name = "Current CC Players",
|
name = "Current CC Players",
|
||||||
description = "Adds a button to the PvP Tools panel that opens a window showing which CC members currently at" +
|
description = "Adds a button to the PvP Tools panel that opens a window showing which CC members currently at" +
|
||||||
" the players location",
|
" the players location",
|
||||||
position = 15
|
position = 16
|
||||||
)
|
)
|
||||||
default boolean currentPlayersEnabled()
|
default boolean currentPlayersEnabled()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -12,11 +12,8 @@ package net.runelite.client.plugins.pvptools;
|
|||||||
import com.google.inject.Provides;
|
import com.google.inject.Provides;
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import java.awt.event.KeyEvent;
|
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.lang.reflect.Array;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.NavigableMap;
|
import java.util.NavigableMap;
|
||||||
@@ -53,8 +50,8 @@ import net.runelite.client.game.ItemManager;
|
|||||||
import net.runelite.client.input.KeyManager;
|
import net.runelite.client.input.KeyManager;
|
||||||
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.PluginManager;
|
|
||||||
import net.runelite.client.plugins.PluginType;
|
import net.runelite.client.plugins.PluginType;
|
||||||
|
import net.runelite.client.plugins.PluginManager;
|
||||||
import net.runelite.client.plugins.clanchat.ClanChatPlugin;
|
import net.runelite.client.plugins.clanchat.ClanChatPlugin;
|
||||||
import static net.runelite.client.plugins.pvptools.PvpToolsPanel.htmlLabel;
|
import static net.runelite.client.plugins.pvptools.PvpToolsPanel.htmlLabel;
|
||||||
import net.runelite.client.ui.ClientToolbar;
|
import net.runelite.client.ui.ClientToolbar;
|
||||||
@@ -70,7 +67,7 @@ import org.apache.commons.lang3.ArrayUtils;
|
|||||||
@PluginDescriptor(
|
@PluginDescriptor(
|
||||||
name = "PvP Tools",
|
name = "PvP Tools",
|
||||||
description = "Enable the PvP Tools panel",
|
description = "Enable the PvP Tools panel",
|
||||||
tags = {"panel", "pvp", "pk", "pklite"},
|
tags = {"panel", "pvp", "pk", "pklite", "renderself"},
|
||||||
type = PluginType.PVP
|
type = PluginType.PVP
|
||||||
)
|
)
|
||||||
public class PvpToolsPlugin extends Plugin
|
public class PvpToolsPlugin extends Plugin
|
||||||
@@ -155,10 +152,11 @@ public class PvpToolsPlugin extends Plugin
|
|||||||
|
|
||||||
|
|
||||||
private ClanChatPlugin clanChatPlugin;
|
private ClanChatPlugin clanChatPlugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The HotKeyListener for the hot key assigned in the config that triggers the Fall In Helper feature
|
* The HotKeyListener for the hot key assigned in the config that triggers the Fall In Helper feature
|
||||||
*/
|
*/
|
||||||
private final HotkeyListener hotkeyListener = new HotkeyListener(() -> config.hotkey())
|
private final HotkeyListener fallinHotkeyListener = new HotkeyListener(() -> config.hotkey())
|
||||||
{
|
{
|
||||||
public void hotkeyPressed()
|
public void hotkeyPressed()
|
||||||
{
|
{
|
||||||
@@ -166,6 +164,14 @@ public class PvpToolsPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private final HotkeyListener renderselfHotkeyListener = new HotkeyListener(() -> config.renderSelf())
|
||||||
|
{
|
||||||
|
public void hotkeyPressed()
|
||||||
|
{
|
||||||
|
client.toggleRenderSelf();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
private int[] overheadCount = new int[]{0, 0, 0};
|
private int[] overheadCount = new int[]{0, 0, 0};
|
||||||
|
|
||||||
private Comparator<Item> itemPriceComparator = new Comparator<Item>()
|
private Comparator<Item> itemPriceComparator = new Comparator<Item>()
|
||||||
@@ -244,7 +250,8 @@ public class PvpToolsPlugin extends Plugin
|
|||||||
|
|
||||||
overlayManager.add(pvpToolsOverlay);
|
overlayManager.add(pvpToolsOverlay);
|
||||||
|
|
||||||
keyManager.registerKeyListener(hotkeyListener);
|
keyManager.registerKeyListener(fallinHotkeyListener);
|
||||||
|
keyManager.registerKeyListener(renderselfHotkeyListener);
|
||||||
final BufferedImage icon = ImageUtil.getResourceStreamFromClass(getClass(), "skull.png");
|
final BufferedImage icon = ImageUtil.getResourceStreamFromClass(getClass(), "skull.png");
|
||||||
|
|
||||||
panel = new PvpToolsPanel();
|
panel = new PvpToolsPanel();
|
||||||
@@ -277,7 +284,8 @@ public class PvpToolsPlugin extends Plugin
|
|||||||
protected void shutDown() throws Exception
|
protected void shutDown() throws Exception
|
||||||
{
|
{
|
||||||
overlayManager.remove(pvpToolsOverlay);
|
overlayManager.remove(pvpToolsOverlay);
|
||||||
keyManager.unregisterKeyListener(hotkeyListener);
|
keyManager.unregisterKeyListener(fallinHotkeyListener);
|
||||||
|
keyManager.unregisterKeyListener(renderselfHotkeyListener);
|
||||||
clientToolbar.removeNavigation(navButton);
|
clientToolbar.removeNavigation(navButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* Copyright (c) 2019. PKLite
|
||||||
|
* Redistributions and modifications of this software are permitted as long as this notice remains in its original unmodified state at the top of this file. If there are any questions, comments, or feedback about this software, please direct all inquiries directly to the following authors.
|
||||||
|
* PKLite discord: https://discord.gg/Dp3HuFM
|
||||||
|
* Written by PKLite(ST0NEWALL, others) <stonewall@stonewall@pklite.xyz>, 2019
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
package net.runelite.client.plugins.safespot;
|
||||||
|
|
||||||
|
import java.awt.Color;
|
||||||
|
import net.runelite.client.config.Config;
|
||||||
|
import net.runelite.client.config.ConfigGroup;
|
||||||
|
import net.runelite.client.config.ConfigItem;
|
||||||
|
|
||||||
|
@ConfigGroup("safespot")
|
||||||
|
public interface SafeSpotConfig extends Config
|
||||||
|
{
|
||||||
|
@ConfigItem(
|
||||||
|
position = 1,
|
||||||
|
keyName = "playerSafeSpots",
|
||||||
|
name = "Render for Players",
|
||||||
|
description = "Renders 1 way safe spots vs other players"
|
||||||
|
)
|
||||||
|
default boolean playerSafeSpots()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
position = 2,
|
||||||
|
keyName = "npcSafeSpots",
|
||||||
|
name = "Render for NPCs",
|
||||||
|
description = "Renders 1 way safe spots vs NPCs"
|
||||||
|
)
|
||||||
|
default boolean npcSafeSpots()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
position = 3,
|
||||||
|
keyName = "tileColor",
|
||||||
|
name = "Tile Color",
|
||||||
|
description = "Color of safe spot tile"
|
||||||
|
)
|
||||||
|
default Color tileColor()
|
||||||
|
{
|
||||||
|
return Color.MAGENTA;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* Copyright (c) 2019. PKLite
|
||||||
|
* Redistributions and modifications of this software are permitted as long as this notice remains in its original unmodified state at the top of this file. If there are any questions, comments, or feedback about this software, please direct all inquiries directly to the following authors.
|
||||||
|
* PKLite discord: https://discord.gg/Dp3HuFM
|
||||||
|
* Written by PKLite(ST0NEWALL, others) <stonewall@stonewall@pklite.xyz>, 2019
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
package net.runelite.client.plugins.safespot;
|
||||||
|
|
||||||
|
import java.awt.Dimension;
|
||||||
|
import java.awt.Graphics2D;
|
||||||
|
import java.awt.Polygon;
|
||||||
|
import javax.inject.Inject;
|
||||||
|
import net.runelite.api.Client;
|
||||||
|
import net.runelite.api.Perspective;
|
||||||
|
import net.runelite.client.ui.overlay.Overlay;
|
||||||
|
import net.runelite.client.ui.overlay.OverlayLayer;
|
||||||
|
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||||
|
import net.runelite.client.ui.overlay.OverlayPriority;
|
||||||
|
import net.runelite.client.ui.overlay.OverlayUtil;
|
||||||
|
|
||||||
|
public class SafeSpotOverlay extends Overlay
|
||||||
|
{
|
||||||
|
|
||||||
|
private final Client client;
|
||||||
|
private final SafeSpotPlugin safeSpotPlugin;
|
||||||
|
private final SafeSpotConfig config;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
public SafeSpotOverlay(Client client, SafeSpotPlugin safeSpotPlugin, SafeSpotConfig config)
|
||||||
|
{
|
||||||
|
this.client = client;
|
||||||
|
this.safeSpotPlugin = safeSpotPlugin;
|
||||||
|
this.config = config;
|
||||||
|
setPosition(OverlayPosition.DYNAMIC);
|
||||||
|
setPriority(OverlayPriority.LOW);
|
||||||
|
setLayer(OverlayLayer.ABOVE_SCENE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Dimension render(Graphics2D graphics)
|
||||||
|
{
|
||||||
|
if (safeSpotPlugin.isSafeSpotsRenderable())
|
||||||
|
{
|
||||||
|
if(safeSpotPlugin.getSafeSpotList() != null)
|
||||||
|
{
|
||||||
|
if (safeSpotPlugin.getSafeSpotList().size() > 0)
|
||||||
|
{
|
||||||
|
safeSpotPlugin.getSafeSpotList().forEach(tile ->
|
||||||
|
{
|
||||||
|
if (tile != null && tile.getLocalLocation() != null)
|
||||||
|
{
|
||||||
|
final Polygon poly = Perspective.getCanvasTilePoly(client, tile.getLocalLocation());
|
||||||
|
if (poly != null)
|
||||||
|
{
|
||||||
|
OverlayUtil.renderPolygon(graphics, poly, config.tileColor());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,166 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2019. PKLite
|
||||||
|
* Redistributions and modifications of this software are permitted as long as this notice remains in its original unmodified state at the top of this file. If there are any questions, comments, or feedback about this software, please direct all inquiries directly to the following authors.
|
||||||
|
* PKLite discord: https://discord.gg/Dp3HuFM
|
||||||
|
* Written by PKLite(ST0NEWALL, others) <stonewall@stonewall@pklite.xyz>, 2019
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
package net.runelite.client.plugins.safespot;
|
||||||
|
|
||||||
|
import com.google.inject.Provides;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import javax.inject.Inject;
|
||||||
|
import lombok.Getter;
|
||||||
|
import net.runelite.api.Actor;
|
||||||
|
import net.runelite.api.Client;
|
||||||
|
import net.runelite.api.CollisionDataFlag;
|
||||||
|
import net.runelite.api.NPC;
|
||||||
|
import net.runelite.api.Player;
|
||||||
|
import net.runelite.api.Tile;
|
||||||
|
import net.runelite.api.coords.LocalPoint;
|
||||||
|
import net.runelite.api.coords.WorldArea;
|
||||||
|
import net.runelite.api.coords.WorldPoint;
|
||||||
|
import net.runelite.api.events.GameTick;
|
||||||
|
import net.runelite.api.events.InteractingChanged;
|
||||||
|
import net.runelite.client.config.ConfigManager;
|
||||||
|
import net.runelite.client.eventbus.Subscribe;
|
||||||
|
import net.runelite.client.plugins.Plugin;
|
||||||
|
import net.runelite.client.plugins.PluginDescriptor;
|
||||||
|
import net.runelite.client.plugins.PluginType;
|
||||||
|
import net.runelite.client.ui.overlay.OverlayManager;
|
||||||
|
|
||||||
|
@PluginDescriptor(
|
||||||
|
name = "1 Way Safe Spots",
|
||||||
|
description = "Renders tile overlays for one way safe spots",
|
||||||
|
tags = {"safe spot", "pvp", "safespots", "pklite"},
|
||||||
|
type = PluginType.UTILITY,
|
||||||
|
enabledByDefault = false
|
||||||
|
)
|
||||||
|
public class SafeSpotPlugin extends Plugin
|
||||||
|
{
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Client client;
|
||||||
|
@Inject
|
||||||
|
OverlayManager overlayManager;
|
||||||
|
@Inject
|
||||||
|
private SafeSpotConfig config;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
private ArrayList<Tile> safeSpotList;
|
||||||
|
@Getter
|
||||||
|
private boolean safeSpotsRenderable = false;
|
||||||
|
|
||||||
|
private SafeSpotOverlay safeSpotOverlay;
|
||||||
|
private int tickCount = 0;
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
SafeSpotConfig config(ConfigManager configManager)
|
||||||
|
{
|
||||||
|
return configManager.getConfig(SafeSpotConfig.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void startUp() throws Exception
|
||||||
|
{
|
||||||
|
safeSpotOverlay = new SafeSpotOverlay(client, this, config);
|
||||||
|
overlayManager.add(safeSpotOverlay);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void shutDown() throws Exception
|
||||||
|
{
|
||||||
|
overlayManager.remove(safeSpotOverlay);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Subscribe
|
||||||
|
private void onInteractingChanged(InteractingChanged event)
|
||||||
|
{
|
||||||
|
if (event.getSource() != client.getLocalPlayer())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (event.getTarget() == null && (config.npcSafeSpots() || config.playerSafeSpots()))
|
||||||
|
{
|
||||||
|
tickCount = 10;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Subscribe
|
||||||
|
public void onGameTick(GameTick event)
|
||||||
|
{
|
||||||
|
if (client.getLocalPlayer().getInteracting() != null)
|
||||||
|
{
|
||||||
|
if (client.getLocalPlayer().getInteracting() instanceof Player && config.playerSafeSpots())
|
||||||
|
{
|
||||||
|
safeSpotsRenderable = true;
|
||||||
|
updateSafeSpots();
|
||||||
|
}
|
||||||
|
if (client.getLocalPlayer().getInteracting() instanceof NPC && config.npcSafeSpots())
|
||||||
|
{
|
||||||
|
safeSpotsRenderable = true;
|
||||||
|
updateSafeSpots();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
safeSpotsRenderable = false;
|
||||||
|
}
|
||||||
|
if (tickCount > 0)
|
||||||
|
{
|
||||||
|
tickCount--;
|
||||||
|
safeSpotsRenderable = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Call this method to update the ArrayList of safespot tiles
|
||||||
|
*/
|
||||||
|
private void updateSafeSpots()
|
||||||
|
{
|
||||||
|
if (client.getLocalPlayer().getInteracting() != null)
|
||||||
|
{
|
||||||
|
Actor enemy = client.getLocalPlayer().getInteracting();
|
||||||
|
WorldArea worldArea = new WorldArea(enemy.getWorldLocation().getX() - 12,
|
||||||
|
enemy.getWorldLocation().getY() - 12, 24, 24, client.getPlane());
|
||||||
|
List<WorldPoint> worldPoints = worldArea.toWorldPointList();
|
||||||
|
safeSpotList = getSafeSpotList(enemy, worldPoints);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The ArrayList of 1-way safe spots
|
||||||
|
* @param actor - The Actor that the tiles are a safe spot against
|
||||||
|
* @param worldPoints - Worldpoints in the current scene
|
||||||
|
* @return an ArrayList of Tiles where current player can attack actor but actor cannot attack local player
|
||||||
|
*/
|
||||||
|
private ArrayList<Tile> getSafeSpotList(Actor actor, List<WorldPoint> worldPoints)
|
||||||
|
{
|
||||||
|
ArrayList<Tile> safeSpotList = new ArrayList<>();
|
||||||
|
Tile[][][] tiles = client.getScene().getTiles();
|
||||||
|
for (WorldPoint w:worldPoints)
|
||||||
|
{
|
||||||
|
LocalPoint toPoint = LocalPoint.fromWorld(client, w);
|
||||||
|
Tile fromTile = tiles[client.getPlane()][actor.getLocalLocation().getSceneX()]
|
||||||
|
[actor.getLocalLocation().getSceneY()];
|
||||||
|
Tile toTile = tiles[client.getPlane()][toPoint.getSceneX()]
|
||||||
|
[toPoint.getSceneY()];
|
||||||
|
final int plane = client.getLocalPlayer().getWorldArea().getPlane();
|
||||||
|
int bit = client.getCollisionMaps()[plane].getFlags()[toPoint.getSceneX()][toPoint.getSceneY()];
|
||||||
|
if (toTile.hasLineOfSightTo(fromTile) && !fromTile.hasLineOfSightTo(toTile))
|
||||||
|
{
|
||||||
|
if (!((bit & CollisionDataFlag.BLOCK_MOVEMENT_OBJECT ) == CollisionDataFlag.BLOCK_MOVEMENT_OBJECT ||
|
||||||
|
(bit & CollisionDataFlag.BLOCK_MOVEMENT_FLOOR_DECORATION )
|
||||||
|
== CollisionDataFlag.BLOCK_MOVEMENT_FLOOR_DECORATION ||
|
||||||
|
(bit & CollisionDataFlag.BLOCK_MOVEMENT_FLOOR ) == CollisionDataFlag.BLOCK_MOVEMENT_FLOOR ||
|
||||||
|
(bit & CollisionDataFlag.BLOCK_MOVEMENT_FULL ) == CollisionDataFlag.BLOCK_MOVEMENT_FULL))
|
||||||
|
{
|
||||||
|
safeSpotList.add(toTile);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return safeSpotList;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,61 +1,39 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2018, https://runelitepl.us
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
*
|
|
||||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
||||||
* list of conditions and the following disclaimer.
|
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
* this list of conditions and the following disclaimer in the documentation
|
|
||||||
* and/or other materials provided with the distribution.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
|
||||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
package net.runelite.client.plugins.wildernesslocations;
|
package net.runelite.client.plugins.wildernesslocations;
|
||||||
|
|
||||||
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.Client;
|
import net.runelite.api.Client;
|
||||||
import net.runelite.client.plugins.wildernesslocations.WildernessLocationsPlugin;
|
|
||||||
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;
|
||||||
import net.runelite.client.ui.overlay.OverlayPriority;
|
import net.runelite.client.ui.overlay.OverlayPriority;
|
||||||
import net.runelite.client.ui.overlay.components.TextComponent;
|
import net.runelite.client.ui.overlay.components.TextComponent;
|
||||||
|
|
||||||
public class WildernessLocationsOverlay
|
public class WildernessLocationsOverlay extends Overlay
|
||||||
extends Overlay {
|
{
|
||||||
private final WildernessLocationsPlugin plugin;
|
private final WildernessLocationsPlugin plugin;
|
||||||
private TextComponent textComponent;
|
private TextComponent textComponent;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public WildernessLocationsOverlay(Client client, WildernessLocationsPlugin plugin) {
|
public WildernessLocationsOverlay(Client client, WildernessLocationsPlugin plugin)
|
||||||
this.plugin = plugin;
|
{
|
||||||
setLayer(OverlayLayer.ABOVE_WIDGETS);
|
this.plugin = plugin;
|
||||||
setPriority(OverlayPriority.HIGH);
|
setLayer(OverlayLayer.ABOVE_WIDGETS);
|
||||||
setPosition(OverlayPosition.BOTTOM_RIGHT);
|
setPriority(OverlayPriority.HIGH);
|
||||||
textComponent = new TextComponent();
|
setPosition(OverlayPosition.BOTTOM_RIGHT);
|
||||||
}
|
textComponent = new TextComponent();
|
||||||
|
|
||||||
@Override
|
}
|
||||||
public Dimension render(Graphics2D graphics) {
|
|
||||||
if (plugin.isRenderLocation()) {
|
@Override
|
||||||
textComponent.setText(plugin.getLocationString());
|
public Dimension render(Graphics2D graphics)
|
||||||
return textComponent.render(graphics);
|
{
|
||||||
}
|
if (plugin.isRenderLocation())
|
||||||
return null;
|
{
|
||||||
}
|
textComponent.setText(plugin.getLocationString());
|
||||||
|
return textComponent.render(graphics);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,27 +1,3 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2018, https://runelitepl.us
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
*
|
|
||||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
||||||
* list of conditions and the following disclaimer.
|
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
* this list of conditions and the following disclaimer in the documentation
|
|
||||||
* and/or other materials provided with the distribution.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
|
||||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
package net.runelite.client.plugins.wildernesslocations;
|
package net.runelite.client.plugins.wildernesslocations;
|
||||||
|
|
||||||
|
|
||||||
@@ -39,16 +15,17 @@ import net.runelite.api.coords.WorldPoint;
|
|||||||
import net.runelite.api.events.GameTick;
|
import net.runelite.api.events.GameTick;
|
||||||
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.PluginType;
|
|
||||||
import net.runelite.client.plugins.PluginDescriptor;
|
import net.runelite.client.plugins.PluginDescriptor;
|
||||||
|
import net.runelite.client.plugins.PluginType;
|
||||||
|
import net.runelite.client.plugins.PluginManager;
|
||||||
import net.runelite.client.ui.overlay.OverlayManager;
|
import net.runelite.client.ui.overlay.OverlayManager;
|
||||||
import net.runelite.client.util.WildernessLocation;
|
import net.runelite.client.util.WildernessLocation;
|
||||||
|
|
||||||
@PluginDescriptor(
|
@PluginDescriptor(
|
||||||
name = "Wild Locations",
|
name = "Wild Locations",
|
||||||
description = "Indicates the players current location in the wild",
|
description = "Indicates the players current location in the wild",
|
||||||
tags = {"Wildy", "Wilderness Location", "location", "loc", "pvp", "pklite"},
|
tags = {"Wildy", "Wilderness Location", "location", "loc", "pvp", "pklite"},
|
||||||
type = PluginType.PVP
|
type = PluginType.PVP
|
||||||
)
|
)
|
||||||
public class WildernessLocationsPlugin extends Plugin
|
public class WildernessLocationsPlugin extends Plugin
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ import java.awt.image.BufferedImage;
|
|||||||
import net.runelite.api.Actor;
|
import net.runelite.api.Actor;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
import net.runelite.api.Perspective;
|
import net.runelite.api.Perspective;
|
||||||
|
import net.runelite.api.Player;
|
||||||
import net.runelite.api.Point;
|
import net.runelite.api.Point;
|
||||||
import net.runelite.api.TileObject;
|
import net.runelite.api.TileObject;
|
||||||
import net.runelite.api.coords.LocalPoint;
|
import net.runelite.api.coords.LocalPoint;
|
||||||
@@ -258,4 +259,17 @@ public class OverlayUtil
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void renderActorTextAndImage(Graphics2D graphics, Actor actor, String text, Color color,
|
||||||
|
BufferedImage image, int yOffset, int xOffset)
|
||||||
|
{
|
||||||
|
Point textLocation = new Point(actor.getConvexHull().getBounds().x + xOffset,
|
||||||
|
actor.getConvexHull().getBounds().y + yOffset);
|
||||||
|
|
||||||
|
renderImageLocation(graphics, textLocation, image);
|
||||||
|
xOffset = image.getWidth() + 1;
|
||||||
|
yOffset = (image.getHeight() - (int) graphics.getFontMetrics().getStringBounds(text, graphics).getHeight());
|
||||||
|
textLocation = new Point(textLocation.getX() + xOffset, textLocation.getY() + image.getHeight() - yOffset);
|
||||||
|
renderTextLocation(graphics, textLocation, text, color);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,98 +1,93 @@
|
|||||||
|
|
||||||
package net.runelite.client.util;
|
package net.runelite.client.util;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
import net.runelite.api.coords.WorldArea;
|
import net.runelite.api.coords.WorldArea;
|
||||||
|
|
||||||
public enum WildernessLocation {
|
public enum WildernessLocation
|
||||||
REV_CAVE_OTHER("Rev Cave", new Location(3128, 10232, 3225, 10059), 0),
|
{
|
||||||
REV_BLACK_DRAGS("Rev Black Drags", new Location(3223, 10216, 3254, 10190), 0),
|
|
||||||
REV_DARK_BEAST("Rev Dark Beast", new Location(3243, 10154, 3264, 10136), 0),
|
|
||||||
REV_MAIN_CHAMBER("Main Rev Chamber", new Location(3227, 10187, 3261, 10157), 0),
|
|
||||||
REV_ENTRANCE_INSIDE("Inside Rev Ent.", new Location(3238, 10236, 3243, 10231), 0),
|
|
||||||
ICE_ROCK("Ice Rock", new Location(2957, 3942, 2984, 3929), 0),
|
|
||||||
WILDY_AGILITY_COURSE("Wildy Agility Course", new Location(2988, 3967, 3008, 3906), 0),
|
|
||||||
FIRE_GIANT_ENTRANCE("Fire Giant Entrance", new Location(3042, 3929, 3051, 3920), 0),
|
|
||||||
PIRATE_HUT("Pirate Hut", new Location(3037, 3959, 3045, 3948), 0),
|
|
||||||
MAGE_BANK("Mage Bank", new Location(3082, 3960, 3103, 3952), 0),
|
|
||||||
MAGE_ARENA("Mage Arena", new Location(3088, 3949, 3123, 3919), 0),
|
|
||||||
LEVER("Lever", new Location(3149, 3933, 3162, 3917), 0),
|
|
||||||
WEB("Web", new Location(3153, 3961, 3163, 3948), 0),
|
|
||||||
RESOURCE_ARENA("Resource Arena", new Location(3174, 3946, 3195, 3923), 0),
|
|
||||||
AXE_HUT("Axe Hut", new Location(3187, 3962, 3194, 3957), 0),
|
|
||||||
SCORPIA("Scorpia", new Location(3216, 3949, 3248, 3935), 0),
|
|
||||||
ROGUE_CASTLE("Rogue Castle", new Location(3275, 3947, 3299, 3920), 0),
|
|
||||||
FIFTY_PORTS("50 ports", new Location(3301, 3923, 3315, 3909), 0),
|
|
||||||
VOLCANO("Volcano", new Location(3345, 3957, 3390, 3916), 0),
|
|
||||||
NEW_GATE("New Gate", new Location(3345, 3957, 3390, 3916), 0),
|
|
||||||
GLORY_HOLE("Glory Hole", new Location(3352, 3897, 3386, 3869), 0),
|
|
||||||
GLORY_HILL("Glory Hill", new Location(3331, 3890, 3348, 3866), 0),
|
|
||||||
GDZ("Gdz", new Location(3279, 3895, 3296, 3875), 0),
|
|
||||||
GAP("Gap", new Location(3238, 3855, 3258, 3841), 0),
|
|
||||||
OLD_GATE("Old Gate", new Location(3211, 3906, 3238, 3882), 0),
|
|
||||||
LAVA_DRAGS("Lava Drags", new Location(3175, 3857, 3221, 3805), 0),
|
|
||||||
SPIDER_HILL("Spider Hill", new Location(3156, 3896, 3182, 3871), 0),
|
|
||||||
RUNE_ROCKS("Rune Rocks", new Location(3055, 3890, 3072, 3876), 0),
|
|
||||||
ICE_GATE("Ice Gate", new Location(2945, 3913, 2978, 3878), 0),
|
|
||||||
VENENATIS("Venenatis", new Location(3298, 3759, 3353, 3722), 0),
|
|
||||||
SINGLE_STRIP("Single Strip", new Location(3333, 3842, 3348, 3774), 0),
|
|
||||||
CALLISTO("Callisto", new Location(3266, 3863, 3315, 3827), 0),
|
|
||||||
DWARVES("Dwarves", new Location(3230, 3805, 3264, 3779), 0),
|
|
||||||
VETTION("Vet'tion", new Location(3183, 3796, 3227, 3765), 0),
|
|
||||||
EAST_DRAGONS("East Drags", new Location(3326, 3704, 3365, 3671), 0),
|
|
||||||
HILL_GIANTS("Hill Giants", new Location(3282, 3687, 3300, 3674), 0),
|
|
||||||
ENTS("Ents", new Location(3300, 3627, 3320, 3584), 0),
|
|
||||||
CHAOS_TEMPLE("Chaos Temple", new Location(3220, 3632, 3255, 3593), 0),
|
|
||||||
NINETEEN_OBELISK("19s", new Location(3220, 3672, 3234, 3660), 0),
|
|
||||||
CORP_CAVE("Corp Cave", new Location(3201, 3684, 3219, 3672), 0),
|
|
||||||
THIRTEEN_OBELISK("13s", new Location(3145, 3628, 3168, 3609), 0),
|
|
||||||
SOUTH_REV_ENTRANCE("Lvl 18 Rev Ent", new Location(3071, 3660, 3092, 3645), 0),
|
|
||||||
GRAVES("Graves", new Location(3128, 3686, 3181, 3658), 0),
|
|
||||||
GRAVEYARD_DRAGS("Graveyard Drags", new Location(3129, 3717, 3172, 3691), 0),
|
|
||||||
CHINS("Chins", new Location(3128, 3792, 3160, 3754), 0),
|
|
||||||
REV_ENTRANCE("Rev Entrance", new Location(3118, 3837, 3142, 3818), 0),
|
|
||||||
HOB_OBELISK("35 Obelisk", new Location(3097, 3804, 3115, 3785), 0),
|
|
||||||
HOBGOBLINS("Hobgoblins", new Location(3073, 3775, 3104, 3745), 0),
|
|
||||||
GWD("God Wars Dungeon", new Location(3010, 3745, 3027, 3727), 0),
|
|
||||||
LAVA_MAZE_TELE("Lava Maze Tele", new Location(3019, 3842, 3044, 3812), 0),
|
|
||||||
KBD_CAGE("KBD CAGE", new Location(3007, 3855, 3021, 3839), 0),
|
|
||||||
GHORROCK("44s", new Location(2973, 3870, 2987, 3859), 0),
|
|
||||||
CHAOS_FANATIC("Chaos Fanatic", new Location(2971, 3854, 2992, 3834), 0),
|
|
||||||
HIGH_ALTAR("High Altar", new Location(2945, 3826, 2970, 3813), 0),
|
|
||||||
CEMETERY("Cemetery", new Location(2956, 3767, 2996, 3736), 0),
|
|
||||||
CRAZY_ARCHAEOLOGIST("Crazy Archaeologist", new Location(2952, 3709, 2985, 3678), 0),
|
|
||||||
DARK_WARRIOR_FORTRESS("Dark Warriors", new Location(3014, 3648, 3046, 3616), 0),
|
|
||||||
WEST_DRAGONS("West Drags", new Location(2960, 3627, 2992, 3598), 0),
|
|
||||||
BANDIT_CAMP("Bandit Camp", new Location(3017, 3712, 3059, 3681), 0);
|
|
||||||
|
|
||||||
private final String name1;
|
REV_CAVE_OTHER("Rev Cave", new Location(3128, 10232, 3225, 10059), 0),
|
||||||
private final WorldArea worldArea;
|
REV_BLACK_DRAGS("Rev Black Drags", new Location(3223, 10216, 3254, 10190), 0),
|
||||||
|
REV_DARK_BEAST("Rev Dark Beast", new Location(3243, 10154, 3264, 10136), 0),
|
||||||
|
REV_MAIN_CHAMBER("Main Rev Chamber", new Location(3227, 10187, 3261, 10157), 0),
|
||||||
|
REV_ENTRANCE_INSIDE("Inside Rev Ent.", new Location(3238, 10236, 3243, 10231), 0),
|
||||||
|
ICE_ROCK("Ice Rock", new Location(2957, 3942, 2984, 3929), 0),
|
||||||
|
WILDY_AGILITY_COURSE("Wildy Agility Course", new Location(2988, 3967, 3008, 3906), 0),
|
||||||
|
FIRE_GIANT_ENTRANCE("Fire Giant Entrance", new Location(3042, 3929, 3051, 3920), 0),
|
||||||
|
PIRATE_HUT("Pirate Hut", new Location(3037, 3959, 3045, 3948), 0),
|
||||||
|
MAGE_BANK("Mage Bank", new Location(3082, 3960, 3103, 3952), 0),
|
||||||
|
MAGE_ARENA("Mage Arena", new Location(3088, 3949, 3123, 3919), 0),
|
||||||
|
LEVER("Lever", new Location(3149, 3933, 3162, 3917), 0),
|
||||||
|
WEB("Web", new Location(3153, 3961, 3163, 3948), 0),
|
||||||
|
RESOURCE_ARENA("Resource Arena", new Location(3174, 3946, 3195, 3923), 0),
|
||||||
|
AXE_HUT("Axe Hut", new Location(3187, 3962, 3194, 3957), 0),
|
||||||
|
SCORPIA("Scorpia", new Location(3216, 3949, 3248, 3935), 0),
|
||||||
|
ROGUE_CASTLE("Rogue Castle", new Location(3275, 3947, 3299, 3920), 0),
|
||||||
|
FIFTY_PORTS("50 ports", new Location(3301, 3923, 3315, 3909), 0),
|
||||||
|
VOLCANO("Volcano", new Location(3345, 3957, 3390, 3916), 0),
|
||||||
|
NEW_GATE("New Gate", new Location(3345, 3957, 3390, 3916), 0),
|
||||||
|
GLORY_HOLE("Glory Hole", new Location(3352, 3897, 3386, 3869), 0),
|
||||||
|
GLORY_HILL("Glory Hill", new Location(3331, 3890, 3348, 3866), 0),
|
||||||
|
GDZ("Gdz", new Location(3279, 3895, 3296, 3875), 0),
|
||||||
|
GAP("Gap", new Location(3238, 3855, 3258, 3841), 0),
|
||||||
|
OLD_GATE("Old Gate", new Location(3211, 3906, 3238, 3882), 0),
|
||||||
|
LAVA_DRAGS("Lava Drags", new Location(3175, 3857, 3221, 3805), 0),
|
||||||
|
SPIDER_HILL("Spider Hill", new Location(3156, 3896, 3182, 3871), 0),
|
||||||
|
RUNE_ROCKS("Rune Rocks", new Location(3055, 3890, 3072, 3876), 0),
|
||||||
|
ICE_GATE("Ice Gate", new Location(2945, 3913, 2978, 3878), 0),
|
||||||
|
VENENATIS("Venenatis", new Location(3298, 3759, 3353, 3722), 0),
|
||||||
|
SINGLE_STRIP("Single Strip", new Location(3333, 3842, 3348, 3774), 0),
|
||||||
|
CALLISTO("Callisto", new Location(3266, 3863, 3315, 3827), 0),
|
||||||
|
DWARVES("Dwarves", new Location(3230, 3805, 3264, 3779), 0),
|
||||||
|
VETTION("Vet'tion", new Location(3183, 3796, 3227, 3765), 0),
|
||||||
|
EAST_DRAGONS("East Drags", new Location(3326, 3704, 3365, 3671), 0),
|
||||||
|
HILL_GIANTS("Hill Giants", new Location(3282, 3687, 3300, 3674), 0),
|
||||||
|
ENTS("Ents", new Location(3300, 3627, 3320, 3584), 0),
|
||||||
|
CHAOS_TEMPLE("Chaos Temple", new Location(3220, 3632, 3255, 3593), 0),
|
||||||
|
NINETEEN_OBELISK("19s", new Location(3220, 3672, 3234, 3660), 0),
|
||||||
|
CORP_CAVE("Corp Cave", new Location(3201, 3684, 3219, 3672), 0),
|
||||||
|
THIRTEEN_OBELISK("13s", new Location(3145, 3628, 3168, 3609), 0),
|
||||||
|
SOUTH_REV_ENTRANCE("Lvl 18 Rev Ent", new Location(3071, 3660, 3092, 3645), 0),
|
||||||
|
GRAVES("Graves", new Location(3128, 3686, 3181, 3658), 0),
|
||||||
|
GRAVEYARD_DRAGS("Graveyard Drags", new Location(3129, 3717, 3172, 3691), 0),
|
||||||
|
CHINS("Chins", new Location(3128, 3792, 3160, 3754), 0),
|
||||||
|
REV_ENTRANCE("Rev Entrance", new Location(3118, 3837, 3142, 3818), 0),
|
||||||
|
HOB_OBELISK("35 Obelisk", new Location(3097, 3804, 3115, 3785), 0),
|
||||||
|
HOBGOBLINS("Hobgoblins", new Location(3073, 3775, 3104, 3745), 0),
|
||||||
|
GWD("God Wars Dungeon", new Location(3010, 3745, 3027, 3727), 0),
|
||||||
|
LAVA_MAZE_TELE("Lava Maze Tele", new Location(3019, 3842, 3044, 3812), 0),
|
||||||
|
KBD_CAGE("KBD CAGE", new Location(3007, 3855, 3021, 3839), 0),
|
||||||
|
GHORROCK("44s", new Location(2973, 3870, 2987, 3859), 0),
|
||||||
|
CHAOS_FANATIC("Chaos Fanatic", new Location(2971, 3854, 2992, 3834), 0),
|
||||||
|
HIGH_ALTAR("High Altar", new Location(2945, 3826, 2970, 3813), 0),
|
||||||
|
CEMETERY("Cemetery", new Location(2956, 3767, 2996, 3736), 0),
|
||||||
|
CRAZY_ARCHAEOLOGIST("Crazy Archaeologist", new Location(2952, 3709, 2985, 3678), 0),
|
||||||
|
DARK_WARRIOR_FORTRESS("Dark Warriors", new Location(3014, 3648, 3046, 3616), 0),
|
||||||
|
WEST_DRAGONS("West Drags", new Location(2960, 3627, 2992, 3598), 0),
|
||||||
|
BANDIT_CAMP("Bandit Camp", new Location(3017, 3712, 3059, 3681), 0);
|
||||||
|
|
||||||
private WildernessLocation(String name, Location location, int plane) {
|
@Getter
|
||||||
name1 = name;
|
private final String name;
|
||||||
worldArea = new WorldArea(location.x, location.y, location.width, location.height, plane);
|
@Getter
|
||||||
}
|
private final WorldArea worldArea;
|
||||||
|
WildernessLocation(String name, Location location, int plane)
|
||||||
public String getName() {
|
{
|
||||||
return name1;
|
this.name = name;
|
||||||
}
|
this.worldArea = new WorldArea(location.x, location.y, location.width, location.height, plane);
|
||||||
|
}
|
||||||
public WorldArea getWorldArea() {
|
|
||||||
return worldArea;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class Location {
|
|
||||||
public int x;
|
|
||||||
public int y;
|
|
||||||
public int width;
|
|
||||||
public int height;
|
|
||||||
|
|
||||||
Location(int x, int y, int x1, int y1) {
|
|
||||||
x = x;
|
|
||||||
y = y1;
|
|
||||||
width = x1 - x;
|
|
||||||
height = y - y1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
public static class Location
|
||||||
|
{
|
||||||
|
public int x;
|
||||||
|
public int y;
|
||||||
|
public int width;
|
||||||
|
public int height;
|
||||||
|
Location(int x, int y, int x1, int y1)
|
||||||
|
{
|
||||||
|
this.x = x;
|
||||||
|
this.y = y1;
|
||||||
|
this.width = x1 - x;
|
||||||
|
this.height = y - y1;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 195 B |
Binary file not shown.
|
After Width: | Height: | Size: 216 B |
Binary file not shown.
|
After Width: | Height: | Size: 251 B |
@@ -972,4 +972,8 @@ public interface RSClient extends RSGameEngine, Client
|
|||||||
@Import("healthbarCache")
|
@Import("healthbarCache")
|
||||||
@Override
|
@Override
|
||||||
RSNodeCache getHealthBarCache();
|
RSNodeCache getHealthBarCache();
|
||||||
|
|
||||||
|
@Import("renderSelf")
|
||||||
|
void toggleRenderSelf();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user