Fastes way to get skill stack count? menu

User Tag List

Results 1 to 2 of 2
  1. #1
    JarJarD3's Avatar Contributor
    Reputation
    106
    Join Date
    Oct 2017
    Posts
    395
    Thanks G/R
    41/101
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Fastes way to get skill stack count?

    Which is fastest way to get skill stack count?
    AFAIK there is no direct way to read it from any THUD provided object like for example charges (or cooldowns).

    I have used BuffRuleCalculator to read stack count for me.

    For curiosity's sake I tested reading it "directly" from UI and it works.

    Doing this requires you to register beforehand "stackcount" UI element you want to watch and to convert its contents to text when you "read" it.
    I haven't done any performance analysis which method is faster as I'm afraid that it is hard to do.
    If BuffRuleCalculator reads the stack count directly from memory it might be faster than using OCR to read text from UI element?
    Assuming that IUiElement.ReadText() uses OCR as its parameters implies.

    It seems that stack count is not straightforward to read from memory, otherwise we would have as an attribute in IPlayerSkill or IBuff like important attributes.

    Code:
    private bool firstTime = true;
    private static string[] uiElementNames = new string[]
    {
            "Root.NormalLayer.game_dialog_backgroundScreenPC.game_skill_hotbar_1",
            "Root.NormalLayer.game_dialog_backgroundScreenPC.game_skill_hotbar_1.stackcount",
            "Root.NormalLayer.game_dialog_backgroundScreenPC.game_skill_hotbar_2",
            "Root.NormalLayer.game_dialog_backgroundScreenPC.game_skill_hotbar_2.stackcount",
            "Root.NormalLayer.game_dialog_backgroundScreenPC.game_skill_hotbar_3",
            "Root.NormalLayer.game_dialog_backgroundScreenPC.game_skill_hotbar_3.stackcount",
            "Root.NormalLayer.game_dialog_backgroundScreenPC.game_skill_hotbar_4",
            "Root.NormalLayer.game_dialog_backgroundScreenPC.game_skill_hotbar_4.stackcount",
            "Root.NormalLayer.game_dialog_backgroundScreenPC.game_activeSkillLeft",
            "Root.NormalLayer.game_dialog_backgroundScreenPC.game_activeSkillLeft.stackcount",
            "Root.NormalLayer.game_dialog_backgroundScreenPC.game_activeSkillRight",
            "Root.NormalLayer.game_dialog_backgroundScreenPC.game_activeSkillRight.stackcount",
    };
    private string checkForSomething()
    {
        if (firstTime)
        {
            firstTime = false;
    
            var skill = 0;
            for (var i = 0; i < uiElementNames.Length; i += 2)  // Even elements are skill button IUiElement.
            {
                skill += 1;
                var name = uiElementNames[i];
                var uiElement = Hud.Render.GetUiElement(name);
                if (uiElement != null)
                {
                    Hud.Debug(string.Format("IUiElement {0} {1},{2}", name, uiElement.Rectangle.X, uiElement.Rectangle.Y));
                    var nameText = uiElementNames[i + 1];
                    Hud.Render.RegisterUiElement(nameText, uiElement, null);
                    Hud.Debug(string.Format("RegisterUiElement {0}", nameText));
                }
                if (skill == 4)
                {
                    break;
                }
                skill += 1;
            }
        }
        var builder = new StringBuilder("Stacks ");
        for (var i = 1; i < uiElementNames.Length; i += 2)  // Odd elements are skill button stack IUiElement.
        {
            var uiElement = Hud.Render.GetUiElement(uiElementNames[i]);
            if (uiElement != null)
            {
                var text = uiElement.ReadText(Encoding.ASCII, removeColors: true);
                if (text?.Length > 0)
                {
                    builder.Append((i / 2) + 1).Append('=').Append(text).Append(' ');
                }
            }
        }
        return builder.ToString();
    }

    Fastes way to get skill stack count?
  2. #2
    JarJarD3's Avatar Contributor
    Reputation
    106
    Join Date
    Oct 2017
    Posts
    395
    Thanks G/R
    41/101
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    I'll reply myself as answer was so obvious: BuffRuleCalculator line 66.
    It can be read from memory but not in a very straightforward way.

Similar Threads

  1. yo whats a fast way to get ad
    By imunderyourbed in forum Neverwinter
    Replies: 11
    Last Post: 10-14-2021, 11:23 PM
  2. another fast way to get xp
    By Distiny in forum Diablo 3 Guides
    Replies: 2
    Last Post: 05-18-2012, 03:46 AM
  3. [How-To] Halls of Lightning: Fast way to get your Swift Lovebird mount! *Rogue Special*
    By wat152 in forum World of Warcraft Guides
    Replies: 6
    Last Post: 02-17-2012, 04:48 AM
  4. Fast way to get ahead in leveling for 85.
    By Reload00 in forum World of Warcraft Exploits
    Replies: 3
    Last Post: 12-04-2010, 02:33 PM
  5. Fast way to get Necrotic Plague Stack higher
    By d0minick in forum World of Warcraft Exploits
    Replies: 4
    Last Post: 10-11-2010, 02:56 PM
All times are GMT -5. The time now is 07:44 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