[C#] Enigma.D3 menu

Shout-Out

User Tag List

Page 18 of 63 FirstFirst ... 141516171819202122 ... LastLast
Results 256 to 270 of 940
  1. #256
    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 ileandros View Post
    Would you suggest this Enigma.D3.Helpers.ActorCommonDataHelper.EnumerateItems(). or the way i am using to enumerate items on the ground?
    Or is there a better way?

    I don't know good c# but i know programming in general. I dont need help in the structure i need help in writting. And i would never use goto, actually i don't know why this even exists cause it could easily cause memory leak. Guess microsoft big heads knows more about it.
    Well, EnumerateGroundItems would probably be more fitting And goto isn't that bad, I've found good use of it sometimes, and I don't see how that would lead to memory leaks unless someone does something really stupid, but then they would probably cause memory leaks in multiple other ways as well ^^

    [C#] Enigma.D3
  2. #257
    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)
    Originally Posted by enigma32 View Post
    Well, EnumerateGroundItems would probably be more fitting And goto isn't that bad, I've found good use of it sometimes, and I don't see how that would lead to memory leaks unless someone does something really stupid, but then they would probably cause memory leaks in multiple other ways as well ^^
    I guess you didn't see the last post i edited
    Anyway how about something like this?
    Code:
    var pt = System.Diagnostics.Stopwatch.StartNew();
                var acd = Enigma.D3.Helpers.ActorCommonDataHelper.EnumerateItems();
    
                foreach (var a in acd)
                {
                    if (BanList.IsItemInBanList(a.x004_Name) == false) //ingore
                    {
                        if (Enigma.D3.Helpers.AttributeHelper.GetAttributeValue(a, Enigma.D3.Enums.AttributeId.ItemQualityLevel) > GlobalVars.ItemQualityLevel) //check quality level
                        {
                            var startLoc = a.x114_ItemLocation;
                            while (a.x114_ItemLocation == startLoc && Distance.GetDistance(a.x0D0_WorldPosX, a.x0D4_WorldPosY, a.x0D8_WorldPosZ) <= 40)
                            {
                                SpellAndHeal.Healing();  //ingore
                                if (pt.Elapsed.TotalMilliseconds >= 5000) //avoid infinity loop
                                {
                                    return;
                                }
                                if (ActorCommonDataHelper.GetLocalAcd().x188_Hitpoints < 1) //ignore
                                {
                                    return;
                                }
                                //Loot here
                            }
    
                        }
                    }
                }

  3. #258
    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 ileandros View Post
    I guess you didn't see the last post i edited
    Anyway how about something like this?
    If you would be so clever to check what the EnumerateGroundItems method does, you would see that -1 returns ground items. What about it? If it works it works? You're doing things that I cannot evaluate is good or bad. I would probably build a list of items to loot, return that and have it handled in an upper level.

  4. #259
    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)
    Originally Posted by enigma32 View Post
    If you would be so clever to check what the EnumerateGroundItems method does, you would see that -1 returns ground items. What about it? If it works it works? You're doing things that I cannot evaluate is good or bad. I would probably build a list of items to loot, return that and have it handled in an upper level.
    Well i already have the grablist in an inifile returned in a multi dimension array and also have a banlist. What i was thinking about it to bring out a list of offsets of the items on the ground. Then check them depending on the grablist and the banlist and then move on the loot. The above code is a mess. Just testing.

    Thank you for the support

  5. #260
    axlrose's Avatar Member
    Reputation
    1
    Join Date
    May 2014
    Posts
    35
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi!

    anybody have an idea how to get the world position of the currently active quest objective (blinking circle / arrow in the minimap)?

    Thanks...

  6. #261
    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)
    Hello enigma,

    I have a problem. Actually i think RActors has one
    I am trying to enumerate all actors. So what i am doing is the code below:
    Code:
    ExpandableContainer<Actor> actors = Engine.Current.ObjectManager.x910_RActors;
                    for (short i = 0; i < actors.x10C_Count; i++)
                    {
                        if (actors[i].x088_AcdId != -1)
                        {
                            count++;
                            Console.WriteLine(actors[i].x004_Name);
                        }
                    }
                    Console.WriteLine(count);
    From the console output i can see that not all actors are enumerated and i am not talking about the if statement.
    Try enumerating all actors then drop some items on the ground and enumerate them again. You will see that not all items on the ground are enumerated.
    For example i will test it and it will return me 105. After throwing down 5 items instead of returning 110 counted actors, it will return 109. Why is that?
    Last edited by ileandros; 06-29-2014 at 10:13 PM.

  7. #262
    CrEEzz's Avatar Active Member
    Reputation
    66
    Join Date
    Jan 2014
    Posts
    153
    Thanks G/R
    10/40
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by axlrose View Post
    I'm back, been away for a while (sorry for the delayed response NoCopyPaste). I've ported Enigma's code to C++ so you'll have to think back in C#:

    So for some more info on the NavCell topic:
    - Player position is given by Actor.x0A4_WorldPosX / Y / Z
    - For each Scene in ObjectManager().x798_Storage().x1BC_Scenes().x11C_Items() find the corresponding GlobalDefinitionContainer().SnoDefinition.x10_SnoItemAs<Autogenerated::Scene>() by matching Scene.x0E8_SceneSnoId() == Autogenerated::Scene.x00_SceneSnoId()
    - GlobalDefinitionContainer is currently at 0x01CF596C in 2.0.6
    - Get NavCells from Autogenerated::Scene with Autogenerated::Scene.x180_NavZoneDefinition().GetNavCells() (NavZoneDefinition as described by Enigma). My C++ looks like this
    Code:
            std::vector<NavCell> GetNavCells()
            {
                return Dereference<NavCell>(0x08, x10().x04_Size() / NavCell::SizeOf);
            }
    - Use corresponding Scene.x0FC_MeshMinX and Scene.x100_MeshMinY to offset the NavCell AABB coordinates NavCell.x00_Min.X / Y. This should transform the NavCell coordinates into world space (same as player position).
    - If you would be painting these you'll have to negate X and rotate all by 45° to match the minimap.
    - As mentioned use NavCell.x18_Flags() & 1 for walkable cells.

    BR
    AxlRose
    I had finally time to implement it. And it ALMOST works like a charm. Here is my code:

    Code:
    float plauer_x = ActorHelper.GetLocalActor().x0A4_WorldPosX;
    float plauer_y = ActorHelper.GetLocalActor().x0A8_WorldPosY;
    
    foreach (SnoDefinition<MemoryObject> sno_def in Engine.Current.GlobalDefinitionContainer)
    {
        if (sno_def.x08_SnoGroupId != SnoGroupId.Scene)
            continue;
    
        Scene s = sno_def.x10_SnoItemAs<Scene>();
    
        foreach (SceneRaw sr in Engine.Current.ObjectManager.x798_Storage.x1BC_Scenes)
        {
            if (s.x00_SceneSnoId.x00 == sr.x0E8_SceneSnoId.x00)
            {
                NavCell[] nav_cells = s.x180_NavZoneDef.x0C_NavCells;
    
                if (nav_cells == null)
                    continue;
    
                foreach (NavCell nav_cell in nav_cells)
                {
                    float min_x = nav_cell.x00_Min.x00_X + sr.x0FC_MeshMinX - plauer_x;
                    float min_y = nav_cell.x00_Min.x04_Y + sr.x100_MeshMinY - plauer_y;
    
                    float max_x = nav_cell.x0C_Max.x00_X + sr.x0FC_MeshMinX - plauer_x;
                    float max_y = nav_cell.x0C_Max.x04_Y + sr.x100_MeshMinY - plauer_y;
    
                    nav_cells_vis.Add(new NavCellVis(new PointF(min_x, min_y), new PointF(max_x, max_y), (nav_cell.x18_Flags & 1) != 0));
                }
    
                break;
            }
        }
    }
    I get something like this as a result:

    [C#] Enigma.D3-nav_mesh-png

    Red lines cross at player position. As you can see I miss fragment of navmesh just like one of the Scene SNO's didn't match any Scene. Any ideas where the bug might be?

    Replacing GlobalDefinitionContainer with Engine.Current.SnoGroupsByCode[(int)SnoGroupId.Scene].x10_Container didn't change anything.
    Last edited by CrEEzz; 06-30-2014 at 11:59 AM.

  8. #263
    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)
    So anyone has an idea what is going on?

  9. #264
    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 ileandros View Post
    Hello enigma,

    I have a problem. Actually i think RActors has one
    I am trying to enumerate all actors. So what i am doing is the code below:
    Code:
    ExpandableContainer<Actor> actors = Engine.Current.ObjectManager.x910_RActors;
                    for (short i = 0; i < actors.x10C_Count; i++)
                    {
                        if (actors[i].x088_AcdId != -1)
                        {
                            count++;
                            Console.WriteLine(actors[i].x004_Name);
                        }
                    }
                    Console.WriteLine(count);
    From the console output i can see that not all actors are enumerated and i am not talking about the if statement.
    Try enumerating all actors then drop some items on the ground and enumerate them again. You will see that not all items on the ground are enumerated.
    For example i will test it and it will return me 105. After throwing down 5 items instead of returning 110 counted actors, it will return 109. Why is that?
    Actors are created and deleted all the time, several ones for various effects and weird proxy actors. The fact that you drop 5 items and count only rises 4 says NOTHING, count should be flickering around to be honest. Are you actually missing actors or are you just guessing? Can it be reproduced and does it happen every time?

  10. #265
    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)
    Originally Posted by enigma32 View Post
    Actors are created and deleted all the time, several ones for various effects and weird proxy actors. The fact that you drop 5 items and count only rises 4 says NOTHING, count should be flickering around to be honest. Are you actually missing actors or are you just guessing? Can it be reproduced and does it happen every time?
    Well it can be reproduced with the simple code above. List all the actors, fast throw the items down and then list all the actors again. Even if the numbers are not correct you can see it with your own eyes in the list... Not all items that were dropped down are listed. It happens like 90% of the times.

    I had the same problem when i created an attack function. I was listing all the monsters and then procceed to attack. I was seeing that sometimes it would skip some monsters but i didn't pay attention.

  11. #266
    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)
    And here is a small reproducer:
    Code:
    ExpandableContainer<Actor> actors = Engine.Current.ObjectManager.x910_RActors;
                    for (short i = 0; i < actors.x10C_Count; i++)
                    {
                        if (actors[i].x088_AcdId != -1)
                        {
                            if (ActorCommonDataHelper.GetAcd(actors[i].x088_AcdId).x184_ActorType == ActorType.Item)
                            {
                                Console.WriteLine(actors[i].x004_Name);
                            }
                        }
                    }

  12. #267
    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 ileandros View Post
    Well it can be reproduced with the simple code above. List all the actors, fast throw the items down and then list all the actors again. Even if the numbers are not correct you can see it with your own eyes in the list... Not all items that were dropped down are listed. It happens like 90% of the times.

    I had the same problem when i created an attack function. I was listing all the monsters and then procceed to attack. I was seeing that sometimes it would skip some monsters but i didn't pay attention.
    Meh... use the helper class instead, it works flawlessly! I've been through this before, Count = number of VALID items (ID != -1) and is thus not good enough for enumeration.

  13. #268
    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)
    Originally Posted by enigma32 View Post
    Meh... use the helper class instead, it works flawlessly! I've been through this before, Count = number of VALID items (ID != -1) and is thus not good enough for enumeration.
    What you mean use helper for enumeration? If you mean check if our actor is valid like this:
    Code:
    ExpandableContainer<Actor> actors = Engine.Current.ObjectManager.x910_RActors;
                    for (short i = 0; i < actors.x10C_Count; i++)
                    {
                        if (ActorCommonDataHelper.GetAcd(actors[i].x088_AcdId) != null)
                        {
                            if (ActorCommonDataHelper.GetAcd(actors[i].x088_AcdId).x184_ActorType == ActorType.Item)
                            {
                                Console.WriteLine(actors[i].x004_Name);
                            }
                        }
                    }
    then yes it returns more actors but still the problem remains...
    I see in the ActorCommonDataHelper you have enumerate as well but it just returns an int so i cant, or to say it better, i don't know if i can loop through that.

    P.S. Sorry but i think the ownedcore server is messing up because i am having problems loading the site.

  14. #269
    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)
    You mean ActorHelper.Enumerate(...)
    Gonna give that a try:

    Edit: Yep that did the trick. Some test showed that it works flawlessly

    Thanks

  15. #270
    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)
    Hey again

    What i am currently doing to check if i picked up an item is this:
    Code:
    var startloc = ActorCommonDataHelper.GetAcd(offset).x114_ItemLocation;  //will return me the location before trying to loot
    while (ActorCommonDataHelper.GetAcd(offset).x114_ItemLocation == startloc)  //will loop and break when item is looted
    {
        //loot here
    }
    This works good for items but i am facing a problem with gold and globes. Their location is always -1 so after looting they still remain -1.
    Is there a way to determine if the gold was picked up or the globe was taken to break the while loop?

    P.s my way goes like this ==> Enumerate actors and return an array with all actors and their offsets + some other infos i need. Loop through the array of the offsets and determine if it is a loot and if it is a loot then i loot it. But as i am saying above o am having difficulties with gold and globes since i cant seem to find a way to see if they are looted.
    Last edited by ileandros; 06-30-2014 at 08:55 PM.

Page 18 of 63 FirstFirst ... 141516171819202122 ... 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:56 AM. 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