Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Linq;
- using Turbo.Plugins.Default;
- namespace Turbo.Plugins.RNN
- {
- public class BKCursorOnMonster : BasePlugin, IInGameWorldPainter
- {
- public IFont TextFontR { get; set; }
- public IFont TextFontG { get; set; }
- public IBrush brush { get; set; }
- public WorldDecoratorCollection HitBoxDecorator { get; set; }
- public WorldDecoratorCollection MiniMapDecorator { get; set; }
- public WorldDecoratorCollection MiniMap2Decorator { get; set; }
- public WorldDecoratorCollection PointerDecorator { get; set; }
- public WorldDecoratorCollection Pointer2Decorator { get; set; }
- public WorldDecoratorCollection Mira { get; set; }
- public bool ShowInMiniMap { get; set; }
- public bool ShowLineToMonster { get; set; }
- public bool OnlyGR { get; set; }
- public BKCursorOnMonster()
- {
- Enabled = true;
- }
- public override void Load(IController hud)
- {
- base.Load(hud);
- ShowInMiniMap = true;
- ShowLineToMonster = true;
- OnlyGR = false;
- TextFontG = Hud.Render.CreateFont("tahoma", 10, 255, 0, 255, 0, false, false, 250, 0, 0, 0, true);
- TextFontR = Hud.Render.CreateFont("tahoma", 9, 255, 255, 255, 0, false, false, 250, 0, 0, 0, true);
- brush = Hud.Render.CreateBrush(50, 255, 255, 220, 2, SharpDX.Direct2D1.DashStyle.Dash, SharpDX.Direct2D1.CapStyle.Flat, SharpDX.Direct2D1.CapStyle.Flat);
- HitBoxDecorator = new WorldDecoratorCollection(
- new GroundCircleDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(150, 200, 200, 200, 1),
- Radius = -1
- },
- new GroundCircleDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(50, 200, 200, 200, 0),
- Radius = -1
- }
- );
- Mira = new WorldDecoratorCollection(
- new GroundShapeDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(150, 255, 0, 50, 3),
- ShadowBrush = Hud.Render.CreateBrush(96, 0, 0, 0, 1),
- ShapePainter = WorldStarShapePainter.NewCross(Hud),
- Radius = 4
- },
- new GroundCircleDecorator(Hud)
- {
- //Brush = Hud.Render.CreateBrush(255, 55, 255, 55, 4),
- Brush = Hud.Render.CreateBrush(255, 255, 0, 50, -3),
- Radius = -1
- }
- );
- MiniMapDecorator = new WorldDecoratorCollection(
- new MapShapeDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(180, 255, 255, 255, 1, SharpDX.Direct2D1.DashStyle.Dash, SharpDX.Direct2D1.CapStyle.Flat, SharpDX.Direct2D1.CapStyle.Flat),
- ShapePainter = new LineFromMeShapePainter(Hud),
- Radius = 2
- },
- new MapShapeDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(180, 255, 55, 55, 1),
- ShapePainter = new PlusShapePainter(Hud),
- Radius = 8
- },
- new MapShapeDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(180, 255, 55, 55, 1),
- ShapePainter = new CircleShapePainter(Hud),
- Radius = 5
- }
- );
- MiniMap2Decorator = new WorldDecoratorCollection(
- new MapShapeDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(180, 255, 255, 255, 1, SharpDX.Direct2D1.DashStyle.Dash, SharpDX.Direct2D1.CapStyle.Flat, SharpDX.Direct2D1.CapStyle.Flat),
- ShapePainter = new LineFromMeShapePainter(Hud),
- Radius = 2
- },
- new MapShapeDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(180, 55, 255, 55, 1),
- ShapePainter = new PlusShapePainter(Hud),
- Radius = 8
- },
- new MapShapeDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(180, 55, 255, 55, 1),
- ShapePainter = new CircleShapePainter(Hud),
- Radius = 5
- }
- );
- PointerDecorator = new WorldDecoratorCollection(
- new GroundShapeDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(180, 255, 55, 55, 2),
- ShadowBrush = Hud.Render.CreateBrush(96, 0, 0, 0, 1),
- ShapePainter = WorldStarShapePainter.NewCross(Hud),
- Radius = 0.5f
- },
- new GroundCircleDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(180, 255, 55, 55, 2),
- Radius = 0.5f
- }
- );
- Pointer2Decorator = new WorldDecoratorCollection(
- new GroundShapeDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(180, 55, 255, 55, 2),
- ShadowBrush = Hud.Render.CreateBrush(96, 0, 0, 0, 1),
- ShapePainter = WorldStarShapePainter.NewCross(Hud),
- Radius = 0.5f
- },
- new GroundCircleDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(180, 55, 255, 55, 2),
- Radius = 0.5f
- }
- );
- }
- public void PaintWorld(WorldLayer layer)
- {
- if (!Hud.Game.IsInGame || Hud.Game.IsInTown ) return;
- if ( OnlyGR && (Hud.Game.SpecialArea != SpecialArea.GreaterRift) ) return;
- var cursorScreenCoord = Hud.Window.CreateScreenCoordinate(Hud.Window.CursorX, Hud.Window.CursorY);
- var CursorCoord = cursorScreenCoord.ToWorldCoordinate();
- var monster = Hud.Game.SelectedMonster2 ?? Hud.Game.SelectedMonster1;
- if (monster == null)
- {
- if (ShowInMiniMap) MiniMapDecorator.Paint(layer, Hud.Game.Me, CursorCoord, null);
- if (ShowLineToMonster) brush.DrawLineWorld(Hud.Game.Me.FloorCoordinate,CursorCoord);
- PointerDecorator.Paint(layer, Hud.Game.Me, CursorCoord, null);
- TextFontR.DrawText(Hud.Game.Me.FloorCoordinate.XYDistanceTo(CursorCoord).ToString("F1") + "y", cursorScreenCoord.Offset(-15, -30));
- }
- else if (monster.IsSelected)
- {
- if ( (monster.SummonerAcdDynamicId == 0) && ((monster.Rarity == ActorRarity.Champion) || (monster.Rarity == ActorRarity.Rare) || (monster.Rarity == ActorRarity.Boss) ) )
- {
- Mira.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
- }
- if (ShowInMiniMap) MiniMap2Decorator.Paint(layer, Hud.Game.Me, CursorCoord, null);
- if (ShowLineToMonster) brush.DrawLineWorld(Hud.Game.Me.FloorCoordinate,monster.FloorCoordinate);
- HitBoxDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
- Pointer2Decorator.Paint(layer, Hud.Game.Me, monster.FloorCoordinate, null);
- TextFontG.DrawText(monster.CentralXyDistanceToMe.ToString("F1") + "y", monster.FloorCoordinate.ToScreenCoordinate().Offset(-20, -30) );
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement