turned off PKer Notifier by default, and other small updates (#445)
* turned off PKer Notifier by default, and other small updates * better description for zulrah plugin
This commit is contained in:
+1
-1
@@ -52,7 +52,7 @@ import net.runelite.client.ui.overlay.OverlayManager;
|
|||||||
|
|
||||||
@PluginDescriptor(
|
@PluginDescriptor(
|
||||||
name = "High Alchemy",
|
name = "High Alchemy",
|
||||||
description = "*Highlights items that yield a profit from casting High Alchemy.",
|
description = "Highlights items that yield a profit from casting the High Alchemy spell.",
|
||||||
tags = {"bank", "inventory", "overlay", "high", "alchemy", "grand", "exchange", "tooltips"},
|
tags = {"bank", "inventory", "overlay", "high", "alchemy", "grand", "exchange", "tooltips"},
|
||||||
type = PluginType.UTILITY,
|
type = PluginType.UTILITY,
|
||||||
enabledByDefault = false
|
enabledByDefault = false
|
||||||
|
|||||||
+2
-2
@@ -146,12 +146,12 @@ public interface IdleNotifierConfig extends Config
|
|||||||
name = "PKer Notifier",
|
name = "PKer Notifier",
|
||||||
position = 9,
|
position = 9,
|
||||||
description = "Notifies if an attackable player based on your level range appears on screen.",
|
description = "Notifies if an attackable player based on your level range appears on screen.",
|
||||||
group = "pvp",
|
group = "PvP",
|
||||||
warning = "This will not notify you if the player is in your cc or is online on your friends list."
|
warning = "This will not notify you if the player is in your cc or is online on your friends list."
|
||||||
)
|
)
|
||||||
default boolean notifyPkers()
|
default boolean notifyPkers()
|
||||||
{
|
{
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+137
-138
@@ -1,138 +1,137 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2019, Bartvollebregt <https://github.com/Bartvollebregt>
|
* Copyright (c) 2019, Bartvollebregt <https://github.com/Bartvollebregt>
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||||
* list of conditions and the following disclaimer.
|
* list of conditions and the following disclaimer.
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer in the documentation
|
* this list of conditions and the following disclaimer in the documentation
|
||||||
* and/or other materials provided with the distribution.
|
* and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
* 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
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
package net.runelite.client.plugins.maxhit;
|
package net.runelite.client.plugins.maxhit;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
import net.runelite.api.InventoryID;
|
import net.runelite.api.InventoryID;
|
||||||
import net.runelite.api.Item;
|
import net.runelite.api.Item;
|
||||||
import net.runelite.api.ItemContainer;
|
import net.runelite.api.ItemContainer;
|
||||||
import net.runelite.api.events.ConfigChanged;
|
import net.runelite.api.events.ConfigChanged;
|
||||||
import net.runelite.api.events.ItemContainerChanged;
|
import net.runelite.api.events.ItemContainerChanged;
|
||||||
import net.runelite.api.events.VarbitChanged;
|
import net.runelite.api.events.VarbitChanged;
|
||||||
import net.runelite.api.widgets.Widget;
|
import net.runelite.api.widgets.Widget;
|
||||||
import net.runelite.api.widgets.WidgetInfo;
|
import net.runelite.api.widgets.WidgetInfo;
|
||||||
import net.runelite.client.eventbus.Subscribe;
|
import net.runelite.client.eventbus.Subscribe;
|
||||||
import net.runelite.client.plugins.Plugin;
|
import net.runelite.client.plugins.Plugin;
|
||||||
import net.runelite.client.plugins.PluginDescriptor;
|
import net.runelite.client.plugins.PluginDescriptor;
|
||||||
import net.runelite.client.plugins.PluginType;
|
import net.runelite.client.plugins.PluginType;
|
||||||
import net.runelite.client.plugins.maxhit.calculators.MagicMaxHitCalculator;
|
import net.runelite.client.plugins.maxhit.calculators.MagicMaxHitCalculator;
|
||||||
import net.runelite.client.plugins.maxhit.calculators.MeleeMaxHitCalculator;
|
import net.runelite.client.plugins.maxhit.calculators.MeleeMaxHitCalculator;
|
||||||
import net.runelite.client.plugins.maxhit.calculators.RangeMaxHitCalculator;
|
import net.runelite.client.plugins.maxhit.calculators.RangeMaxHitCalculator;
|
||||||
|
|
||||||
@PluginDescriptor(
|
@PluginDescriptor(
|
||||||
name = "Max Hit",
|
name = "Max Hit",
|
||||||
description = "Max Hit Calculator",
|
description = "Adds the max hit of the equipped weapon to the equipment and stats widget",
|
||||||
type = PluginType.UTILITY,
|
type = PluginType.UTILITY,
|
||||||
enabledByDefault = false
|
enabledByDefault = false
|
||||||
)
|
)
|
||||||
public class MaxHitPlugin extends Plugin
|
public class MaxHitPlugin extends Plugin
|
||||||
{
|
{
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private Client client;
|
private Client client;
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void onItemContainerChanged(final ItemContainerChanged event)
|
public void onItemContainerChanged(final ItemContainerChanged event)
|
||||||
{
|
{
|
||||||
this.updateMaxHitWidget();
|
this.updateMaxHitWidget();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void onConfigChanged(final ConfigChanged event)
|
public void onConfigChanged(final ConfigChanged event)
|
||||||
{
|
{
|
||||||
this.updateMaxHitWidget();
|
this.updateMaxHitWidget();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void onVarbitChanged(VarbitChanged event)
|
public void onVarbitChanged(VarbitChanged event)
|
||||||
{
|
{
|
||||||
this.updateMaxHitWidget();
|
this.updateMaxHitWidget();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateMaxHitWidget()
|
private void updateMaxHitWidget()
|
||||||
{
|
{
|
||||||
Widget equipmentStats = client.getWidget(WidgetInfo.EQUIPMENT_INVENTORY_ITEMS_CONTAINER);
|
Widget equipmentStats = client.getWidget(WidgetInfo.EQUIPMENT_INVENTORY_ITEMS_CONTAINER);
|
||||||
|
|
||||||
ItemContainer equipmentContainer = client.getItemContainer(InventoryID.EQUIPMENT);
|
ItemContainer equipmentContainer = client.getItemContainer(InventoryID.EQUIPMENT);
|
||||||
Item[] equipedItems = new Item[14];
|
Item[] equipedItems = new Item[14];
|
||||||
|
|
||||||
if (equipmentStats != null && !equipmentStats.isHidden())
|
if (equipmentStats != null && !equipmentStats.isHidden())
|
||||||
{
|
{
|
||||||
if (equipmentContainer != null)
|
if (equipmentContainer != null)
|
||||||
{
|
{
|
||||||
equipedItems = equipmentContainer.getItems();
|
equipedItems = equipmentContainer.getItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
MeleeMaxHitCalculator meleeMaxHitCalculator = new MeleeMaxHitCalculator(this.client, equipedItems);
|
MeleeMaxHitCalculator meleeMaxHitCalculator = new MeleeMaxHitCalculator(this.client, equipedItems);
|
||||||
RangeMaxHitCalculator rangeMaxHitCalculator = new RangeMaxHitCalculator(this.client, equipedItems);
|
RangeMaxHitCalculator rangeMaxHitCalculator = new RangeMaxHitCalculator(this.client, equipedItems);
|
||||||
MagicMaxHitCalculator magicMaxHitCalculator = new MagicMaxHitCalculator(this.client, equipedItems);
|
MagicMaxHitCalculator magicMaxHitCalculator = new MagicMaxHitCalculator(this.client, equipedItems);
|
||||||
|
|
||||||
MaxHit maxHit = new MaxHit(meleeMaxHitCalculator.getMaxHit(), rangeMaxHitCalculator.getMaxHit(), magicMaxHitCalculator.getMaxHit());
|
MaxHit maxHit = new MaxHit(meleeMaxHitCalculator.getMaxHit(), rangeMaxHitCalculator.getMaxHit(), magicMaxHitCalculator.getMaxHit());
|
||||||
this.setWidgetMaxHit(maxHit);
|
this.setWidgetMaxHit(maxHit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setWidgetMaxHit(MaxHit maxhit)
|
private void setWidgetMaxHit(MaxHit maxhit)
|
||||||
{
|
{
|
||||||
Widget equipYourCharacter = client.getWidget(WidgetInfo.EQUIP_YOUR_CHARACTER);
|
Widget equipYourCharacter = client.getWidget(WidgetInfo.EQUIP_YOUR_CHARACTER);
|
||||||
String maxHitText = "Melee Max Hit: " + maxhit.getMaxMeleeHit();
|
String maxHitText = "Melee Max Hit: " + maxhit.getMaxMeleeHit();
|
||||||
maxHitText += "<br>Range Max Hit: " + maxhit.getMaxRangeHit();
|
maxHitText += "<br>Range Max Hit: " + maxhit.getMaxRangeHit();
|
||||||
maxHitText += "<br>Magic Max Hit: " + maxhit.getMaxMagicHit();
|
maxHitText += "<br>Magic Max Hit: " + maxhit.getMaxMagicHit();
|
||||||
|
|
||||||
|
|
||||||
equipYourCharacter.setText(maxHitText);
|
equipYourCharacter.setText(maxHitText);
|
||||||
}
|
}
|
||||||
|
|
||||||
private class MaxHit
|
private class MaxHit
|
||||||
{
|
{
|
||||||
private final double maxMeleeHit;
|
private final double maxMeleeHit;
|
||||||
private final double maxRangeHit;
|
private final double maxRangeHit;
|
||||||
private final double maxMagicHit;
|
private final double maxMagicHit;
|
||||||
|
|
||||||
MaxHit(double maxMeleeHit, double maxRangeHit, double maxMagicHit)
|
MaxHit(double maxMeleeHit, double maxRangeHit, double maxMagicHit)
|
||||||
{
|
{
|
||||||
this.maxMeleeHit = maxMeleeHit;
|
this.maxMeleeHit = maxMeleeHit;
|
||||||
this.maxRangeHit = maxRangeHit;
|
this.maxRangeHit = maxRangeHit;
|
||||||
this.maxMagicHit = maxMagicHit;
|
this.maxMagicHit = maxMagicHit;
|
||||||
}
|
}
|
||||||
|
|
||||||
double getMaxMeleeHit()
|
double getMaxMeleeHit()
|
||||||
{
|
{
|
||||||
return maxMeleeHit;
|
return maxMeleeHit;
|
||||||
}
|
}
|
||||||
|
|
||||||
double getMaxRangeHit()
|
double getMaxRangeHit()
|
||||||
{
|
{
|
||||||
return maxRangeHit;
|
return maxRangeHit;
|
||||||
}
|
}
|
||||||
|
|
||||||
double getMaxMagicHit()
|
double getMaxMagicHit()
|
||||||
{
|
{
|
||||||
return maxMagicHit;
|
return maxMagicHit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
+4
-4
@@ -64,7 +64,7 @@ public interface PlayerIndicatorsConfig extends Config
|
|||||||
)
|
)
|
||||||
default boolean highlightFriends()
|
default boolean highlightFriends()
|
||||||
{
|
{
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
@@ -108,7 +108,7 @@ public interface PlayerIndicatorsConfig extends Config
|
|||||||
)
|
)
|
||||||
default boolean highlightTeamMembers()
|
default boolean highlightTeamMembers()
|
||||||
{
|
{
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
@@ -196,7 +196,7 @@ public interface PlayerIndicatorsConfig extends Config
|
|||||||
)
|
)
|
||||||
default boolean showClanRanks()
|
default boolean showClanRanks()
|
||||||
{
|
{
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
@@ -350,7 +350,7 @@ public interface PlayerIndicatorsConfig extends Config
|
|||||||
)
|
)
|
||||||
default boolean highlightCallers()
|
default boolean highlightCallers()
|
||||||
{
|
{
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
|
|||||||
@@ -54,8 +54,8 @@ import net.runelite.client.plugins.zulrah.phase.ZulrahPhase;
|
|||||||
import net.runelite.client.ui.overlay.OverlayManager;
|
import net.runelite.client.ui.overlay.OverlayManager;
|
||||||
|
|
||||||
@PluginDescriptor(
|
@PluginDescriptor(
|
||||||
name = "Zulrah",
|
name = "Zulrah Helper",
|
||||||
description = "Overlays to assist with killing Zulrah",
|
description = "Shows tiles on where to stand during the phases and what prayer to use.",
|
||||||
tags = {"zulrah", "boss", "helper"},
|
tags = {"zulrah", "boss", "helper"},
|
||||||
type = PluginType.PVM
|
type = PluginType.PVM
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user