-
Established Member
[v9.0?] [INT] PainEnhancerHelper
I wanted to get the title right, I developed this against the latest public release, so I think it should be 9.0. Sorry if I've fucked up.
Got sick of not being able to see how much value I'm getting from pain enhancer in my rifts, or seeing who's bleeding.
Pain enhancer is one of the main staples of my build for the attack speed, so I wanted something super eye catching with bright green. Feel free to change the colours yourself.
- Draws green dots on enemies that don't have pain enhancer bleed on them
- Draws label under player showing how many enemies have dot dps applied and how much attack speed you gain from this
- Doesn't draw if in town
- Doesn't draw if pain enhancer not equipped
Code:
using System.Linq;
using Turbo.Plugins;
using Turbo.Plugins.Default;
namespace Turbo.plugins.Roast
{
public sealed class PainEnhancerHelper : BasePlugin, IInGameWorldPainter
{
private WorldDecoratorCollection PlayerLabel { get; set; }
private WorldDecoratorCollection BleedRadiusDecorator { get; set; }
private WorldDecoratorCollection NoBleedDecorator { get; set; }
private IAttribute m_PowerBuff1;
private uint m_PainEnhancerPrimarySno;
public PainEnhancerHelper()
{
Enabled = true;
}
public override void Load(IController hud)
{
base.Load(hud);
m_PowerBuff1 = Hud.Sno.Attributes.Power_Buff_1_Visual_Effect_None;
m_PainEnhancerPrimarySno = Hud.Sno.SnoPowers.PainEnhancerPrimary.Sno;
NoBleedDecorator = new WorldDecoratorCollection(
new GroundCircleDecorator(Hud)
{
Brush = Hud.Render.CreateBrush(255, 0, 255, 0, 20)
});
PlayerLabel = new WorldDecoratorCollection(
new GroundLabelDecorator(Hud)
{
TextFont = Hud.Render.CreateFont("tahoma", 6.5f, 255, 0, 255, 0, false, false, false),
BackgroundBrush = Hud.Render.CreateBrush(255, 0, 0,0, 0)
});
BleedRadiusDecorator = new WorldDecoratorCollection(new GroundCircleDecorator(Hud)
{
Brush = Hud.Render.CreateBrush(155, 255, 0, 0, 2.0f),
Radius = 20,
Enabled = true
});
}
public void PaintWorld(WorldLayer layer)
{
var player = Hud.Game.Me;
if (player.IsInTown)
return;
if (player.Powers.UsedLegendaryGems.PainEnhancerPrimary?.Active != true)
return;
var monsters = Hud.Game.AliveMonsters.ToList();
var noBleedMonsters = monsters.Where(m => m.GetAttributeValueAsInt(m_PowerBuff1, m_PainEnhancerPrimarySno) != 1).ToList();
var bleedCount = monsters.Except(noBleedMonsters).Count(m => m.NormalizedXyDistanceToMe <= 20);
foreach (var m in noBleedMonsters)
{
NoBleedDecorator.Paint(layer, m, m.FloorCoordinate, string.Empty);
}
PlayerLabel.Paint(layer, player, player.FloorCoordinate, $"Bleeding: {bleedCount}\nAttack Speed: {bleedCount * 3}%");
BleedRadiusDecorator.Paint(layer, player, player.FloorCoordinate, string.Empty);
}
}
}
Last edited by Roast; 03-03-2019 at 02:31 PM.
Developer of RoastBot https://www.ownedcore.com/forums/fps/overwatch-exploits-hacks/619893-roastbot-continuation-of-serenity.html
-
Post Thanks / Like - 2 Thanks
johnbl,
icheck (2 members gave Thanks to Roast for this useful post)
-
Active Member
Good idea! It works with pain enhancer equipped.
Will you check that there are lots of exceptions if pain enhancer gem not equipped and you get into a rift?
-
this
if (!player.Powers.UsedLegendaryGems.PainEnhancerPrimary.Active)
return;
should be
if (player.Powers.UsedLegendaryGems.PainEnhancerPrimary?.Active != true)
return;
Do not send me private messages unless it is absolutely necessary or the content is sensitive or when I ask you to do that...
-
Active Member
Wow. It works great as intended.
Thanks KJ.
-
Contributor
Originally Posted by
KillerJohn
this
if (!player.Powers.UsedLegendaryGems.PainEnhancerPrimary.Active)
return;
should be
if (player.Powers.UsedLegendaryGems.PainEnhancerPrimary?.Active != true)
return;
It would be better if you could support bleeding debuff directly.
monsters.Where(m => m.DotDpsApplied <= 0).ToList() This is not accurate.
-
Originally Posted by
SeaDragon
It would be better if you could support bleeding debuff directly.
monsters.Where(m => m.DotDpsApplied <= 0).ToList() This is not accurate.
Well, it is up to the plugin author to find out the (de)buff's SNO...
Do not send me private messages unless it is absolutely necessary or the content is sensitive or when I ask you to do that...
-
Member
@SeaDragon
I can't find an article about "GreaterRiftPylonMarkerPlugin"
I can only ask you here, can it support 9.0?
tks~
-
Contributor
Originally Posted by
odaru7788
@SeaDragon
I can't find an article about "GreaterRiftPylonMarkerPlugin"
I can only ask you here, can it support 9.0?
tks~
https://www.ownedcore.com/forums/dia...ck-plugin.html (Pylon Check Plugin)
You should find it in the original thread
I've updated pastebin.com
-
Post Thanks / Like - 1 Thanks
odaru7788 (1 members gave Thanks to SeaDragon for this useful post)
-
Legendary
- I see that they already wrote you a link to download it, I delete this-
-
Active Member
FYI, this is what I use.
if (player.Powers.UsedLegendaryGems.PainEnhancerPrimary?.Active != true)
return;
var monsters = Hud.Game.AliveMonsters.Where(m => m.NormalizedXyDistanceToMe <= 20f && m.Attackable).ToList();
var noBleedMonsters = monsters.Where(m => m.DotDpsApplied <= 0 && m.NormalizedXyDistanceToMe <= 20f).ToList();
var bleedCount = monsters.Count - noBleedMonsters.Count;
int ASUp = bleedCount * 3; // Pain Enhancer increases attack speed 3% for each enemy bleeding within 20 yards
foreach (var m in noBleedMonsters)
{
NoBleedDecorator.Paint(layer, m, m.FloorCoordinate, string.Empty);
}
PlayerLabel.Paint(layer, player, player.FloorCoordinate, $"ASUp : {ASUp} %");
Any better idea?
-
Established Member
Originally Posted by
KillerJohn
this
if (!player.Powers.UsedLegendaryGems.PainEnhancerPrimary.Active)
return;
should be
if (player.Powers.UsedLegendaryGems.PainEnhancerPrimary?.Active != true)
return;
Looking at the design of the API, I expected it to guarantee that these references are not null. I'll change the script in a bit. I couldn't find any documentation and most of the interfaces don't have summaries or remarks on them, is there a link to some in depth docs anywhere?
Also, any advice on finding the SNO for bleed(s) or is it just going to be a case of dump active debuffs during a session to try and find it that way?
EDIT: Nevermind, I think I found what I'm looking for, but can't see anywhere on IMonster/IActor/ISnoMonster/ISnoActor to get the list of debuffs.
Last edited by Roast; 02-27-2019 at 03:17 PM.
Developer of RoastBot https://www.ownedcore.com/forums/fps/overwatch-exploits-hacks/619893-roastbot-continuation-of-serenity.html
-
Established Member
Update:
I did some reading and this script is now accurate, it will show only bleeds applied by Pain Enhancer.
Developer of RoastBot https://www.ownedcore.com/forums/fps/overwatch-exploits-hacks/619893-roastbot-continuation-of-serenity.html
-
Active Member
I looked into both the numbers of yours and mine. They are identical.
Yours feels more professional. Good job!
-
Established Member
Realised my logic was wrong- Bleed count now only calculated based on monsters which are within 20 yards of you, as per the gem effect
- To help with keeping mobs within your bleed radius, added a circle drawer
Developer of RoastBot https://www.ownedcore.com/forums/fps/overwatch-exploits-hacks/619893-roastbot-continuation-of-serenity.html
-
Active Member
For the sake of accuracy, this is what I tested to check the difference between yours and mine.
They are identical. I defined it within 20 yards.
if (player.Powers.UsedLegendaryGems.PainEnhancerPrimary?.Active != true)
return;
var monsters = Hud.Game.AliveMonsters.Where(m => m.NormalizedXyDistanceToMe <= 20f && m.Attackable).ToList();
// var monsters = Hud.Game.AliveMonsters.ToList();
var noBleedMonsters2 = monsters.Where(m => m.DotDpsApplied <= 0 && m.NormalizedXyDistanceToMe <= 20f).ToList();
var noBleedMonsters = monsters.Where(m => m.GetAttributeValueAsInt(m_PowerBuff1, m_PainEnhancerPrimarySno) != 1).ToList();
var bleedCount2 = monsters.Count - noBleedMonsters2.Count;
var bleedCount = monsters.Count - noBleedMonsters.Count;
foreach (var m in noBleedMonsters)
{
NoBleedDecorator.Paint(layer, m, m.FloorCoordinate, string.Empty);
}
PlayerLabel.Paint(layer, player, player.FloorCoordinate.Offset(-20f, -20f, 0), $"ASUp2 : {bleedCount2 * 3} %");
PlayerLabel.Paint(layer, player, player.FloorCoordinate.Offset(-18f, -18f, 0), $"ASUp1 : {bleedCount * 3} %");