Updating ToB Plugin
This commit is contained in:
@@ -1,38 +1,22 @@
|
|||||||
/*
|
|
||||||
* 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.ztob;
|
package net.runelite.client.plugins.ztob;
|
||||||
|
|
||||||
|
import java.awt.BasicStroke;
|
||||||
|
import java.awt.Color;
|
||||||
|
import java.awt.Dimension;
|
||||||
|
import java.awt.Font;
|
||||||
|
import java.awt.Graphics2D;
|
||||||
|
import java.awt.Polygon;
|
||||||
|
import javax.inject.Inject;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
import net.runelite.api.Perspective;
|
import net.runelite.api.Perspective;
|
||||||
import net.runelite.api.Point;
|
import net.runelite.api.Point;
|
||||||
import net.runelite.api.coords.LocalPoint;
|
import net.runelite.api.coords.LocalPoint;
|
||||||
import net.runelite.api.coords.WorldPoint;
|
import net.runelite.api.coords.WorldPoint;
|
||||||
import net.runelite.client.ui.overlay.*;
|
import net.runelite.client.ui.overlay.Overlay;
|
||||||
|
import net.runelite.client.ui.overlay.OverlayLayer;
|
||||||
import javax.inject.Inject;
|
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||||
import java.awt.*;
|
import net.runelite.client.ui.overlay.OverlayPriority;
|
||||||
|
import net.runelite.client.ui.overlay.OverlayUtil;
|
||||||
|
|
||||||
public class BloatTimerOverlay extends Overlay {
|
public class BloatTimerOverlay extends Overlay {
|
||||||
|
|
||||||
@@ -50,20 +34,29 @@ public class BloatTimerOverlay extends Overlay {
|
|||||||
setLayer(OverlayLayer.ABOVE_SCENE);
|
setLayer(OverlayLayer.ABOVE_SCENE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Dimension render(Graphics2D graphics) {
|
public Dimension render(Graphics2D graphics)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (config.bloatTimer())
|
||||||
|
{
|
||||||
|
final String tickCounter = String.valueOf(plugin.bloatTimer);
|
||||||
|
int secondConversion = (int) (plugin.bloatTimer * .6);
|
||||||
|
if (plugin.getBloat_NPC() != null)
|
||||||
|
{
|
||||||
|
Point canvasPoint = plugin.getBloat_NPC().getCanvasTextLocation(graphics, tickCounter, 60);
|
||||||
|
if (plugin.bloatTimer <= 37)
|
||||||
|
{
|
||||||
|
renderTextLocation(graphics, tickCounter + "( " + secondConversion + " )", 15, Font.BOLD, Color.WHITE, canvasPoint);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
renderTextLocation(graphics, tickCounter + "( " + secondConversion + " )", 15, Font.BOLD, Color.RED, canvasPoint);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (config.bloatTimer()) {
|
|
||||||
final String tickCounter = String.valueOf(plugin.bloatTimer);
|
|
||||||
int secondConversion = (int) (plugin.bloatTimer * .6);
|
|
||||||
if (plugin.getBloat_NPC() != null) {
|
|
||||||
Point canvasPoint = plugin.getBloat_NPC().getCanvasTextLocation(graphics, tickCounter, 60);
|
|
||||||
if (plugin.bloatTimer <= 37) {
|
|
||||||
renderTextLocation(graphics, tickCounter + "( " + secondConversion + " )", 15, Font.BOLD, Color.WHITE, canvasPoint);
|
|
||||||
} else {
|
|
||||||
renderTextLocation(graphics, tickCounter + "( " + secondConversion + " )", 15, Font.BOLD, Color.RED, canvasPoint);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
@@ -91,15 +84,17 @@ public class BloatTimerOverlay extends Overlay {
|
|||||||
graphics.fill(poly);
|
graphics.fill(poly);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void renderTextLocation(Graphics2D graphics, String txtString, int fontSize, int fontStyle, Color fontColor, net.runelite.api.Point canvasPoint) {
|
private void renderTextLocation(Graphics2D graphics, String txtString, int fontSize, int fontStyle, Color fontColor, net.runelite.api.Point canvasPoint)
|
||||||
|
{
|
||||||
graphics.setFont(new Font("Arial", fontStyle, fontSize));
|
graphics.setFont(new Font("Arial", fontStyle, fontSize));
|
||||||
if (canvasPoint != null) {
|
if (canvasPoint != null)
|
||||||
|
{
|
||||||
final net.runelite.api.Point canvasCenterPoint = new net.runelite.api.Point(
|
final net.runelite.api.Point canvasCenterPoint = new net.runelite.api.Point(
|
||||||
canvasPoint.getX(),
|
canvasPoint.getX(),
|
||||||
canvasPoint.getY());
|
canvasPoint.getY());
|
||||||
final net.runelite.api.Point canvasCenterPoint_shadow = new Point(
|
final net.runelite.api.Point canvasCenterPoint_shadow = new Point(
|
||||||
canvasPoint.getX() + 1,
|
canvasPoint.getX() + 1,
|
||||||
canvasPoint.getY() + 1);
|
canvasPoint.getY() + 1);
|
||||||
OverlayUtil.renderTextLocation(graphics, canvasCenterPoint_shadow, txtString, Color.BLACK);
|
OverlayUtil.renderTextLocation(graphics, canvasCenterPoint_shadow, txtString, Color.BLACK);
|
||||||
OverlayUtil.renderTextLocation(graphics, canvasCenterPoint, txtString, fontColor);
|
OverlayUtil.renderTextLocation(graphics, canvasCenterPoint, txtString, fontColor);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,16 +14,18 @@ import net.runelite.client.config.ConfigItem;
|
|||||||
|
|
||||||
@ConfigGroup("Theatre")
|
@ConfigGroup("Theatre")
|
||||||
|
|
||||||
public interface TheatreConfig extends Config {
|
public interface TheatreConfig extends Config
|
||||||
|
{
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 0,
|
position = 0,
|
||||||
keyName = "MaidenBlood",
|
keyName = "MaidenBlood",
|
||||||
name = "Maiden blood attack",
|
name = "Maiden blood attack",
|
||||||
description = ""
|
description = ""
|
||||||
)
|
)
|
||||||
default boolean MaidenBlood() {
|
default boolean MaidenBlood()
|
||||||
return true;
|
{
|
||||||
}
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 1,
|
position = 1,
|
||||||
@@ -31,9 +33,10 @@ public interface TheatreConfig extends Config {
|
|||||||
name = "Maiden blood spawns",
|
name = "Maiden blood spawns",
|
||||||
description = ""
|
description = ""
|
||||||
)
|
)
|
||||||
default boolean MaidenSpawns() {
|
default boolean MaidenSpawns()
|
||||||
return true;
|
{
|
||||||
}
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 2,
|
position = 2,
|
||||||
@@ -41,9 +44,10 @@ public interface TheatreConfig extends Config {
|
|||||||
name = "Bloat Indicator",
|
name = "Bloat Indicator",
|
||||||
description = ""
|
description = ""
|
||||||
)
|
)
|
||||||
default boolean BloatIndicator() {
|
default boolean BloatIndicator()
|
||||||
return true;
|
{
|
||||||
}
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 3,
|
position = 3,
|
||||||
@@ -51,9 +55,10 @@ public interface TheatreConfig extends Config {
|
|||||||
name = "Bloat Timer",
|
name = "Bloat Timer",
|
||||||
description = ""
|
description = ""
|
||||||
)
|
)
|
||||||
default boolean bloatTimer() {
|
default boolean bloatTimer()
|
||||||
return true;
|
{
|
||||||
}
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 4,
|
position = 4,
|
||||||
@@ -61,9 +66,10 @@ public interface TheatreConfig extends Config {
|
|||||||
name = "Bloat Feet",
|
name = "Bloat Feet",
|
||||||
description = ""
|
description = ""
|
||||||
)
|
)
|
||||||
default boolean bloatFeetIndicator() {
|
default boolean bloatFeetIndicator()
|
||||||
return true;
|
{
|
||||||
}
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 5,
|
position = 5,
|
||||||
@@ -71,9 +77,11 @@ public interface TheatreConfig extends Config {
|
|||||||
name = "Nylocas pillar health",
|
name = "Nylocas pillar health",
|
||||||
description = ""
|
description = ""
|
||||||
)
|
)
|
||||||
default boolean NyloPillars() {
|
default boolean NyloPillars()
|
||||||
return true;
|
{
|
||||||
}
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
@@ -82,9 +90,10 @@ public interface TheatreConfig extends Config {
|
|||||||
name = "Nylocas explosions",
|
name = "Nylocas explosions",
|
||||||
description = ""
|
description = ""
|
||||||
)
|
)
|
||||||
default boolean NyloBlasts() {
|
default boolean NyloBlasts()
|
||||||
return true;
|
{
|
||||||
}
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 7,
|
position = 7,
|
||||||
@@ -103,9 +112,10 @@ public interface TheatreConfig extends Config {
|
|||||||
name = "Sotetseg maze",
|
name = "Sotetseg maze",
|
||||||
description = ""
|
description = ""
|
||||||
)
|
)
|
||||||
default boolean SotetsegMaze1() {
|
default boolean SotetsegMaze1()
|
||||||
return true;
|
{
|
||||||
}
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 9,
|
position = 9,
|
||||||
@@ -113,9 +123,10 @@ public interface TheatreConfig extends Config {
|
|||||||
name = "Sotetseg maze (solo mode)",
|
name = "Sotetseg maze (solo mode)",
|
||||||
description = ""
|
description = ""
|
||||||
)
|
)
|
||||||
default boolean SotetsegMaze2() {
|
default boolean SotetsegMaze2()
|
||||||
return true;
|
{
|
||||||
}
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 10,
|
position = 10,
|
||||||
@@ -123,9 +134,10 @@ public interface TheatreConfig extends Config {
|
|||||||
name = "Xarpus Exhumed",
|
name = "Xarpus Exhumed",
|
||||||
description = ""
|
description = ""
|
||||||
)
|
)
|
||||||
default boolean XarpusExhumed() {
|
default boolean XarpusExhumed()
|
||||||
return true;
|
{
|
||||||
}
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 11,
|
position = 11,
|
||||||
@@ -133,9 +145,10 @@ public interface TheatreConfig extends Config {
|
|||||||
name = "Xarpus Tick",
|
name = "Xarpus Tick",
|
||||||
description = ""
|
description = ""
|
||||||
)
|
)
|
||||||
default boolean XarpusTick() {
|
default boolean XarpusTick()
|
||||||
return false;
|
{
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 12,
|
position = 12,
|
||||||
@@ -143,9 +156,10 @@ public interface TheatreConfig extends Config {
|
|||||||
name = "Xarpus Exhume Counter",
|
name = "Xarpus Exhume Counter",
|
||||||
description = ""
|
description = ""
|
||||||
)
|
)
|
||||||
default boolean XarpusExhumeOverlay() {
|
default boolean XarpusExhumeOverlay()
|
||||||
return false;
|
{
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 13,
|
position = 13,
|
||||||
@@ -153,9 +167,10 @@ public interface TheatreConfig extends Config {
|
|||||||
name = "Verzik Projectile Markers",
|
name = "Verzik Projectile Markers",
|
||||||
description = ""
|
description = ""
|
||||||
)
|
)
|
||||||
default boolean VerzikCupcakes() {
|
default boolean VerzikCupcakes()
|
||||||
return false;
|
{
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 14,
|
position = 14,
|
||||||
@@ -163,9 +178,10 @@ public interface TheatreConfig extends Config {
|
|||||||
name = "Verzik P3 Tick",
|
name = "Verzik P3 Tick",
|
||||||
description = ""
|
description = ""
|
||||||
)
|
)
|
||||||
default boolean VerzikTick() {
|
default boolean VerzikTick()
|
||||||
return false;
|
{
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 15,
|
position = 15,
|
||||||
@@ -173,9 +189,10 @@ public interface TheatreConfig extends Config {
|
|||||||
name = "Verzik P3 Melee Range",
|
name = "Verzik P3 Melee Range",
|
||||||
description = ""
|
description = ""
|
||||||
)
|
)
|
||||||
default boolean VerzikMelee() {
|
default boolean VerzikMelee()
|
||||||
return false;
|
{
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 16,
|
position = 16,
|
||||||
@@ -183,19 +200,21 @@ public interface TheatreConfig extends Config {
|
|||||||
name = "Verzik Yellow Timing",
|
name = "Verzik Yellow Timing",
|
||||||
description = ""
|
description = ""
|
||||||
)
|
)
|
||||||
default boolean VerzikYellow() {
|
default boolean VerzikYellow()
|
||||||
return false;
|
{
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 17,
|
position = 17,
|
||||||
keyName = "Verzik Nylo",
|
keyName = "Verzik Nylo",
|
||||||
name = "Verzik Nylo Overlay",
|
name = "Verzik Nylo Overlay",
|
||||||
description = ""
|
description = ""
|
||||||
)
|
)
|
||||||
default boolean NyloTargetOverlay() {
|
default boolean NyloTargetOverlay()
|
||||||
return false;
|
{
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 18,
|
position = 18,
|
||||||
@@ -203,9 +222,11 @@ public interface TheatreConfig extends Config {
|
|||||||
name = "Verzik P3 Tile Overlay",
|
name = "Verzik P3 Tile Overlay",
|
||||||
description = ""
|
description = ""
|
||||||
)
|
)
|
||||||
default boolean verzikTankTile() {
|
default boolean verzikTankTile()
|
||||||
return true;
|
{
|
||||||
}
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -8,18 +8,32 @@
|
|||||||
|
|
||||||
package net.runelite.client.plugins.ztob;
|
package net.runelite.client.plugins.ztob;
|
||||||
|
|
||||||
import net.runelite.api.Point;
|
import java.awt.BasicStroke;
|
||||||
import net.runelite.api.*;
|
import java.awt.Color;
|
||||||
import net.runelite.api.coords.LocalPoint;
|
import java.awt.Dimension;
|
||||||
import net.runelite.api.coords.WorldArea;
|
import java.awt.Font;
|
||||||
import net.runelite.api.coords.WorldPoint;
|
import java.awt.Graphics2D;
|
||||||
import net.runelite.client.ui.overlay.*;
|
import java.awt.Polygon;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
|
||||||
import java.awt.*;
|
|
||||||
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 javax.inject.Inject;
|
||||||
|
import net.runelite.api.Client;
|
||||||
|
import net.runelite.api.GroundObject;
|
||||||
|
import net.runelite.api.NPC;
|
||||||
|
import net.runelite.api.NPCComposition;
|
||||||
|
import net.runelite.api.NpcID;
|
||||||
|
import net.runelite.api.Perspective;
|
||||||
|
import net.runelite.api.Point;
|
||||||
|
import net.runelite.api.Projectile;
|
||||||
|
import net.runelite.api.coords.LocalPoint;
|
||||||
|
import net.runelite.api.coords.WorldArea;
|
||||||
|
import net.runelite.api.coords.WorldPoint;
|
||||||
|
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 TheatreOverlay extends Overlay {
|
public class TheatreOverlay extends Overlay {
|
||||||
private final Client client;
|
private final Client client;
|
||||||
@@ -37,53 +51,71 @@ public class TheatreOverlay extends Overlay {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Dimension render(Graphics2D graphics) {
|
public Dimension render(Graphics2D graphics)
|
||||||
if (plugin.isRunMaiden()) {
|
{
|
||||||
if (config.MaidenBlood()) {
|
if (plugin.isRunMaiden())
|
||||||
for (WorldPoint point : plugin.getMaiden_BloodSpatters()) {
|
{
|
||||||
|
if (config.MaidenBlood())
|
||||||
|
{
|
||||||
|
for (WorldPoint point : plugin.getMaiden_BloodSpatters())
|
||||||
|
{
|
||||||
drawTile(graphics, point, new Color(36, 248, 229), 2, 150, 10);
|
drawTile(graphics, point, new Color(36, 248, 229), 2, 150, 10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.MaidenSpawns()) {
|
if (config.MaidenSpawns())
|
||||||
for (WorldPoint point : plugin.getMaiden_SpawnLocations()) {
|
{
|
||||||
|
for (WorldPoint point : plugin.getMaiden_SpawnLocations())
|
||||||
|
{
|
||||||
drawTile(graphics, point, new Color(36, 248, 229), 2, 180, 20);
|
drawTile(graphics, point, new Color(36, 248, 229), 2, 180, 20);
|
||||||
}
|
}
|
||||||
for (WorldPoint point : plugin.getMaiden_SpawnLocations2()) {
|
for (WorldPoint point : plugin.getMaiden_SpawnLocations2())
|
||||||
drawTile(graphics, point, new Color(36, 248, 229), 1, 120, 10);
|
{
|
||||||
|
drawTile(graphics, point, new Color(36, 248, 229), 1, 120, 10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (plugin.isRunBloat() && config.BloatIndicator()) {
|
if (plugin.isRunBloat() && config.BloatIndicator())
|
||||||
if (config.bloatFeetIndicator()) {
|
{
|
||||||
if (plugin.getTemp().size() > 0) {
|
if (config.bloatFeetIndicator())
|
||||||
if (plugin.isTempFlag()) {
|
{
|
||||||
for (WorldPoint point : plugin.getTemp()) {
|
if (plugin.getTemp().size() > 0)
|
||||||
|
{
|
||||||
|
if (plugin.isTempFlag())
|
||||||
|
{
|
||||||
|
for (WorldPoint point : plugin.getTemp())
|
||||||
|
{
|
||||||
|
|
||||||
drawTile(graphics, point, Color.black, 4, 255, 0);
|
drawTile(graphics, point, Color.black, 4, 255, 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
} else if (plugin.getTemp2().size() > 0) {
|
}
|
||||||
if (plugin.isTemp2Flag()) {
|
else if (plugin.getTemp2().size() > 0)
|
||||||
for (WorldPoint point : plugin.getTemp2()) {
|
{
|
||||||
|
if (plugin.isTemp2Flag())
|
||||||
|
{
|
||||||
|
for (WorldPoint point : plugin.getTemp2())
|
||||||
|
{
|
||||||
|
|
||||||
drawTile(graphics, point, Color.black, 4, 255, 0);
|
drawTile(graphics, point, Color.black, 4, 255, 0);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
NPC bloat = plugin.getBloat_NPC();
|
NPC bloat = plugin.getBloat_NPC();
|
||||||
int state = plugin.getBloat_State();
|
int state = plugin.getBloat_State();
|
||||||
if (bloat == null) {
|
if (bloat == null)
|
||||||
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
switch (state) {
|
switch (state)
|
||||||
|
{
|
||||||
case 2:
|
case 2:
|
||||||
renderNpcOverlay(graphics, bloat, Color.GREEN, 3, 150, 0);
|
renderNpcOverlay(graphics, bloat, Color.GREEN, 3, 150, 0);
|
||||||
break;
|
break;
|
||||||
@@ -96,8 +128,10 @@ public class TheatreOverlay extends Overlay {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (plugin.isRunNylocas()) {
|
if (plugin.isRunNylocas())
|
||||||
if (config.NyloPillars()) {
|
{
|
||||||
|
if (config.NyloPillars())
|
||||||
|
{
|
||||||
Map<NPC, Integer> pillars = plugin.getNylocas_Pillars();
|
Map<NPC, Integer> pillars = plugin.getNylocas_Pillars();
|
||||||
for (NPC npc : pillars.keySet()) {
|
for (NPC npc : pillars.keySet()) {
|
||||||
final int health = pillars.get(npc);
|
final int health = pillars.get(npc);
|
||||||
@@ -114,13 +148,15 @@ public class TheatreOverlay extends Overlay {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.NyloBlasts()) {
|
if (config.NyloBlasts())
|
||||||
|
{
|
||||||
final Map<NPC, Integer> npcMap = plugin.getNylocas_Map();
|
final Map<NPC, Integer> npcMap = plugin.getNylocas_Map();
|
||||||
for (NPC npc : npcMap.keySet()) {
|
for (NPC npc : npcMap.keySet())
|
||||||
|
{
|
||||||
int ticksLeft = npcMap.get(npc);
|
int ticksLeft = npcMap.get(npc);
|
||||||
if (ticksLeft > -1) {
|
if (ticksLeft > -1) {
|
||||||
if (ticksLeft <= 6) {
|
if (ticksLeft <= 6) {
|
||||||
Color color = new Color(255, 255, 0, 180);
|
Color color = new Color(255, 255, 0, 180);
|
||||||
int outlineWidth = 2;
|
int outlineWidth = 2;
|
||||||
int outlineAlpha = 150;
|
int outlineAlpha = 150;
|
||||||
renderNpcOverlay(graphics, npc, color, outlineWidth, outlineAlpha, 15);
|
renderNpcOverlay(graphics, npc, color, outlineWidth, outlineAlpha, 15);
|
||||||
@@ -130,18 +166,23 @@ public class TheatreOverlay extends Overlay {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (plugin.isRunSotetseg()) {
|
if (plugin.isRunSotetseg())
|
||||||
if (config.SotetsegMaze1()) {
|
{
|
||||||
|
if (config.SotetsegMaze1())
|
||||||
|
{
|
||||||
int i = 1;
|
int i = 1;
|
||||||
for (GroundObject o : plugin.getRedTiles().keySet()) {
|
for (GroundObject o : plugin.getRedTiles().keySet())
|
||||||
|
{
|
||||||
Polygon poly = o.getCanvasTilePoly();
|
Polygon poly = o.getCanvasTilePoly();
|
||||||
if (poly != null) {
|
if (poly != null)
|
||||||
|
{
|
||||||
graphics.setColor(Color.WHITE);
|
graphics.setColor(Color.WHITE);
|
||||||
graphics.setStroke(new BasicStroke(2));
|
graphics.setStroke(new BasicStroke(2));
|
||||||
graphics.draw(poly);
|
graphics.draw(poly);
|
||||||
}
|
}
|
||||||
Point textLocation = o.getCanvasTextLocation(graphics, String.valueOf(i), 0);
|
Point textLocation = o.getCanvasTextLocation(graphics, String.valueOf(i), 0);
|
||||||
if (textLocation != null) {
|
if (textLocation != null)
|
||||||
|
{
|
||||||
OverlayUtil.renderTextLocation(graphics, textLocation, String.valueOf(i), Color.WHITE);
|
OverlayUtil.renderTextLocation(graphics, textLocation, String.valueOf(i), Color.WHITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -149,40 +190,51 @@ public class TheatreOverlay extends Overlay {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.SotetsegMaze2()) {
|
if (config.SotetsegMaze2())
|
||||||
for (WorldPoint p : plugin.getRedTilesOverworld()) {
|
{
|
||||||
|
for (WorldPoint p : plugin.getRedTilesOverworld())
|
||||||
|
{
|
||||||
drawTile(graphics, p, Color.WHITE, 2, 255, 10);
|
drawTile(graphics, p, Color.WHITE, 2, 255, 10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (plugin.isRunXarpus()) {
|
if (plugin.isRunXarpus())
|
||||||
|
{
|
||||||
NPC boss = plugin.getXarpus_NPC();
|
NPC boss = plugin.getXarpus_NPC();
|
||||||
|
|
||||||
if (boss.getId() == NpcID.XARPUS_8340 && !plugin.isXarpus_Stare() && config.XarpusTick()) {
|
if (boss.getId() == NpcID.XARPUS_8340 && !plugin.isXarpus_Stare() && config.XarpusTick())
|
||||||
|
{
|
||||||
int tick = plugin.getXarpus_TicksUntilShoot();
|
int tick = plugin.getXarpus_TicksUntilShoot();
|
||||||
if (tick < 1) {
|
if (tick < 1)
|
||||||
|
{
|
||||||
tick = tick % 4 + 4;
|
tick = tick % 4 + 4;
|
||||||
}
|
}
|
||||||
final String ticksLeftStr = String.valueOf(tick);
|
final String ticksLeftStr = String.valueOf(tick);
|
||||||
Point canvasPoint = boss.getCanvasTextLocation(graphics, ticksLeftStr, 130);
|
Point canvasPoint = boss.getCanvasTextLocation(graphics, ticksLeftStr, 130);
|
||||||
renderTextLocation(graphics, ticksLeftStr, 12, Font.BOLD, Color.WHITE, canvasPoint);
|
renderTextLocation(graphics, ticksLeftStr, 12, Font.BOLD, Color.WHITE, canvasPoint);
|
||||||
}
|
}
|
||||||
if (boss.getId() == NpcID.XARPUS_8339 && config.XarpusExhumed()) {
|
if (boss.getId() == NpcID.XARPUS_8339 && config.XarpusExhumed())
|
||||||
for (GroundObject o : plugin.getXarpus_Exhumeds().keySet()) {
|
{
|
||||||
|
for (GroundObject o : plugin.getXarpus_Exhumeds().keySet())
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Polygon poly = o.getCanvasTilePoly();
|
Polygon poly = o.getCanvasTilePoly();
|
||||||
if (poly != null) {
|
if (poly != null)
|
||||||
|
{
|
||||||
graphics.setColor(new Color(0, 255, 0, 130));
|
graphics.setColor(new Color(0, 255, 0, 130));
|
||||||
graphics.setStroke(new BasicStroke(1));
|
graphics.setStroke(new BasicStroke(1));
|
||||||
graphics.draw(poly);
|
graphics.draw(poly);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (Map.Entry<GroundObject, Integer> exhumes : plugin.getXarpusExhumedsTimer().entrySet()) {
|
for (Map.Entry<GroundObject, Integer> exhumes : plugin.getXarpusExhumedsTimer().entrySet())
|
||||||
|
{
|
||||||
final String ticksremaining = String.valueOf(exhumes.getValue());
|
final String ticksremaining = String.valueOf(exhumes.getValue());
|
||||||
if (Integer.valueOf(ticksremaining) > 0) {
|
if (Integer.valueOf(ticksremaining) > 0)
|
||||||
|
{
|
||||||
GroundObject ex = exhumes.getKey();
|
GroundObject ex = exhumes.getKey();
|
||||||
Point point = ex.getCanvasTextLocation(graphics, ticksremaining, 0);
|
Point point = ex.getCanvasTextLocation(graphics, ticksremaining, 0);
|
||||||
renderTextLocation(graphics, ticksremaining, 12, Font.BOLD, Color.white, point);
|
renderTextLocation(graphics, ticksremaining, 12, Font.BOLD, Color.white, point);
|
||||||
@@ -196,21 +248,27 @@ public class TheatreOverlay extends Overlay {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (plugin.isRunVerzik()) {
|
if (plugin.isRunVerzik())
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
if (config.VerzikCupcakes()) {
|
if (config.VerzikCupcakes())
|
||||||
for (WorldPoint p : plugin.getVerzik_RangeProjectiles().values()) {
|
{
|
||||||
|
for (WorldPoint p : plugin.getVerzik_RangeProjectiles().values())
|
||||||
|
{
|
||||||
drawTile(graphics, p, Color.RED, 2, 180, 50);
|
drawTile(graphics, p, Color.RED, 2, 180, 50);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.VerzikYellow()) {
|
if (config.VerzikYellow())
|
||||||
for (WorldPoint p : plugin.getVerzik_YellowTiles()) {
|
{
|
||||||
drawTile(graphics, p, Color.YELLOW, 3, 255, 0);
|
for (WorldPoint p : plugin.getVerzik_YellowTiles())
|
||||||
|
{
|
||||||
|
drawTile(graphics, p, Color.YELLOW, 3, 255, 0);
|
||||||
Projectile yellowBall = plugin.getVerzik_YellowBall();
|
Projectile yellowBall = plugin.getVerzik_YellowBall();
|
||||||
if (yellowBall != null) {
|
if (yellowBall != null)
|
||||||
final int ticksToImpact = yellowBall.getRemainingCycles() / 30;
|
{
|
||||||
|
final int ticksToImpact = yellowBall.getRemainingCycles() / 30;
|
||||||
final String countdownStr = String.valueOf(ticksToImpact);
|
final String countdownStr = String.valueOf(ticksToImpact);
|
||||||
Point canvasPoint = Perspective.getCanvasTextLocation(client, graphics, LocalPoint.fromWorld(client, p), countdownStr, 0);
|
Point canvasPoint = Perspective.getCanvasTextLocation(client, graphics, LocalPoint.fromWorld(client, p), countdownStr, 0);
|
||||||
renderTextLocation(graphics, countdownStr, 12, Font.BOLD, Color.WHITE, canvasPoint);
|
renderTextLocation(graphics, countdownStr, 12, Font.BOLD, Color.WHITE, canvasPoint);
|
||||||
@@ -220,32 +278,40 @@ public class TheatreOverlay extends Overlay {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final NPC boss = plugin.getVerzik_NPC();
|
final NPC boss = plugin.getVerzik_NPC();
|
||||||
if (boss.getId() == NpcID.VERZIK_VITUR_8374) {
|
if (boss.getId() == NpcID.VERZIK_VITUR_8374)
|
||||||
if (config.verzikTankTile()) {
|
{
|
||||||
renderNpcOverlay(graphics, boss, new Color(75, 0, 130), 1, 255, 0);
|
if (config.verzikTankTile())
|
||||||
|
{
|
||||||
|
renderNpcOverlay(graphics, boss, new Color(75, 0, 130), 1, 255, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.VerzikTick()) {
|
if (config.VerzikTick())
|
||||||
|
{
|
||||||
final int ticksLeft = plugin.getP3_TicksUntilAttack();
|
final int ticksLeft = plugin.getP3_TicksUntilAttack();
|
||||||
if (ticksLeft > 0 && ticksLeft < 8) {
|
if (ticksLeft > 0 && ticksLeft < 8)
|
||||||
|
{
|
||||||
final String ticksLeftStr = String.valueOf(ticksLeft);
|
final String ticksLeftStr = String.valueOf(ticksLeft);
|
||||||
Point canvasPoint = boss.getCanvasTextLocation(graphics, ticksLeftStr, 60);
|
Point canvasPoint = boss.getCanvasTextLocation(graphics, ticksLeftStr, 60);
|
||||||
renderTextLocation(graphics, ticksLeftStr, 15, Font.BOLD, Color.WHITE, canvasPoint);
|
renderTextLocation(graphics, ticksLeftStr, 15, Font.BOLD, Color.WHITE, canvasPoint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.VerzikMelee()) {
|
if (config.VerzikMelee())
|
||||||
|
{
|
||||||
List<WorldPoint> meleeRange = getHitSquares(boss.getWorldLocation(), 7, 1, false);
|
List<WorldPoint> meleeRange = getHitSquares(boss.getWorldLocation(), 7, 1, false);
|
||||||
|
|
||||||
for (WorldPoint p : meleeRange) {
|
for (WorldPoint p : meleeRange)
|
||||||
drawTile(graphics, p, Color.WHITE, 1, 155, 10);
|
{
|
||||||
|
drawTile(graphics, p, Color.WHITE, 1, 155, 10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (boss.getAnimation() == 8117) {
|
if (boss.getAnimation() == 8117)
|
||||||
|
{
|
||||||
final int ticksLeft = plugin.getRedCrabsTimer();
|
final int ticksLeft = plugin.getRedCrabsTimer();
|
||||||
if (ticksLeft > 0) {
|
if (ticksLeft > 0)
|
||||||
|
{
|
||||||
final String ticksLeftStr = String.valueOf(ticksLeft);
|
final String ticksLeftStr = String.valueOf(ticksLeft);
|
||||||
Point canvasPoint = boss.getCanvasTextLocation(graphics, ticksLeftStr, 60);
|
Point canvasPoint = boss.getCanvasTextLocation(graphics, ticksLeftStr, 60);
|
||||||
renderTextLocation(graphics, ticksLeftStr, 15, Font.BOLD, Color.WHITE, canvasPoint);
|
renderTextLocation(graphics, ticksLeftStr, 15, Font.BOLD, Color.WHITE, canvasPoint);
|
||||||
@@ -279,16 +345,19 @@ public class TheatreOverlay extends Overlay {
|
|||||||
graphics.fill(poly);
|
graphics.fill(poly);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void renderNpcOverlay(Graphics2D graphics, NPC actor, Color color, int outlineWidth, int outlineAlpha, int fillAlpha) {
|
private void renderNpcOverlay(Graphics2D graphics, NPC actor, Color color, int outlineWidth, int outlineAlpha, int fillAlpha)
|
||||||
|
{
|
||||||
int size = 1;
|
int size = 1;
|
||||||
NPCComposition composition = actor.getTransformedComposition();
|
NPCComposition composition = actor.getTransformedComposition();
|
||||||
if (composition != null) {
|
if (composition != null)
|
||||||
|
{
|
||||||
size = composition.getSize();
|
size = composition.getSize();
|
||||||
}
|
}
|
||||||
LocalPoint lp = actor.getLocalLocation();
|
LocalPoint lp = actor.getLocalLocation();
|
||||||
Polygon tilePoly = Perspective.getCanvasTileAreaPoly(client, lp, size);
|
Polygon tilePoly = Perspective.getCanvasTileAreaPoly(client, lp, size);
|
||||||
|
|
||||||
if (tilePoly != null) {
|
if (tilePoly != null)
|
||||||
|
{
|
||||||
graphics.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), outlineAlpha));
|
graphics.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), outlineAlpha));
|
||||||
graphics.setStroke(new BasicStroke(outlineWidth));
|
graphics.setStroke(new BasicStroke(outlineWidth));
|
||||||
graphics.draw(tilePoly);
|
graphics.draw(tilePoly);
|
||||||
@@ -297,27 +366,33 @@ public class TheatreOverlay extends Overlay {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void renderTextLocation(Graphics2D graphics, String txtString, int fontSize, int fontStyle, Color fontColor, Point canvasPoint) {
|
private void renderTextLocation(Graphics2D graphics, String txtString, int fontSize, int fontStyle, Color fontColor, Point canvasPoint)
|
||||||
|
{
|
||||||
graphics.setFont(new Font("Arial", fontStyle, fontSize));
|
graphics.setFont(new Font("Arial", fontStyle, fontSize));
|
||||||
if (canvasPoint != null) {
|
if (canvasPoint != null)
|
||||||
|
{
|
||||||
final Point canvasCenterPoint = new Point(
|
final Point canvasCenterPoint = new Point(
|
||||||
canvasPoint.getX(),
|
canvasPoint.getX(),
|
||||||
canvasPoint.getY());
|
canvasPoint.getY());
|
||||||
final Point canvasCenterPoint_shadow = new Point(
|
final Point canvasCenterPoint_shadow = new Point(
|
||||||
canvasPoint.getX() + 1,
|
canvasPoint.getX() + 1,
|
||||||
canvasPoint.getY() + 1);
|
canvasPoint.getY() + 1);
|
||||||
OverlayUtil.renderTextLocation(graphics, canvasCenterPoint_shadow, txtString, Color.BLACK);
|
OverlayUtil.renderTextLocation(graphics, canvasCenterPoint_shadow, txtString, Color.BLACK);
|
||||||
OverlayUtil.renderTextLocation(graphics, canvasCenterPoint, txtString, fontColor);
|
OverlayUtil.renderTextLocation(graphics, canvasCenterPoint, txtString, fontColor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<WorldPoint> getHitSquares(WorldPoint npcLoc, int npcSize, int thickness, boolean includeUnder) {
|
private List<WorldPoint> getHitSquares(WorldPoint npcLoc, int npcSize, int thickness, boolean includeUnder)
|
||||||
|
{
|
||||||
List<WorldPoint> little = new WorldArea(npcLoc, npcSize, npcSize).toWorldPointList();
|
List<WorldPoint> little = new WorldArea(npcLoc, npcSize, npcSize).toWorldPointList();
|
||||||
List<WorldPoint> big = new WorldArea(npcLoc.getX() - thickness, npcLoc.getY() - thickness, npcSize + (thickness * 2), npcSize + (thickness * 2), npcLoc.getPlane()).toWorldPointList();
|
List<WorldPoint> big = new WorldArea(npcLoc.getX() - thickness, npcLoc.getY() - thickness, npcSize + (thickness * 2), npcSize + (thickness * 2), npcLoc.getPlane()).toWorldPointList();
|
||||||
if (!includeUnder) {
|
if (!includeUnder)
|
||||||
for (Iterator<WorldPoint> it = big.iterator(); it.hasNext(); ) {
|
{
|
||||||
|
for (Iterator<WorldPoint> it = big.iterator(); it.hasNext(); )
|
||||||
|
{
|
||||||
WorldPoint p = it.next();
|
WorldPoint p = it.next();
|
||||||
if (little.contains(p)) {
|
if (little.contains(p))
|
||||||
|
{
|
||||||
it.remove();
|
it.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,11 +9,39 @@
|
|||||||
package net.runelite.client.plugins.ztob;
|
package net.runelite.client.plugins.ztob;
|
||||||
|
|
||||||
import com.google.inject.Provides;
|
import com.google.inject.Provides;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
import javax.inject.Inject;
|
||||||
import lombok.AccessLevel;
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.*;
|
import net.runelite.api.Client;
|
||||||
|
import net.runelite.api.GameState;
|
||||||
|
import net.runelite.api.GraphicsObject;
|
||||||
|
import net.runelite.api.GroundObject;
|
||||||
|
import net.runelite.api.ItemID;
|
||||||
|
import net.runelite.api.MenuEntry;
|
||||||
|
import net.runelite.api.NPC;
|
||||||
|
import net.runelite.api.NpcID;
|
||||||
|
import net.runelite.api.Point;
|
||||||
|
import net.runelite.api.Projectile;
|
||||||
|
import net.runelite.api.Tile;
|
||||||
|
import net.runelite.api.Varbits;
|
||||||
import net.runelite.api.coords.WorldPoint;
|
import net.runelite.api.coords.WorldPoint;
|
||||||
import net.runelite.api.events.*;
|
import net.runelite.api.events.AnimationChanged;
|
||||||
|
import net.runelite.api.events.GameTick;
|
||||||
|
import net.runelite.api.events.GraphicsObjectCreated;
|
||||||
|
import net.runelite.api.events.GroundObjectSpawned;
|
||||||
|
import net.runelite.api.events.MenuEntryAdded;
|
||||||
|
import net.runelite.api.events.NpcDespawned;
|
||||||
|
import net.runelite.api.events.NpcSpawned;
|
||||||
|
import net.runelite.api.events.ProjectileMoved;
|
||||||
|
import net.runelite.api.events.VarbitChanged;
|
||||||
import net.runelite.api.kit.KitType;
|
import net.runelite.api.kit.KitType;
|
||||||
import net.runelite.client.chat.ChatMessageManager;
|
import net.runelite.client.chat.ChatMessageManager;
|
||||||
import net.runelite.client.config.ConfigManager;
|
import net.runelite.client.config.ConfigManager;
|
||||||
@@ -24,15 +52,12 @@ import net.runelite.client.plugins.PluginType;
|
|||||||
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;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
|
||||||
import java.util.*;
|
|
||||||
|
|
||||||
@PluginDescriptor(
|
@PluginDescriptor(
|
||||||
name = "Theater of Blood",
|
name = "Theater of Blood",
|
||||||
description = "All-in-one plugin for Theatre of Blood",
|
description = "All-in-one plugin for Theatre of Blood",
|
||||||
tags = {"ToB"},
|
tags = {"ToB", "theatre", "blood"},
|
||||||
enabledByDefault = false,
|
enabledByDefault = false,
|
||||||
type = PluginType.PVM
|
type = PluginType.PVM
|
||||||
)
|
)
|
||||||
|
|
||||||
public class TheatrePlugin extends Plugin {
|
public class TheatrePlugin extends Plugin {
|
||||||
@@ -55,24 +80,30 @@ public class TheatrePlugin extends Plugin {
|
|||||||
private static final int PROJECTILE_ID_P3_GREEN = 1598;
|
private static final int PROJECTILE_ID_P3_GREEN = 1598;
|
||||||
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private final Map<GroundObject, Integer> xarpusExhumedsTimer = new HashMap<>();
|
|
||||||
@Getter
|
@Getter
|
||||||
int exhumecount;
|
int exhumecount;
|
||||||
|
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private final Map<GroundObject, Integer> xarpusExhumedsTimer = new HashMap<>();
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
int bloatTimer = 0;
|
int bloatTimer = 0;
|
||||||
|
|
||||||
int bloatFeetTimer = 0;
|
int bloatFeetTimer = 0;
|
||||||
NPC BossNylo = null;
|
|
||||||
private boolean bloatFlag = false;
|
|
||||||
@Getter
|
@Getter
|
||||||
private Set<WorldPoint> bloatTiles = new HashSet<>();
|
private Set<WorldPoint> bloatTiles = new HashSet<>();
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
private Set<WorldPoint> temp = new HashSet<>();
|
private Set<WorldPoint> temp = new HashSet<>();
|
||||||
@Getter
|
|
||||||
|
@Getter
|
||||||
private Set<WorldPoint> temp2 = new HashSet<>();
|
private Set<WorldPoint> temp2 = new HashSet<>();
|
||||||
@Getter
|
|
||||||
|
@Getter
|
||||||
private Set<WorldPoint> localTemp = new HashSet<>();
|
private Set<WorldPoint> localTemp = new HashSet<>();
|
||||||
|
NPC BossNylo = null;
|
||||||
|
private boolean bloatFlag = false;
|
||||||
|
|
||||||
//@Getter
|
//@Getter
|
||||||
//private List<WorldPoint> bloatTiles = new ArrayList<>();
|
//private List<WorldPoint> bloatTiles = new ArrayList<>();
|
||||||
@@ -168,7 +199,8 @@ public class TheatrePlugin extends Plugin {
|
|||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private NPC Verzik_NPC;
|
private NPC Verzik_NPC;
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private List<NPC> tornadoList;
|
private List<NPC> tornadoList;
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
@@ -224,7 +256,6 @@ public class TheatrePlugin extends Plugin {
|
|||||||
overlayManager.remove(bloatTimerOverlay);
|
overlayManager.remove(bloatTimerOverlay);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void onMenuEntryAdded(MenuEntryAdded event) {
|
public void onMenuEntryAdded(MenuEntryAdded event) {
|
||||||
if (client.getGameState() != GameState.LOGGED_IN || !config.NyloMenu() || !runNylocas) {
|
if (client.getGameState() != GameState.LOGGED_IN || !config.NyloMenu() || !runNylocas) {
|
||||||
@@ -232,12 +263,10 @@ public class TheatrePlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final String pOptionToReplace = Text.removeTags(event.getOption()).toUpperCase();
|
final String pOptionToReplace = Text.removeTags(event.getOption()).toUpperCase();
|
||||||
Map<KitType, ItemComposition> playerEquipment = new HashMap<>();
|
|
||||||
|
|
||||||
int attackType = 0; //0=idk 1= melee 2= range 3= mage
|
int attackType = 0; //0=idk 1= melee 2= range 3= mage
|
||||||
|
|
||||||
for (KitType kitType : KitType.values()) {
|
for (KitType kitType : KitType.values()) {
|
||||||
|
|
||||||
int itemId = client.getLocalPlayer().getPlayerComposition().getEquipmentId(kitType);
|
int itemId = client.getLocalPlayer().getPlayerComposition().getEquipmentId(kitType);
|
||||||
switch (itemId) {
|
switch (itemId) {
|
||||||
case ItemID.DRAGON_CLAWS:
|
case ItemID.DRAGON_CLAWS:
|
||||||
@@ -302,7 +331,8 @@ public class TheatrePlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (!pOptionToReplace.equals("ATTACK")) {
|
|
||||||
|
if (!pOptionToReplace.equals("ATTACK")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int Id = 0;
|
int Id = 0;
|
||||||
@@ -912,7 +942,7 @@ public class TheatrePlugin extends Plugin {
|
|||||||
Keep = "Nylocas Ischyros";
|
Keep = "Nylocas Ischyros";
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
Keep = "Nylocal Toxobolos";
|
Keep = "Nylocas Toxobolos";
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
Keep = "Nylocas Hagios";
|
Keep = "Nylocas Hagios";
|
||||||
|
|||||||
@@ -1,25 +1,26 @@
|
|||||||
package net.runelite.client.plugins.ztob;
|
package net.runelite.client.plugins.ztob;
|
||||||
|
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
|
import java.awt.Color;
|
||||||
|
import java.awt.Dimension;
|
||||||
|
import java.awt.Graphics2D;
|
||||||
|
import static net.runelite.api.MenuAction.RUNELITE_OVERLAY_CONFIG;
|
||||||
import net.runelite.client.ui.overlay.Overlay;
|
import net.runelite.client.ui.overlay.Overlay;
|
||||||
|
import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE;
|
||||||
import net.runelite.client.ui.overlay.OverlayMenuEntry;
|
import net.runelite.client.ui.overlay.OverlayMenuEntry;
|
||||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||||
import net.runelite.client.ui.overlay.components.LineComponent;
|
import net.runelite.client.ui.overlay.components.LineComponent;
|
||||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||||
import net.runelite.client.ui.overlay.components.TitleComponent;
|
import net.runelite.client.ui.overlay.components.TitleComponent;
|
||||||
|
|
||||||
import java.awt.*;
|
|
||||||
|
|
||||||
import static net.runelite.api.MenuAction.RUNELITE_OVERLAY_CONFIG;
|
|
||||||
import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE;
|
|
||||||
|
|
||||||
public class TheatreXarpusOverlay extends Overlay {
|
public class TheatreXarpusOverlay extends Overlay {
|
||||||
private final TheatrePlugin plugin;
|
private final TheatrePlugin plugin;
|
||||||
private final TheatreConfig config;
|
private final TheatreConfig config;
|
||||||
PanelComponent panelComponent = new PanelComponent();
|
PanelComponent panelComponent = new PanelComponent();
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private TheatreXarpusOverlay(TheatrePlugin plugin, TheatreConfig config) {
|
private TheatreXarpusOverlay(TheatrePlugin plugin, TheatreConfig config)
|
||||||
|
{
|
||||||
super(plugin);
|
super(plugin);
|
||||||
setPosition(OverlayPosition.ABOVE_CHATBOX_RIGHT);
|
setPosition(OverlayPosition.ABOVE_CHATBOX_RIGHT);
|
||||||
setPosition(OverlayPosition.DYNAMIC);
|
setPosition(OverlayPosition.DYNAMIC);
|
||||||
@@ -29,10 +30,10 @@ public class TheatreXarpusOverlay extends Overlay {
|
|||||||
getMenuEntries().add(new OverlayMenuEntry(RUNELITE_OVERLAY_CONFIG, OPTION_CONFIGURE, "Theatre xarpus overlay"));
|
getMenuEntries().add(new OverlayMenuEntry(RUNELITE_OVERLAY_CONFIG, OPTION_CONFIGURE, "Theatre xarpus overlay"));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Dimension render(Graphics2D graphics) {
|
public Dimension render(Graphics2D graphics) {
|
||||||
if (plugin.isRunXarpus()) {
|
if (plugin.isRunXarpus())
|
||||||
|
{
|
||||||
if (config.XarpusExhumeOverlay()) {
|
if (config.XarpusExhumeOverlay()) {
|
||||||
if (plugin.getXarpus_NPC().getId() == 8339) {
|
if (plugin.getXarpus_NPC().getId() == 8339) {
|
||||||
panelComponent.getChildren().clear();
|
panelComponent.getChildren().clear();
|
||||||
|
|||||||
@@ -1,36 +1,18 @@
|
|||||||
/*
|
|
||||||
* 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.ztob;
|
package net.runelite.client.plugins.ztob;
|
||||||
|
|
||||||
|
import java.awt.Color;
|
||||||
|
import java.awt.Dimension;
|
||||||
|
import java.awt.Font;
|
||||||
|
import java.awt.Graphics2D;
|
||||||
|
import javax.inject.Inject;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
import net.runelite.api.NPC;
|
import net.runelite.api.NPC;
|
||||||
import net.runelite.api.Point;
|
import net.runelite.api.Point;
|
||||||
import net.runelite.client.ui.overlay.*;
|
import net.runelite.client.ui.overlay.Overlay;
|
||||||
|
import net.runelite.client.ui.overlay.OverlayLayer;
|
||||||
import javax.inject.Inject;
|
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||||
import java.awt.*;
|
import net.runelite.client.ui.overlay.OverlayPriority;
|
||||||
|
import net.runelite.client.ui.overlay.OverlayUtil;
|
||||||
|
|
||||||
public class VerzikNyloOverlay extends Overlay {
|
public class VerzikNyloOverlay extends Overlay {
|
||||||
|
|
||||||
@@ -48,34 +30,47 @@ public class VerzikNyloOverlay extends Overlay {
|
|||||||
setLayer(OverlayLayer.ABOVE_SCENE);
|
setLayer(OverlayLayer.ABOVE_SCENE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Dimension render(Graphics2D graphics) {
|
public Dimension render(Graphics2D graphics)
|
||||||
|
{
|
||||||
|
|
||||||
if (plugin.isRunVerzik()) {
|
if (plugin.isRunVerzik())
|
||||||
if (config.NyloTargetOverlay()) {
|
{
|
||||||
if (plugin.getCrabList().size() > 0) {
|
if (config.NyloTargetOverlay())
|
||||||
|
{
|
||||||
|
if (plugin.getCrabList().size() > 0)
|
||||||
|
{
|
||||||
|
|
||||||
for (NPC npc : plugin.getCrabList()) {
|
for (NPC npc : plugin.getCrabList())
|
||||||
if (npc.isDead()) {
|
{
|
||||||
|
if (npc.isDead())
|
||||||
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
String renderText = "";
|
String renderText = "";
|
||||||
if (npc.getInteracting() != null) {
|
if (npc.getInteracting() != null)
|
||||||
|
{
|
||||||
|
|
||||||
renderText = npc.getInteracting().getName();
|
renderText = npc.getInteracting().getName();
|
||||||
Point point = npc.getCanvasTextLocation(graphics, npc.getInteracting().getName(), 0);
|
Point point = npc.getCanvasTextLocation(graphics, npc.getInteracting().getName(), 0);
|
||||||
|
|
||||||
|
|
||||||
if (npc.getInteracting().getName().toLowerCase().equals(client.getLocalPlayer().getName().toLowerCase())) {
|
if (npc.getInteracting().getName().toLowerCase().equals(client.getLocalPlayer().getName().toLowerCase()))
|
||||||
point = npc.getCanvasTextLocation(graphics, client.getLocalPlayer().getName(), 0);
|
{
|
||||||
|
point = npc.getCanvasTextLocation(graphics, client.getLocalPlayer().getName(), 0);
|
||||||
renderText = "YOU NIGGA RUN!";
|
renderText = "YOU NIGGA RUN!";
|
||||||
|
|
||||||
} else if (npc.getInteracting().getName().toLowerCase().equals("afyy")) {
|
}
|
||||||
point = npc.getCanvasTextLocation(graphics, "Ricecup", 0);
|
else if (npc.getInteracting().getName().toLowerCase().equals("afyy"))
|
||||||
|
{
|
||||||
|
point = npc.getCanvasTextLocation(graphics, "Ricecup", 0);
|
||||||
renderText = "Ricecup";
|
renderText = "Ricecup";
|
||||||
}
|
}
|
||||||
if (renderText.equals("YOU NIGGA RUN!")) {
|
if (renderText.equals("YOU NIGGA RUN!"))
|
||||||
|
{
|
||||||
renderTextLocation(graphics, renderText, 12, Font.BOLD, Color.RED, point);
|
renderTextLocation(graphics, renderText, 12, Font.BOLD, Color.RED, point);
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
renderTextLocation(graphics, renderText, 12, Font.BOLD, Color.GREEN, point);
|
renderTextLocation(graphics, renderText, 12, Font.BOLD, Color.GREEN, point);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -89,15 +84,17 @@ public class VerzikNyloOverlay extends Overlay {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void renderTextLocation(Graphics2D graphics, String txtString, int fontSize, int fontStyle, Color fontColor, Point canvasPoint) {
|
private void renderTextLocation(Graphics2D graphics, String txtString, int fontSize, int fontStyle, Color fontColor, Point canvasPoint)
|
||||||
|
{
|
||||||
graphics.setFont(new Font("Arial", fontStyle, fontSize));
|
graphics.setFont(new Font("Arial", fontStyle, fontSize));
|
||||||
if (canvasPoint != null) {
|
if (canvasPoint != null)
|
||||||
|
{
|
||||||
final Point canvasCenterPoint = new Point(
|
final Point canvasCenterPoint = new Point(
|
||||||
canvasPoint.getX(),
|
canvasPoint.getX(),
|
||||||
canvasPoint.getY());
|
canvasPoint.getY());
|
||||||
final Point canvasCenterPoint_shadow = new Point(
|
final Point canvasCenterPoint_shadow = new Point(
|
||||||
canvasPoint.getX() + 1,
|
canvasPoint.getX() + 1,
|
||||||
canvasPoint.getY() + 1);
|
canvasPoint.getY() + 1);
|
||||||
OverlayUtil.renderTextLocation(graphics, canvasCenterPoint_shadow, txtString, Color.BLACK);
|
OverlayUtil.renderTextLocation(graphics, canvasCenterPoint_shadow, txtString, Color.BLACK);
|
||||||
OverlayUtil.renderTextLocation(graphics, canvasCenterPoint, txtString, fontColor);
|
OverlayUtil.renderTextLocation(graphics, canvasCenterPoint, txtString, fontColor);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user