actor.SummonerAcdDynamicId check menu

User Tag List

Results 1 to 5 of 5
  1. #1
    JohnWick's Avatar Member
    Reputation
    13
    Join Date
    Mar 2017
    Posts
    103
    Thanks G/R
    84/8
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    actor.SummonerAcdDynamicId check

    hello

    i want to use different decorators for actors summoned by different monsters

    how to create a condition to tell if an actor with a unique "SummonerAcdDynamicId" present on screen more then once (to count same and separate one actors from another) ?

    or is it possible to tell if an actor summoned by "rare" or "champion" ?

    actor.SummonerAcdDynamicId check
  2. #2
    RNN's Avatar Legendary
    Reputation
    837
    Join Date
    Sep 2018
    Posts
    1,102
    Thanks G/R
    107/799
    Trade Feedback
    0 (0%)
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by JohnWick View Post
    i want to use different decorators for actors summoned by different monsters
    You could do it with a dictionary to store the different SummonerAcdDynamicId that you find by associating each one to a decorator.

    Originally Posted by JohnWick View Post
    or is it possible to tell if an actor summoned by "rare" or "champion" ?
    Directly it doesn't seem possible but it does occur to me to do it indirectly using SummonerId. There is a problem: I can be wrong but it seems that it is bugged or limited by efficiency issues and it does not work with actors other than players, it would need to work with elites at least
    Last edited by RNN; 11-03-2020 at 06:52 PM.

  3. #3
    JohnWick's Avatar Member
    Reputation
    13
    Join Date
    Mar 2017
    Posts
    103
    Thanks G/R
    84/8
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by RNN View Post
    You could do it with a dictionary to store the different SummonerAcdDynamicId that you find by associating each one to a decorator.



    Directly it doesn't seem possible but it does occur to me to do it indirectly using SummonerId. There is a problem: I can be wrong but it seems that it is bugged or limited by efficiency issues and it does not work with actors other than players, it would need to work with elites at least


    In a while I post a code here to show how I would do it.....


    Plugins\RNN\Summoned.cs
    Hello, RNN, thank you for response
    I guess i've done bad job explaining myself


    Elite enemies with waller affix, creates walls, which has different time of existence, depending on if summoner is rare or champion
    My goal is to set correct timers for different walls actors

    Champion create one actor at a time for 4 seconds
    Rare create more then one actor at a time for 5 seconds

    All "_monsteraffix_waller_model" actors created by certain rare elite has same "SummonerAcdDynamicId" and same "Summoned_By_ACDID"

    So my though was to check if there is more then one wall actor on screen with same "SummonerAcdDynamicId" or "Summoned_By_ACDID" then we can safely assume that it was summoned by rare elite and assign different decorator for it

    Smt like that to check for it
    var SummonedBy = actor.GetAttributeValue(Hud.Sno.Attributes.Summoned_By_ACDID,226808);
    But i dont know how to create function to count and separate them

  4. #4
    RNN's Avatar Legendary
    Reputation
    837
    Join Date
    Sep 2018
    Posts
    1,102
    Thanks G/R
    107/799
    Trade Feedback
    0 (0%)
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    You can use GroupBy

    Code:
    	
    	foreach (var WallerGroup in Hud.Game.Actors.Where(a => a.SnoActor.Sno == ActorSnoEnum._monsteraffix_waller_model).GroupBy(x => x.SummonerAcdDynamicId))
    	{
    		//var SummAcdDId = WallerGroup.Key;  
    		var Counter = WallerGroup.Count();  //  WallerGroup.Key found  WallerGroup.Count() times
    		var Duration = (Counter > 1)? 5 : 4 ;   // if == 1 -> 4 sec (champion) , if > 1 -> 5 sec (rare)
    
    		foreach (var Waller in WallerGroup) 
    		{
    			// Decorator for actor Waller and duration "Duration"
    		}
    	}
    Simple example:
    Code:
    using Turbo.Plugins.Default;
    using System.Linq;
    
    namespace Turbo.Plugins.RNN
    {
        public class wallerplugin : BasePlugin, IInGameTopPainter 
        {
    		public IFont DefaultFont { get; set; }		
    		
            public wallerplugin()
            {
    			Enabled = true;
    		}
    
            public override void Load(IController hud)
            {
    			base.Load(hud);
    			DefaultFont = Hud.Render.CreateFont("tahoma", 8f, 250, 0, 250, 0, false, false, 250, 0, 0, 0, true);			
    		}
    
    		public void PaintTopInGame(ClipState clipState)
    		{
    			if (clipState != ClipState.BeforeClip) return;			
    			if (!Hud.Game.IsInGame) return;			
    
    			var actors = Hud.Game.Actors.Where(a => a.SnoActor.Sno == ActorSnoEnum._monsteraffix_waller_model);
    			if (actors.Any())
    			{
    				var i = 0;
    				foreach (var WallerGroup in actors.GroupBy(x => x.SummonerAcdDynamicId))
    				{
    					DefaultFont.DrawText(DefaultFont.GetTextLayout( "SummonerAcdDynamicId " + WallerGroup.Key + " Found " + WallerGroup.Count() + " Times"), 800 , 200 + i * 20);
    					i++;
    					foreach (var Waller in WallerGroup) 
    					{
    						DefaultFont.DrawText(DefaultFont.GetTextLayout( (WallerGroup.Count() == 1)? "Champion":"Rare"), Waller.FloorCoordinate.ToScreenCoordinate().X , Waller.FloorCoordinate.ToScreenCoordinate().Y);
    					}
    				}
    			}			
    		}
    	}
    }
    Last edited by RNN; 11-03-2020 at 05:58 PM.

  5. Thanks JohnWick (1 members gave Thanks to RNN for this useful post)
  6. #5
    JohnWick's Avatar Member
    Reputation
    13
    Join Date
    Mar 2017
    Posts
    103
    Thanks G/R
    84/8
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Perfect, thank you very much )

Similar Threads

  1. Replies: 2
    Last Post: 08-15-2006, 12:13 AM
  2. Searching for Voice Actors/In-Game Actors
    By Örpheus in forum World of Warcraft General
    Replies: 1
    Last Post: 08-01-2006, 10:03 AM
  3. Check this game out!!!
    By XxKajxX in forum Gaming Chat
    Replies: 8
    Last Post: 07-17-2006, 04:14 PM
  4. Error in checking WoW.exe CRC code hack?
    By Trichelieu in forum World of Warcraft General
    Replies: 0
    Last Post: 06-11-2006, 02:24 PM
  5. Beyond the Deadmines Exploit (check it out! trippy)
    By Utensil in forum World of Warcraft Exploits
    Replies: 3
    Last Post: 04-10-2006, 10:44 PM
All times are GMT -5. The time now is 12:03 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