Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Linq;
- using SharpDX.DirectInput;
- using Turbo.Plugins.Default;
- namespace Turbo.Plugins.glew
- {
- public class RangeRound : BasePlugin, IInGameWorldPainter, IKeyEventHandler
- {
- public GroundCircleDecorator Round1 { get; set; }
- public GroundCircleDecorator Round2 { get; set; }
- public IKeyEvent ToggleKeyEvent { get; set; }
- public int on { get; set; }
- public RangeRound()
- {
- Enabled = true;
- }
- public override void Load(IController hud)
- {
- base.Load(hud);
- on = 0;
- ToggleKeyEvent = Hud.Input.CreateKeyEvent(true, Key.D9, false, false, false); // Change Key.F9 to Key.# where # is your key of choice, for reference. https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.keys?view=net-5.0
- Round1 = new GroundCircleDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(175, 255, 115, 45, 4.0f), // CreateBrush(Opacity, Red, Green, Blue, Radius)
- Radius = 10f // Change this to your Lower Range Choice
- };
- Round2 = new GroundCircleDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(255, 0, 40, 255, 4.0f), // CreateBrush(Opacity, Red, Green, Blue, Radius)
- Radius = 25f // Change this to your Higher Range Choice
- };
- }
- public void PaintWorld(WorldLayer layer)
- {
- if (Hud.Game.MapMode != MapMode.Minimap) return;
- if (on==1)
- Round1.Paint(null, Hud.Game.Me.FloorCoordinate, null);
- if (on==2)
- Round2.Paint(null, Hud.Game.Me.FloorCoordinate, null);
- if (on==3)
- {
- Round1.Paint(null, Hud.Game.Me.FloorCoordinate, null);
- Round2.Paint(null, Hud.Game.Me.FloorCoordinate, null);
- }
- }
- public void OnKeyEvent(IKeyEvent keyEvent)
- {
- if (keyEvent.IsPressed && ToggleKeyEvent.Matches(keyEvent))
- {
- on++;
- if (on>3) on = 0;
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment