Guest User

StarpactcirclePlugin.cs

a guest
May 28th, 2018
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.15 KB | None | 0 0
  1. using System.Linq;
  2. using Turbo.Plugins.Default;
  3.  
  4. namespace Turbo.Plugins.Stone
  5. {
  6. public class StarpactcirclePlugin : BasePlugin, IInGameWorldPainter
  7. {
  8. public WorldDecoratorCollection meteorcircleDeco { get; set; }
  9. public WorldDecoratorCollection meteorstringDeco { get; set; }
  10. public WorldDecoratorCollection meteorvisionstringDeco { get; set; }
  11. public float remaining { get; set; }
  12. public float starpactstarttict { get; set; }
  13.  
  14. public StarpactcirclePlugin()
  15. {
  16. Enabled = true;
  17. }
  18.  
  19. public override void Load(IController hud)
  20. {
  21. base.Load(hud);
  22.  
  23. meteorcircleDeco = new WorldDecoratorCollection(
  24. new GroundCircleDecorator(Hud)
  25. {
  26. Brush = Hud.Render.CreateBrush(255, 0, 140, 255, 6),
  27. Radius = 13,
  28. }
  29. );
  30. meteorstringDeco = new WorldDecoratorCollection(
  31. new GroundLabelDecorator(Hud)
  32. {
  33. BackgroundBrush = Hud.Render.CreateBrush(255, 255, 255, 0, 0),
  34. BorderBrush = Hud.Render.CreateBrush(255, 112, 48, 160, -1),
  35. TextFont = Hud.Render.CreateFont("tahoma", 11, 255, 0, 140, 255, true, false, 128, 0, 0, 0, true),
  36. }
  37. );
  38. meteorvisionstringDeco = new WorldDecoratorCollection(
  39. new GroundLabelDecorator(Hud)
  40. {
  41. BackgroundBrush = Hud.Render.CreateBrush(255, 255, 128, 0, 0),
  42. BorderBrush = Hud.Render.CreateBrush(255, 112, 48, 160, -1),
  43. TextFont = Hud.Render.CreateFont("tahoma", 11, 255, 120, 0, 120, true, false, 128, 0, 0, 0, true),
  44. }
  45. );
  46. }
  47.  
  48. public void PaintWorld(WorldLayer layer)
  49. {
  50. if (Hud.Game.Me.HeroClassDefinition.HeroClass != HeroClass.Wizard) return;
  51. var actors = Hud.Game.Actors;
  52. var me = Hud.Game.Me;
  53. remaining = 1.25f - ((Hud.Game.CurrentGameTick - starpactstarttict) / 60.0f);
  54. if (remaining < 0) remaining = 0;
  55. foreach (var actor in actors)
  56. {
  57. switch (actor.SnoActor.Sno)
  58. {
  59. case 217142:
  60. meteorcircleDeco.Paint(layer, actor, actor.FloorCoordinate, null);
  61. if (Hud.Game.Me.HeroClassDefinition.HeroClass == HeroClass.Wizard && me.Stats.ResourceCurArcane == 0)
  62. {
  63. starpactstarttict = Hud.Game.CurrentGameTick;
  64. meteorstringDeco.Paint(layer, actor, actor.FloorCoordinate, Hud.Sno.SnoPowers.Wizard_Meteor.NameLocalized);
  65. break;
  66. }
  67. if (Hud.Game.Me.HeroClassDefinition.HeroClass == HeroClass.Wizard && remaining >= 0.1)
  68. {
  69. meteorstringDeco.Paint(layer, actor, actor.FloorCoordinate, Hud.Sno.SnoPowers.Wizard_Meteor.NameLocalized);
  70. break;
  71. }
  72. if (Hud.Game.Me.HeroClassDefinition.HeroClass == HeroClass.Wizard && remaining < 0.1 && remaining > 0)
  73. {
  74. if (me.Powers.BuffIsActive(430674, 1) && me.Powers.BuffIsActive(134456))
  75. {
  76. meteorvisionstringDeco.Paint(layer, actor, actor.FloorCoordinate, "VIS" + Hud.Sno.SnoPowers.Wizard_Meteor.NameLocalized + " + " + Hud.Sno.SnoPowers.Wizard_ArcaneTorrent.NameLocalized);
  77. break;
  78. }
  79. if (me.Powers.BuffIsActive(134456))
  80. {
  81. meteorstringDeco.Paint(layer, actor, actor.FloorCoordinate, Hud.Sno.SnoPowers.Wizard_Meteor.NameLocalized + " + " + Hud.Sno.SnoPowers.Wizard_ArcaneTorrent.NameLocalized);
  82. break;
  83. }
  84. if (me.Powers.BuffIsActive(430674, 1) && me.Powers.BuffIsActive(91549))
  85. {
  86. meteorvisionstringDeco.Paint(layer, actor, actor.FloorCoordinate, "VIS" + Hud.Sno.SnoPowers.Wizard_Meteor.NameLocalized + " + " + Hud.Sno.SnoPowers.Wizard_Disintegrate.NameLocalized);
  87. break;
  88. }
  89. if (me.Powers.BuffIsActive(91549))
  90. {
  91. meteorstringDeco.Paint(layer, actor, actor.FloorCoordinate, Hud.Sno.SnoPowers.Wizard_Meteor.NameLocalized + " + " + Hud.Sno.SnoPowers.Wizard_Disintegrate.NameLocalized);
  92. break;
  93. }
  94. }
  95. break;
  96. }
  97. }
  98. }
  99. }
  100. }
Add Comment
Please, Sign In to add comment