[C#] Enigma.D3 menu

User Tag List

Page 5 of 63 FirstFirst 12345678955 ... LastLast
Results 61 to 75 of 940
  1. #61
    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 BladeM View Post
    hi there m8 first of all you have done an amazing work here...you give us a dll that literally strips down d3 ...my problem is that i'm new to d3 botting and i want to try making a simple bot that opens chest and loots items (not the pixel search way) but i don't know how the d3 structure work here or where the data are stored and how to fetch them with your dll...any more in-depth help on how to start or if you know any other thread to help me start understanding how d3 works would be very helpful! i have done in the past a fishing and gathering bot in wow relaying only on memory reading though it took me some months since i get into it but i did it at the end... of course i could not do a shit if the ownedcore community was not existing which gave me a lot of information and guides to understand how things work... Thanks in advance and again as KillerJohn said your code is a truly state of art!
    Thanks for the rep and kind words!

    Getting chests:
    Code:
    if (acd.x180_GizmoType == GizmoType.LoreChest) ...
    
    private static bool IsValidGizmoChest(ActorCommonData acd)
    {
        return (acd.x24C_Flags & 0x400) == 0 &&
            Attributes.ChestOpen.GetValue(acd) != 1;
    }
    
    
    private static bool IsValidGizmoLoreChest(ActorCommonData acd)
    {
        // this overload doesn't exist in live version, 0xA0000 is the "modifier"
        return Attributes.ChestOpen.GetValue(acd, 0xA0000) != 1;
    }
    Getting info where they are in the world is easy, but for knowing where to click I have no translation. If you look at old AutoIT frameworks they probably have some viewport calculations or what they call it to figure out what pixel to click on.

    [C#] Enigma.D3
  2. #62
    NoCopyPaste's Avatar Member
    Reputation
    1
    Join Date
    Apr 2014
    Posts
    19
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Enigma,

    I have problems getting my Resource value, the Code is used basically looked like this:
    Code:
     ActorCommonData acd = ActorCommonDataHelper.GetLocalAcd();
                double mainRessource = AttributeHelper.GetAttributeValue(acd, AttributeId.ResourceCur);
    I tried AttributeId.ResourcePercent as well, but both always return 0.
    Am I doing something wrong? My Code works fine with all other Attributes, I tried.

    It would be very nice, if you could help me on this

    Keep up your awesome work

    NoCopyPaste

  3. #63
    yondervaluabletuna's Avatar Private
    Reputation
    1
    Join Date
    Apr 2014
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Resources are a little trickier than that. They work differently for some classes, and some classes have more than one. Try this:

    Code:
    var acd = Enigma.D3.Helpers.ActorCommonDataHelper.GetLocalAcd();
    var modifier = (int) Enigma.D3.Helpers.AttributeHelper.GetAttributeValue(acd, Enigma.D3.Enums.AttributeId.ResourceTypePrimary);
    var rCur = Enigma.D3.Helpers.AttributeHelper.GetAttributeValue(acd, Enigma.D3.Enums.AttributeId.ResourceCur, modifier);
    var rMax = Enigma.D3.Helpers.AttributeHelper.GetAttributeValue(acd, Enigma.D3.Enums.AttributeId.ResourceMaxTotal, modifier);
    Console.WriteLine(rCur + "/" + rMax);
    Last edited by yondervaluabletuna; 05-05-2014 at 01:36 PM.

  4. #64
    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)
    Hi NCP,

    You need to enter a modifier for that attribute, namely a value that tells the resource type.
    "Mana" = 0,
    "Arcanum" = 1,
    "Fury" = 2,
    "Spirit" = 3,
    "Power" = 4,
    "Hatred" = 5,
    "Discipline" = 6,
    "Faith" = 7

    I've updated AttributeHelper.cs so modifiers can be used with the "prepared" attributes as well.
    The following works for me, getting current amount of fury:

    Attributes.ResourceCur.GetValue(ActorCommonDataHelper.GetLocalAcd(), 2)

  5. #65
    NoCopyPaste's Avatar Member
    Reputation
    1
    Join Date
    Apr 2014
    Posts
    19
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    wohoo it works!
    thank you!

    But I still have another question:
    It seems like Items are no longer in the Actor List after some time, does anyone know why or how to fix this?

    Thanks for your support
    NoCopyPaste

  6. #66
    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)
    What kind of items? If you go outside a certain range they (ground items) will disappear. You do mean Actor and not ActorCommonData?

  7. #67
    NoCopyPaste's Avatar Member
    Reputation
    1
    Join Date
    Apr 2014
    Posts
    19
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have a programm iterating over all actors and showing some of the actorCommonData, if its ActorType is Item of Gizmo, the Items dissapear after some time even if their still on screen
    my code looks like this:
    Code:
     static void Main(string[] args)
            {
                Engine.Create();
                // List of actors
                ExpandableContainer<Actor> actors = Engine.Current.ObjectManager.x910_RActors;
    
                for (short i = 0; i < actors.x10C_Count; i++)
                {
                    Actor currentActor = actors[i];
                    ActorCommonData acd = Enigma.D3.Helpers.ActorCommonDataHelper.GetAcd(currentActor.x088_AcdId);
    
                    if (((short)acd.x08C_ActorId) > 0 && !((short)acd.x08C_ActorId == 4352) && (acd.x184_ActorType == ActorType.Gizmo || acd.x184_ActorType == ActorType.Item))
                    {
                        int[] pos = FromD3toScreenCoords(acd.x0D0_WorldPosX, acd.x0D4_WorldPosY, acd.x0D8_WorldPosZ);
                        Console.WriteLine("Name: " + acd.x004_Name + " ID: " + (short)acd.x08C_ActorId + " @: " + pos[0] + " , " + pos[1] + " Type: " + acd.x184_ActorType);
                        if (acd.x184_ActorType == ActorType.Item)
                        {
                            Console.WriteLine("Quality: " + (ItemQuality)AttributeHelper.GetAttributeValue(acd, AttributeId.ItemQualityLevel));
                        }
                        if (acd.x184_ActorType == ActorType.Monster || acd.x184_ActorType == ActorType.Player)
                        {
                            Console.WriteLine("MonsterLevel: " + (MonsterQuality)acd.x0B8_MonsterQualityLevel);
                            Console.WriteLine("With " + (int)acd.x188_Hitpoints + " Hitpoints");
                        }
                        if (acd.x184_ActorType == ActorType.Gizmo)
                        {
                            Console.WriteLine("Type " + acd.x180_GizmoType);
                        }
                    }
                }
                // Keep the console window open in debug mode.
                Console.WriteLine("Press any key to exit.");
                Console.ReadKey();
            }

  8. #68
    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)
    Don't use Count for iteration, use MaxIndex (cast it to short, will be 0x0000FFFF = -1 if empty). When entries are removed from the collection, gaps are created. These are typically filled with new entries as they are added, but indexes high up could take some time to fill up or be removed.

    If you're gonna iterate all actors then you're better of using foreach on the container, would save a few reads.

    EDIT: You can now use ActorHelper.Enumerate(...)
    Although, from your example you're not using Actor anywhere, you just use it to get an ACD. Maybe you only need ACDs.
    Last edited by enigma32; 05-05-2014 at 03:45 PM.

  9. #69
    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)
    I've improved overall performance a bit

    Measuring using the following code:
    Code:
    static void Main(string[] args){
        var engine = Engine.Create();
        var acds = new ActorCommonData[0];
        var pt = System.Diagnostics.Stopwatch.StartNew();
        for (int i = 0; i < 1000; i++)
        {
            acds = ActorCommonDataHelper.EnumerateMonsters().ToArray();
        }
        pt.Stop();
        Console.WriteLine("Getting all monster ACDs 1000 times took " + pt.Elapsed.TotalMilliseconds.ToString("0.00") + "ms");
        Console.WriteLine("Max update frequency: " + (1000d / (pt.Elapsed.TotalMilliseconds / 1000)).ToString("0") + "Hz");
        Console.WriteLine("Number of ACDs: " + ActorCommonDataHelper.Enumerate(a => true).Count());
        Console.ReadLine();
    }
    With Enigma.D3 rev 7:
    Getting all monster ACDs 1000 times took 5339.60ms
    Max update frequency: 187Hz
    Number of ACDs: 194

    With Enigma.D3 rev 8:
    Getting all monster ACDs 1000 times took 1971.03ms
    Max update frequency: 507Hz
    Number of ACDs: 194


    Now some experimental variations on the code above:

    With Enigma.D3 rev 8, using a shared buffer for all updates (this is work in progress):
    Getting all monster ACDs 1000 times took 285.62ms
    Max update frequency: 3501Hz
    Number of ACDs: 194

    With Enigma.D3 rev 8, using shared buffer and being clever about object creation (also work in progress):
    Getting all monster ACDs 1000 times took 235.32ms
    Max update frequency: 4250Hz
    Number of ACDs: 194

  10. #70
    raler's Avatar Member
    Reputation
    1
    Join Date
    Apr 2014
    Posts
    8
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So I have to say that your code is absolutely stunning! As of now I have been able to explore most every aspect of the game with it! Having a debug overlay as such: Debug Overlay has helped me a ton when looking for specific items/mobs.

    However, I am unsure as to how I would go about getting the position and validity of UIElements. For example, how would I be able to tell if the inventory window is open or not? I have looked through all of the UI related code and have need seen any indication as to the status or position of an Element. Any help would be much appreciated!

    Also, killer job with the performance enhancements. I can't wait until the new experimental versions are perfected and implemented!

  11. #71
    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 raler View Post
    So I have to say that your code is absolutely stunning! As of now I have been able to explore most every aspect of the game with it! Having a debug overlay as such: Debug Overlay has helped me a ton when looking for specific items/mobs.

    However, I am unsure as to how I would go about getting the position and validity of UIElements. For example, how would I be able to tell if the inventory window is open or not? I have looked through all of the UI related code and have need seen any indication as to the status or position of an Element. Any help would be much appreciated!

    Also, killer job with the performance enhancements. I can't wait until the new experimental versions are perfected and implemented!
    Thanks Do you mind sharing the code/algorithm for how to get the screen position?

    I've added UIControl but I'm not sure what the size is, so I just threw in some fields. I think size varies depending on what type of control it is, but maybe extended controls will do so by pointers. Anyways, what you asked for I've found. Getting a UIControl can be done as follows:

    Engine.Current.ObjectManager.x984_UI.x10_Map["Root.NormalLayer.inventory_dialog_mainPage"].Dereference<UIControl>()
    You have an array of UIReferences (with control names) directly in Engine, but only statically defined ones. Dynamic elements such as tooltips are a bit special. Afaik these static elements should be at the same addresses for a single game. Controls are created when entering a game, and destroyed when leaving. There are also a few UIReferences in UIManager for LastClicked, MouseOver etc. to help you get names.

    x024_Visibility seems to be 23 for when a control is visible, 1 probably means created but hidden.
    x4E8_UIRect is the position. See UIRect.TranslateToClientRect for how to make it into screen coordinates. By client width/height that means window size without the "chrome", you know border and title bar.

    Have fun!

    EDIT: Seems x4D8 is the offset to use, not sure what x4E8 is the size of then.
    Last edited by enigma32; 05-10-2014 at 01:03 PM.

  12. #72
    raler's Avatar Member
    Reputation
    1
    Join Date
    Apr 2014
    Posts
    8
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by enigma32 View Post
    Thanks Do you mind sharing the code/algorithm for how to get the screen position?
    Sure! This is the code that I currently use. However, I've only been able to get it to work in WindowedFullscreen mode. It works perfectly for 1920x1080 resolution! I'm not sure about others, but I don't see why it wouldn't work for any resolution.

    Code:
            public static Point FromD3toScreenCoords(Vector3 objectGameLocation)
            {
                Vector3 currentCharGameLoc = Game.Me.Location;
    
                double xd = objectGameLocation.X - currentCharGameLoc.X;
                double yd = objectGameLocation.Y - currentCharGameLoc.Y;
                double zd = objectGameLocation.Z - currentCharGameLoc.Z;
    
                double w = -0.515 * xd + -0.514 * yd + -0.686 * zd + 97.985;
                double X = (-1.682 * xd + 1.683 * yd + 0 * zd + 7.045e-3) / w;
                double Y = (-1.54 * xd + -1.539 * yd + 2.307 * zd + 6.161) / w;
    
                double width = Engine.Current.VideoPreferences.x0C_DisplayMode.x20_Width;
                double height = Engine.Current.VideoPreferences.x0C_DisplayMode.x24_Height;
    
                double aspectChange = (double)((double)width / (double)height) / (double)(4.0f / 3.0f); // 4:3 = default aspect ratio
    
                X /= aspectChange;
    
                float rX = (float)((X + 1) / 2 * width);
                float rY = (float)((1 - Y) / 2 * height);
    
                return new Point((int)rX, (int)rY);
            }

  13. #73
    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)
    Ferroks, your inbox is full. Please use this thread instead when asking about Enigma.D3

    Regarding your question, that's not even made by me. If you don't know how to get that info on the screen then you need to go learn basic UI programming. Make a transparent window if you don't want to inject.

  14. #74
    yondervaluabletuna's Avatar Private
    Reputation
    1
    Join Date
    Apr 2014
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just updated from r6 to r9. No troubles and monster-enumerating is nice and speedy! Bravo.

    I also appreciate the discussion happening in this thread. Looking forward to playing with the UIControls soon.

  15. #75
    raler's Avatar Member
    Reputation
    1
    Join Date
    Apr 2014
    Posts
    8
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey Enigma. I was doing some playing around with the UI control that you added, and it seems as if the visibility is dependent on the first 5 bits of the offset 0x024. The only reason I say this is that I had some issues with the int values being wayyyy off for some reason. This means that the visibility read should be:
    Code:
    public Visibility x024_Visibility { get { return (Visibility)(Field<byte>(0x024) & 0x17); } }
    With Visibility being:
    Code:
    public enum Visibility
    {
        Hidden = 1,
        Visible = 23
    }
    I think this is correct, however I could be extremely wrong as I have only tested it with a few controls. Let me know what you think!

    EDIT: It looks as though it is the 0x04 value that is the flag for visibility. Change the above to Hidden = 0, Visible = 4, and 0x04 instead of 0x17 in the getter.
    Last edited by raler; 05-12-2014 at 11:26 PM.

Page 5 of 63 FirstFirst 12345678955 ... 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 07:43 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