Advertisement
psychopyro212

Untitled

Feb 11th, 2017
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 5.89 KB | None | 0 0
  1. namespace Turbo.Plugins.PsychosPlugins
  2. {
  3.     using Turbo.Plugins.Default;
  4.  
  5.     public class ClassMarkersPlugin : BasePlugin
  6.     {
  7.         public MapShapeDecorator BarbaianCircleDecorator, CrusaderCircleDecorator, DemonhunterCircleDecorator,
  8.         MonkCircleDecorator, WitchDoctorCircleDecorator, WizardCircleDecorator;
  9.         public GroundCircleDecorator BarbaianGroundCircleDecorator, CrusaderGroundCircleDecorator, DemonhunterGroundCircleDecorator,
  10.         MonkGroundCircleDecorator, WitchDoctorGroundCircleDecorator, WizardGroundCircleDecorator;
  11.         public bool MyPlayerCircle, OtherPlayersCircles;
  12.  
  13.         public ClassMarkersPlugin()
  14.         {
  15.             Enabled = true;
  16.         }
  17.  
  18.         public override void Load(IController hud)
  19.         {
  20.             base.Load(hud);
  21.  
  22.                 MyPlayerCircle = true;
  23.                 OtherPlayersCircles = true;
  24.  
  25.                 BarbaianCircleDecorator = new MapShapeDecorator(Hud)
  26.                 {
  27.                     Brush = Hud.Render.CreateBrush(200, 250, 10, 10, 5),
  28.                     ShapePainter = new CircleShapePainter(Hud),
  29.                     Radius = 2f,
  30.                 };
  31.  
  32.                 BarbaianGroundCircleDecorator = new GroundCircleDecorator(Hud)
  33.                 {
  34.                     Brush = Hud.Render.CreateBrush(200, 250, 10, 10, 5),
  35.                     Radius = 4f,
  36.                 };
  37.  
  38.                 CrusaderCircleDecorator = new MapShapeDecorator(Hud)
  39.                 {
  40.                     Brush = Hud.Render.CreateBrush(240, 0, 200, 250, 5),
  41.                     ShapePainter = new CircleShapePainter(Hud),
  42.                     Radius = 2f,
  43.                 };
  44.  
  45.                 CrusaderGroundCircleDecorator = new GroundCircleDecorator(Hud)
  46.                 {
  47.                     Brush = Hud.Render.CreateBrush(240, 0, 200, 250, 5),
  48.                     Radius = 4f
  49.                 };
  50.  
  51.                 DemonhunterCircleDecorator = new MapShapeDecorator(Hud)
  52.                 {
  53.                     Brush = Hud.Render.CreateBrush(255, 0, 0, 200, 5),
  54.                     ShapePainter = new CircleShapePainter(Hud),
  55.                     Radius = 2f,
  56.                 };
  57.  
  58.                 DemonhunterGroundCircleDecorator = new GroundCircleDecorator(Hud)
  59.                 {
  60.                     Brush = Hud.Render.CreateBrush(255, 0, 0, 200, 5),
  61.                     Radius = 4f
  62.                 };
  63.  
  64.                 MonkCircleDecorator = new MapShapeDecorator(Hud)
  65.                 {
  66.                     Brush = Hud.Render.CreateBrush(245, 120, 0, 200, 5),
  67.                     ShapePainter = new CircleShapePainter(Hud),
  68.                     Radius = 2f,
  69.                 };
  70.  
  71.                 MonkGroundCircleDecorator = new GroundCircleDecorator(Hud)
  72.                 {
  73.                     Brush = Hud.Render.CreateBrush(245, 120, 0, 200, 5),
  74.                     Radius = 4f
  75.                 };
  76.  
  77.                 WitchDoctorCircleDecorator = new MapShapeDecorator(Hud)
  78.                 {
  79.                     Brush = Hud.Render.CreateBrush(155, 0, 155, 125, 5),
  80.                     ShapePainter = new CircleShapePainter(Hud),
  81.                     Radius = 2f,
  82.                 };
  83.  
  84.                 WitchDoctorGroundCircleDecorator = new GroundCircleDecorator(Hud)
  85.                 {
  86.                     Brush = Hud.Render.CreateBrush(155, 0, 155, 125, 5),
  87.                     Radius = 4f
  88.                 };
  89.  
  90.                 WizardCircleDecorator = new MapShapeDecorator(Hud)
  91.                 {
  92.                     Brush = Hud.Render.CreateBrush(255, 250, 50, 180, 5),
  93.                     ShapePainter = new CircleShapePainter(Hud),
  94.                     Radius = 2f,
  95.                 };
  96.  
  97.                 WizardGroundCircleDecorator = new GroundCircleDecorator(Hud)
  98.                 {
  99.                     Brush = Hud.Render.CreateBrush(255, 250, 50, 180, 5),
  100.                     Radius = 4f
  101.                 };
  102.         }
  103.  
  104.            
  105.  
  106.         public override void Customize()
  107.         {
  108.             if (OtherPlayersCircles == true)
  109.             {
  110.                 Hud.RunOnPlugin<OtherPlayersPlugin>(plugin =>
  111.                 {
  112.                     plugin.NameOffsetZ = 0;              
  113.                     plugin.DecoratorByClass[HeroClass.Barbarian].Decorators.Add(BarbaianCircleDecorator);
  114.                     plugin.DecoratorByClass[HeroClass.Barbarian].Decorators.Add(BarbaianGroundCircleDecorator);
  115.                     plugin.DecoratorByClass[HeroClass.Crusader].Decorators.Add(CrusaderCircleDecorator);
  116.                     plugin.DecoratorByClass[HeroClass.Crusader].Decorators.Add(CrusaderGroundCircleDecorator);
  117.                     plugin.DecoratorByClass[HeroClass.DemonHunter].Decorators.Add(DemonhunterCircleDecorator);
  118.                     plugin.DecoratorByClass[HeroClass.DemonHunter].Decorators.Add(DemonhunterGroundCircleDecorator);
  119.                     plugin.DecoratorByClass[HeroClass.Monk].Decorators.Add(MonkCircleDecorator);
  120.                     plugin.DecoratorByClass[HeroClass.Monk].Decorators.Add(MonkGroundCircleDecorator);
  121.                     plugin.DecoratorByClass[HeroClass.WitchDoctor].Decorators.Add(WitchDoctorCircleDecorator);
  122.                     plugin.DecoratorByClass[HeroClass.WitchDoctor].Decorators.Add(WitchDoctorGroundCircleDecorator);
  123.                     plugin.DecoratorByClass[HeroClass.Wizard].Decorators.Add(WizardCircleDecorator);
  124.                     plugin.DecoratorByClass[HeroClass.Wizard].Decorators.Add(WizardGroundCircleDecorator);
  125.                 });
  126.             }
  127.         }
  128.  
  129.         public override void PaintWorld(WorldLayer layer)
  130.         {
  131.             if (MyPlayerCircle == true)
  132.             {
  133.                 Hud.RunOnPlugin<OtherPlayersPlugin>(plugin =>
  134.                 {
  135.                     plugin.DecoratorByClass[Hud.Game.Me.HeroClassDefinition.HeroClass].Paint(layer, Hud.Game.Me, Hud.Game.Me.FloorCoordinate, string.Empty);
  136.                 });
  137.             }
  138.         }
  139.     }
  140. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement