Wizard MirrorImagePlugin [9.2] menu

User Tag List

Results 1 to 9 of 9
  1. #1
    MLPFUN's Avatar Member
    Reputation
    4
    Join Date
    Aug 2017
    Posts
    10
    Thanks G/R
    2/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Wizard MirrorImagePlugin [9.2]

    This Plugin draws a circle under each MirrorImage (Wizard) and shows the total number of your summoned MirrorImages above your head.

    MirrorImages.jpg

    Code:
    namespace Turbo.Plugins.User
    {
        using Turbo.Plugins.Default;
        using System.Linq;
        using System.Text;
        using System.Collections.Generic;
    
        public class WizardMirrorImagesIndicatorPlugin : BasePlugin, IInGameWorldPainter, IInGameTopPainter
        {
            public WorldDecoratorCollection MirrorImagesDecorator;
            public TopLabelDecorator MirrorImagesCountLabel;
            public string MirrorImagesLabel;
            public int MirrorImagesCount;
            public float barW, barH, barX, barY;
            public bool MirrorImagesEnabled;
    
            private static uint MirrorImagesSkillSNO = 98027;
            public HashSet<ActorSnoEnum> MirrorImagesActorSNOs = new HashSet<ActorSnoEnum>
            {
                ActorSnoEnum._wizard_mirrorimage_male, // 107916
                ActorSnoEnum._wizard_mirrorimage_female // 98010
            };
    
    
            public WizardMirrorImagesIndicatorPlugin()
            {
                Enabled = true;
    
                MirrorImagesEnabled = true;
    
                // Inits variables
                MirrorImagesCount = 0;
                MirrorImagesLabel = "";
    
            }
    
            public override void Load(IController hud)
            {
                base.Load(hud);
    
                // Unlike the old XML system where it draws x,y,w,h in terms of percentage of screen size, the new plugin uses actual pixel coordinates
                // To convert x,y,w,h sizes from the XML system to the new plugin system, multiply the screensize with percentage. ie. XML size of 2 => 0.02f * screensize
    
                // Display coordinates for non-combined indicators
                barW = Hud.Window.Size.Width * 0.012f;
                barH = Hud.Window.Size.Height * 0.0175f;
                barX = Hud.Window.Size.Width * 0.5f;
                barY = Hud.Window.Size.Height * 0.36f;
    
                // Decorator under each MirrorImage
                MirrorImagesDecorator = new WorldDecoratorCollection(
                    new GroundCircleDecorator(Hud)
                    {
                        Brush = Hud.Render.CreateBrush(240, 50, 200, 0, 4),
                        Radius = 0.5f,
                    },
                    new MapShapeDecorator(Hud)
                    {
                        ShapePainter = new RotatingTriangleShapePainter(Hud),
                        Brush = Hud.Render.CreateBrush(220, 200, 200, 0, 0),
                        Radius = 0f,
                        RadiusTransformator = new StandardPingRadiusTransformator(Hud, 250)
                    }
                );
    
    
                // Label Decorator for Indicator
                MirrorImagesCountLabel = new TopLabelDecorator(Hud)
                {
                    TextFont = Hud.Render.CreateFont("tahoma", 7, 255, 255, 240, 0, false, false, false),
                    BackgroundTexture1 = Hud.Texture.Button2TextureBrown,
                    BackgroundTexture2 = Hud.Texture.BackgroundTextureOrange,
                    BackgroundTextureOpacity2 = 0.25f
                };
            }
    
            public void PaintWorld(WorldLayer layer)
            {
                // Don't draw if not playing a Wizard
                if (Hud.Game.Me.HeroClassDefinition.HeroClass != HeroClass.Wizard) return;
    
                // For MirrorImages, only when equipping the skill
                if (MirrorImagesEnabled && Hud.Game.Me.Powers.UsedSkills.Where(x => x.SnoPower.Sno == MirrorImagesSkillSNO) != null)
                {
                    // Iterate all the game actors, find out and count which are MirrorImages summoned by player
                    var MirrorImagesActors = Hud.Game.Actors.Where(EachActor => MirrorImagesActorSNOs.Contains(EachActor.SnoActor.Sno) && // Find out which are skeleton melees actors
                                                EachActor.SummonerAcdDynamicId == Hud.Game.Me.SummonerId); // Then find out if they are summoned by the player
                    MirrorImagesCount = MirrorImagesActors.Count(); // And then count how many are found
    
                    // Paint circle decorator under each MirrorImage 
                    foreach (var EachActor in MirrorImagesActors)
                    {
                        var text = string.IsNullOrWhiteSpace(MirrorImagesLabel) ? EachActor.SnoActor.NameLocalized : MirrorImagesLabel;
                        MirrorImagesDecorator.Paint(layer, EachActor, EachActor.FloorCoordinate, text);
                    }
                }
                else
                {
                    MirrorImagesCount = 0;
                }
            }
    
            public void PaintTopInGame(ClipState clipState)
            {
                // Don't draw if not playing a Wizard
                if (Hud.Game.Me.HeroClassDefinition.HeroClass != HeroClass.Wizard) return;
                if (clipState != ClipState.BeforeClip) return;
    
                // Drawing count indicator
                if (MirrorImagesEnabled && MirrorImagesCount != 0)
                {
                    MirrorImagesCountLabel.TextFunc = () => MirrorImagesCount.ToString();
                    MirrorImagesCountLabel.Paint(barX, barY, barW, barH, HorizontalAlign.Center);
                }
            }
        }
    }
    Put the Code in WizardMirrorImagesIndicator.cs in \plugins\User\

    This Plugin is a modification of: https://www.ownedcore.com/forums/dia...torplugin.html

    These ads disappear when you log in.

  2. Thanks alternate_, Gilavar, takayo72 (3 members gave Thanks to MLPFUN for this useful post)
  3. #2
    hositamtam's Avatar Member
    Reputation
    1
    Join Date
    Jun 2021
    Posts
    9
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello - how can I modify it to see the circles of Mirrorimage when the other members in the party are playing Wizard?
    Last edited by hositamtam; 06-04-2021 at 12:21 AM.

  4. #3
    MLPFUN's Avatar Member
    Reputation
    4
    Join Date
    Aug 2017
    Posts
    10
    Thanks G/R
    2/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you need to comment out these two checks by putting "//" in front of them:

    && EachActor.SummonerAcdDynamicId == Hud.Game.Me.SummonerId); // Then find out if they are summoned by the player
    if (Hud.Game.Me.HeroClassDefinition.HeroClass != HeroClass.Wizard) return;

    make sure you include the AND-Operator (&&) from the first line

  5. #4
    hositamtam's Avatar Member
    Reputation
    1
    Join Date
    Jun 2021
    Posts
    9
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks. I changed as below but it doesn't work and shows exceptions. Would you be able to identify what's wrong?

    public void PaintWorld(WorldLayer layer)
    {
    // Don't draw if not playing a Wizard
    // if (Hud.Game.Me.HeroClassDefinition.HeroClass != HeroClass.Wizard) return;

    // For MirrorImages, only when equipping the skill
    if (MirrorImagesEnabled && Hud.Game.Me.Powers.UsedSkills.Where(x => x.SnoPower.Sno == MirrorImagesSkillSNO) != null)
    {
    // Iterate all the game actors, find out and count which are MirrorImages summoned by player
    var MirrorImagesActors = Hud.Game.Actors.Where(EachActor => MirrorImagesActorSNOs.Contains(EachActor.SnoActor.Sno); // && EachActor.SummonerAcdDynamicId == Hud.Game.Me.SummonerId)
    MirrorImagesCount = MirrorImagesActors.Count(); // And then count how many are found

    // Paint circle decorator under each MirrorImage
    foreach (var EachActor in MirrorImagesActors)
    {
    var text = string.IsNullOrWhiteSpace(MirrorImagesLabel) ? EachActor.SnoActor.NameLocalized : MirrorImagesLabel;
    MirrorImagesDecorator.Paint(layer, EachActor, EachActor.FloorCoordinate, text);
    }
    }
    else
    {
    MirrorImagesCount = 0;
    }
    }


    Exceptions:
    WizardMirrorImagesIndicator.cs(86,131) : error CS1026: ) expected

  6. #5
    MLPFUN's Avatar Member
    Reputation
    4
    Join Date
    Aug 2017
    Posts
    10
    Thanks G/R
    2/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    use this:


    Code:
    namespace Turbo.Plugins.User
    {
        using Turbo.Plugins.Default;
        using System.Linq;
        using System.Text;
        using System.Collections.Generic;
    
        public class WizardMirrorImagesIndicatorPlugin : BasePlugin, IInGameWorldPainter, IInGameTopPainter
        {
            public WorldDecoratorCollection MirrorImagesDecorator;
            public TopLabelDecorator MirrorImagesCountLabel;
            public string MirrorImagesLabel;
            public int MirrorImagesCount;
            public float barW, barH, barX, barY;
            public bool MirrorImagesEnabled;
    
            private static uint MirrorImagesSkillSNO = 98027;
            public HashSet<ActorSnoEnum> MirrorImagesActorSNOs = new HashSet<ActorSnoEnum>
            {
                ActorSnoEnum._wizard_mirrorimage_male, // 107916
                ActorSnoEnum._wizard_mirrorimage_female // 98010
            };
    
    
            public WizardMirrorImagesIndicatorPlugin()
            {
                Enabled = true;
    
                MirrorImagesEnabled = true;
    
                // Inits variables
                MirrorImagesCount = 0;
                MirrorImagesLabel = "";
    
            }
    
            public override void Load(IController hud)
            {
                base.Load(hud);
    
                // Unlike the old XML system where it draws x,y,w,h in terms of percentage of screen size, the new plugin uses actual pixel coordinates
                // To convert x,y,w,h sizes from the XML system to the new plugin system, multiply the screensize with percentage. ie. XML size of 2 => 0.02f * screensize
    
                // Display coordinates for non-combined indicators
                barW = Hud.Window.Size.Width * 0.012f;
                barH = Hud.Window.Size.Height * 0.0175f;
                barX = Hud.Window.Size.Width * 0.5f;
                barY = Hud.Window.Size.Height * 0.36f;
    
                // Decorator under each MirrorImage
                MirrorImagesDecorator = new WorldDecoratorCollection(
                    new GroundCircleDecorator(Hud)
                    {
                        Brush = Hud.Render.CreateBrush(240, 50, 200, 0, 4),
                        Radius = 0.5f,
                    },
                    new MapShapeDecorator(Hud)
                    {
                        ShapePainter = new RotatingTriangleShapePainter(Hud),
                        Brush = Hud.Render.CreateBrush(220, 200, 200, 0, 0),
                        Radius = 0f,
                        RadiusTransformator = new StandardPingRadiusTransformator(Hud, 250)
                    }
                );
    
    
                // Label Decorator for Indicator
                MirrorImagesCountLabel = new TopLabelDecorator(Hud)
                {
                    TextFont = Hud.Render.CreateFont("tahoma", 7, 255, 255, 240, 0, false, false, false),
                    BackgroundTexture1 = Hud.Texture.Button2TextureBrown,
                    BackgroundTexture2 = Hud.Texture.BackgroundTextureOrange,
                    BackgroundTextureOpacity2 = 0.25f
                };
            }
    
            public void PaintWorld(WorldLayer layer)
            {
                // Don't draw if not playing a Wizard
                //if (Hud.Game.Me.HeroClassDefinition.HeroClass != HeroClass.Wizard) return;
    
                // For MirrorImages, only when equipping the skill
                if (MirrorImagesEnabled && Hud.Game.Me.Powers.UsedSkills.Where(x => x.SnoPower.Sno == MirrorImagesSkillSNO) != null)
                {
                    // Iterate all the game actors, find out and count which are MirrorImages summoned by player
                    var MirrorImagesActors = Hud.Game.Actors.Where(EachActor => MirrorImagesActorSNOs.Contains(EachActor.SnoActor.Sno);  //&& // Find out which are skeleton melees actors
                           //EachActor.SummonerAcdDynamicId == Hud.Game.Me.SummonerId); // Then find out if they are summoned by the player
                    MirrorImagesCount = MirrorImagesActors.Count(); // And then count how many are found
    
                    // Paint circle decorator under each MirrorImage 
                    foreach (var EachActor in MirrorImagesActors)
                    {
                        var text = string.IsNullOrWhiteSpace(MirrorImagesLabel) ? EachActor.SnoActor.NameLocalized : MirrorImagesLabel;
                        MirrorImagesDecorator.Paint(layer, EachActor, EachActor.FloorCoordinate, text);
                    }
                }
                else
                {
                    MirrorImagesCount = 0;
                }
            }
    
            public void PaintTopInGame(ClipState clipState)
            {
                // Don't draw if not playing a Wizard
               // if (Hud.Game.Me.HeroClassDefinition.HeroClass != HeroClass.Wizard) return;
                if (clipState != ClipState.BeforeClip) return;
    
                // Drawing count indicator
                if (MirrorImagesEnabled && MirrorImagesCount != 0)
                {
                    MirrorImagesCountLabel.TextFunc = () => MirrorImagesCount.ToString();
                    MirrorImagesCountLabel.Paint(barX, barY, barW, barH, HorizontalAlign.Center);
                }
            }
        }
    }

  7. #6
    gardanbvcps's Avatar Member
    Reputation
    1
    Join Date
    Jun 2018
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    2021.06.07 23:13:29.898 21.4.8.0 error while initializing plugins
    2021.06.07 23:13:29.899 21.4.8.0 Plugins\User\WizardMirrorImagesIndicatorPlugin.cs(86,131) : error CS1026: ) expected
    Hello, i received above 2 exceptions after using the revised plugin, would you please double check again? Many many thanks :P

  8. #7
    hositamtam's Avatar Member
    Reputation
    1
    Join Date
    Jun 2021
    Posts
    9
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I see the same exceptions

  9. #8
    Razorfish's Avatar Contributor
    Reputation
    184
    Join Date
    Apr 2019
    Posts
    171
    Thanks G/R
    19/154
    Trade Feedback
    0 (0%)
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by gardanbvcps View Post
    2021.06.07 23:13:29.898 21.4.8.0 error while initializing plugins
    2021.06.07 23:13:29.899 21.4.8.0 Plugins\User\WizardMirrorImagesIndicatorPlugin.cs(86,131) : error CS1026: ) expected
    Hello, i received above 2 exceptions after using the revised plugin, would you please double check again? Many many thanks :P
    Line 86 is this, and it is missing a closing parenthesis (added it in red below):
    Code:
    var MirrorImagesActors = Hud.Game.Actors.Where(EachActor => MirrorImagesActorSNOs.Contains(EachActor.SnoActor.Sno));  //&& // Find out which are skeleton melees actors

  10. #9
    gardanbvcps's Avatar Member
    Reputation
    1
    Join Date
    Jun 2018
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    that works fine now, thanks for your support~~

Similar Threads

  1. Arena use cutting stones/wizard oils
    By octech in forum World of Warcraft Exploits
    Replies: 27
    Last Post: 09-15-2007, 08:09 AM
  2. Wizard of Oz
    By bluesnoke in forum World of Warcraft Exploits
    Replies: 13
    Last Post: 06-13-2007, 09:30 AM
  3. Stormwind Wizard Tower, but where?
    By Trustdale in forum World of Warcraft Exploration
    Replies: 13
    Last Post: 02-17-2007, 10:50 PM
  4. Mana/Wizard [email protected]
    By Borr in forum WoW Scam Prevention
    Replies: 6
    Last Post: 09-03-2006, 07:21 PM
  5. [Scam] wizard oil etc.
    By KuRIoS in forum World of Warcraft Exploits
    Replies: 9
    Last Post: 05-29-2006, 05:12 AM
All times are GMT -5. The time now is 01:31 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2021 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2021 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search