Stable -> Master ✓ (#396)

* Disabled KeptonDeath

* Disabled acid target, fixed up teleport.

* Fix Potential Travis Error

* Disabled MenuManager invokes.

* Disable invokes.

* Fix travis error.

* Disabled until bytecodes are back.

* Disabled till bytecodes

* Disabled till bytecode

* Update TimersOverlay.java

* Update DevToolsOverlay.java
This commit is contained in:
Ganom
2019-05-26 15:40:58 -04:00
committed by Kyleeld
parent 40d0c49a78
commit 6234515eea
9 changed files with 175 additions and 156 deletions

View File

@@ -469,8 +469,8 @@ public class MenuManager
{
continue;
}
event.consume();
//todo once bytecodes work again, re-enable
/* event.consume();
client.invokeMenuAction(
event.getActionParam(),
@@ -481,7 +481,7 @@ public class MenuManager
"do not edit",
client.getMouseCanvasPosition().getX(),
client.getMouseCanvasPosition().getY()
);
);*/
break;
}
@@ -491,15 +491,15 @@ public class MenuManager
!leftClickObjects.isEmpty() &&
event.getMenuAction() == MenuAction.GAME_OBJECT_FIRST_OPTION &&
(
leftClickObjects.contains(event.getId())
||
client.getObjectDefinition(event.getId()) != null &&
client.getObjectDefinition(event.getId()).getImpostorIds() != null &&
client.getObjectDefinition(event.getId()).getImpostor() != null &&
client.getObjectDefinition(event.getId()).getImpostor().getId() == event.getId()))
leftClickObjects.contains(event.getId())
||
client.getObjectDefinition(event.getId()) != null &&
client.getObjectDefinition(event.getId()).getImpostorIds() != null &&
client.getObjectDefinition(event.getId()).getImpostor() != null &&
client.getObjectDefinition(event.getId()).getImpostor().getId() == event.getId()))
{
event.consume();
//todo once bytecodes work again, re-enable
/* event.consume();
client.invokeMenuAction(
event.getActionParam(),
@@ -510,7 +510,7 @@ public class MenuManager
"do not edit",
client.getMouseCanvasPosition().getX(),
client.getMouseCanvasPosition().getY()
);
);*/
}
if (event.getMenuAction() != MenuAction.RUNELITE)
@@ -650,7 +650,7 @@ public class MenuManager
}
/**
* Adds to the map of swaps. Strict options, not strict target but target1=target2
* Adds to the map of swaps. Strict options, not strict target but target1=target2
*/
public void addSwap(String option, String target, String option2)
{

View File

@@ -29,6 +29,8 @@ package net.runelite.client.plugins.coxhelper;
import com.google.inject.Provides;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.inject.Inject;
import javax.inject.Singleton;
import lombok.AccessLevel;
@@ -36,10 +38,10 @@ import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import net.runelite.api.Actor;
import net.runelite.api.ChatMessageType;
import net.runelite.api.Client;
import net.runelite.api.GraphicID;
import net.runelite.api.GraphicsObject;
import net.runelite.api.MessageNode;
import net.runelite.api.NPC;
import net.runelite.api.NpcID;
import net.runelite.api.Projectile;
@@ -77,6 +79,7 @@ public class CoxPlugin extends Plugin
private static final int GRAPHICSOBJECT_ID_HEAL = 1363;
private static final int ANIMATION_ID_G1 = 430;
private static final String OLM_HAND_CRIPPLE = "The Great Olm\'s left claw clenches to protect itself temporarily.";
private static final Pattern TP_REGEX = Pattern.compile("<col\\b[^>]*>(.*?)</col>");
private int sleepcount = 0;
private boolean needOlm = false;
@@ -243,62 +246,79 @@ public class CoxPlugin extends Plugin
@Subscribe
public void onChatMessage(ChatMessage chatMessage)
{
MessageNode messageNode = chatMessage.getMessageNode();
final Matcher tpMatcher = TP_REGEX.matcher(chatMessage.getMessage());
String msg = chatMessage.getMessageNode().getValue();
if (chatMessage.getType() == ChatMessageType.GAMEMESSAGE)
{
if (msg.toLowerCase().contains("The Great Olm rises with the power of".toLowerCase()))
{
if (!runOlm)
{
Olm_ActionCycle = -1;
Olm_TicksUntilAction = 4;
}
else
{
Olm_ActionCycle = -1;
Olm_TicksUntilAction = 3;
}
OlmPhase = 0;
runOlm = true;
needOlm = true;
Olm_NextSpec = -1;
}
if (messageNode.getValue().toLowerCase().contains("The Great Olm rises with the power of".toLowerCase()) || messageNode.getValue().toLowerCase().contains("!olm".toLowerCase()))
{
if (!runOlm)
if (msg.toLowerCase().contains("The Great Olm is giving its all. this is its final stand"))
{
Olm_ActionCycle = -1;
Olm_TicksUntilAction = 4;
if (!runOlm)
{
Olm_ActionCycle = -1;
Olm_TicksUntilAction = 4;
}
else
{
Olm_ActionCycle = -1;
Olm_TicksUntilAction = 3;
}
OlmPhase = 1;
runOlm = true;
needOlm = true;
Olm_NextSpec = -1;
}
else
if (msg.startsWith(OLM_HAND_CRIPPLE))
{
Olm_ActionCycle = -1;
Olm_TicksUntilAction = 3;
HandCripple = true;
timer = 45;
}
OlmPhase = 0;
runOlm = true;
needOlm = true;
Olm_NextSpec = -1;
}
if (messageNode.getValue().toLowerCase().contains("The Great Olm is giving its all. this is its final stand".toLowerCase()))
{
if (!runOlm)
if (msg.toLowerCase().contains("aggression"))
{
Olm_ActionCycle = -1;
Olm_TicksUntilAction = 4;
prayAgainstOlm = PrayAgainst.MELEE;
lastPrayTime = System.currentTimeMillis();
}
else
if (msg.toLowerCase().contains("of magical power"))
{
Olm_ActionCycle = -1;
Olm_TicksUntilAction = 3;
prayAgainstOlm = PrayAgainst.MAGIC;
lastPrayTime = System.currentTimeMillis();
}
if (msg.toLowerCase().contains("accuracy and dexterity"))
{
prayAgainstOlm = PrayAgainst.RANGED;
lastPrayTime = System.currentTimeMillis();
}
if (msg.toLowerCase().startsWith("You have been paired with"))
{
if (!tpMatcher.matches())
{
return;
}
for (Actor actor : client.getPlayers())
{
if (actor.getName().equals((tpMatcher.group(1))))
{
teleportTarget.add(actor);
}
}
}
OlmPhase = 1;
runOlm = true;
needOlm = true;
Olm_NextSpec = -1;
}
if (messageNode.getValue().startsWith(OLM_HAND_CRIPPLE))
{
HandCripple = true;
timer = 45;
}
if (messageNode.getValue().toLowerCase().contains("aggression"))
{
prayAgainstOlm = PrayAgainst.MELEE;
lastPrayTime = System.currentTimeMillis();
}
if (messageNode.getValue().toLowerCase().contains("of magical power"))
{
prayAgainstOlm = PrayAgainst.MAGIC;
lastPrayTime = System.currentTimeMillis();
}
if (messageNode.getValue().toLowerCase().contains("accuracy and dexterity"))
{
prayAgainstOlm = PrayAgainst.RANGED;
lastPrayTime = System.currentTimeMillis();
}
}
@@ -318,7 +338,7 @@ public class CoxPlugin extends Plugin
}
if (projectile.getId() == ProjectileID.OLM_ACID_TRAIL)
{
acidTarget = projectile.getInteracting();
/*acidTarget = projectile.getInteracting();*/
}
}

View File

@@ -1,3 +1,26 @@
/*
* Copyright (c) 2019, ganom <https://github.com/Ganom>
* 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.coxhelper;
import java.awt.BasicStroke;
@@ -10,6 +33,7 @@ import javax.inject.Inject;
import net.runelite.api.Actor;
import net.runelite.api.Client;
import net.runelite.api.Perspective;
import net.runelite.api.Player;
import net.runelite.api.Point;
import net.runelite.api.coords.LocalPoint;
import net.runelite.client.ui.overlay.Overlay;
@@ -103,7 +127,16 @@ public class TimersOverlay extends Overlay
{
for (Actor actor : plugin.getTeleportTarget())
{
renderNpcOverlay(graphics, actor, new Color(193, 255, 245, 255), 2, 100, 10);
if (actor instanceof Player)
{
Player target = (Player) actor;
renderNpcOverlay(graphics, target, new Color(193, 255, 245, 255), 2, 100, 10);
client.setHintArrow(target);
}
else
{
renderNpcOverlay(graphics, actor, new Color(193, 255, 245, 255), 2, 100, 10);
}
}
}
}

View File

@@ -404,7 +404,7 @@ class DevToolsOverlay extends Overlay
}
int projectileId = projectile.getId();
Actor projectileInteracting = projectile.getInteracting();
Actor projectileInteracting = null;
String infoString = "";

View File

@@ -24,36 +24,7 @@
*/
package net.runelite.client.plugins.keptondeath;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.EnumSet;
import java.util.LinkedHashMap;
import java.util.List;
import javax.inject.Inject;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import net.runelite.api.Client;
import net.runelite.api.FontID;
import net.runelite.api.InventoryID;
import net.runelite.api.Item;
import net.runelite.api.ItemComposition;
import net.runelite.api.ItemContainer;
import net.runelite.api.ItemID;
import net.runelite.api.ScriptID;
import net.runelite.api.SkullIcon;
import net.runelite.api.SpriteID;
import net.runelite.api.Varbits;
import net.runelite.api.WorldType;
import net.runelite.api.events.ScriptCallbackEvent;
import net.runelite.api.vars.AccountType;
import net.runelite.api.widgets.Widget;
import net.runelite.api.widgets.WidgetInfo;
import net.runelite.api.widgets.WidgetType;
import net.runelite.client.eventbus.Subscribe;
import net.runelite.client.game.ItemManager;
import net.runelite.client.game.ItemVariationMapping;
import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.plugins.PluginType;
@@ -66,6 +37,10 @@ import net.runelite.client.plugins.PluginType;
)
@Slf4j
public class KeptOnDeathPlugin extends Plugin
{
}
//todo once bytecodes work again, re-enable
/*
{
// Handles Clicking on items in Kept on Death Interface
private static final int SCRIPT_ID = ScriptID.KEPT_LOST_ITEM_EXAMINE;
@@ -330,13 +305,24 @@ public class KeptOnDeathPlugin extends Plugin
}
}
/**
* Wrapper for widget.setChildren() but updates the child index and original positions
* Used for Items Kept and Lost containers
*
* @param parent Widget to override children
* @param widgets Children to set on parent
*/
*/
/**
* Wrapper for widget.setChildren() but updates the child index and original positions
* Used for Items Kept and Lost containers
*
* @param parent Widget to override children
* @param widgets Children to set on parent
* <p>
* Creates the text to be displayed in the right side of the interface based on current selections
* <p>
* Corrects the Information panel based on the item containers
* <p>
* Creates an Item Widget for use inside the Kept on Death Interface
* @param qty Amount of item
* @param c Items Composition
* @return
*//*
private void setWidgetChildren(Widget parent, List<Widget> widgets)
{
Widget[] children = parent.getChildren();
@@ -371,9 +357,11 @@ public class KeptOnDeathPlugin extends Plugin
parent.revalidate();
}
/**
* Creates the text to be displayed in the right side of the interface based on current selections
*/
*/
/**
* Creates the text to be displayed in the right side of the interface based on current selections
*//*
private String getUpdatedInfoText()
{
String textToAdd = DEFAULT;
@@ -413,9 +401,11 @@ public class KeptOnDeathPlugin extends Plugin
return textToAdd;
}
/**
* Corrects the Information panel based on the item containers
*/
*/
/**
* Corrects the Information panel based on the item containers
*//*
private void updateKeptWidgetInfoText()
{
// Add Information text widget
@@ -572,13 +562,15 @@ public class KeptOnDeathPlugin extends Plugin
recreateItemsKeptOnDeathWidget();
}
/**
* Creates an Item Widget for use inside the Kept on Death Interface
*
* @param qty Amount of item
* @param c Items Composition
* @return
*/
*/
/**
* Creates an Item Widget for use inside the Kept on Death Interface
*
* @param qty Amount of item
* @param c Items Composition
* @return
*//*
private Widget createItemWidget(int qty, ItemComposition c)
{
Widget itemWidget = client.createWidget();
@@ -596,4 +588,4 @@ public class KeptOnDeathPlugin extends Plugin
return itemWidget;
}
}
}*/

View File

@@ -27,7 +27,6 @@ package net.runelite.client.plugins.raids;
import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.lang.reflect.Method;
import javax.inject.Inject;
import javax.swing.BorderFactory;
import javax.swing.JButton;
@@ -83,7 +82,9 @@ public class RaidsPanel extends PluginPanel
if ((client.getGameState() == GameState.LOGGED_IN))
{
try
//todo once bytecodes work again, re-enable
/* try
{
//look for client.gameStateChanged(-1); in src files to find
Method m = client.getClass().getClassLoader().loadClass("jr").getDeclaredMethod("fn", int.class, int.class);
@@ -99,7 +100,7 @@ public class RaidsPanel extends PluginPanel
catch (ReflectiveOperationException f)
{
throw new RuntimeException(f);
}
}*/
}
else
{

View File

@@ -35,7 +35,6 @@ import java.util.Map;
import javax.inject.Inject;
import lombok.extern.slf4j.Slf4j;
import net.runelite.api.Client;
import net.runelite.api.MenuAction;
import net.runelite.api.events.ConfigChanged;
import net.runelite.api.events.WidgetLoaded;
import net.runelite.api.widgets.Widget;
@@ -299,7 +298,9 @@ public class RuneLitePlusPlugin extends Plugin
}
Widget w = buttonMap.get(c);
//todo once bytecodes work again, re-enable
/*
client.invokeMenuAction(0, w.getId(), MenuAction.WIDGET_DEFAULT.getId(), 1, "Select", "", w.getCanvasLocation().getX() + 32, w.getCanvasLocation().getY() + 32);
*/
}
}

View File

@@ -25,21 +25,7 @@
*/
package net.runelite.client.plugins.tickcounter;
import java.awt.Dimension;
import java.awt.Graphics2D;
import java.util.ArrayList;
import java.util.List;
import java.util.Map.Entry;
import javax.inject.Inject;
import net.runelite.api.Client;
import net.runelite.client.ui.overlay.Overlay;
import net.runelite.client.ui.overlay.OverlayPosition;
import net.runelite.client.ui.overlay.components.LayoutableRenderableEntity;
import net.runelite.client.ui.overlay.components.LineComponent;
import net.runelite.client.ui.overlay.components.PanelComponent;
import net.runelite.client.ui.overlay.components.TitleComponent;
public class TickCounterOverlay extends Overlay
/*public class TickCounterOverlay extends Overlay
{
private TickCounterPlugin plugin;
@@ -94,4 +80,4 @@ public class TickCounterOverlay extends Overlay
return this.panelComponent.render(g);
}
}
}*/

View File

@@ -25,24 +25,9 @@
*/
package net.runelite.client.plugins.tickcounter;
import com.google.inject.Provides;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.inject.Inject;
import net.runelite.api.Client;
import net.runelite.api.Player;
import net.runelite.api.events.AnimationChanged;
import net.runelite.api.events.ClientTick;
import net.runelite.api.events.GameTick;
import net.runelite.api.kit.KitType;
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 = "Tick Counter",
description = "Counts combat activity for nearby players",
@@ -51,7 +36,8 @@ import net.runelite.client.ui.overlay.OverlayManager;
)
public class TickCounterPlugin extends Plugin
{
//todo once bytecodes work again, re-enable
/*
@Inject
private OverlayManager overlayManager;
@@ -215,10 +201,10 @@ public class TickCounterPlugin extends Plugin
@Subscribe
public void onClientTick(ClientTick e)
{
/*
* Hack for blowpipe since the AnimationChanged event doesn't fire when using a
* blowpipe because of its speed. If blowpipe animation restarts, then add 2
*/
*//*
* Hack for blowpipe since the AnimationChanged event doesn't fire when using a
* blowpipe because of its speed. If blowpipe animation restarts, then add 2
*//*
for (Player p : blowpiping)
{
if (p.getActionFrame() == 0 && p.getActionFrameCycle() == 1)
@@ -243,5 +229,5 @@ public class TickCounterPlugin extends Plugin
{
activity.clear();
}
}
}*/
}