Advertisement
s4000

DAV_MissingBuffConfig

Sep 9th, 2019
1,952
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 6.69 KB | None | 0 0
  1. using System.Collections.Generic;
  2. using System.Globalization;
  3. using System.Linq;
  4. using System.Media;
  5. using System;
  6. using Turbo.Plugins.Default;
  7.  
  8. namespace Turbo.Plugins.DAV
  9. {
  10.     public class DAV_MissingBuffConfig : BasePlugin, ICustomizer {
  11.         public DAV_MissingBuffConfig() {
  12.             Enabled = true;
  13.         }
  14.  
  15.         public override void Load(IController hud) {
  16.             base.Load(hud);
  17.         }
  18.  
  19.         public void Customize() {
  20.             var stdSize = 11f / 240f * Hud.Window.Size.Height * 0.85f;
  21.             var Brush_Red = Hud.Render.CreateBrush(240, 255, 51, 51, 1);
  22.             var Brush_Yellow = Hud.Render.CreateBrush(240, 255, 255, 51, 2);
  23.             var Brush_Green = Hud.Render.CreateBrush(240, 51, 51, 255, 2);
  24.             var stdFont = Hud.Render.CreateFont("tahoma", 7, 255, 255, 255, 51, true, true, 255, 255, 51, 51, true);
  25.  
  26.             Hud.RunOnPlugin<DAV_MissingBuff>(plugin => {
  27.                 plugin.GRonly = false;
  28.                 plugin.SpeakInterval = 5000; // msecond
  29.  
  30.                 plugin.xPos = Hud.Window.Size.Width * 0.7f;
  31.                 plugin.yPos = Hud.Window.Size.Height * 0.35f;
  32.                 plugin.partyOffsetX = 0f;
  33.                 plugin.partyOffsetY = 0.72f;
  34. /*
  35. HeroClass.DemonHunter
  36. HeroClass.Barbarian
  37. HeroClass.Wizard
  38. HeroClass.WitchDoctor
  39. HeroClass.Monk
  40. HeroClass.Crusader
  41. HeroClass.Necromancer
  42. HeroClass.None (for all class)
  43. */
  44.             /*  plugin.HeroNoBuffList.Add(HeroClass.None, new DAV_NoBuffRule() { // Buff X
  45.                     InCombatOnly = true,
  46.                     IsRelevant = (player) => , // condition
  47.                     IsBuffOn = (player) => player.Powers.BuffIsActive(SNO), // check if buff is on
  48.                     IconMsg = (player) => ,
  49.                     SpeakEnable = true,
  50.                     Message = "",
  51.                     warmFont = stdFont,
  52.                     IconSize = stdSize,
  53.                     Icon_Brush = Brush_Red, // draw 3rd
  54.                     Icon_BG = Hud.Texture.InventorySetBackgroundSmall, // draw 1st
  55.                     Icon_Texture = Hud.Texture.GetItemTexture(Hud.Sno.SnoItems.P61_Unique_Belt_01) // draw 2nd
  56.                 }); */
  57.  
  58.                 // Aquila Cuirass
  59.                 plugin.HeroNoBuffList.Add(HeroClass.None, new DAV_NoBuffRule() {
  60.                     InCombatOnly = false,
  61.                     IsRelevant = (player) => player.Powers.BuffIsActive(449064, 0),
  62.                     IsBuffOn = (player) => player.Powers.BuffIsActive(449064, 1),
  63.                     // IconMsg = (player) => ,
  64.                     SpeakEnable = false,
  65.                     Message = "No Energy",
  66.                     warmFont = stdFont,
  67.                     IconSize = stdSize,
  68.                     Icon_Brush = Brush_Red,
  69.                     // Icon_BG = Hud.Texture.InventorySetBackgroundSmall,
  70.                     Icon_Texture = Hud.Texture.GetTexture(3322046564)
  71.                 });
  72.  
  73.                 // Crusader - Akarats Champion
  74.                 plugin.HeroNoBuffList.Add(HeroClass.Crusader, new DAV_NoBuffRule() {
  75.                     InCombatOnly = true,
  76.                     IsRelevant = (player) => player.Powers.UsedSkills.Any(x => x.SnoPower.Sno == 269032),
  77.                     IsBuffOn = (player) => player.Powers.BuffIsActive(269032, 1),
  78.                     // IconMsg = (player) => ,
  79.                     SpeakEnable = false,
  80.                     Message = "No Akarats Champion",
  81.                     warmFont = stdFont,
  82.                     IconSize = stdSize,
  83.                     Icon_Brush = Brush_Red,
  84.                     // Icon_BG = Hud.Texture.InventorySetBackgroundSmall,
  85.                     Icon_Texture = Hud.Texture.GetTexture(3777397019)
  86.                 });
  87.  
  88.                 // Crusader - Aegis of Valor, Set 2
  89.                 plugin.HeroNoBuffList.Add(HeroClass.Crusader, new DAV_NoBuffRule() {
  90.                     InCombatOnly = true,
  91.                     IsRelevant = (player) => player.Powers.BuffIsActive(483643, 0),
  92.                     IsBuffOn = (player) => player.Powers.GetBuff(483643).IconCounts[1] == 3,
  93.                     IconMsg = (player) => player.Powers.GetBuff(483643).IconCounts[1].ToString(),
  94.                     SpeakEnable = false,
  95.                     Message = "No Heaven Fury Stack",
  96.                     warmFont = stdFont,
  97.                     IconSize = stdSize,
  98.                     Icon_Brush = Brush_Red,
  99.                     // Icon_BG = Hud.Texture.InventorySetBackgroundSmall,
  100.                     Icon_Texture = Hud.Texture.GetTexture(2206308930)
  101.                 });
  102.                
  103.                 // Crusader - Aegis of Valor, Set 4
  104.                 plugin.HeroNoBuffList.Add(HeroClass.Crusader, new DAV_NoBuffRule() {
  105.                     InCombatOnly = false,
  106.                     IsRelevant = (player) => player.Powers.BuffIsActive(483655, 0),
  107.                     IsBuffOn = (player) => player.Powers.GetBuff(483655).IconCounts[1] >= 30,
  108.                     IconMsg = (player) => "",
  109.                     SpeakEnable = false,
  110.                     Message = "No Valor Damage Reduction",
  111.                     warmFont = stdFont,
  112.                     IconSize = stdSize,
  113.                     Icon_Brush = Brush_Red,
  114.                     // Icon_BG = Hud.Texture.InventorySetBackgroundSmall,
  115.                     Icon_Texture = Hud.Texture.GetTexture(3476188190)
  116.                 });
  117.  
  118.                 // Monk - Sweeping Wind
  119.                 plugin.HeroNoBuffList.Add(HeroClass.Monk, new DAV_NoBuffRule() {
  120.                     InCombatOnly = true,
  121.                     IsRelevant = (player) => player.Powers.BuffIsActive(478511, 0), // Monkey King Set
  122.                     IsBuffOn = (player) => player.Powers.BuffIsActive(96090, 0),
  123.                     // IconMsg = (player) => ,
  124.                     SpeakEnable = true,
  125.                     Message = "No Sweeping Wind",
  126.                     warmFont = stdFont,
  127.                     IconSize = stdSize,
  128.                     Icon_Brush = Brush_Red,
  129.                     // Icon_BG = Hud.Texture.InventorySetBackgroundSmall,
  130.                     Icon_Texture = Hud.Texture.GetTexture(2500355564)
  131.                 });
  132.  
  133.                 // DemonHunter - Unhallowed Essence, Low Discipline
  134.                 plugin.HeroNoBuffList.Add(HeroClass.DemonHunter, new DAV_NoBuffRule() {
  135.                     InCombatOnly = false,
  136.                     IsRelevant = (player) => player.Powers.BuffIsActive(423228, 0), // full set power
  137.                     IsBuffOn = (player) => player.Stats.ResourceCurSec > 60, // adjust
  138.                     IconMsg = (player) => player.Stats.ResourceCurSec.ToString("F0"),
  139.                     SpeakEnable = false,
  140.                     Message = "Low Discipline",
  141.                     warmFont = stdFont,
  142.                     IconSize = stdSize,
  143.                     Icon_Brush = Brush_Red,
  144.                     // Icon_BG = Hud.Texture.InventorySetBackgroundSmall,
  145.                     Icon_Texture = Hud.Texture.GetTexture(3666675121)
  146.                 });
  147.  
  148.                 // Nephalem Glory Globes
  149.                 plugin.HeroNoBuffList.Add(HeroClass.None, new DAV_NoBuffRule() {
  150.                     InCombatOnly = false,
  151.                     IsRelevant = (player) => player.Powers.BuffIsActive(300082, 0),
  152.                     IsBuffOn = (player) => player.Powers.GetBuff(300082).TimeLeftSeconds[0] > 5,
  153.                     IconMsg = (player) => player.Powers.GetBuff(300082).TimeLeftSeconds[0].ToString("F0"),
  154.                     SpeakEnable = false,
  155.                     Message = "Nephalem Glory",
  156.                     warmFont = stdFont,
  157.                     IconSize = stdSize,
  158.                     Icon_Brush = Brush_Red,
  159.                     Icon_BG = Hud.Texture.InventorySetBackgroundSmall,
  160.                     Icon_Texture = Hud.Texture.GetTexture(1597362067)
  161.                 });
  162.  
  163.                 // Barbarian - Band of Might
  164.                 plugin.HeroNoBuffList.Add(HeroClass.Barbarian, new DAV_NoBuffRule() {
  165.                     InCombatOnly = true,
  166.                     IsRelevant = (player) => player.Powers.BuffIsActive(Hud.Sno.SnoPowers.BandOfMight.Sno, 0),
  167.                     IsBuffOn = (player) => player.Powers.BuffIsActive(Hud.Sno.SnoPowers.BandOfMight.Sno, 1),
  168.                 //  IconMsg = (player) => ,
  169.                     SpeakEnable = false,
  170.                     Message = "No Band of Might",
  171.                     warmFont = stdFont,
  172.                     IconSize = stdSize,
  173.                     Icon_Brush = Brush_Red,
  174.                     Icon_BG = Hud.Texture.InventorySetBackgroundSmall,
  175.                     Icon_Texture = Hud.Texture.GetItemTexture(Hud.Sno.SnoItems.P61_Unique_Ring_05)
  176.                 });
  177.  
  178.                 // Squirt's Necklace
  179.                 plugin.HeroNoBuffList.Add(HeroClass.None, new DAV_NoBuffRule() {
  180.                     InCombatOnly = false,
  181.                     IsRelevant = (player) => player.Powers.BuffIsActive(Hud.Sno.SnoPowers.SquirtsNecklace.Sno, 0),
  182.                     IsBuffOn = (player) => player.Powers.GetBuff(Hud.Sno.SnoPowers.SquirtsNecklace.Sno).IconCounts[5] > 5,
  183.                     IconMsg = (player) => player.Powers.GetBuff(Hud.Sno.SnoPowers.SquirtsNecklace.Sno).IconCounts[5].ToString(),
  184.                     SpeakEnable = false,
  185.                     Message = "No Squirt's Necklace",
  186.                     warmFont = stdFont,
  187.                     IconSize = stdSize,
  188.                     Icon_Brush = Brush_Red,
  189.                     Icon_BG = Hud.Texture.InventorySetBackgroundSmall,
  190.                     Icon_Texture = Hud.Texture.GetItemTexture(Hud.Sno.SnoItems.P66_Unique_Amulet_010)
  191.                 });
  192.  
  193.                 // Bastions of Will
  194.                 plugin.HeroNoBuffList.Add(HeroClass.None, new DAV_NoBuffRule() {
  195.                     InCombatOnly = true,
  196.                     IsRelevant = (player) => player.Powers.BuffIsActive(Hud.Sno.SnoPowers.Generic_ItemPassiveUniqueRing735x1.Sno, 0),
  197.                     IsBuffOn = (player) => player.Powers.BuffIsActive(Hud.Sno.SnoPowers.Generic_ItemPassiveUniqueRing735x1.Sno, 1),
  198.                 //  IconMsg = (player) => ,
  199.                     SpeakEnable = false,
  200.                     Message = "No Generator",
  201.                     warmFont = stdFont,
  202.                     IconSize = stdSize,
  203.                     Icon_Brush = Brush_Red,
  204.                     Icon_BG = Hud.Texture.InventorySetBackgroundSmall,
  205.                     Icon_Texture = Hud.Texture.GetItemTexture(Hud.Sno.SnoItems.Unique_Ring_Set_001_x1)
  206.                 });
  207.  
  208.                 // Bastions of Will
  209.                 plugin.HeroNoBuffList.Add(HeroClass.None, new DAV_NoBuffRule() {
  210.                     InCombatOnly = true,
  211.                     IsRelevant = (player) => player.Powers.BuffIsActive(Hud.Sno.SnoPowers.Generic_ItemPassiveUniqueRing735x1.Sno, 0),
  212.                     IsBuffOn = (player) => player.Powers.BuffIsActive(Hud.Sno.SnoPowers.Generic_ItemPassiveUniqueRing735x1.Sno, 2),
  213.                 //  IconMsg = (player) => ,
  214.                     SpeakEnable = false,
  215.                     Message = "No Spender",
  216.                     warmFont = stdFont,
  217.                     IconSize = stdSize,
  218.                     Icon_Brush = Brush_Red,
  219.                     Icon_BG = Hud.Texture.InventorySetBackgroundSmall,
  220.                     Icon_Texture = Hud.Texture.GetItemTexture(Hud.Sno.SnoItems.Unique_Ring_Set_002_x1)
  221.                 });
  222.  
  223.                 // Ignore Pain for Meta
  224.                 plugin.HeroNoBuffList.Add(HeroClass.None, new DAV_NoBuffRule() {
  225.                     InCombatOnly = true,
  226.                     IsRelevant = (player) => Hud.Game.Players.Any(p => p.HeroClassDefinition.HeroClass == HeroClass.Barbarian && p.Powers.UsedSkills.Any(x => x.RuneNameEnglish == "Mob Rule")),
  227.                     IsBuffOn = (player) => player.Powers.BuffIsActive(Hud.Sno.SnoPowers.Barbarian_IgnorePain.Sno) || player.Powers.BuffIsActive(Hud.Sno.SnoPowers.Generic_PagesBuffInvulnerable.Sno), // Shield Pylon // from Razorfish
  228.                 //  IconMsg = (player) => ,
  229.                     SpeakEnable = false,
  230.                     Message = "No IP",
  231.                     warmFont = stdFont,
  232.                     IconSize = stdSize,
  233.                     Icon_Brush = Brush_Red,
  234.                 //  Icon_BG = Hud.Texture.InventorySetBackgroundSmall,
  235.                     Icon_Texture = Hud.Texture.GetTexture(Hud.Sno.SnoPowers.Barbarian_IgnorePain.Icons[1].TextureId)
  236.                 });
  237.  
  238.                 // Necromancer - Dayntee's Binding
  239.                 plugin.HeroNoBuffList.Add(HeroClass.Necromancer, new DAV_NoBuffRule() {
  240.                     InCombatOnly = true,
  241.                     IsRelevant = (player) => player.Powers.BuffIsActive(Hud.Sno.SnoPowers.DaynteesBinding.Sno, 0),
  242.                     IsBuffOn = (player) => player.Powers.BuffIsActive(Hud.Sno.SnoPowers.DaynteesBinding.Sno, 1),
  243.                 //  IconMsg = (player) => ,
  244.                     SpeakEnable = false,
  245.                     Message = "No Curse",
  246.                     warmFont = stdFont,
  247.                     IconSize = stdSize,
  248.                     Icon_Brush = Brush_Red,
  249.                     Icon_BG = Hud.Texture.InventorySetBackgroundSmall,
  250.                     Icon_Texture = Hud.Texture.GetItemTexture(Hud.Sno.SnoItems.P61_Unique_Belt_01)
  251.                 });
  252.  
  253.                 // Monk - Spirit Guards
  254.                 plugin.HeroNoBuffList.Add(HeroClass.Monk, new DAV_NoBuffRule() {
  255.                     InCombatOnly = true,
  256.                     IsRelevant = (player) => player.Powers.BuffIsActive(Hud.Sno.SnoPowers.SpiritGuards.Sno, 0),
  257.                     IsBuffOn = (player) => player.Powers.BuffIsActive(Hud.Sno.SnoPowers.SpiritGuards.Sno, 1),
  258.                 //  IconMsg = (player) => ,
  259.                     SpeakEnable = false,
  260.                     Message = "No Spirit Guards",
  261.                     warmFont = stdFont,
  262.                     IconSize = stdSize,
  263.                     Icon_Brush = Brush_Red,
  264.                 //  Icon_BG = Hud.Texture.InventorySetBackgroundSmall,
  265.                     Icon_Texture = Hud.Texture.GetTexture(Hud.Sno.SnoPowers.Monk_WayOfTheHundredFists.Icons[1].TextureId)
  266.                 });
  267.  
  268.                 // Wizard - Halo Of Karini
  269.                 plugin.HeroNoBuffList.Add(HeroClass.Wizard, new DAV_NoBuffRule() {
  270.                     InCombatOnly = true,
  271.                     IsRelevant = (player) => player.Powers.BuffIsActive(Hud.Sno.SnoPowers.HaloOfKarini.Sno, 0),
  272.                     IsBuffOn = (player) => player.Powers.BuffIsActive(Hud.Sno.SnoPowers.Wizard_StormArmor.Sno, 4),
  273.                 //  IconMsg = (player) => ,,
  274.                     SpeakEnable = false,
  275.                     Message = "No Storm Armor",
  276.                     warmFont = stdFont,
  277.                     IconSize = stdSize,
  278.                     Icon_Brush = Brush_Red,
  279.                 //  Icon_BG = Hud.Texture.InventorySetBackgroundSmall,
  280.                     Icon_Texture = Hud.Texture.GetTexture(Hud.Sno.SnoPowers.Wizard_StormArmor.Icons[1].TextureId)
  281.                 });
  282.  
  283.                 // Necromancer - Steuart's Greaves
  284.                 plugin.HeroNoBuffList.Add(HeroClass.Necromancer, new DAV_NoBuffRule() {
  285.                     InCombatOnly = false,
  286.                     IsRelevant = (player) => player.Powers.BuffIsActive(Hud.Sno.SnoPowers.SteuartsGreaves.Sno, 0),
  287.                     IsBuffOn = (player) => player.Powers.BuffIsActive(Hud.Sno.SnoPowers.SteuartsGreaves.Sno, 1),
  288.                 // IconMsg = (player) => ,
  289.                     SpeakEnable = false,
  290.                     Message = "Blood Rush",
  291.                     warmFont = stdFont,
  292.                     IconSize = stdSize,
  293.                     Icon_Brush = Brush_Yellow,
  294.                 // Icon_BG = Hud.Texture.InventorySetBackgroundSmall,
  295.                     Icon_Texture = Hud.Texture.GetTexture(Hud.Sno.SnoPowers.Necromancer_BloodRush.NormalIconTextureId)
  296.                 });
  297.  
  298.                 // Necromancer - Simulacrum for Rat Run
  299.             /*  plugin.HeroNoBuffList.Add(HeroClass.Necromancer, new DAV_NoBuffRule() {
  300.                     InCombatOnly = true,
  301.                     IsRelevant = (player) => player.Powers.BuffIsActive(Hud.Sno.SnoPowers.ScytheOfTheCycle.Sno, 0) && player.Powers.UsedSkills.Any(x => x.SnoPower.Sno == Hud.Sno.SnoPowers.Necromancer_Simulacrum.Sno),
  302.                     IsBuffOn = (player) => player.Powers.BuffIsActive(Hud.Sno.SnoPowers.Necromancer_Simulacrum.Sno, 1),
  303.                 // IconMsg = (player) => ,
  304.                     SpeakEnable = false,
  305.                     Message = "No Simulacrum",
  306.                     warmFont = stdFont,
  307.                     IconSize = stdSize,
  308.                     Icon_Brush = Brush_Yellow,
  309.                 // Icon_BG = Hud.Texture.InventorySetBackgroundSmall,
  310.                     Icon_Texture = Hud.Texture.GetTexture(Hud.Sno.SnoPowers.Necromancer_Simulacrum.NormalIconTextureId)
  311.                 }); */
  312.  
  313.                 // Necromancer - Simulacrum + Land of the Dead for Rat Run
  314.             /*  plugin.HeroNoBuffList.Add(HeroClass.Necromancer, new DAV_NoBuffRule() {
  315.                     InCombatOnly = true,
  316.                     IsRelevant = (player) => player.Powers.BuffIsActive(Hud.Sno.SnoPowers.ScytheOfTheCycle.Sno, 0) && player.Powers.UsedSkills.Any(x => x.SnoPower.Sno == Hud.Sno.SnoPowers.Necromancer_LandOfTheDead.Sno) && player.Powers.UsedSkills.Any(x => x.SnoPower.Sno == Hud.Sno.SnoPowers.Necromancer_Simulacrum.Sno),
  317.                     IsBuffOn = (player) => {
  318.                             var pSkill = player.Powers.UsedSkills.FirstOrDefault(x => x.SnoPower == Hud.Sno.SnoPowers.Necromancer_LandOfTheDead);
  319.                             if (pSkill != null && pSkill.IsOnCooldown) return true;
  320.  
  321.                             pSkill = player.Powers.UsedSkills.FirstOrDefault(x => x.SnoPower == Hud.Sno.SnoPowers.Necromancer_Simulacrum);
  322.                             if (pSkill != null && pSkill.IsOnCooldown)  return true;
  323.  
  324.                             return false;
  325.                         },
  326.                 // IconMsg = (player) => ,
  327.                     SpeakEnable = false,
  328.                     Message = "Can Cast Simulacrum + Lotd",
  329.                     warmFont = stdFont,
  330.                     IconSize = stdSize,
  331.                     Icon_Brush = Brush_Yellow,
  332.                 // Icon_BG = Hud.Texture.InventorySetBackgroundSmall,
  333.                     Icon_Texture = Hud.Texture.GetTexture(Hud.Sno.SnoPowers.Necromancer_LandOfTheDead.NormalIconTextureId)
  334.                 }); */
  335.  
  336.                 // Necromancer - Bone Armor
  337.                 plugin.HeroNoBuffList.Add(HeroClass.Necromancer, new DAV_NoBuffRule() {
  338.                     InCombatOnly = true,
  339.                     IsRelevant = (player) => player.Powers.UsedSkills.Any(x => x.SnoPower.Sno == Hud.Sno.SnoPowers.Necromancer_BoneArmor.Sno),
  340.                     IsBuffOn = (player) => player.Powers.BuffIsActive(Hud.Sno.SnoPowers.Necromancer_BoneArmor.Sno),
  341.                 // IconMsg = (player) => ,
  342.                     SpeakEnable = false,
  343.                     Message = "No Bone Armor",
  344.                     warmFont = stdFont,
  345.                     IconSize = stdSize,
  346.                     Icon_Brush = Brush_Red,
  347.                 // Icon_BG = Hud.Texture.InventorySetBackgroundSmall,
  348.                     Icon_Texture = Hud.Texture.GetTexture(Hud.Sno.SnoPowers.Necromancer_BoneArmor.NormalIconTextureId)
  349.                 });
  350.             });
  351.         }
  352.     }
  353. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement