Advertisement
Guest User

ZeiStonePlugin

a guest
May 3rd, 2017
852
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.48 KB | None | 0 0
  1. //Note: I've used many snippets from other plugins as template/idea to create this one.Plugins such as GargsMasterPlugin, BountyCacheIndicatorPlugin, DemonForgePlugin & last ZeiCircleForBoss plugin for powerbuff instead of Zeistone itemSno.
  2.  
  3. using System.Linq;
  4. using Turbo.Plugins.Default;
  5.  
  6. namespace Turbo.Plugins.Everknown
  7. {
  8.     public class ZeiStonePlugin : BasePlugin, IInGameWorldPainter
  9.     {
  10.         public bool ShowInTown { get; set; }
  11.         public bool ShowZeiCircle { get; set; }
  12.         public GroundCircleDecorator ZeiYardIndicator { get; set; }
  13.  
  14.         public ZeiStonePlugin()
  15.         {
  16.             Enabled = true;
  17.         }
  18.         public override void Load(IController hud)
  19.         {
  20.             base.Load(hud);
  21.             ShowInTown = false;
  22.             ShowZeiCircle = true;
  23.  
  24.             ZeiYardIndicator = new GroundCircleDecorator(Hud)
  25.             {
  26.                 Brush = Hud.Render.CreateBrush(50, 14, 200, 245, 1.5f),
  27.                 Radius = 50f
  28.             };
  29.         }
  30.  
  31.         public void PaintWorld(WorldLayer layer)
  32.         {
  33.             if (Hud.Game.IsInGame && !(Hud.Game.Me.IsInTown && !ShowInTown))
  34.             {
  35.                 var me = Hud.Game.Me;
  36.                 if (ShowZeiCircle)
  37.                 {
  38.                     if (me.Powers.BuffIsActive(403468, 0))
  39.                     {
  40.                         ZeiYardIndicator.Paint(me, me.FloorCoordinate, null);
  41.                     }
  42.                 }
  43.             }
  44.         }
  45.     }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement