[Resolved] How to stop Object Manager in the correct spot menu

Shout-Out

User Tag List

Results 1 to 11 of 11
  1. #1
    Jadd's Avatar 🐸 Premium Seller
    Reputation
    1515
    Join Date
    May 2008
    Posts
    2,433
    Thanks G/R
    81/336
    Trade Feedback
    1 (100%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    [Resolved] How to stop Object Manager in the correct spot

    Hello again.

    I've recently switched to C# and have been crossing some of my AutoIt hacks and bots over, including this fishing bot.

    Problem is, it's not properly finding the fishing bobber.

    I've made a little script, showing how it's not working:

    Code:
                uint g_clientConnect = WoW.ReadUInt(0x12705B0);
                uint s_curMgr = WoW.ReadUInt(g_clientConnect + 0x2D94);
                uint curObj = WoW.ReadUInt(s_curMgr + 0xAC);
                uint nextObj = curObj;
                int Started = 1;
    
                while (Started == 1)
                {
                        ObjectName = WoW.ReadASCIIString(WoW.ReadUInt(WoW.ReadUInt(curObj + 0x1A4) + 0x90), 256);
    
                        if (ObjectName == "Fishing Bobber")
                        {
                            MessageBox.Show("Bobber found.");
                        }
    
                        nextObj = WoW.ReadUInt(curObj + 0x3C);
                        if (nextObj == curObj)
                        {
                            curObj = WoW.ReadUInt(s_curMgr + 0xAC);
                            nextObj = curObj;
                        }
                        else
                        {
                            curObj = nextObj;
                        }
                }
    However, I get two problems. The first one is that there is no messagebox come up when I'm fishing. Second one is that after all the objects are scanned (it is then supposed to start the scan again) the program stops and gives me a 'ReadUInt Failed' error.

    Can anyone help?

    And also, please refrain from flaming, I haven't been using C# for long, and I know I've probably made a stupid mistake.

    Thanks.
    Last edited by Jadd; 11-16-2009 at 07:21 AM.

    [Resolved] How to stop Object Manager in the correct spot
  2. #2
    ramey's Avatar Member
    Reputation
    45
    Join Date
    Jan 2008
    Posts
    320
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Jadd View Post
    Hello again.

    I've recently switched to C# and have been crossing some of my AutoIt hacks and bots over, including this fishing bot.

    Problem is, it's not properly finding the fishing bobber.

    I've made a little script, showing how it's not working:

    Code:
                uint g_clientConnect = WoW.ReadUInt(0x12705B0);
                uint s_curMgr = WoW.ReadUInt(g_clientConnect + 0x2D94);
                uint curObj = WoW.ReadUInt(s_curMgr + 0xAC);
                uint nextObj = curObj;
                int Started = 1;
    
                while (Started == 1)
                {
                        ObjectName = WoW.ReadASCIIString(WoW.ReadUInt(WoW.ReadUInt(curObj + 0x1A4) + 0x90), 256);
    
                        if (ObjectName == "Fishing Bobber")
                        {
                            MessageBox.Show("Bobber found.");
                        }
    
                        nextObj = WoW.ReadUInt(curObj + 0x3C);
                        if (nextObj == curObj)
                        {
                            curObj = WoW.ReadUInt(s_curMgr + 0xAC);
                            nextObj = curObj;
                        }
                        else
                        {
                            curObj = nextObj;
                        }
                }
    However, I get two problems. The first one is that there is no messagebox come up when I'm fishing. Second one is that after all the objects are scanned (it is then supposed to start the scan again) the program stops and gives me a 'ReadUInt Failed' error.

    Can anyone help?

    And also, please refrain from flaming, I haven't been using C# for long, and I know I've probably made a stupid mistake.

    Thanks.
    Debug your program. Check when iterating objects can you get any object name? Find out what is causing the ReadUInt error because that's probably related to the object name problem you have. I don't use C#, and I haven't used memory reading in ages so I don't really have a clue what your problem could be. All I have to say is really, debug your code and you should find out pretty fast what the problem is.

  3. #3
    Kryso's Avatar Active Member
    Reputation
    40
    Join Date
    Jul 2009
    Posts
    97
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    1) Only game objects has name on that offset - filter results by object type

    2) End of linked list = when pointer to next node isn't valid.. That means it's equal to 0 or it's odd number ( pointer % 2 == 1 )

  4. Thanks boipus, timginter (2 members gave Thanks to Kryso for this useful post)
  5. #4
    Nesox's Avatar ★ Elder ★
    Reputation
    1280
    Join Date
    Mar 2007
    Posts
    1,238
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    var curObj = Wow.Read<uint>(CurMgr + 0xAC);
    var objectList = new List<WoWObject>();          
    
    while (curObj != 0 && (curObj & 1) == 0)
    {  
        var cGuid = Wow.Read<ulong>(curObj + 0x30);
        var curType = (WoWObjectType)Wow.Read<uint>(curObj + 0x14);
    
        switch (curType)
        {
             case WoWObjectType.GameObject:
             objectList.Add(new WoWGameObject(curObj); // derieves from WoWObject so we can add it as a WoWGameObject :o
             break;
    
             default:
             objectList.Add(new WoWObject(curObj);
             break;
         }
    
      var nextObj = Wow.Read<uint>(curObj + 0x3C);
    
      if (nextObj == curObj)
          break;
    
      curObj = nextObj;
    }


    After you got ure list of objects you can use a LINQ a loop or something to get the bobber

    Code:
    var bobber = (objectList.Where(
        b => b.CreatedBy == ObjectManager.Me.Guid &&
        b.DisplayId == 668)).FirstOrDefault();


    Last edited by Nesox; 11-15-2009 at 08:12 AM.

  6. #5
    lanman92's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2007
    Posts
    1,033
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I love how people are so willing to help known people with these types of problems, but if a new person comes in, they flame. Just a thought.

  7. #6
    Norus's Avatar Elite User CoreCoins Purchaser
    Reputation
    347
    Join Date
    Aug 2007
    Posts
    115
    Thanks G/R
    10/4
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    but Jadd has already tried something, he already has a code (not copy/pasted), that's not everyone case.
    Last edited by Norus; 11-22-2009 at 05:14 AM.

  8. #7
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Nesox View Post
    Code:
    var curObj = Wow.Read<uint>(CurMgr + 0xAC);
    var objectList = new List<WoWObject>();          
    
    while (curObj != 0 && (curObj & 1) == 0)
    {  
        var cGuid = Wow.Read<ulong>(curObj + 0x30);
        var curType = (WoWObjectType)Wow.Read<uint>(curObj + 0x14);
    
        switch (curType)
        {
             case WoWObjectType.GameObject:
             objectList.Add(new WoWGameObject(curObj); // derieves from WoWObject so we can add it as a WoWGameObject :o
             break;
    
             default:
             objectList.Add(new WoWObject(curObj);
             break;
         }
    
      var nextObj = Wow.Read<uint>(curObj + 0x3C);
    
      if (nextObj == curObj)
          break;
    
      curObj = nextObj;
    }


    After you got ure list of objects you can use a LINQ a loop or something to get the bobber

    Code:
    var bobber = (objectList.Where(
        b => b.CreatedBy == ObjectManager.Me.Guid &&
        b.DisplayId == 668)).FirstOrDefault();


    Lol, C# is so awesome.

    I love it when someone writes half a page of code, then someone else comes along and says:
    "Oh, just use language feature X"
    or
    "Oh, just use System.DotNet.Needs.Deeper.Nesting.Wtf.Y"

  9. #8
    Nesox's Avatar ★ Elder ★
    Reputation
    1280
    Join Date
    Mar 2007
    Posts
    1,238
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Cypher View Post
    Lol, C# is so awesome.
    Why don't you drop C++ then and learn a real language ?

    Jadd is past the state of flaming he's immune, darn it
    !

  10. #9
    flo8464's Avatar Active Member
    Reputation
    30
    Join Date
    Apr 2009
    Posts
    434
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    "Oh, just use System.DotNet.Needs.Deeper.Nesting.Wtf.Y"
    That kinda reminds me whenever I work with boost.

    boost::give::me::more::namespaces::damn::it (
    boost::give::me::more::namespaces::damn::wuz,
    boost::give::me::more::namespaces::damn:hyeah);

    Yeah, I know, typedefs + using xy but its still annoying.
    Hey, it compiles! Ship it!

  11. #10
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Nesox View Post
    Why don't you drop C++ then and learn a real language ?

    Jadd is past the state of flaming he's immune, darn it
    !
    Because .NET isn't low level enough for my needs. I need to be able to compile directly to a platform native form.

    Originally Posted by flo8464 View Post
    That kinda reminds me whenever I work with boost.

    boost::give::me::more::namespaces::damn::it (
    boost::give::me::more::namespaces::damn::wuz,
    boost::give::me::more::namespaces::damn:hyeah);

    Yeah, I know, typedefs + using xy but its still annoying.
    Namespace aliases dude.

    namespace fs = boost::filesystem;

    Or whatever.

    That way you don't have to dump the entire namespace into global scope, but you also don't have to clutter up your code with the full name.

  12. #11
    Jadd's Avatar 🐸 Premium Seller
    Reputation
    1515
    Join Date
    May 2008
    Posts
    2,433
    Thanks G/R
    81/336
    Trade Feedback
    1 (100%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Nesox View Post
    Jadd is past the state of flaming he's immune, darn it !
    Finally! '

    Edit: Fixed it by the way (the lazy man's way), instead of:
    Code:
    if (nextObj == curObj)
    I used:
    Code:
    if ((nextObj % 2) == 1)
    +Rep to Kryso and Nesox!
    Last edited by Jadd; 11-16-2009 at 07:19 AM.

  13. Thanks timginter (1 members gave Thanks to Jadd for this useful post)

Similar Threads

  1. [Question] How to use Object Manager
    By Akaike in forum Wildstar Memory Editing
    Replies: 17
    Last Post: 05-16-2014, 09:57 AM
  2. [help] Getting a firm grip on the object manager...
    By yeahlol in forum WoW Bots Questions & Requests
    Replies: 3
    Last Post: 11-23-2010, 03:44 AM
  3. Replies: 9
    Last Post: 04-16-2010, 02:52 PM
  4. Replies: 9
    Last Post: 03-03-2010, 02:36 PM
  5. Replies: 9
    Last Post: 01-28-2008, 12:35 AM
All times are GMT -5. The time now is 05:53 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