psychopyro212

Untitled

Feb 17th, 2017
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.51 KB | None | 0 0
  1. namespace Turbo.Plugins.PsychosPlugins
  2. {
  3.     using Turbo.Plugins.Default;
  4.     public class CursorMarkerPlugin : BasePlugin
  5.     {
  6.         //original idea from http://turbohud.freeforums.net/user/11902
  7.         public WorldDecoratorCollection CursorDecorator { get; set; }
  8.         public IScreenCoordinate CursorLocation {get; set; }
  9.         public bool InTownToggle { get; set; }
  10.         public CursorMarkerPlugin()
  11.         {
  12.             Enabled = true;
  13.             InTownToggle = false;
  14.         }
  15.  
  16.         public override void Load(IController hud)
  17.         {
  18.             base.Load(hud);
  19.  
  20.             CursorDecorator = new WorldDecoratorCollection(
  21.                 new GroundCircleDecorator(Hud)
  22.                 {
  23.                     Brush = Hud.Render.CreateBrush(255, 255, 255, 255, 5),
  24.                     Radius = 14f
  25.                 });
  26.         }
  27.  
  28.         public override void PaintWorld(WorldLayer layer)
  29.         {
  30.             if (Hud.Game.IsInTown && InTownToggle == true) return;
  31.  
  32.             bool HasSkill = false;
  33.  
  34.             var skills = Hud.Game.Me.Powers.SkillSlots;
  35.             foreach (var skill in skills)
  36.             {
  37.                 if (skill.SnoPower.Sno == 239137) HasSkill = true;
  38.             }
  39.             if (HasSkill == true)
  40.             {
  41.                 CursorLocation = Hud.Window.CreateScreenCoordinate(Hud.Window.CursorX,Hud.Window.CursorY);
  42.                 CursorDecorator.Paint(layer,null,CursorLocation.ToWorldCoordinate(),string.Empty);
  43.             }
  44.         }
  45.     }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment