Selecting target by GUID menu

User Tag List

Results 1 to 10 of 10
  1. #1
    NitroGlycerine's Avatar Member
    Reputation
    3
    Join Date
    May 2009
    Posts
    45
    Thanks G/R
    5/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Selecting target by GUID

    I'm trying to target a unit by GUID using the following function:
    Code:
    00524BF0    CGGameUI__Target
    I'm using the following code, based on some pieces of code I found on this forum:
    Code:
            public static void SelectTarget( ulong guid )
            {
                Wow.SuspendThread(Wow.ThreadHandle);
    
                uint codecave = Wow.AllocateMemory(),
                    dwHiWord = (uint)(guid >> 32),
                    dwLoWord = (uint)guid;
    
                Wow.Asm.Clear();
                Wow.Asm.AddLine("MOV EAX, 0x{0}", dwHiWord.ToString("X"));
                Wow.Asm.AddLine("PUSH EAX");
                Wow.Asm.AddLine("MOV EAX, 0x{0}", dwLoWord.ToString("X"));
                Wow.Asm.AddLine("PUSH EAX");
                Wow.Asm.AddLine("CALL 0x00524BF0");
                Wow.Asm.AddLine("ADD ESP, 0x08");
                Wow.Asm.AddLine("RETN");
    
                Wow.Asm.InjectAndExecute(codecave);
                Wow.FreeMemory(codecave);
                Wow.ResumeThread();
            }
    Wow throws a critical error when I call the SelectTarget function. I have verified that the GUID I pass to the function is a valid one. I'm still learning, and not really good on this topic yet. Could anyone point me to my mistake(s)? Thanks!

    Selecting target by GUID
  2. #2
    MaiN's Avatar Elite User
    Reputation
    335
    Join Date
    Sep 2006
    Posts
    1,047
    Thanks G/R
    0/10
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You are not doing this in the main thread. That's your mistake.
    [16:15:41] Cypher: caus the CPU is a dick
    [16:16:07] kynox: CPU is mad
    [16:16:15] Cypher: CPU is all like
    [16:16:16] Cypher: whatever, i do what i want

  3. #3
    NitroGlycerine's Avatar Member
    Reputation
    3
    Join Date
    May 2009
    Posts
    45
    Thanks G/R
    5/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm using BlackMagic:

    Code:
    public bool OpenProcessAndThread(int dwProcessId)
        Member of Magic.BlackMagic
    
    Summary:
    Opens a process and its main thread for manipulation.
    
    Parameters:
    dwProcessId: Id of the target process.
    I assumed that I was already going from the main thread.

  4. #4
    zys924's Avatar Active Member
    Reputation
    20
    Join Date
    Nov 2009
    Posts
    113
    Thanks G/R
    0/7
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh... It's "running" in the main thread, not just grab the handle of it...
    You have to hook the EndScene and poke your code there to be executed by DX3D

  5. #5
    RedArray's Avatar Corporal
    Reputation
    7
    Join Date
    Nov 2009
    Posts
    24
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You should just create a delegate for the SelectTarget function and call it like a normal function instead of dealing with assembly imho.

  6. #6
    miceiken's Avatar Contributor Authenticator enabled
    Reputation
    209
    Join Date
    Dec 2007
    Posts
    401
    Thanks G/R
    7/9
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by RedArray View Post
    You should just create a delegate for the SelectTarget function and call it like a normal function instead of dealing with assembly imho.
    I don't think he's inprocess

  7. Thanks themaster (1 members gave Thanks to miceiken for this useful post)
  8. #7
    RedArray's Avatar Corporal
    Reputation
    7
    Join Date
    Nov 2009
    Posts
    24
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by miceiken View Post
    I don't think he's inprocess
    Oh thought BlackMagic was the in-process version. I dunno maybe not. If I recall there is two versions of basically the same thing. Ones in-process the other out.

  9. #8
    miceiken's Avatar Contributor Authenticator enabled
    Reputation
    209
    Join Date
    Dec 2007
    Posts
    401
    Thanks G/R
    7/9
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by RedArray View Post
    Oh thought BlackMagic was the in-process version. I dunno maybe not. If I recall there is two versions of basically the same thing. Ones in-process the other out.
    Nah, BlackMagic is an oop memory reading library

  10. #9
    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 RedArray View Post
    Oh thought BlackMagic was the in-process version. I dunno maybe not. If I recall there is two versions of basically the same thing. Ones in-process the other out.
    You're thinking of WhiteMagic by Apoc.

  11. #10
    RedArray's Avatar Corporal
    Reputation
    7
    Join Date
    Nov 2009
    Posts
    24
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Cypher View Post
    You're thinking of WhiteMagic by Apoc.
    Ah yeah that's what it was. My bad.

Similar Threads

  1. Easiest way to use "Blizzard UI" functions to /interact with a selected target?
    By b0nghitter in forum WoW Bots Questions & Requests
    Replies: 1
    Last Post: 11-05-2012, 11:07 AM
  2. Click to move on selected target
    By radarlove in forum WoW Bots Questions & Requests
    Replies: 0
    Last Post: 07-02-2012, 04:26 AM
  3. Using CTM Struct to attack a Target by GUID
    By dehe in forum WoW Memory Editing
    Replies: 2
    Last Post: 04-14-2012, 01:47 PM
  4. 2 Questions Interact/Select Target C++
    By jockel in forum WoW Memory Editing
    Replies: 4
    Last Post: 06-04-2009, 08:31 AM
  5. target by guid
    By Sillyboy72 in forum WoW Memory Editing
    Replies: 10
    Last Post: 01-21-2009, 07:51 AM
All times are GMT -5. The time now is 06:23 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