[INTERNATIONAL] [Zy] OculusColor menu

User Tag List

Page 2 of 2 FirstFirst 12
Results 16 to 22 of 22
  1. #16
    BeeAntOS's Avatar Active Member
    Reputation
    30
    Join Date
    Oct 2017
    Posts
    119
    Thanks G/R
    239/28
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by rickyyev View Post
    Thanks a lot, do i need to create the Zy folder right?
    You're welcome -and- yep ("..\plugins\Zy\OculusColor.cs")

    [INTERNATIONAL] [Zy] OculusColor
  2. #17
    Gambit75x's Avatar Member
    Reputation
    1
    Join Date
    Jun 2019
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by MLPFUN View Post
    [Zy], thank you sooo much for this awesome plugin!

    If anybody is interested I rewrote a few lines and now it does the following:

    If you are standing in the Oculus, the border will turn into a dashed style (class doesn't matter). This way it's is easy to tell whether you are in one or more oculus rings.

    Attachment 67648
    Attachment 67647

    Code:
    using Turbo.Plugins.Default;
    using System.Linq;
    
    namespace Turbo.Plugins.User
    {
        public class OculusColor : BasePlugin, IInGameWorldPainter, ICustomizer
        {
            public WorldDecoratorCollection DecoratorOutside { get; set; }
            public WorldDecoratorCollection DecoratorInside { get; set; }
            public OculusColor()
            {
                Enabled = true;
            }
    
            public override void Load(IController hud)
            {
                base.Load(hud);
    
                DecoratorOutside = new WorldDecoratorCollection(
                    new GroundCircleDecorator(Hud)
                    {
                        Brush = Hud.Render.CreateBrush(255, 128, 255, 0, -2),
                        Radius = 10.0f,
                    },
                    new GroundLabelDecorator(Hud)
                    {
                        CountDownFrom = 7,
                        TextFont = Hud.Render.CreateFont("tahoma", 11, 255, 96, 255, 96, true, false, 128, 0, 0, 0, true),
                    },
                    new GroundTimerDecorator(Hud)
                    {
                        CountDownFrom = 7,
                        BackgroundBrushEmpty = Hud.Render.CreateBrush(128, 0, 0, 0, 0),
                        BackgroundBrushFill = Hud.Render.CreateBrush(200, 0, 192, 0, 0),
                        Radius = 30,
                    },
    		new MapShapeDecorator(Hud)
    		{
    			Brush = Hud.Render.CreateBrush(255, 128, 255, 0, 2),
    			Radius = 10.0f,
    			ShapePainter = new CircleShapePainter(Hud),
    		}
                    );
                DecoratorInside = new WorldDecoratorCollection(
                    new GroundCircleDecorator(Hud)
                    {
    		    Brush = Hud.Render.CreateBrush(255, 128, 255, 0, -2, SharpDX.Direct2D1.DashStyle.Dash),
                        Radius = 10.0f,
                    },
                    new GroundLabelDecorator(Hud)
                    {
                        CountDownFrom = 7,
                        TextFont = Hud.Render.CreateFont("tahoma", 11, 255, 96, 255, 96, true, false, 128, 0, 0, 0, true),
                    },
                    new GroundTimerDecorator(Hud)
                    {
                        CountDownFrom = 7,
                        BackgroundBrushEmpty = Hud.Render.CreateBrush(128, 0, 0, 0, 0),
                        BackgroundBrushFill = Hud.Render.CreateBrush(200, 0, 192, 0, 0),
                        Radius = 30,
                    },
    		new MapShapeDecorator(Hud)
    		{
    			Brush = Hud.Render.CreateBrush(255, 128, 255, 0, 2),
    			Radius = 10.0f,
    			ShapePainter = new CircleShapePainter(Hud),
    		}
                    );
            }
            public void Customize()
            {
                Hud.TogglePlugin<OculusPlugin>(false);
            }
            public void PaintWorld(WorldLayer layer)
            {
                if (Hud.Game.IsInTown) return;
    
                var actors = Hud.Game.Actors.Where(x => x.SnoActor.Sno == ActorSnoEnum._generic_proxy && x.GetAttributeValueAsInt(Hud.Sno.Attributes.Power_Buff_1_Visual_Effect_None, Hud.Sno.SnoPowers.OculusRing.Sno) == 1);
                if (actors.Count() > 0){
                    foreach (var actor in actors){
                    float dist = actor.FloorCoordinate.XYDistanceTo(Hud.Game.Me.FloorCoordinate);
    
    		if (dist < 13.3f){
                            DecoratorInside.Paint(layer, actor, actor.FloorCoordinate, null); 
                        }
                        else{
                            DecoratorOutside.Paint(layer, actor, actor.FloorCoordinate, null);
                            }
                        }
    		}
            }
        }
    }
    Where do I put this text to use?

  3. #18
    BeeAntOS's Avatar Active Member
    Reputation
    30
    Join Date
    Oct 2017
    Posts
    119
    Thanks G/R
    239/28
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Gambit75x View Post
    Where do I put this text to use?
    "..\plugins\User\OculusColor.cs"

  4. #19
    Gambit75x's Avatar Member
    Reputation
    1
    Join Date
    Jun 2019
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by BeeAntOS View Post
    "..\plugins\User\OculusColor.cs"
    Do I replace all the test with that code or only part of it? I am not sure where to copy and paste it into on that OculusColor.cs document.

  5. #20
    BeeAntOS's Avatar Active Member
    Reputation
    30
    Join Date
    Oct 2017
    Posts
    119
    Thanks G/R
    239/28
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Gambit75x View Post
    Do I replace all the test with that code or only part of it? I am not sure where to copy and paste it into on that OculusColor.cs document.
    If you want to use that different version, you should paste all lines of code into a new "OculusColor.cs" file.

  6. #21
    Gambit75x's Avatar Member
    Reputation
    1
    Join Date
    Jun 2019
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks a lot, got it working. Plugin is awesome to ensure I am standing in the circle, sometimes it is hard to tell. Love TurboHud!
    Last edited by Gambit75x; 06-22-2019 at 08:49 AM.

  7. #22
    bolek85's Avatar Member
    Reputation
    2
    Join Date
    Jun 2020
    Posts
    13
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    how change dashed style too other color? red or somthink

    nvm im fixed this
    Last edited by bolek85; 08-04-2020 at 05:44 AM.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. [INTERNATIONAL] [Zy] NayrStacks
    By thetest1 in forum TurboHUD Community Plugins
    Replies: 6
    Last Post: 07-24-2020, 12:43 AM
  2. [ENGLISH] [Zy] MonsterSets
    By thetest1 in forum TurboHUD Community Plugins
    Replies: 17
    Last Post: 04-09-2020, 01:48 AM
  3. [INTERNATIONAL] [Zy] ArchonDowntime
    By thetest1 in forum TurboHUD Community Plugins
    Replies: 13
    Last Post: 08-28-2019, 02:19 AM
  4. [v7.3] [INTERNATIONAL] [Zy] MissingCursesPlugin
    By thetest1 in forum TurboHUD Community Plugins
    Replies: 2
    Last Post: 01-19-2019, 03:37 AM
  5. President Bush, CAUGHT SWEARING at international meeting
    By mantalcore in forum Community Chat
    Replies: 15
    Last Post: 08-14-2006, 09:41 AM
All times are GMT -5. The time now is 05:32 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search