RNNCode

PandemoniumDecorators

Jun 22nd, 2025 (edited)
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 8.68 KB | None | 0 0
  1. using System.Linq;
  2. using Turbo.Plugins.Default;
  3.  
  4. namespace Turbo.Plugins.RNN
  5. {
  6.     public class PandemoniumDecorators : BasePlugin, IInGameWorldPainter
  7.     {
  8.         public WorldDecoratorCollection ChickenRain { get; set; }
  9.         public WorldDecoratorCollection EnergyTwister { get; set; }
  10.         public WorldDecoratorCollection AdriaGeyser { get; set; }
  11.         public WorldDecoratorCollection GoldenShower { get; set; }
  12.         public WorldDecoratorCollection MeteorImpact { get; set; }
  13.         public WorldDecoratorCollection AngelTrooper { get; set; }
  14.  
  15.         public bool ShowChickenRain { get; set; }
  16.         public bool ShowEnergyTwister { get; set; }
  17.         public bool ShowAdriaGeyser { get; set; }
  18.         public bool ShowGoldenShower { get; set; }
  19.         public bool ShowMeteorImpact { get; set; }
  20.         public bool ShowAngelTrooper { get; set; }
  21.         public bool OnlyGR { get; set; }
  22.  
  23.         public PandemoniumDecorators()
  24.         {
  25.             Enabled = true;
  26.         }
  27.  
  28.         public override void Load(IController hud)
  29.         {
  30.             base.Load(hud);
  31.  
  32.             OnlyGR = true;
  33.             ShowChickenRain = false;
  34.             ShowEnergyTwister = true;
  35.             ShowAdriaGeyser = true;
  36.             ShowGoldenShower = true;
  37.             ShowMeteorImpact = true;
  38.             ShowAngelTrooper = true;
  39.  
  40.             ChickenRain = new WorldDecoratorCollection(
  41.                 new MapShapeDecorator(Hud)
  42.                 {
  43.                     Brush = Hud.Render.CreateBrush(180, 255, 255, 98, 2),
  44.                     Radius = 6.0f,
  45.                     ShapePainter = new CircleShapePainter(Hud),
  46.                 },
  47.                 new GroundCircleDecorator(Hud)
  48.                 {
  49.                     Radius = 5.0f,
  50.                     Brush = Hud.Render.CreateBrush(200, 255, 255, 98, 4, SharpDX.Direct2D1.DashStyle.Dash),
  51.                     RadiusTransformator = new StandardPingRadiusTransformator(Hud, 500) {  RadiusMinimumMultiplier = 0.8f, }
  52.                 },
  53.                 new GroundLabelDecorator(Hud)
  54.                 {
  55.                     //CountDownFrom = 5,
  56.                     TextFont = Hud.Render.CreateFont("tahoma", 10, 255, 255, 255, 98, true, false, 128, 0, 0, 0, true),
  57.                     ForceOnScreen = false,
  58.                 }
  59.             );
  60.  
  61.             GoldenShower = new WorldDecoratorCollection(
  62.                 new MapShapeDecorator(Hud)
  63.                 {
  64.                     ShapePainter = new CircleShapePainter(Hud),
  65.                     Brush = Hud.Render.CreateBrush(180, 255, 255, 98, 2),
  66.                     Radius = 6.0f,
  67.                 },
  68.                 new GroundCircleDecorator(Hud)
  69.                 {
  70.                     Radius = 6.0f,
  71.                     Brush = Hud.Render.CreateBrush(200, 255, 255, 98, 4, SharpDX.Direct2D1.DashStyle.DashDot),
  72.                 },
  73.                 new GroundLabelDecorator(Hud)
  74.                 {
  75.                     //CountDownFrom = 2.1f,
  76.                     TextFont = Hud.Render.CreateFont("tahoma", 10, 255, 255, 255, 98, true, false, 128, 0, 0, 0, true),
  77.                     ForceOnScreen = false,
  78.                 }
  79.             );
  80.  
  81.             MeteorImpact = new WorldDecoratorCollection(
  82.                 new MapShapeDecorator(Hud)
  83.                 {
  84.                     Radius = 6.0f,
  85.                     Brush = Hud.Render.CreateBrush(180, 255, 255, 98, 2),
  86.                     ShapePainter = new CircleShapePainter(Hud),
  87.                 },
  88.                 new GroundCircleDecorator(Hud)
  89.                 {
  90.                    Radius = 6.0f,
  91.                    Brush = Hud.Render.CreateBrush(200, 255, 255, 98, 4, SharpDX.Direct2D1.DashStyle.Dash),
  92.                 },
  93.                 new GroundLabelDecorator(Hud)
  94.                 {
  95.                     //CountDownFrom = 1.0f,
  96.                     TextFont = Hud.Render.CreateFont("tahoma", 10, 255, 255, 255, 98, true, false, 128, 0, 0, 0, true),
  97.                     ForceOnScreen = false,
  98.                 }
  99.             );
  100.  
  101.             AdriaGeyser = new WorldDecoratorCollection(
  102.                 new MapShapeDecorator(Hud)
  103.                 {
  104.                     Radius = 15.0f,
  105.                     Brush = Hud.Render.CreateBrush(180, 255, 150, 255, 2, SharpDX.Direct2D1.DashStyle.Dash),
  106.                     ShapePainter = new CircleShapePainter(Hud),
  107.                 },
  108.                 new GroundCircleDecorator(Hud)
  109.                 {
  110.                     Radius = 15,
  111.                     Brush = Hud.Render.CreateBrush(200, 255, 150, 255, 4, SharpDX.Direct2D1.DashStyle.Dash),
  112.                 },
  113.                 new GroundLabelDecorator(Hud)
  114.                 {
  115.                     CountDownFrom = 3,
  116.                     TextFont = Hud.Render.CreateFont("tahoma", 10, 255, 255, 200, 200, true, false, 128, 0, 0, 0, true),
  117.                 },
  118.                 new GroundTimerDecorator(Hud)
  119.                 {
  120.                     CountDownFrom = 3,
  121.                     BackgroundBrushEmpty = Hud.Render.CreateBrush(128, 0, 0, 0, 0),
  122.                     BackgroundBrushFill = Hud.Render.CreateBrush(230, 255, 150, 255, 0),
  123.                     Radius = 25,
  124.                 }
  125.             );
  126.  
  127.             EnergyTwister = new WorldDecoratorCollection(
  128.                 new MapShapeDecorator(Hud)
  129.                 {
  130.                     Radius = 10.0f,
  131.                     Brush = Hud.Render.CreateBrush(180, 255, 201, 132, 2),
  132.                     ShapePainter = new CircleShapePainter(Hud),
  133.                 },
  134.                 new GroundCircleDecorator(Hud)
  135.                 {
  136.                     Radius = 10.0f,
  137.                     Brush = Hud.Render.CreateBrush(200, 255, 201, 132, 4, SharpDX.Direct2D1.DashStyle.Dash),
  138.                 },
  139.                 new GroundLabelDecorator(Hud)
  140.                 {
  141.                     CountDownFrom = 30,
  142.                     TextFont = Hud.Render.CreateFont("tahoma", 10f, 255, 225, 225, 225, true, false, 175, 0, 0, 0, true),
  143.                 },
  144.                 new GroundTimerDecorator(Hud)
  145.                 {
  146.                     CountDownFrom = 30,
  147.                     BackgroundBrushEmpty = Hud.Render.CreateBrush(150, 25, 25, 25, 0),
  148.                     BackgroundBrushFill = Hud.Render.CreateBrush(200, 128, 128, 128, 0),
  149.                     Radius = 25,
  150.                 }
  151.             );
  152.  
  153.             AngelTrooper = new WorldDecoratorCollection(
  154.                 new MapShapeDecorator(Hud)
  155.                 {
  156.                     Radius = 6.0f,
  157.                     Brush = Hud.Render.CreateBrush(180, 159, 240, 250, 2),
  158.                     ShapePainter = new CircleShapePainter(Hud),
  159.                 },
  160.                 new GroundLabelDecorator(Hud)
  161.                 {
  162.                     CountDownFrom = 30,
  163.                     TextFont = Hud.Render.CreateFont("tahoma", 10f, 255, 255, 255, 255, true, false, 175, 0, 0, 0, true),
  164.                 },
  165.                 new GroundTimerDecorator(Hud)
  166.                 {
  167.                     CountDownFrom = 30,
  168.                     BackgroundBrushEmpty = Hud.Render.CreateBrush(150, 126, 126, 205, 0),
  169.                     BackgroundBrushFill = Hud.Render.CreateBrush(200, 122, 182, 242, 0),
  170.                     Radius = 20,
  171.                 }
  172.             );
  173.         }
  174.  
  175.         public void PaintWorld(WorldLayer layer)
  176.         {
  177.             if (!Hud.Game.IsInGame || !Hud.Game.Me.Powers.BuffIsActive(483967) || (Hud.Game.Me.InGreaterRiftRank == 0 && OnlyGR)) return;
  178.  
  179.             foreach (IActor actor in Hud.Game.Actors)
  180.             {
  181.                 switch (actor.SnoActor.Sno)
  182.                 {
  183.                     case ActorSnoEnum._generic_proxy:               // 50 Chikens
  184.                             if (ShowChickenRain && actor.GetAttributeValueAsInt(Hud.Sno.Attributes.Power_Buff_0_Visual_Effect_None, 483859) == 1)
  185.                                 ChickenRain.Paint(layer, actor, actor.FloorCoordinate, "Rain\nChickens");
  186.                             break;
  187.  
  188.                     case ActorSnoEnum._zoltunkulle_energytwister:   // 100 Twister
  189.                             if (ShowEnergyTwister)
  190.                                 EnergyTwister.Paint(layer, actor, actor.FloorCoordinate, null);
  191.                             break;
  192.  
  193.                     case ActorSnoEnum._x1_adria_geyser:             // 150 Geyser
  194.                             if (ShowAdriaGeyser &&  actor.GetAttributeValueAsInt(Hud.Sno.Attributes.Power_Buff_0_Visual_Effect_None, 483889) == 1)
  195.                                 AdriaGeyser.Paint(layer, actor, actor.FloorCoordinate, null);
  196.                             break;
  197.  
  198.                     case ActorSnoEnum._p1_greed_goldenshower_impactproxy:   // 200 Golden
  199.                             if (ShowGoldenShower && actor.GetAttributeValueAsInt(Hud.Sno.Attributes.Power_Buff_0_Visual_Effect_None, 483865) == 1)
  200.                                 GoldenShower.Paint(layer, actor, actor.FloorCoordinate, null);
  201.                             break;
  202.  
  203.                     case ActorSnoEnum._diablo_meteor_impact:                // 400 Meteors
  204.                             if (ShowMeteorImpact && actor.GetAttributeValueAsInt(Hud.Sno.Attributes.Power_Buff_1_Visual_Effect_None, 483884) == 1)
  205.                                 MeteorImpact.Paint(layer, actor, actor.FloorCoordinate, null);
  206.                             break;
  207.  
  208.                     case ActorSnoEnum._pandemonium_angel_trooper:           //  500 Angels
  209.                             if (ShowAngelTrooper)
  210.                                 AngelTrooper.Paint(layer, actor, actor.FloorCoordinate, null);
  211.                             break;
  212.                 }
  213.             }
  214.         }
  215.     }
  216. }
Add Comment
Please, Sign In to add comment