[C#] Enigma.D3 menu

User Tag List

Page 15 of 63 FirstFirst ... 111213141516171819 ... LastLast
Results 211 to 225 of 940
  1. #211
    ileandros's Avatar Member
    Reputation
    1
    Join Date
    Jul 2012
    Posts
    60
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I know it will do it's magic but the coords returned are wrong for me.
    In me 1600x900 laptop my code will return
    768
    988
    832
    1052
    while this one will return a bit different.
    776.25
    741
    824,25
    789

    And that is why i want to performe a memory read to return the coords exact as my code...
    Last edited by ileandros; 06-14-2014 at 08:32 AM.

    [C#] Enigma.D3
  2. #212
    azgul's Avatar Member
    Reputation
    8
    Join Date
    Jun 2012
    Posts
    107
    Thanks G/R
    3/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    did you change

    Code:
    UIRect rect = control.x4D8_UIRect.TranslateToClientRect(1920, 1080);
    ? I'm pretty sure that I've seen functions that can return client width/height, but I just needed something quick and dirty hence I hard-coded it.

  3. #213
    ileandros's Avatar Member
    Reputation
    1
    Join Date
    Jul 2012
    Posts
    60
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It is my error.
    I was actually searching for:
    Code:
    point[0] = control.x4D8_UIRect.Left;
                point[1] = control.x4D8_UIRect.Top;
                point[2] = control.x4D8_UIRect.Right;
                point[3] = control.x4D8_UIRect.Bottom;
    Thanks

  4. #214
    Thacai's Avatar Member
    Reputation
    1
    Join Date
    Mar 2008
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by enigma32 View Post
    Since you people seem really interested in a map hack I'll post/commit this later today or tomorrow. Have to finish some other stuff before I have time to deal with it. If anyone wanna be prepared, go learn WPF
    thumbs up! waiting with excitement

  5. #215
    tgo's Avatar Member
    Reputation
    1
    Join Date
    Jun 2012
    Posts
    15
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ileandros i was just exploring this part of the framework yestrday and here are some tips that i have found.

    All the uiControls have two UIRect properties, they are both used by the game.
    Each UIRect is projected on 1600x1200 by Diablo and then scaled according to your resolution and format (4:3, 16:9) and so on.

    There is a method that will translate each UIRect to your specific screen format called TranslateToClientRect(1920, 1080) // This works for me

    One thing you can do that is very simple to play around with this type of code is to create a transparent form and transpose it over the game it self.
    Sample code that can help everyone

    The code below will create a new engine and find all the ui controls that are visible, create a new form and pass the controls to it so they can be draw.
    Code:
    private void button14_Click(object sender, EventArgs e)
            {
                // Get the current engine
                Engine ee = Engine.Create();
    
                // Get all the ui map objects
                List<UIMap.Pair> test = Engine.Current.ObjectManager.x984_UI.x0000_Controls.x10_Map.ToList();
    
                // Create a list of controls
                List<UIControl> uiControls = new List<UIControl>();
    
                // For each control in the map get the reference control
                foreach (UIMap.Pair itemmap in test)
                {
                    uiControls.Add(Engine.Current.ObjectManager.x984_UI.x0000_Controls.x10_Map[itemmap.x08_Hash].Dereference<UIControl>());
                }
    
                // Filter the visible controls or any other filtering
                uiControls = uiControls.Where(x => x.x024_Visibility == 23).ToList();
                
                // Create a new form to draw
                frmScreenDraw = new frmScreenDraw();
    
                // Get the current screen bounds
                System.Windows.Forms.Screen[] screens = System.Windows.Forms.Screen.AllScreens;
    
                // Set the bounds to the secondary monitor (my case monitors are reversed Primary = 1, Secondary = 0)
                Rectangle bounds = screens[0].Bounds;
    
                // Set the form bounds to the screen size
                frmScreenDraw.SetBounds(bounds.X, bounds.Y, bounds.Width, bounds.Height);
    
                // Set the screen position as manual
                frmScreenDraw.StartPosition = FormStartPosition.Manual;
    
                // Show the form
                frmScreenDraw.Show();
    
                // Draw the list of controls
                frmScreenDraw.DrawOnForm(uiControls);
            }
    Below is the code for the form to draw on the screen
    Code:
    namespace MyNamespace
    {
        using System;
        using System.Collections.Generic;
        using System.Drawing;
        using System.Windows.Forms;
    
        using Enigma.D3.UI;
    
        public partial class frmScreenDraw : Form
        {
            public frmScreenDraw()
            {
                // Set the back color as lime
                this.BackColor = System.Drawing.Color.Lime;
    
                // Set the all lime color to be transparent
                this.TransparencyKey = System.Drawing.Color.Lime;
    
                // Enable double buffer so the form does not flicker on the screen
                this.DoubleBuffered = true;
    
                // Initalize all the other components
                InitializeComponent();
            }
    
            public void DrawOnForm(List<UIControl> controls)
            {
                // Get Client screen constants
                System.Windows.Forms.Screen[] screens = System.Windows.Forms.Screen.AllScreens;
    
                // Set the client width and height based on the monitor screen area
                int clientWidth = screens[0].Bounds.Width;
                int clientHeight = screens[0].Bounds.Height;
    
                // Crate an image 
                Bitmap myImage = new Bitmap(clientWidth, clientHeight);
    
                // Set the client size
                pictureBox1.ClientSize = new Size(clientWidth, clientHeight);
    
                // Create a graphics object
                using (Graphics g = Graphics.FromImage(myImage))
                {
                    // For each control
                    foreach (UIControl control in controls)
                    {
                        // Get the first ui control rect and translate it to the client screen size
                        UIRect uiRectMain = control.x4D8_UIRect.TranslateToClientRect(clientWidth, clientHeight);
    
                        // Get the second ui control rect and translate it to the client screen size
                        UIRect uiRectSecondary = control.x4E8_UIRect.TranslateToClientRect(clientWidth, clientHeight);
    
                        // Some coordinates are not valid
                        try
                        {
                            // Draw the main rectangle with deep blue color
                            g.DrawRectangle(Pens.DeepSkyBlue, uiRectMain.Left, uiRectMain.Top, uiRectMain.Width, uiRectMain.Height);
    
                            // Write the name of the primary rect
                            g.DrawString(control.x030_Self.x008_Name, DefaultFont, Brushes.DeepSkyBlue, uiRectMain.Left + 2, uiRectMain.Top + 3);
    
                            // Draw the secondary rectangle with red
                            g.DrawRectangle(Pens.Red, uiRectSecondary.Left, uiRectSecondary.Top, uiRectSecondary.Width, uiRectSecondary.Height);
    
                            // Write the name of the secondary rect
                            g.DrawString(control.x030_Self.x008_Name, DefaultFont, Brushes.Red, uiRectSecondary.Left + 2, uiRectSecondary.Top + 3);
                        }
                        catch (Exception ex){ }
                    }
                }
    
                // Set the image to the picture box
                pictureBox1.Image = myImage;
            }
        }
    }
    Image of how it looks on my screen
    [C#] Enigma.D3-screentest-jpg

  6. #216
    enigma32's Avatar Legendary
    Reputation
    912
    Join Date
    Jan 2013
    Posts
    551
    Thanks G/R
    4/738
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by tgo View Post
    Image of how it looks on my screen
    [C#] Enigma.D3-screentest-jpg
    Could we assume the red rects are for 4:3 resolution (narrowest possible) and the blue ones adapted for actual screen ratio?

    A tip on your enumeration. You're first getting all pairs from the map, then for each pair you're looking it up in the map in order to get the pointer to ui control. You could actually just use x10_PtrComponent on the pair to get that pointer immediately
    Last edited by enigma32; 06-14-2014 at 05:55 PM.

  7. #217
    enigma32's Avatar Legendary
    Reputation
    912
    Join Date
    Jan 2013
    Posts
    551
    Thanks G/R
    4/738
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    MapHack is ready! Code commited and here is a link to the binaries if anyone just wants those.
    https://jumpshare.com/v/VI2d5nzpfBuy...HkOqfGkXrg74ZY

    Obviously, use at your own risk!
    A transparent window is created that uses D3 as its owner. That means it will follow D3 visibility, and is probably easier to detect than other windows. Do I think it will get you banned? Nah. It also means that if this program isn't responding, D3 will also stop responding.

    If you run with your character quickly around in a tight circle you'll see that the center position is a bit wrong. I don't know what's wrong, maybe a rounding error somewhere. It might look like it's lagging if making quick turns, which sucks.
    There is also no clipping.

    I make no commitment whatsoever to keep this updated or support neither normal users nor developers! Feel free to make derivative works, but please keep them open source!
    Last edited by enigma32; 06-14-2014 at 10:05 PM.

  8. #218
    XiNiGaMi's Avatar Private
    Reputation
    1
    Join Date
    Jun 2014
    Posts
    2
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Achievement

    I searching for some method to rip the Achievement on json format.
    when i encounter with this community and your framework.
    i wonder if you have some tip.
    trying to analyze the maphack source but when compile them , trow error.
    "This label has not been referenced" and "No such label 'IL_6D' within the scope of the goto statement"
    on MapMarkerAcdMonster.cs


    Nice work whit map hack.

  9. #219
    Thacai's Avatar Member
    Reputation
    1
    Join Date
    Mar 2008
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Really nice maphack, only quirk i seem to be having is that when its active i cant hold down mouse button to keep moving my character around

  10. #220
    enigma32's Avatar Legendary
    Reputation
    912
    Join Date
    Jan 2013
    Posts
    551
    Thanks G/R
    4/738
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by XiNiGaMi View Post
    I searching for some method to rip the Achievement on json format.
    when i encounter with this community and your framework.
    i wonder if you have some tip.
    trying to analyze the maphack source but when compile them , trow error.
    "This label has not been referenced" and "No such label 'IL_6D' within the scope of the goto statement"
    on MapMarkerAcdMonster.cs


    Nice work whit map hack.
    I have no info on achievements. That error sounds really really strange... Maybe you have something that interferes with the build process? I mean, there isn't even a goto in the file.

    Originally Posted by Thacai View Post
    Really nice maphack, only quirk i seem to be having is that when its active i cant hold down mouse button to keep moving my character around
    Works perfectly for me, and I can't think of a good reason why it would behave like that :C I'm running Win 7 with full Aero features, maybe that has anything to do with how transparent windows are handled.

  11. #221
    Thacai's Avatar Member
    Reputation
    1
    Join Date
    Mar 2008
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by enigma32 View Post

    Works perfectly for me, and I can't think of a good reason why it would behave like that :C I'm running Win 7 with full Aero features, maybe that has anything to do with how transparent windows are handled.
    Hmm appears its only when being run directly from visual studio (debug mode), if i just run the exe directly, then it works properly ...

  12. #222
    kjata's Avatar Member
    Reputation
    1
    Join Date
    Apr 2009
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi.
    First of all I want to thank you Enigma, for this awesome framework. I admire your job done creating it, really!

    I am trying to write a simple app that will salvage all yellow/blue items and stash gems, saving my time clicking on each. The salvage part I did works perfectly, but I encountered problem with stashing. I am checking x024_Visibility == 23 property to determine if stash is open, but sometimes it has enormous value regarding if its visible or not.
    Anyone had this problem before and know how to solve it?

    To clarify, my code below:

    Code:
    public static void StashGems()
            {
                var stashTab1 = GetUIControl("Root.NormalLayer.stash_dialog_mainPage.tab_1");
                if (stashTab1 != null && stashTab1._x4B4 == 58 && stashTab1.x024_Visibility == 23) // stash them to first tab
                {
                    List<ClickCoord> gemList = new List<ClickCoord>();
                    String[] stackables = new String[] { "topaz", "ruby", "ameth", "emerald", "diamond" };
    
                    foreach (ActorCommonData inventoryItem in ActorCommonDataHelper.EnumerateInventoryItems())
                    {
                        foreach(String stackable in stackables)
                        {
                            var acd = ActorCommonDataHelper.GetAcd(inventoryItem.x000_Id);
                            if (inventoryItem.x004_Name.ToLower().Contains(stackable))
                            {
                                gemList.Add(new ClickCoord() { X = 1428 + inventoryItem.x118_ItemSlotX * 50, Y = 583 + inventoryItem.x11C_ItemSlotY * 50 });
                                Console.WriteLine("{0} {1} {2}", inventoryItem.x004_Name, inventoryItem.x118_ItemSlotX, inventoryItem.x11C_ItemSlotY);
                            } 
                        }
                    }
                    if (gemList.Any() && IsDiabloWindowActive())
                    {
                        foreach (var item in gemList)
                        {
                            InputManager.Mouse.Move(item.X, item.Y);
                            InputManager.Mouse.PressButton(InputManager.Mouse.MouseKeys.Right);
                        }
                    }
                    gemList.Clear();
                }
            }

  13. #223
    enigma32's Avatar Legendary
    Reputation
    912
    Join Date
    Jan 2013
    Posts
    551
    Thanks G/R
    4/738
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by kjata View Post
    Hi.
    First of all I want to thank you Enigma, for this awesome framework. I admire your job done creating it, really!

    I am trying to write a simple app that will salvage all yellow/blue items and stash gems, saving my time clicking on each. The salvage part I did works perfectly, but I encountered problem with stashing. I am checking x024_Visibility == 23 property to determine if stash is open, but sometimes it has enormous value regarding if its visible or not.
    Anyone had this problem before and know how to solve it?

    To clarify, my code below:

    Code:
    public static void StashGems()
            {
                var stashTab1 = GetUIControl("Root.NormalLayer.stash_dialog_mainPage.tab_1");
                if (stashTab1 != null && stashTab1._x4B4 == 58 && stashTab1.x024_Visibility == 23) // stash them to first tab
                {
                    List<ClickCoord> gemList = new List<ClickCoord>();
                    String[] stackables = new String[] { "topaz", "ruby", "ameth", "emerald", "diamond" };
    
                    foreach (ActorCommonData inventoryItem in ActorCommonDataHelper.EnumerateInventoryItems())
                    {
                        foreach(String stackable in stackables)
                        {
                            var acd = ActorCommonDataHelper.GetAcd(inventoryItem.x000_Id);
                            if (inventoryItem.x004_Name.ToLower().Contains(stackable))
                            {
                                gemList.Add(new ClickCoord() { X = 1428 + inventoryItem.x118_ItemSlotX * 50, Y = 583 + inventoryItem.x11C_ItemSlotY * 50 });
                                Console.WriteLine("{0} {1} {2}", inventoryItem.x004_Name, inventoryItem.x118_ItemSlotX, inventoryItem.x11C_ItemSlotY);
                            } 
                        }
                    }
                    if (gemList.Any() && IsDiabloWindowActive())
                    {
                        foreach (var item in gemList)
                        {
                            InputManager.Mouse.Move(item.X, item.Y);
                            InputManager.Mouse.PressButton(InputManager.Mouse.MouseKeys.Right);
                        }
                    }
                    gemList.Clear();
                }
            }
    Hi What I've seen, the value is typically 3 for hidden and 23 for visible. Difference between 3 and 23 are the 3rd and 5th bit so I'm guessing one of those are the flag for visible. I would recommend either checking that both are set or either one of them. Why there are suddenly huge numbers I don't know, but I've heard of it before. Maybe it's not a 32-bit value but instead 2x 16-bit values where the high one typically isn't set.

  14. #224
    BootHole's Avatar Private
    Reputation
    1
    Join Date
    Jun 2014
    Posts
    1
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Been lurking for a while, would like to say thank you for the framework and the discussion about it. As I'm new to C# this has been a good learning experience. The MapHack that was just released is pretty sweet and will give me a good playground to tool around in to implement my ideas. My crummy version didn't refresh as well as yours does.

    Anyways, I like the idea of drawing Affixes onto elites to let me know what they have. Is there a better way to check for Affixes than to manually create the enum for values that are retrieved using the "MonsterAffixId" variables? My current implementation works but feels clunky.

    Partial code to illustrate my current thoughts:
    PHP Code:
    //Find elites and track affixes to create enum
    Console.WriteLine("Affixes: (" myAffixCount ")[" +
                    
    myMonster.x1AC_Neg1_MonsterAffixId "," +
                    
    myMonster.x1B0_Neg1_MonsterAffixId "," +
                    
    myMonster.x1B4_Neg1_MonsterAffixId "," +
                    
    myMonster.x1B8_Neg1_MonsterAffixId "," +
                    
    myMonster.x1BC_Neg1_MonsterAffixId "," +
                    
    myMonster.x1C0_Neg1_MonsterAffixId "," +
                    
    myMonster.x1C4_Neg1_MonsterAffixId "," +
                    
    myMonster.x1C8_Neg1_MonsterAffixId "," +
                    
    myMonster.x1CC_Neg1_MonsterAffixId +
                    
    "]");

    // Probably not a full list
    public enum AffixesCheck
        
    {
            
    None 0,
            
    ArcaneEnchanted = -1669589516,
            
    Avenger 1165197192,
            
    Electrified = -1752429632,
            
    ExtraHealth = -1512481702,
            
    Frozen = -163836908,
            
    Fast 3775118,
            
    FireChains = -439707236,
            
    FrozenPulse 1886876669,
            
    HealthLink 1799201764,
            
    Horde 127452338,
            
    Illusionist    394214687,
            
    Jailer = -27686857,
            
    Knockback = -2088540441,
            
    Minion 99383434,  // Don't really need to draw on screen
            
    Molten 106438735,
            
    Mortar 106654229,
            
    Nightmarish = -1245918914,
            
    Orbiter 1905614711,
            
    Plagued = -1333953694,
            
    PoisonEnchanted 1929212066,
            
    ReflectsDamage = -1374592233,
            
    Teleport = -507706394,
            
    Thunderstorm = -50556465,
            
    Vampiric 395423867,
            
    Vortex 458872904,
            
    Waller 481181063
        

    Sorry if this has already been discussed and I missed it, but I haven't come across it yet.

  15. #225
    enigma32's Avatar Legendary
    Reputation
    912
    Join Date
    Jan 2013
    Posts
    551
    Thanks G/R
    4/738
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by BootHole View Post
    Been lurking for a while, would like to say thank you for the framework and the discussion about it. As I'm new to C# this has been a good learning experience. The MapHack that was just released is pretty sweet and will give me a good playground to tool around in to implement my ideas. My crummy version didn't refresh as well as yours does.

    Anyways, I like the idea of drawing Affixes onto elites to let me know what they have. Is there a better way to check for Affixes than to manually create the enum for values that are retrieved using the "MonsterAffixId" variables? My current implementation works but feels clunky.

    Partial code to illustrate my current thoughts:
    PHP Code:
    //Find elites and track affixes to create enum
    Console.WriteLine("Affixes: (" myAffixCount ")[" +
                    
    myMonster.x1AC_Neg1_MonsterAffixId "," +
                    
    myMonster.x1B0_Neg1_MonsterAffixId "," +
                    
    myMonster.x1B4_Neg1_MonsterAffixId "," +
                    
    myMonster.x1B8_Neg1_MonsterAffixId "," +
                    
    myMonster.x1BC_Neg1_MonsterAffixId "," +
                    
    myMonster.x1C0_Neg1_MonsterAffixId "," +
                    
    myMonster.x1C4_Neg1_MonsterAffixId "," +
                    
    myMonster.x1C8_Neg1_MonsterAffixId "," +
                    
    myMonster.x1CC_Neg1_MonsterAffixId +
                    
    "]");

    // Probably not a full list
    public enum AffixesCheck
        
    {
            
    None 0,
            
    ArcaneEnchanted = -1669589516,
            
    Avenger 1165197192,
            
    Electrified = -1752429632,
            
    ExtraHealth = -1512481702,
            
    Frozen = -163836908,
            
    Fast 3775118,
            
    FireChains = -439707236,
            
    FrozenPulse 1886876669,
            
    HealthLink 1799201764,
            
    Horde 127452338,
            
    Illusionist    394214687,
            
    Jailer = -27686857,
            
    Knockback = -2088540441,
            
    Minion 99383434,  // Don't really need to draw on screen
            
    Molten 106438735,
            
    Mortar 106654229,
            
    Nightmarish = -1245918914,
            
    Orbiter 1905614711,
            
    Plagued = -1333953694,
            
    PoisonEnchanted 1929212066,
            
    ReflectsDamage = -1374592233,
            
    Teleport = -507706394,
            
    Thunderstorm = -50556465,
            
    Vampiric 395423867,
            
    Vortex 458872904,
            
    Waller 481181063
        

    Sorry if this has already been discussed and I missed it, but I haven't come across it yet.
    That solution sounds reasonable. I guess the biggest problem is having to find those IDs manually. A more efficient way would be to extract that information from the MPQs, but unless you already happen to know how to do that it could take more time than you save

Page 15 of 63 FirstFirst ... 111213141516171819 ... LastLast

Similar Threads

  1. [Hack] Enigma TriggerBot - AutoIT
    By Zolyrica in forum Overwatch Exploits|Hacks
    Replies: 9
    Last Post: 09-12-2016, 02:37 PM
  2. [Release] [C#] 1.0.8.16603 Enigma.D3
    By enigma32 in forum Diablo 3 Memory Editing
    Replies: 33
    Last Post: 05-16-2015, 01:40 PM
  3. Enigma's Smartcast Manager
    By da_bizkit in forum League of Legends
    Replies: 3
    Last Post: 10-22-2012, 02:11 PM
  4. request Blue suede boots -> enigma boots
    By Geico in forum WoW ME Questions and Requests
    Replies: 0
    Last Post: 12-27-2007, 05:40 AM
All times are GMT -5. The time now is 05:03 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search