[8.0] TeammateTrails menu

User Tag List

Results 1 to 14 of 14
  1. #1
    Roast's Avatar Established Member
    Reputation
    87
    Join Date
    Apr 2017
    Posts
    126
    Thanks G/R
    7/83
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [8.0] TeammateTrails

    A friend of mine has recently switched to zDPS monk and after many hours of grind he started having trouble keeping track of where his teammates are.
    So here are some hot pink lines drawn between you and your teammates.



    Code:
    using System;
    using System.Linq;
    using Turbo.Plugins;
    using Turbo.Plugins.Default;
    
    namespace Turbo.plugins.Roast
    {
        internal sealed class TeammateTrails : BasePlugin, IInGameWorldPainter
        {
            private const float DistanceThreshold = 50.0F;
            private const bool Debug = false;
            private const bool DistanceBased = true;
            private IBrush LineDrawing { get; set; }
            private WorldDecoratorCollection DebugDrawing { get; set; }
    
            public TeammateTrails()
            {
                Enabled = true;
            }
    
            public override void Load(IController hud)
            {
                base.Load(hud);
    
                LineDrawing = Hud.Render.CreateBrush(255, 255, 105, 180, 10);
    
                DebugDrawing = new WorldDecoratorCollection(
                    new GroundLabelDecorator(Hud)
                    {
                        TextFont = Hud.Render.CreateFont("tahoma", 6.5f, 255, 255, 105, 180, false, false, false)
                    });
            }
    
            public void PaintWorld(WorldLayer layer)
            {
                var self = Hud.Game.Me;
    
                if(self.IsInTown)
                    return;
    
                if (Hud.Game.NumberOfPlayersInGame <= 1)
                    return;
    
                var otherPlayers = Hud.Game.Players.Where(p => !p.IsMe && p.CoordinateKnown);
                var selfLocation = self.FloorCoordinate;
    
                foreach(var otherPlayer in otherPlayers)
                {
                    var otherLocation = otherPlayer.FloorCoordinate;
    
                    if (DistanceBased)
                    {
                        var distance = selfLocation.XYZDistanceTo(otherLocation);
                        if(Debug)
                        {
                            DebugDrawing.Paint(layer, otherPlayer, otherLocation, $"Distance: {distance}");
                        }
                        if(distance >= DistanceThreshold)
                            continue;
                    }
    
                    LineDrawing.DrawLineWorld(otherLocation, selfLocation);
                }
            }
        }
    }
    Last edited by Roast; 02-23-2019 at 05:36 AM. Reason: Use built in distance function
    Developer of RoastBot https://www.ownedcore.com/forums/fps/overwatch-exploits-hacks/619893-roastbot-continuation-of-serenity.html

    [8.0] TeammateTrails
  2. #2
    jaeheung09's Avatar Active Member
    Reputation
    23
    Join Date
    Nov 2017
    Posts
    109
    Thanks G/R
    8/21
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'd like to know the distance between me and otherPlayer so that the plugin doesn't draw a line if the distance is over 100 for example.
    It looks cluttered when other players are far away.
    Any help?

  3. #3
    Roast's Avatar Established Member
    Reputation
    87
    Join Date
    Apr 2017
    Posts
    126
    Thanks G/R
    7/83
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by jaeheung09 View Post
    I'd like to know the distance between me and otherPlayer so that the plugin doesn't draw a line if the distance is over 100 for example.
    It looks cluttered when other players are far away.
    Any help?
    Sure, I'll take a look at adding this later today
    Alternatively if you want to do it yourself you could implement the pythagoreom theoreom as described here
    c# - Calculating the distance between 2 points - Stack Overflow
    Last edited by Roast; 02-23-2019 at 03:31 AM.
    Developer of RoastBot https://www.ownedcore.com/forums/fps/overwatch-exploits-hacks/619893-roastbot-continuation-of-serenity.html

  4. #4
    jaeheung09's Avatar Active Member
    Reputation
    23
    Join Date
    Nov 2017
    Posts
    109
    Thanks G/R
    8/21
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks.
    I found the builtin function of the distance between two points.
    One can use this as necessary.

    FYI
    using System.Drawing; // should be add
    .
    .

    foreach(var otherPlayer in otherPlayers)
    {
    var otherLocation = otherPlayer.FloorCoordinate;
    int length = (int)otherPlayer.NormalizedXyDistanceToMe;
    if (length < 100) LineDrawing.DrawLineWorld(otherLocation, selfLocation);
    }

  5. #5
    Roast's Avatar Established Member
    Reputation
    87
    Join Date
    Apr 2017
    Posts
    126
    Thanks G/R
    7/83
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Updated with some debug features so you can see the distance between yourself and others players to find your own sweet spot. I found that 50 was about what I'd want.
    Just change line 11 to
    Code:
    private const bool Debug = false;
    To disable distance based decisions just set line 12 to
    Code:
    private const bool DistanceBased = true;
    Developer of RoastBot https://www.ownedcore.com/forums/fps/overwatch-exploits-hacks/619893-roastbot-continuation-of-serenity.html

  6. #6
    Roast's Avatar Established Member
    Reputation
    87
    Join Date
    Apr 2017
    Posts
    126
    Thanks G/R
    7/83
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by jaeheung09 View Post
    Thanks.
    I found the builtin function of the distance between two points.
    One can use this as necessary.

    FYI
    using System.Drawing; // should be add
    .
    .

    foreach(var otherPlayer in otherPlayers)
    {
    var otherLocation = otherPlayer.FloorCoordinate;
    int length = (int)otherPlayer.NormalizedXyDistanceToMe;
    if (length < 100) LineDrawing.DrawLineWorld(otherLocation, selfLocation);
    }
    :O I hadn't seen that there was a built in function. I ended up implementing my own with LINQ.
    Developer of RoastBot https://www.ownedcore.com/forums/fps/overwatch-exploits-hacks/619893-roastbot-continuation-of-serenity.html

  7. #7
    franehr's Avatar Member
    Reputation
    6
    Join Date
    Oct 2017
    Posts
    82
    Thanks G/R
    34/5
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi is it possible to do it like this?[
    Attached Thumbnails Attached Thumbnails [8.0] TeammateTrails-222tracker_effect_iw-png  

  8. #8
    iThinkiWin's Avatar Active Member
    Reputation
    27
    Join Date
    Oct 2018
    Posts
    104
    Thanks G/R
    25/24
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    could be done simply by adding an IWatch for delay then adding IWorldCoordinate, HeroID, +order to a dictionary Dictionary to drawing lines with DashStyle.Dash at low opacity..
    this would be very taxing on memory all the paintworld refreshes drawing 29145819254892185 lines per map lol,
    * could be a neat project still.

  9. #9
    yuliaangel's Avatar Member
    Reputation
    1
    Join Date
    May 2019
    Posts
    24
    Thanks G/R
    3/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello, how to make this pink lines less "fat"? thanks.

  10. #10
    s4000's Avatar Contributor
    Reputation
    284
    Join Date
    Oct 2018
    Posts
    489
    Thanks G/R
    18/271
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by yuliaangel View Post
    Hello, how to make this pink lines less "fat"? thanks.
    modify LineDrawing = Hud.Render.CreateBrush(255, 255, 105, 180, 10);
    the last number 10 is the thickness of the line

  11. #11
    rocker002002's Avatar Member
    Reputation
    1
    Join Date
    Feb 2018
    Posts
    2
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    Is it possible to just draw a line between me and a particular class (for example, me and wizard)? Thanks!

  12. #12
    Saico's Avatar Active Member
    Reputation
    21
    Join Date
    Apr 2019
    Posts
    379
    Thanks G/R
    35/20
    Trade Feedback
    0 (0%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    It has exception in new Thud Build

    C:\Users\xxx/Desktop\xxx\TURBO\Plugins\Roast\TeamMateLines.cs(56,25) : warning CS0162: Unreachable code detected

    Any idea ?

  13. #13
    RNN's Avatar Legendary
    Reputation
    801
    Join Date
    Sep 2018
    Posts
    1,043
    Thanks G/R
    102/764
    Trade Feedback
    0 (0%)
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    It's not really important, it's just a warning, and it doesn't appear unless you have errors.
    If you want to avoid it, modify line 11

    Code:
            private const bool Debug = false;
    and you erase what is colored green

  14. #14
    Saico's Avatar Active Member
    Reputation
    21
    Join Date
    Apr 2019
    Posts
    379
    Thanks G/R
    35/20
    Trade Feedback
    0 (0%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by RNN View Post
    It's not really important, it's just a warning, and it doesn't appear unless you have errors.
    If you want to avoid it, modify line 11

    Code:
            private const bool Debug = false;
    and you erase what is colored green
    Oh ye, I just fixed another exception and it doesnt affect this one, thank you RNN

All times are GMT -5. The time now is 03:33 AM. 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