Solve this plugin please menu

User Tag List

Results 1 to 4 of 4
  1. #1
    CarrierKing's Avatar Member
    Reputation
    1
    Join Date
    Jun 2019
    Posts
    5
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Solve this plugin please

    Hello! first time poster here.
    I have a plugin titled "MotherSummonerPlugin.cs" that I would like to perform slightly differently.
    right now the plugin recognizes monsters by their name; and if their name was added to the summoner's list, it draws a purple circle around them on the map and minimap.
    Cool but the problem is that sometimes the elite itself is flagged as a summoner in this process. This is the part that I would like changed. I would prefer that it only highlights NON-ELITES with the purple circles.
    Perhaps someone who is an experienced coder here can give me a line of code to insert into this plugin that basically says
    "is it on the summoner list? is it also NOT AN ELITE? IF SO, draw big purple circle"
    I hope someone here is willing to solve this great coding problem.
    Thank you for reading, below is a link to the plugin in question.
    I am not the author of this plugin.




    MotherSummonerPlugin.cs - Google Drive
    Last edited by CarrierKing; 08-22-2019 at 06:28 PM. Reason: clarity and grammar

    Solve this plugin please
  2. #2
    iThinkiWin's Avatar Active Member
    Reputation
    28
    Join Date
    Oct 2018
    Posts
    104
    Thanks G/R
    25/25
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    add: if (monster.Rarity == ActorRarity.Normal) continue; after;

    foreach (var monster in monsters)
    {

    Code:
    using System.Collections.Generic;
    using Turbo.Plugins.Default;
    
    namespace Turbo.Plugins.User
    {
        public class MotherSummonerPlugin : BasePlugin, IInGameWorldPainter
        {
    
            public WorldDecoratorCollection Decorator { get; set; }
            private Dictionary<string, string> _names = new Dictionary<string, string>();
    
            public MotherSummonerPlugin()
            {
                Enabled = true;
            }
    
            public override void Load(IController hud)
            {
                base.Load(hud);
    
                AddNames("Skeletal Summoner", "Tomb Guardian", "Returned Summoner", "Vengeful Summoner", "Retching Cadaver", "Wretched Mother", "Spewing Horror", "Deathspitter");
    
                Decorator = new WorldDecoratorCollection(
                    new MapShapeDecorator(Hud)
                    {
                        Brush = Hud.Render.CreateBrush(255, 150, 80, 255, 2.5f),
                        ShadowBrush = Hud.Render.CreateBrush(96, 0, 0, 0, 1),
                        ShapePainter = new CircleShapePainter(Hud),
                        Radius = 5,
                        RadiusTransformator = new StandardPingRadiusTransformator(Hud, 600)
                        {
                            RadiusMinimumMultiplier = 0.8f
                        }
                    },
                    new GroundCircleDecorator(Hud)
                    {
                        Brush = Hud.Render.CreateBrush(255, 150, 80, 255, 6),
                        Radius = 2.0f,
                        RadiusTransformator = new StandardPingRadiusTransformator(Hud, 600)
                        {
                            RadiusMinimumMultiplier = 0.8f
                        }
                    }
                );
            }
    
            public void AddNames(params string[] names)
            {
                foreach (var name in names)
                {
                    _names[name] = name;
                }
            }
    
            public void RemoveName(string name)
            {
                if (_names.ContainsKey(name)) _names.Remove(name);
            }
    
            public void PaintWorld(WorldLayer layer)
            {
                var monsters = Hud.Game.AliveMonsters;
                foreach (var monster in monsters)
                {
                    if (monster.Rarity == ActorRarity.Normal) continue;
                    if (_names.ContainsKey(monster.SnoMonster.NameEnglish) || _names.ContainsKey(monster.SnoMonster.NameLocalized))
                    {
                        Decorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
                    }
                }
            }
        }
    }

  3. #3
    RNN's Avatar Legendary
    Reputation
    813
    Join Date
    Sep 2018
    Posts
    1,055
    Thanks G/R
    104/776
    Trade Feedback
    0 (0%)
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    You just have to check the value of monster.IsElite in the foreach . 3 Options:

    Code:
    foreach  (var monster in monsters)
    {
    	if (monster.IsElite) continue;
    	if (_names.ContainsKey(monster.SnoMonster.NameEnglish) || _names.ContainsKey(monster.SnoMonster.NameLocalized))
    or use
    Code:
    	if  ( !monster.IsElite &&  (_names.ContainsKey(monster.SnoMonster.NameEnglish) || _names.ContainsKey(monster.SnoMonster.NameLocalized)) ) {
    or replace
    Code:
    var monsters = Hud.Game.AliveMonsters;
    to
    Code:
    var monsters = Hud.Game.AliveMonsters.Where(x => !x.IsElite);
    Option 3 Uploaded : [C#] MotherSummonerPlugin - Pastebin.com

    Edit: I arrived late, they already answered you

  4. #4
    CarrierKing's Avatar Member
    Reputation
    1
    Join Date
    Jun 2019
    Posts
    5
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you so much!
    I came to the right place

Similar Threads

  1. Replies: 1
    Last Post: 09-08-2016, 09:21 AM
  2. Replies: 2
    Last Post: 09-24-2014, 12:01 PM
  3. Solve this for rep!
    By Gelormino in forum Community Chat
    Replies: 21
    Last Post: 09-22-2007, 01:14 PM
  4. if you solve this i will reward you
    By Ark in forum Gaming Chat
    Replies: 39
    Last Post: 08-08-2007, 12:56 PM
All times are GMT -5. The time now is 08:07 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