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