Advertisement
Guest User

Untitled

a guest
Dec 17th, 2017
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.33 KB | None | 0 0
  1. // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  2. // *.txt files are not loaded automatically by TurboHUD
  3. // you have to change this file's extension to .cs to enable it
  4. // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  5.  
  6. using Turbo.Plugins.Default;
  7.  
  8. namespace Turbo.Plugins.User
  9. {
  10.  
  11. public class PluginEnablerOrDisablerPlugin : BasePlugin, ICustomizer
  12. {
  13.  
  14. public PluginEnablerOrDisablerPlugin()
  15. {
  16. Enabled = true;
  17. }
  18.  
  19. public override void Load(IController hud)
  20. {
  21. base.Load(hud);
  22. }
  23.  
  24. // "Customize" methods are automatically executed after every plugin is loaded.
  25. // So these methods can use Hud.GetPlugin<class> to access the plugin instances' public properties (like decorators, Enabled flag, parameters, etc)
  26. // Make sure you test the return value against null!
  27. public void Customize()
  28. {
  29. // basic examples
  30. // In this example below, we see one way to adjust the bottom list plugin. All commented out for now.
  31. //var feetBuffs = Hud.GetPlugin<PlayerBottomBuffListPlugin>().RuleCalculator.Rules;
  32. //if (feetBuffs != null)
  33. //{
  34. // feetBuffs.Add(new BuffRule(403471) { IconIndex = null, MinimumIconCount = 1, ShowStacks = true, ShowTimeLeft = true }); // Gem, Taeguk
  35.  
  36. // feetBuffs.Add(new BuffRule(383014) { IconIndex = null, MinimumIconCount = 1, ShowStacks = false, ShowTimeLeft = true }); // Gem, Bane of the Powerful
  37.  
  38. // feetBuffs.Add(new BuffRule(403464) { IconIndex = 1, MinimumIconCount = 1, ShowStacks = true, ShowTimeLeft = true }); // Gem, Gogok of Swiftness
  39.  
  40. // feetBuffs.Add(new BuffRule(263029) { IconIndex = null, MinimumIconCount = 1, ShowTimeLeft = true }); // Pylon, Conduit - Normal Rift
  41. // feetBuffs.Add(new BuffRule(403404) { IconIndex = null, MinimumIconCount = 1, ShowTimeLeft = true }); // Pylon, Conduit - Greater Rift
  42. // feetBuffs.Add(new BuffRule(262935) { IconIndex = null, MinimumIconCount = 1, ShowTimeLeft = true }); // Pylon, Power
  43. // feetBuffs.Add(new BuffRule(266258) { IconIndex = null, MinimumIconCount = 1, ShowTimeLeft = true }); // Pylon, Channeling
  44. // feetBuffs.Add(new BuffRule(266254) { IconIndex = null, MinimumIconCount = 1, ShowTimeLeft = true }); // Pylon, Shield
  45.  
  46. // feetBuffs.Add(new BuffRule(429673) { IconIndex = null, MinimumIconCount = 1, ShowStacks = true }); // Set, Raekor - 6Pcs
  47. // feetBuffs.Add(new BuffRule(429855) { IconIndex = 5, MinimumIconCount = 1, ShowTimeLeft = true, ShowStacks = true }); // Set, Tal Rasha - 6Pcs
  48.  
  49. // feetBuffs.Add(new BuffRule(402458) { IconIndex = 1, MinimumIconCount = 1, ShowTimeLeft = true }); // Legendary, In-Geom
  50. // feetBuffs.Add(new BuffRule(430674) { IconIndex = null, MinimumIconCount = 1, ShowTimeLeft = true }); // Legendary, Convention of Elements
  51.  
  52. // feetBuffs.Add(new BuffRule(79607) { IconIndex = null, MinimumIconCount = 1, ShowTimeLeft = true }); // Barbarian, Wrath of the Berserker
  53.  
  54. // feetBuffs.Add(new BuffRule(205187) { IconIndex = 1, MinimumIconCount = 1, ShowTimeLeft = false }); // Barbarian, Berserker Rage
  55.  
  56. // feetBuffs.Add(new BuffRule(205133) { IconIndex = 1, MinimumIconCount = 1, ShowTimeLeft = false }); // Barbarian, Brawler
  57.  
  58. // feetBuffs.Add(new BuffRule(79528) { IconIndex = null, MinimumIconCount = 1, ShowTimeLeft = true }); // Barbarian, Ignore Pain
  59. // feetBuffs.Add(new BuffRule(134872) { IconIndex = 2, MinimumIconCount = 1, ShowTimeLeft = true, ShowStacks = true }); // Archon Stacks
  60. // feetBuffs.Add(new BuffRule(134872) { IconIndex = 5, MinimumIconCount = 0, ShowTimeLeft = true, ShowStacks = true }); // Swami Archon Stacks
  61. //}
  62.  
  63. //var LeftBuffs = Hud.GetPlugin<PlayerLeftBuffListPlugin>().RuleCalculator.Rules;
  64. //if (LeftBuffs != null)
  65. //{
  66. // LeftBuffs.Add(new BuffRule(302846) { IconIndex = 2, MinimumIconCount = 1, ShowTimeLeft = true, ShowStacks = true, IconSizeMultiplier = 2 }); // Demon Hunter Vengence
  67. //}
  68. //var RightBuffs = Hud.GetPlugin<PlayerRightBuffListPlugin>().RuleCalculator.Rules;
  69. //if (RightBuffs != null)
  70. //{
  71. // RightBuffs.Add(new BuffRule(302846) { IconIndex = 4, MinimumIconCount = 1, ShowTimeLeft = true }); // Demon Hunter Vengence
  72. //}
  73. //var TopBuffs = Hud.GetPlugin<PlayerTopBuffListPlugin>().RuleCalculator.Rules;
  74. //if (TopBuffs != null)
  75. //{
  76. // TopBuffs.Add(new BuffRule(302846) { IconIndex = 1, MinimumIconCount = 1, ShowTimeLeft = true }); // Demon Hunter Vengence
  77. //}
  78.  
  79. // In this example, we see another way to turn on various buffs which allows direct control of the timers and other functions.
  80. // Notes for myself. You must have all of the variables for the Buff Painter in the new section.
  81. // If you leave one of them out, it remoes it completely.
  82. Hud.RunOnPlugin<PlayerBottomBuffListPlugin>(plugin => {
  83. plugin.BuffPainter = new BuffPainter(Hud, true)
  84. {
  85. Opacity = 0.75f,
  86. ShowTimeLeftNumbers = true,
  87. ShowTooltips = false,
  88. TimeLeftFont = Hud.Render.CreateFont("tahoma", 7, 255, 255, 255, 255, false, false, 255, 0, 0, 0, true),
  89. StackFont = Hud.Render.CreateFont("tahoma", 6, 255, 255, 255, 255, false, false, 255, 0, 0, 0, true),
  90. };
  91. // This section changes the rule settings in the original .cs file, in this case the size.
  92. plugin.RuleCalculator.SizeMultiplier = 1.00f;
  93. // This section is adding in new rules (buffs) to include. See the SnowPowerList.cs for their IDs.
  94. //In this example, it doubles the size of the just that icon.
  95. //plugin.RuleCalculator.Rules.Add(new BuffRule(302846) { IconIndex = 2, MinimumIconCount = 1, ShowTimeLeft = true, ShowStacks = true, IconSizeMultiplier = 2 }); // Demon Hunter Vengence
  96. //plugin.RuleCalculator.Rules.Add(new BuffRule(302846) { IconIndex = 2, MinimumIconCount = 1, ShowTimeLeft = true, ShowStacks = true, IconSizeMultiplier = 1 }); // Demon Hunter Vengence
  97. // 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.
  98. //plugin.PositionOffset = -0.25f;
  99. });
  100.  
  101. Hud.RunOnPlugin<PlayerLeftBuffListPlugin>(plugin => {
  102. plugin.BuffPainter = new BuffPainter(Hud, true)
  103. {
  104. Opacity = 0.75f,
  105. ShowTimeLeftNumbers = true,
  106. ShowTooltips = false,
  107. TimeLeftFont = Hud.Render.CreateFont("tahoma", 7, 255, 255, 255, 255, false, false, 255, 0, 0, 0, true),
  108. StackFont = Hud.Render.CreateFont("tahoma", 6, 255, 255, 255, 255, false, false, 255, 0, 0, 0, true),
  109. };
  110. plugin.RuleCalculator.SizeMultiplier = 1.00f;
  111. });
  112.  
  113. Hud.RunOnPlugin<PlayerRightBuffListPlugin>(plugin => {
  114. plugin.BuffPainter = new BuffPainter(Hud, true)
  115. {
  116. Opacity = 0.75f,
  117. ShowTimeLeftNumbers = true,
  118. ShowTooltips = false,
  119. TimeLeftFont = Hud.Render.CreateFont("tahoma", 7, 255, 255, 255, 255, false, false, 255, 0, 0, 0, true),
  120. StackFont = Hud.Render.CreateFont("tahoma", 6, 255, 255, 255, 255, false, false, 255, 0, 0, 0, true),
  121. };
  122. plugin.RuleCalculator.SizeMultiplier = 1.00f;
  123. plugin.RuleCalculator.Rules.Add(new BuffRule(441517) { IconIndex = null, MinimumIconCount = 1, ShowTimeLeft = true }); // Wraps of Clarity
  124. plugin.RuleCalculator.Rules.Add(new BuffRule(365311) { IconIndex = null, MinimumIconCount = 1, ShowTimeLeft = true }); // Wolf
  125. plugin.RuleCalculator.Rules.Add(new BuffRule(302846) { IconIndex = 2, MinimumIconCount = 1, ShowTimeLeft = true, IconSizeMultiplier = 1 }); // Demon Hunter Vengence
  126. });
  127.  
  128. Hud.RunOnPlugin<PlayerTopBuffListPlugin>(plugin => {
  129. plugin.BuffPainter = new BuffPainter(Hud, true)
  130. {
  131. Opacity = 0.75f,
  132. ShowTimeLeftNumbers = true,
  133. ShowTooltips = false,
  134. TimeLeftFont = Hud.Render.CreateFont("tahoma", 7, 255, 255, 255, 255, false, false, 255, 0, 0, 0, true),
  135. StackFont = Hud.Render.CreateFont("tahoma", 6, 255, 255, 255, 255, false, false, 255, 0, 0, 0, true),
  136. };
  137. plugin.RuleCalculator.SizeMultiplier = 1.25f;
  138.  
  139. plugin.RuleCalculator.Rules.Add(new BuffRule(430674) { IconIndex = null, MinimumIconCount = 1, ShowTimeLeft = true }); // Convention of Elements
  140. //plugin.RuleCalculator.Rules.Add(new BuffRule(111215) { IconIndex = null, MinimumIconCount = 1, ShowTimeLeft = true }); // Vault
  141. //plugin.RuleCalculator.Rules.Add(new BuffRule(365311) { IconIndex = null, MinimumIconCount = 1, ShowTimeLeft = true }); // Wolf
  142.  
  143. plugin.PositionOffset = -0.26f;
  144. });
  145.  
  146. // turn on MultiplayerExperienceRangePlugin
  147. Hud.TogglePlugin<MultiplayerExperienceRangePlugin>(true);
  148.  
  149. // turn off sell darkening
  150. Hud.GetPlugin<InventoryAndStashPlugin>().NotGoodDisplayEnabled = false;
  151.  
  152. // disable arcane affix label
  153. //Hud.GetPlugin<EliteMonsterAffixPlugin>().AffixDecorators.Remove(MonsterAffix.Arcane);
  154.  
  155. // override an elite affix's text
  156. //Hud.GetPlugin<EliteMonsterAffixPlugin>().CustomAffixNames.Add(MonsterAffix.Desecrator, "DES");
  157. }
  158.  
  159. }
  160.  
  161. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement