s4000

MouseCircle

Aug 31st, 2019
638
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using Turbo.Plugins.Default;
  2.  
  3. namespace Turbo.Plugins.DAV
  4. {
  5.     public class MouseCircle : BasePlugin, IInGameWorldPainter {
  6.         public bool showCombat { get; set; }
  7.         public float xPos { get; set; }
  8.         public float yPos { get; set; }
  9.         public IFont locFont { get; set; }
  10.         public IBrush mouseBrush1 { get; set; }
  11.         public IBrush mouseBrush2 { get; set; }
  12.  
  13.         private float screenW { get; set; }
  14.         private float screenH { get; set; }
  15.  
  16.         public MouseCircle() {
  17.             Enabled = true;
  18.         }
  19.  
  20.         public override void Load(IController hud) {
  21.             base.Load(hud);
  22.  
  23.             showCombat = false;
  24.             xPos = 385 / 1920f;
  25.             yPos = 10 / 1080f;
  26.  
  27.             mouseBrush1 = Hud.Render.CreateBrush(255, 255, 255, 255, 2);
  28.             mouseBrush2 = Hud.Render.CreateBrush(255, 255, 153, 51, 2);
  29.             locFont = Hud.Render.CreateFont("arial", 8, 200, 255, 255, 255, true, false, false);
  30.  
  31.             screenW = Hud.Window.Size.Width;
  32.             screenH = Hud.Window.Size.Height;
  33.         }
  34.  
  35.         public void PaintWorld(WorldLayer layer) {
  36.             var x = Hud.Window.CursorX;
  37.             var y = Hud.Window.CursorY;
  38.  
  39.             if (Hud.Game.IsInTown) {
  40.                 var location = "Absoulate\t" + x.ToString("F0") + "\t" + y.ToString("F0") + "\nPercent\t\t" + (x/screenW).ToString("F3") + "\t" + (y/screenH).ToString("F3");
  41.                 locFont.DrawText(location, screenW * xPos, screenH * yPos);
  42.             }
  43.             else if (showCombat) {
  44.                 mouseBrush1.DrawLine(x, y - 50, x, y - 30);
  45.                 mouseBrush1.DrawLine(x, y + 50, x, y + 30);
  46.                 mouseBrush1.DrawLine(x - 50, y, x - 30, y);
  47.                 mouseBrush1.DrawLine(x + 50, y, x + 30, y);
  48.                 mouseBrush2.DrawEllipse(x, y, 35, 35);
  49.                 mouseBrush2.DrawEllipse(x, y, 45, 45);
  50.             }
  51.         }
  52.     }
  53. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×