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(
|
||||
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"},
|
||||
type = PluginType.UTILITY,
|
||||
enabledByDefault = false
|
||||
|
||||
+2
-2
@@ -146,12 +146,12 @@ public interface IdleNotifierConfig extends Config
|
||||
name = "PKer Notifier",
|
||||
position = 9,
|
||||
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."
|
||||
)
|
||||
default boolean notifyPkers()
|
||||
{
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+137
-138
@@ -1,138 +1,137 @@
|
||||
/*
|
||||
* Copyright (c) 2019, Bartvollebregt <https://github.com/Bartvollebregt>
|
||||
* 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.maxhit;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.InventoryID;
|
||||
import net.runelite.api.Item;
|
||||
import net.runelite.api.ItemContainer;
|
||||
import net.runelite.api.events.ConfigChanged;
|
||||
import net.runelite.api.events.ItemContainerChanged;
|
||||
import net.runelite.api.events.VarbitChanged;
|
||||
import net.runelite.api.widgets.Widget;
|
||||
import net.runelite.api.widgets.WidgetInfo;
|
||||
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.plugins.maxhit.calculators.MagicMaxHitCalculator;
|
||||
import net.runelite.client.plugins.maxhit.calculators.MeleeMaxHitCalculator;
|
||||
import net.runelite.client.plugins.maxhit.calculators.RangeMaxHitCalculator;
|
||||
|
||||
@PluginDescriptor(
|
||||
name = "Max Hit",
|
||||
description = "Max Hit Calculator",
|
||||
type = PluginType.UTILITY,
|
||||
enabledByDefault = false
|
||||
)
|
||||
public class MaxHitPlugin extends Plugin
|
||||
{
|
||||
|
||||
@Inject
|
||||
private Client client;
|
||||
|
||||
@Subscribe
|
||||
public void onItemContainerChanged(final ItemContainerChanged event)
|
||||
{
|
||||
this.updateMaxHitWidget();
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onConfigChanged(final ConfigChanged event)
|
||||
{
|
||||
this.updateMaxHitWidget();
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onVarbitChanged(VarbitChanged event)
|
||||
{
|
||||
this.updateMaxHitWidget();
|
||||
}
|
||||
|
||||
private void updateMaxHitWidget()
|
||||
{
|
||||
Widget equipmentStats = client.getWidget(WidgetInfo.EQUIPMENT_INVENTORY_ITEMS_CONTAINER);
|
||||
|
||||
ItemContainer equipmentContainer = client.getItemContainer(InventoryID.EQUIPMENT);
|
||||
Item[] equipedItems = new Item[14];
|
||||
|
||||
if (equipmentStats != null && !equipmentStats.isHidden())
|
||||
{
|
||||
if (equipmentContainer != null)
|
||||
{
|
||||
equipedItems = equipmentContainer.getItems();
|
||||
}
|
||||
|
||||
MeleeMaxHitCalculator meleeMaxHitCalculator = new MeleeMaxHitCalculator(this.client, equipedItems);
|
||||
RangeMaxHitCalculator rangeMaxHitCalculator = new RangeMaxHitCalculator(this.client, equipedItems);
|
||||
MagicMaxHitCalculator magicMaxHitCalculator = new MagicMaxHitCalculator(this.client, equipedItems);
|
||||
|
||||
MaxHit maxHit = new MaxHit(meleeMaxHitCalculator.getMaxHit(), rangeMaxHitCalculator.getMaxHit(), magicMaxHitCalculator.getMaxHit());
|
||||
this.setWidgetMaxHit(maxHit);
|
||||
}
|
||||
}
|
||||
|
||||
private void setWidgetMaxHit(MaxHit maxhit)
|
||||
{
|
||||
Widget equipYourCharacter = client.getWidget(WidgetInfo.EQUIP_YOUR_CHARACTER);
|
||||
String maxHitText = "Melee Max Hit: " + maxhit.getMaxMeleeHit();
|
||||
maxHitText += "<br>Range Max Hit: " + maxhit.getMaxRangeHit();
|
||||
maxHitText += "<br>Magic Max Hit: " + maxhit.getMaxMagicHit();
|
||||
|
||||
|
||||
equipYourCharacter.setText(maxHitText);
|
||||
}
|
||||
|
||||
private class MaxHit
|
||||
{
|
||||
private final double maxMeleeHit;
|
||||
private final double maxRangeHit;
|
||||
private final double maxMagicHit;
|
||||
|
||||
MaxHit(double maxMeleeHit, double maxRangeHit, double maxMagicHit)
|
||||
{
|
||||
this.maxMeleeHit = maxMeleeHit;
|
||||
this.maxRangeHit = maxRangeHit;
|
||||
this.maxMagicHit = maxMagicHit;
|
||||
}
|
||||
|
||||
double getMaxMeleeHit()
|
||||
{
|
||||
return maxMeleeHit;
|
||||
}
|
||||
|
||||
double getMaxRangeHit()
|
||||
{
|
||||
return maxRangeHit;
|
||||
}
|
||||
|
||||
double getMaxMagicHit()
|
||||
{
|
||||
return maxMagicHit;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
/*
|
||||
* Copyright (c) 2019, Bartvollebregt <https://github.com/Bartvollebregt>
|
||||
* 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.maxhit;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.InventoryID;
|
||||
import net.runelite.api.Item;
|
||||
import net.runelite.api.ItemContainer;
|
||||
import net.runelite.api.events.ConfigChanged;
|
||||
import net.runelite.api.events.ItemContainerChanged;
|
||||
import net.runelite.api.events.VarbitChanged;
|
||||
import net.runelite.api.widgets.Widget;
|
||||
import net.runelite.api.widgets.WidgetInfo;
|
||||
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.plugins.maxhit.calculators.MagicMaxHitCalculator;
|
||||
import net.runelite.client.plugins.maxhit.calculators.MeleeMaxHitCalculator;
|
||||
import net.runelite.client.plugins.maxhit.calculators.RangeMaxHitCalculator;
|
||||
|
||||
@PluginDescriptor(
|
||||
name = "Max Hit",
|
||||
description = "Adds the max hit of the equipped weapon to the equipment and stats widget",
|
||||
type = PluginType.UTILITY,
|
||||
enabledByDefault = false
|
||||
)
|
||||
public class MaxHitPlugin extends Plugin
|
||||
{
|
||||
|
||||
@Inject
|
||||
private Client client;
|
||||
|
||||
@Subscribe
|
||||
public void onItemContainerChanged(final ItemContainerChanged event)
|
||||
{
|
||||
this.updateMaxHitWidget();
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onConfigChanged(final ConfigChanged event)
|
||||
{
|
||||
this.updateMaxHitWidget();
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onVarbitChanged(VarbitChanged event)
|
||||
{
|
||||
this.updateMaxHitWidget();
|
||||
}
|
||||
|
||||
private void updateMaxHitWidget()
|
||||
{
|
||||
Widget equipmentStats = client.getWidget(WidgetInfo.EQUIPMENT_INVENTORY_ITEMS_CONTAINER);
|
||||
|
||||
ItemContainer equipmentContainer = client.getItemContainer(InventoryID.EQUIPMENT);
|
||||
Item[] equipedItems = new Item[14];
|
||||
|
||||
if (equipmentStats != null && !equipmentStats.isHidden())
|
||||
{
|
||||
if (equipmentContainer != null)
|
||||
{
|
||||
equipedItems = equipmentContainer.getItems();
|
||||
}
|
||||
|
||||
MeleeMaxHitCalculator meleeMaxHitCalculator = new MeleeMaxHitCalculator(this.client, equipedItems);
|
||||
RangeMaxHitCalculator rangeMaxHitCalculator = new RangeMaxHitCalculator(this.client, equipedItems);
|
||||
MagicMaxHitCalculator magicMaxHitCalculator = new MagicMaxHitCalculator(this.client, equipedItems);
|
||||
|
||||
MaxHit maxHit = new MaxHit(meleeMaxHitCalculator.getMaxHit(), rangeMaxHitCalculator.getMaxHit(), magicMaxHitCalculator.getMaxHit());
|
||||
this.setWidgetMaxHit(maxHit);
|
||||
}
|
||||
}
|
||||
|
||||
private void setWidgetMaxHit(MaxHit maxhit)
|
||||
{
|
||||
Widget equipYourCharacter = client.getWidget(WidgetInfo.EQUIP_YOUR_CHARACTER);
|
||||
String maxHitText = "Melee Max Hit: " + maxhit.getMaxMeleeHit();
|
||||
maxHitText += "<br>Range Max Hit: " + maxhit.getMaxRangeHit();
|
||||
maxHitText += "<br>Magic Max Hit: " + maxhit.getMaxMagicHit();
|
||||
|
||||
|
||||
equipYourCharacter.setText(maxHitText);
|
||||
}
|
||||
|
||||
private class MaxHit
|
||||
{
|
||||
private final double maxMeleeHit;
|
||||
private final double maxRangeHit;
|
||||
private final double maxMagicHit;
|
||||
|
||||
MaxHit(double maxMeleeHit, double maxRangeHit, double maxMagicHit)
|
||||
{
|
||||
this.maxMeleeHit = maxMeleeHit;
|
||||
this.maxRangeHit = maxRangeHit;
|
||||
this.maxMagicHit = maxMagicHit;
|
||||
}
|
||||
|
||||
double getMaxMeleeHit()
|
||||
{
|
||||
return maxMeleeHit;
|
||||
}
|
||||
|
||||
double getMaxRangeHit()
|
||||
{
|
||||
return maxRangeHit;
|
||||
}
|
||||
|
||||
double getMaxMagicHit()
|
||||
{
|
||||
return maxMagicHit;
|
||||
}
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -64,7 +64,7 @@ public interface PlayerIndicatorsConfig extends Config
|
||||
)
|
||||
default boolean highlightFriends()
|
||||
{
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
@@ -108,7 +108,7 @@ public interface PlayerIndicatorsConfig extends Config
|
||||
)
|
||||
default boolean highlightTeamMembers()
|
||||
{
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
@@ -196,7 +196,7 @@ public interface PlayerIndicatorsConfig extends Config
|
||||
)
|
||||
default boolean showClanRanks()
|
||||
{
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
@@ -350,7 +350,7 @@ public interface PlayerIndicatorsConfig extends Config
|
||||
)
|
||||
default boolean highlightCallers()
|
||||
{
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
|
||||
@@ -54,8 +54,8 @@ import net.runelite.client.plugins.zulrah.phase.ZulrahPhase;
|
||||
import net.runelite.client.ui.overlay.OverlayManager;
|
||||
|
||||
@PluginDescriptor(
|
||||
name = "Zulrah",
|
||||
description = "Overlays to assist with killing Zulrah",
|
||||
name = "Zulrah Helper",
|
||||
description = "Shows tiles on where to stand during the phases and what prayer to use.",
|
||||
tags = {"zulrah", "boss", "helper"},
|
||||
type = PluginType.PVM
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user