Advertisement
Guest User

Untitled

a guest
Jul 29th, 2018
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.19 KB | None | 0 0
  1. using Turbo.Plugins.Default;
  2.  
  3. namespace Turbo.Plugins.User
  4. {
  5.  
  6. public class PluginEnablerOrDisablerPlugin : BasePlugin, ICustomizer
  7. {
  8.  
  9. public PluginEnablerOrDisablerPlugin()
  10. {
  11. Enabled = true;
  12. }
  13.  
  14. public override void Load(IController hud)
  15. {
  16. base.Load(hud);
  17. }
  18.  
  19. // "Customize" methods are automatically executed after every plugin is loaded.
  20. // So these methods can use Hud.GetPlugin<class> to access the plugin instances' public properties (like decorators, Enabled flag, parameters, etc)
  21. // Make sure you test the return value against null!
  22. public void Customize()
  23. {
  24. Hud.RunOnPlugin<Prrovoss.Popups.ItemDroppedPopup>(plugin =>
  25. {
  26. var AncientDecorator = new TopLabelWithTitleDecorator(Hud)
  27. {
  28. BorderBrush = Hud.Render.CreateBrush(255, 183, 132, 21, 5),
  29. BackgroundBrush = Hud.Render.CreateBrush(200, 91, 55, 19, 0),
  30. TextFont = Hud.Render.CreateFont("tahoma", 8, 255, 255, 255, 255, true, false, false),
  31. TitleFont = Hud.Render.CreateFont("tahoma", 6, 255, 180, 147, 109, true, false, false),
  32. };
  33.  
  34. var PrimalDecorator = new TopLabelWithTitleDecorator(Hud)
  35. {
  36. BorderBrush = Hud.Render.CreateBrush(255, 183, 22, 32, 5),
  37. BackgroundBrush = Hud.Render.CreateBrush(200, 91, 55, 19, 0),
  38. TextFont = Hud.Render.CreateFont("tahoma", 8, 255, 255, 255, 255, true, false, false),
  39. TitleFont = Hud.Render.CreateFont("tahoma", 6, 255, 180, 147, 109, true, false, false),
  40. };
  41.  
  42. //sno (put null if not needed), itemQuality (put null if not needed), ancientRank (put null if not needed), hint, title, duration (in ms), custom decorator (ignore if not needed)
  43. plugin.Add(null, ItemQuality.Legendary, 1, "", "Ancient dropped", 9000, AncientDecorator);
  44. plugin.Add(null, ItemQuality.Legendary, 2, "", "Primal dropped", 15000, PrimalDecorator);
  45. });
  46. }
  47.  
  48. }
  49.  
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement