Advertisement
WindyForce

FlyingDragon

Feb 10th, 2017
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.21 KB | None | 0 0
  1. using Turbo.Plugins.Default;
  2.  
  3. namespace Turbo.Plugins.WindyForce
  4. {
  5.     public class FlyingDragonPlugin : BasePlugin
  6.     {
  7.         public const uint DragonSno = 246562;
  8.         public WorldDecoratorCollection DragonDecorator { get; set; }
  9.  
  10.         public FlyingDragonPlugin()
  11.         {
  12.             Enabled = true;        
  13.         }
  14.  
  15.         public override void Load(IController hud)
  16.         {
  17.             base.Load(hud);
  18.  
  19.             DragonDecorator = new WorldDecoratorCollection(new GroundLabelDecorator(hud)
  20.             {
  21.                 BackgroundBrush = Hud.Render.CreateBrush(0, 0, 0, 0, 0),
  22.                 BorderBrush = Hud.Render.CreateBrush(0, 0, 0, 0, 2),
  23.                 TextFont = Hud.Render.CreateFont("tahoma", 20, 250, 250, 0, 0, true, false, false)
  24.             });
  25.         }
  26.  
  27.         public override void PaintWorld(WorldLayer layer)
  28.         {
  29.             var me = Hud.Game.Me;
  30.             var buf = me.Powers.GetBuff(DragonSno);            
  31.             if (null!= buf && buf.IconCounts.Length>=1 && buf.IconCounts[1] == 1)
  32.             {
  33.                 DragonDecorator.Paint(layer, me, me.FloorCoordinate, "DRAGON!!!");
  34.             }          
  35.         } //        
  36.     } //class
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement