Solve this plugin please menu

These ads disappear when you log in.

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%)

    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; 3 Weeks Ago at 06:28 PM. Reason: clarity and grammar

  2. #2
    iThinkiWin's Avatar Active Member CoreCoins User
    Reputation
    16
    Join Date
    Oct 2018
    Posts
    63
    Thanks G/R
    15/14
    Trade Feedback
    0 (0%)
    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 Contributor CoreCoins User
    Reputation
    204
    Join Date
    Sep 2018
    Posts
    340
    Thanks G/R
    58/194
    Trade Feedback
    0 (0%)
    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%)
    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 02:41 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved. Digital Point modules: Sphinx-based search