Advertisement
Litespeed0

BloodSpringPlugin.cs v7.2

Feb 19th, 2017
1,223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.41 KB | None | 0 0
  1. using System.Linq;
  2. using Turbo.Plugins.Default;
  3.  
  4. namespace Turbo.Plugins.Ls
  5. {
  6. public class BloodSpringPlugin : BasePlugin, IInGameWorldPainter
  7. {
  8.  
  9. public WorldDecoratorCollection BloodSpringDecoratorSmall { get; set; }
  10. public WorldDecoratorCollection BloodSpringDecoratorMedium { get; set; }
  11. public WorldDecoratorCollection BloodSpringDecoratorLarge { get; set; }
  12.  
  13. public BloodSpringPlugin()
  14. {
  15. Enabled = true;
  16. }
  17.  
  18. public override void Load(IController hud)
  19. {
  20. base.Load(hud);
  21. BloodSpringDecoratorSmall = new WorldDecoratorCollection(
  22. new MapShapeDecorator(Hud)
  23. {
  24. Brush = Hud.Render.CreateBrush(120, 255, 0, 0, 3),
  25. Radius = 6.0f,
  26. ShapePainter = new CircleShapePainter(Hud),
  27. RadiusTransformator = new StandardPingRadiusTransformator(Hud, 555),
  28. },
  29. new GroundCircleDecorator(Hud)
  30. {
  31. Brush = Hud.Render.CreateBrush(120, 255, 0, 0, 5, SharpDX.Direct2D1.DashStyle.Dash),
  32. Radius = 6.0f,
  33. }
  34. );
  35.  
  36. BloodSpringDecoratorMedium = new WorldDecoratorCollection(
  37. new MapShapeDecorator(Hud)
  38. {
  39. Brush = Hud.Render.CreateBrush(120, 255, 0, 0, 3),
  40. Radius = 11.0f,
  41. ShapePainter = new CircleShapePainter(Hud),
  42. RadiusTransformator = new StandardPingRadiusTransformator(Hud, 555),
  43. },
  44. new GroundCircleDecorator(Hud)
  45. {
  46. Brush = Hud.Render.CreateBrush(120, 255, 0, 0, 5, SharpDX.Direct2D1.DashStyle.Dash),
  47. Radius = 11.0f,
  48. }
  49. );
  50.  
  51. BloodSpringDecoratorLarge = new WorldDecoratorCollection(
  52. new MapShapeDecorator(Hud)
  53. {
  54. Brush = Hud.Render.CreateBrush(120, 255, 0, 0, 3),
  55. Radius = 11.0f,
  56. ShapePainter = new CircleShapePainter(Hud),
  57. RadiusTransformator = new StandardPingRadiusTransformator(Hud, 555),
  58. },
  59. new GroundCircleDecorator(Hud)
  60. {
  61. Brush = Hud.Render.CreateBrush(120, 255, 0, 0, 5, SharpDX.Direct2D1.DashStyle.Dash),
  62. Radius = 19.0f,
  63. }
  64. );
  65. }
  66.  
  67. public void PaintWorld(WorldLayer layer)
  68. {
  69.  
  70. var actors = Hud.Game.Actors;
  71. foreach (var actor in actors)
  72. {
  73.  
  74. switch (actor.SnoActor.Sno)
  75. {
  76.  
  77. case 332924: //small blood spring
  78. BloodSpringDecoratorSmall.Paint(layer, actor, actor.FloorCoordinate, null);
  79. break;
  80. case 332922: //medium blood spring
  81. BloodSpringDecoratorMedium.Paint(layer, actor, actor.FloorCoordinate, null);
  82. break;
  83. case 332923: //large blood spring
  84. BloodSpringDecoratorLarge.Paint(layer, actor, actor.FloorCoordinate, null);
  85. break;
  86. }
  87. }
  88.  
  89. }
  90. }
  91. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement