Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- // *.txt files are not loaded automatically by TurboHUD
- // you have to change this file's extension to .cs to enable it
- // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- using Turbo.Plugins.Default;
- namespace Turbo.Plugins.User
- {
- public class PluginEnablerOrDisablerPlugin : BasePlugin, ICustomizer
- {
- public PluginEnablerOrDisablerPlugin()
- {
- Enabled = true;
- }
- public override void Load(IController hud)
- {
- base.Load(hud);
- }
- // "Customize" methods are automatically executed after every plugin is loaded.
- // So these methods can use Hud.GetPlugin<class> to access the plugin instances' public properties (like decorators, Enabled flag, parameters, etc)
- // Make sure you test the return value against null!
- public void Customize()
- {
- // basic examples
- // In this example below, we see one way to adjust the bottom list plugin. All commented out for now.
- //var feetBuffs = Hud.GetPlugin<PlayerBottomBuffListPlugin>().RuleCalculator.Rules;
- //if (feetBuffs != null)
- //{
- // feetBuffs.Add(new BuffRule(403471) { IconIndex = null, MinimumIconCount = 1, ShowStacks = true, ShowTimeLeft = true }); // Gem, Taeguk
- // feetBuffs.Add(new BuffRule(383014) { IconIndex = null, MinimumIconCount = 1, ShowStacks = false, ShowTimeLeft = true }); // Gem, Bane of the Powerful
- // feetBuffs.Add(new BuffRule(403464) { IconIndex = 1, MinimumIconCount = 1, ShowStacks = true, ShowTimeLeft = true }); // Gem, Gogok of Swiftness
- // feetBuffs.Add(new BuffRule(263029) { IconIndex = null, MinimumIconCount = 1, ShowTimeLeft = true }); // Pylon, Conduit - Normal Rift
- // feetBuffs.Add(new BuffRule(403404) { IconIndex = null, MinimumIconCount = 1, ShowTimeLeft = true }); // Pylon, Conduit - Greater Rift
- // feetBuffs.Add(new BuffRule(262935) { IconIndex = null, MinimumIconCount = 1, ShowTimeLeft = true }); // Pylon, Power
- // feetBuffs.Add(new BuffRule(266258) { IconIndex = null, MinimumIconCount = 1, ShowTimeLeft = true }); // Pylon, Channeling
- // feetBuffs.Add(new BuffRule(266254) { IconIndex = null, MinimumIconCount = 1, ShowTimeLeft = true }); // Pylon, Shield
- // feetBuffs.Add(new BuffRule(429673) { IconIndex = null, MinimumIconCount = 1, ShowStacks = true }); // Set, Raekor - 6Pcs
- // feetBuffs.Add(new BuffRule(429855) { IconIndex = 5, MinimumIconCount = 1, ShowTimeLeft = true, ShowStacks = true }); // Set, Tal Rasha - 6Pcs
- // feetBuffs.Add(new BuffRule(402458) { IconIndex = 1, MinimumIconCount = 1, ShowTimeLeft = true }); // Legendary, In-Geom
- // feetBuffs.Add(new BuffRule(430674) { IconIndex = null, MinimumIconCount = 1, ShowTimeLeft = true }); // Legendary, Convention of Elements
- // feetBuffs.Add(new BuffRule(79607) { IconIndex = null, MinimumIconCount = 1, ShowTimeLeft = true }); // Barbarian, Wrath of the Berserker
- // feetBuffs.Add(new BuffRule(205187) { IconIndex = 1, MinimumIconCount = 1, ShowTimeLeft = false }); // Barbarian, Berserker Rage
- // feetBuffs.Add(new BuffRule(205133) { IconIndex = 1, MinimumIconCount = 1, ShowTimeLeft = false }); // Barbarian, Brawler
- // feetBuffs.Add(new BuffRule(79528) { IconIndex = null, MinimumIconCount = 1, ShowTimeLeft = true }); // Barbarian, Ignore Pain
- // feetBuffs.Add(new BuffRule(134872) { IconIndex = 2, MinimumIconCount = 1, ShowTimeLeft = true, ShowStacks = true }); // Archon Stacks
- // feetBuffs.Add(new BuffRule(134872) { IconIndex = 5, MinimumIconCount = 0, ShowTimeLeft = true, ShowStacks = true }); // Swami Archon Stacks
- //}
- //var LeftBuffs = Hud.GetPlugin<PlayerLeftBuffListPlugin>().RuleCalculator.Rules;
- //if (LeftBuffs != null)
- //{
- // LeftBuffs.Add(new BuffRule(302846) { IconIndex = 2, MinimumIconCount = 1, ShowTimeLeft = true, ShowStacks = true, IconSizeMultiplier = 2 }); // Demon Hunter Vengence
- //}
- //var RightBuffs = Hud.GetPlugin<PlayerRightBuffListPlugin>().RuleCalculator.Rules;
- //if (RightBuffs != null)
- //{
- // RightBuffs.Add(new BuffRule(302846) { IconIndex = 4, MinimumIconCount = 1, ShowTimeLeft = true }); // Demon Hunter Vengence
- //}
- //var TopBuffs = Hud.GetPlugin<PlayerTopBuffListPlugin>().RuleCalculator.Rules;
- //if (TopBuffs != null)
- //{
- // TopBuffs.Add(new BuffRule(302846) { IconIndex = 1, MinimumIconCount = 1, ShowTimeLeft = true }); // Demon Hunter Vengence
- //}
- // In this example, we see another way to turn on various buffs which allows direct control of the timers and other functions.
- // Notes for myself. You must have all of the variables for the Buff Painter in the new section.
- // If you leave one of them out, it remoes it completely.
- Hud.RunOnPlugin<PlayerBottomBuffListPlugin>(plugin => {
- plugin.BuffPainter = new BuffPainter(Hud, true)
- {
- Opacity = 0.75f,
- ShowTimeLeftNumbers = true,
- ShowTooltips = false,
- TimeLeftFont = Hud.Render.CreateFont("tahoma", 7, 255, 255, 255, 255, false, false, 255, 0, 0, 0, true),
- StackFont = Hud.Render.CreateFont("tahoma", 6, 255, 255, 255, 255, false, false, 255, 0, 0, 0, true),
- };
- // This section changes the rule settings in the original .cs file, in this case the size.
- plugin.RuleCalculator.SizeMultiplier = 1.00f;
- // This section is adding in new rules (buffs) to include. See the SnowPowerList.cs for their IDs.
- //In this example, it doubles the size of the just that icon.
- //plugin.RuleCalculator.Rules.Add(new BuffRule(302846) { IconIndex = 2, MinimumIconCount = 1, ShowTimeLeft = true, ShowStacks = true, IconSizeMultiplier = 2 }); // Demon Hunter Vengence
- //plugin.RuleCalculator.Rules.Add(new BuffRule(302846) { IconIndex = 2, MinimumIconCount = 1, ShowTimeLeft = true, ShowStacks = true, IconSizeMultiplier = 1 }); // Demon Hunter Vengence
- // Change position of plugin defaults can be found in the Buff list plugins in the default UI. -0.25f is good for right above the characters head.
- //plugin.PositionOffset = -0.25f;
- });
- Hud.RunOnPlugin<PlayerLeftBuffListPlugin>(plugin => {
- plugin.BuffPainter = new BuffPainter(Hud, true)
- {
- Opacity = 0.75f,
- ShowTimeLeftNumbers = true,
- ShowTooltips = false,
- TimeLeftFont = Hud.Render.CreateFont("tahoma", 7, 255, 255, 255, 255, false, false, 255, 0, 0, 0, true),
- StackFont = Hud.Render.CreateFont("tahoma", 6, 255, 255, 255, 255, false, false, 255, 0, 0, 0, true),
- };
- plugin.RuleCalculator.SizeMultiplier = 1.00f;
- });
- Hud.RunOnPlugin<PlayerRightBuffListPlugin>(plugin => {
- plugin.BuffPainter = new BuffPainter(Hud, true)
- {
- Opacity = 0.75f,
- ShowTimeLeftNumbers = true,
- ShowTooltips = false,
- TimeLeftFont = Hud.Render.CreateFont("tahoma", 7, 255, 255, 255, 255, false, false, 255, 0, 0, 0, true),
- StackFont = Hud.Render.CreateFont("tahoma", 6, 255, 255, 255, 255, false, false, 255, 0, 0, 0, true),
- };
- plugin.RuleCalculator.SizeMultiplier = 1.00f;
- plugin.RuleCalculator.Rules.Add(new BuffRule(441517) { IconIndex = null, MinimumIconCount = 1, ShowTimeLeft = true }); // Wraps of Clarity
- plugin.RuleCalculator.Rules.Add(new BuffRule(365311) { IconIndex = null, MinimumIconCount = 1, ShowTimeLeft = true }); // Wolf
- plugin.RuleCalculator.Rules.Add(new BuffRule(302846) { IconIndex = 2, MinimumIconCount = 1, ShowTimeLeft = true, IconSizeMultiplier = 1 }); // Demon Hunter Vengence
- });
- Hud.RunOnPlugin<PlayerTopBuffListPlugin>(plugin => {
- plugin.BuffPainter = new BuffPainter(Hud, true)
- {
- Opacity = 0.75f,
- ShowTimeLeftNumbers = true,
- ShowTooltips = false,
- TimeLeftFont = Hud.Render.CreateFont("tahoma", 7, 255, 255, 255, 255, false, false, 255, 0, 0, 0, true),
- StackFont = Hud.Render.CreateFont("tahoma", 6, 255, 255, 255, 255, false, false, 255, 0, 0, 0, true),
- };
- plugin.RuleCalculator.SizeMultiplier = 1.25f;
- plugin.RuleCalculator.Rules.Add(new BuffRule(430674) { IconIndex = null, MinimumIconCount = 1, ShowTimeLeft = true }); // Convention of Elements
- //plugin.RuleCalculator.Rules.Add(new BuffRule(111215) { IconIndex = null, MinimumIconCount = 1, ShowTimeLeft = true }); // Vault
- //plugin.RuleCalculator.Rules.Add(new BuffRule(365311) { IconIndex = null, MinimumIconCount = 1, ShowTimeLeft = true }); // Wolf
- plugin.PositionOffset = -0.26f;
- });
- // turn on MultiplayerExperienceRangePlugin
- Hud.TogglePlugin<MultiplayerExperienceRangePlugin>(true);
- // turn off sell darkening
- Hud.GetPlugin<InventoryAndStashPlugin>().NotGoodDisplayEnabled = false;
- // disable arcane affix label
- //Hud.GetPlugin<EliteMonsterAffixPlugin>().AffixDecorators.Remove(MonsterAffix.Arcane);
- // override an elite affix's text
- //Hud.GetPlugin<EliteMonsterAffixPlugin>().CustomAffixNames.Add(MonsterAffix.Desecrator, "DES");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement