-
Member
[v7.6] [INTERNATIONAL] [Lis] SkillDamagePlugin
Reflects damage based on Skills and Elements
111.jpg
install to: [HUD folder]/plugins/SkillDmgPlugin.cs
PHP Code:
using Turbo.Plugins.Default;
using System.Collections.Generic;
using System.Linq;
using System;
namespace Turbo.Plugins
{
public class SkillDmgPlugin : BasePlugin, IInGameTopPainter
{
public TopLabelDecorator DamageInfoDecorator { get; set; }
private long HighestDPS;
private string skillbonus;
private string elem;//skillbonus
private string dpsb;//skillbonus
private float dpstmp;//skillbonus
public string WeaponBonuse { get; set; }
private bool waiting=false;
public SkillDmgPlugin()
{
Enabled = true;
}
public override void Load(IController hud)
{
base.Load(hud);
WeaponBonuse="";
DamageInfoDecorator = new TopLabelDecorator(Hud)
{
TextFont = Hud.Render.CreateFont("Segoe UI Light", 8, 255, 255, 234, 137, false, false, true),
TextFunc = () => "" + dpsb,
HintFunc = () => ""+skillbonus+WeaponBonuse
+"\n Max current damage: "
+ValueToString(HighestDPS, ValueFormat.LongNumber)
+"\n("+String.Format("{0:N0}",HighestDPS)+")"
+"",
};
}
public void PaintTopInGame(ClipState clipState)
{
dpsb="";
dpstmp=0;
skillbonus="";
Hud.Game.Me.Powers.UsedSkills.ForEach(skilltest =>{
if(skilltest.DamageBonus>0){
skillbonus+=""+String.Format("{0:N0}",Hud.Game.Me.Offense.SheetDps*(1+skilltest.DamageBonus)*(1+skilltest.ElementalDamageBonus))+" ( "+ skilltest.CurrentSnoPower.NameLocalized+": "+skilltest.DamageBonus*100+"% + Elemental: "+ skilltest.ElementalDamageBonus*100+"%) \n";
if(skilltest.DamageBonus>dpstmp){
dpstmp=skilltest.DamageBonus;
dpsb=""+String.Format("{0:N0}",Hud.Game.Me.Offense.SheetDps*(1+skilltest.DamageBonus)*(1+skilltest.ElementalDamageBonus)) ;
}
}
});
//----------------------------------------------------
if (Hud.Game.Me.Damage.CurrentDps > HighestDPS) HighestDPS = Hud.Game.Me.Damage.CurrentDps;
if (!Hud.Game.IsInTown){if(waiting){HighestDPS=0;waiting=false;};}else{if(!waiting)waiting=true;};
//----------------------------------------------------
var uiMinimap = Hud.Render.MinimapUiElement.Rectangle;
var xPos = uiMinimap.Left-50;
var yPos = 30;
var bgWidth = Hud.Window.Size.Width * 0.08f;
var bgHeight = Hud.Window.Size.Height * 0.04f;
if (clipState != ClipState.Inventory){
return;}else{
var uiRect = Hud.Render.GetUiElement("Root.NormalLayer.inventory_dialog_mainPage").Rectangle;
DamageInfoDecorator.Paint(uiRect.Left+45f, uiRect.Top+250f , 100, 15, HorizontalAlign.Center);
};
}
}
}
Last edited by qwerty.56; 01-09-2018 at 11:49 AM.
-
Post Thanks / Like - 1 Thanks
gaagaa_se (1 members gave Thanks to qwerty.56 for this useful post)
-
Active Member
Can you explain a little what does it do?
Why in your preview pic it show the max dmg as zero and why is the sheet dps equal to what your plugin shows?
-
Member
max dmg
will display the largest damage dealt, and will be reset when leaving the city
and the damage taken takes into account% of the increase in skill and% of the increase in the elemental damage of the selected rune
Set and see
Last edited by qwerty.56; 01-08-2018 at 01:01 PM.
-
Post Thanks / Like - 1 Thanks
johnbl (1 members gave Thanks to qwerty.56 for this useful post)