Advertisement
coreyblack

DangerousAffixMonsterConfig.cs

Jul 28th, 2017
487
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 7.39 KB | None | 0 0
  1. namespace Turbo.Plugins.Jack.Monsters
  2. {
  3.     using System;
  4.     using Turbo.Plugins.Default;
  5.  
  6.     public class DangerousAffixMonsterConfig : BasePlugin, ICustomizer
  7.     {
  8.         public DangerousAffixMonsterConfig()
  9.         {
  10.             Enabled = true;
  11.         }
  12.  
  13.         public void Customize()
  14.         {
  15.             //Debug(); return;
  16.             Hud.RunOnPlugin<DangerousAffixMonsterPlugin>(plugin =>
  17.             {
  18.                 ////////////////////////////////////////////////
  19.                 // first, redefine plugin defaults if you want :
  20.                 ////////////////////////////////////////////////
  21.                 // DEFAULTS //
  22.                 //////////////
  23.                 // plugin.DefaultMapShapePainter = new CircleShapePainter(Hud);
  24.                 // plugin.DefaultRadiusTransformator = new StandardPingRadiusTransformator(Hud, 500);
  25.                 // plugin.DefaultBackgroundBrush = Hud.Render.CreateBrush(255, 0, 0, 0, 0);
  26.                 // plugin.DefaultForegroundBrush = Hud.Render.CreateBrush(255, 255, 0, 0, 0);
  27.                  plugin.DefaultEliteAffixesFont = Hud.Render.CreateFont("tahoma", 8f, 200, 255, 255, 0, false, false, 128, 0, 0, 0, true);
  28.                  plugin.DefaultMinionAffixesFont = Hud.Render.CreateFont("tahoma", 8f, 200, 255, 255, 0, false, false, 128, 0, 0, 0, true);
  29.                 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  30.  
  31.                 // A complete example for Juggernaut overriding all defaults
  32.                 // You don't need to redefine everything, it's just for the sake of the example ;p
  33.                 plugin.DefineDangerousAffix(MonsterAffix.Juggernaut,
  34.                     (a) => a.NameLocalized.Substring(0, 0)+"\u2622", // or a string like "Jug"
  35.                     priority: 420, // higher first
  36.                     // decorator background
  37.                     bgBrush: Hud.Render.CreateBrush(255, 0, 0, 0, 0), // default
  38.                     bgShapePainter: new CircleShapePainter(Hud), // default new CircleShapePainter(Hud)
  39.                     bgPing: true, // default false
  40.                     bgRadiusTransformator: new StandardPingRadiusTransformator(Hud, 500), // default
  41.                     bgEliteRadius: 8, // default 8
  42.                     bgMinionRadius: 6, // default 6
  43.                     // decorator foreground
  44.                     fgBrush: Hud.Render.CreateBrush(255, 255, 0, 0, 1), // default
  45.                     fgShapePainter: new RotatingTriangleShapePainter(Hud), // default new CircleShapePainter(Hud)
  46.                     fgPing: true, // default false
  47.                     fgRadiusTransformator: new StandardPingRadiusTransformator(Hud, 500), // default
  48.                     fgEliteRadius: 6, // default 6
  49.                     fgMinionRadius: 2, // default 2
  50.                     // labels fonts
  51.                     eliteFont: Hud.Render.CreateFont("tahoma", 10f, 200, 255, 0, 0, false, false, 128, 0, 0, 0, true),
  52.                     minionFont: Hud.Render.CreateFont("tahoma", 7f, 200, 255, 0, 0, false, false, 128, 0, 0, 0, true),
  53.                     // minions
  54.                     showMinionDecorators: false, // default false
  55.                     showMinionAffixesNames: false // default false
  56.                 );
  57.                 plugin.DefineDangerousAffix(MonsterAffix.Illusionist, (a) => a.NameLocalized.Substring(0, 0)+"\uD83C\uDD78");
  58.                 //plugin.DefineDangerousAffix(MonsterAffix.Reflect, (a) => a.NameLocalized.Substring(0, 0)+"\uD83C\uDD81");
  59.                 /* plugin.DefineDangerousAffix(MonsterAffix.Poison, (a) => a.NameLocalized.Substring(0, 0)+"\uD83C\uDD7F",
  60.                     fgBrush: Hud.Render.CreateBrush(255, 0, 250, 0, 0),
  61.                     eliteFont: Hud.Render.CreateFont("tahoma", 8f, 200, 0, 250, 0, false, false, 128, 0, 0, 0, true),
  62.                     minionFont: Hud.Render.CreateFont("tahoma", 7f, 200, 0, 250, 0, false, false, 128, 0, 0, 0, true)
  63.                 ); */
  64.                 plugin.DefineDangerousAffix(MonsterAffix.Arcane, (a) => a.NameLocalized.Substring(0, 0)+"\u26a1");
  65.                 plugin.DefineDangerousAffix(MonsterAffix.Shielding, (a) => a.NameLocalized.Substring(0, 0)+"\u26e8");
  66.                 plugin.DefineDangerousAffix(MonsterAffix.FireChains, (a) => a.NameLocalized.Substring(0, 0)+"\u287E");
  67.                 //plugin.DefineDangerousAffix(MonsterAffix.FrozenPulse, (a) => a.NameLocalized.Substring(0, 0)+"\u2738");
  68.                 //plugin.DefineDangerousAffix(MonsterAffix.ExtraHealth, (a) => a.NameLocalized.Substring(0, 0)+"\uD83C\uDD74");
  69.                 //plugin.DefineDangerousAffix(MonsterAffix.Teleporter, (a) => a.NameLocalized.Substring(0, 0)+"\uD83C\uDD83");
  70.                 //plugin.DefineDangerousAffix(MonsterAffix.Nightmarish, (a) => a.NameLocalized.Substring(0, 0)+"\uD83C\uDD75");
  71.                 //plugin.DefineDangerousAffix(MonsterAffix.Fast, (a) => a.NameLocalized.Substring(0, 4));
  72.                
  73.                 //plugin.DefineDangerousAffix(MonsterAffix.Molten, (a) => a.NameLocalized.Substring(0, 4));
  74.                 //plugin.DefineDangerousAffix(MonsterAffix.Desecrator, (a) => a.NameLocalized.Substring(0, 0)+"\uD83C\uDD73");
  75.                 //plugin.DefineDangerousAffix(MonsterAffix.Wormhole, (a) => a.NameLocalized.Substring(0, 0)+"\uD83C\uDD86");
  76.  
  77.                 //plugin.DefineDangerousAffix(MonsterAffix.Waller, string.Empty);
  78.                 /**/
  79.             });
  80.             // the config is done, disable this plugin
  81.             Enabled = false;
  82.         }
  83.  
  84.         public void Debug()
  85.         {
  86.             Hud.RunOnPlugin<DangerousAffixMonsterPlugin>(plugin =>
  87.             {
  88.                 var p = 420;
  89.                 foreach (MonsterAffix affix in Enum.GetValues(typeof (MonsterAffix)))
  90.                 {
  91.                     plugin.DefineDangerousAffix(affix,
  92.                         (a) => a.NameLocalized.Substring(0, 3), // or a string like "Jug"
  93.                         priority: p--, // higher first
  94.                         // decorator background
  95.                         bgBrush: Hud.Render.CreateBrush(255, 0, 0, 0, 0),
  96.                         bgShapePainter: new CircleShapePainter(Hud), // default new CircleShapePainter(Hud)
  97.                         bgPing: true, // default false
  98.                         bgRadiusTransformator: new StandardPingRadiusTransformator(Hud, 666),
  99.                         bgEliteRadius: 8, // default 8
  100.                         bgMinionRadius: 6, // default 6
  101.                         // decorator foreground
  102.                         fgBrush: Hud.Render.CreateBrush(255, 255, 0, 0, 1),
  103.                         fgShapePainter: new RotatingTriangleShapePainter(Hud), // default new CircleShapePainter(Hud)
  104.                         fgPing: false, // default false
  105.                         fgRadiusTransformator: new StandardPingRadiusTransformator(Hud, 666),
  106.                         fgEliteRadius: 6, // default 6
  107.                         fgMinionRadius: 2, // default 2
  108.                         // labels fonts
  109.                         eliteFont: Hud.Render.CreateFont("tahoma", 10f, 200, 255, 0, 0, false, false, 128, 0, 0, 0, true),
  110.                         minionFont: Hud.Render.CreateFont("tahoma", 7f, 200, 255, 0, 0, false, false, 128, 0, 0, 0, true),
  111.                         // minions
  112.                         showMinionDecorators: true, // default false
  113.                         showMinionAffixesNames: true // default false
  114.                         );
  115.                 }
  116.             });
  117.         }
  118.     }
  119. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement