How to properly interact with Unit by lua unlcoker's way? menu

Shout-Out

User Tag List

Results 1 to 5 of 5
  1. #1
    singed420's Avatar Member
    Reputation
    5
    Join Date
    Jan 2018
    Posts
    23
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to properly interact with Unit by lua unlcoker's way?

    I used to do external Wow bot and do everything in my bot's lua thread instead of using ingame lua engine, recently I tried study a bit more and now I am able to make my own lua unlocker to unlock protected wow api.But I am stucked at interact with Unit. after do some research in forum it makes me even more confused. My question are listed below, very appreciate if anyone could give me hints and help:


    1. By default, wow's native api such as UnitIsDeadOrGhost(unit) only accepts UnitID such as "player","target","pet",etc as parameter, so if I want to use UnitIsDeadOrGhost() to get info of a specific unit without selecting it as target first, what should I use as paramater, or what's the general way of other lua unlocker handles this?
    Should I use the specific unit's GUID string as parameter, eg: UnitIsDeadOrGhost("Creature-0-3039-2570-8014-181494-000003E27E")? If so, what exactly do I need to patch to make it recognize GUID string instead of just "target" UnitID? Do i need to hook anything, or should I register my own api and pass unit's actor as paramater like most external bot does?

    2. If I need to register my own function to return the ObjectManager/Entity list in game's lua engine, is there a way to make this function remain exists after doing "/reload" ?

    How to properly interact with Unit by lua unlcoker's way?
  2. #2
    Makkah's Avatar Active Member Authenticator enabled
    Reputation
    45
    Join Date
    Jun 2024
    Posts
    67
    Thanks G/R
    10/29
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hey there,

    Glad to see you’re diving into the internal side of things—it definitely gives you more control compared to external bots. I’ve been down this road myself, and there are always ways to work around the limitations.

    To answer your questions, I’m assuming you’re working with a specific version of WoW, like Classic, Retail or maybe even private servers.. Let me know if that’s the case, because there can be some differences in how things behave.

    1. If you want to use something like `UnitIsDeadOrGhost()` without having to target the unit directly, you can try setting the unit as your focus using its GUID, and then call `UnitIsDeadOrGhost("focus")`. That way, you’re not stuck with always needing to target them. But honestly, it might be better to set up your own function or metatable to pull info straight from the Object Manager. That would let you use GUIDs or other identifiers directly, which gives you more flexibility and doesn’t lock you into using specific unit IDs like “player” or “target.”

    2. For the second question, the key is to use a callback. You’ll need a function that re-registers your custom functions every time the game does a `/reload` or when you port to a new area. When the UI reloads, WoW wipes the global table, so everything has to be set up again. I usually hook into the same process that registers the other Lua functions at load time to keep things consistent.

    Let me know what version you’re working with and if you need more details. Good luck with the unlocker—it’s a bit of a learning curve, but it’s totally worth it!

  3. #3
    singed420's Avatar Member
    Reputation
    5
    Join Date
    Jan 2018
    Posts
    23
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Makkah View Post
    Hey there,

    Glad to see you’re diving into the internal side of things—it definitely gives you more control compared to external bots. I’ve been down this road myself, and there are always ways to work around the limitations.

    To answer your questions, I’m assuming you’re working with a specific version of WoW, like Classic, Retail or maybe even private servers.. Let me know if that’s the case, because there can be some differences in how things behave.

    1. If you want to use something like `UnitIsDeadOrGhost()` without having to target the unit directly, you can try setting the unit as your focus using its GUID, and then call `UnitIsDeadOrGhost("focus")`. That way, you’re not stuck with always needing to target them. But honestly, it might be better to set up your own function or metatable to pull info straight from the Object Manager. That would let you use GUIDs or other identifiers directly, which gives you more flexibility and doesn’t lock you into using specific unit IDs like “player” or “target.”

    2. For the second question, the key is to use a callback. You’ll need a function that re-registers your custom functions every time the game does a `/reload` or when you port to a new area. When the UI reloads, WoW wipes the global table, so everything has to be set up again. I usually hook into the same process that registers the other Lua functions at load time to keep things consistent.

    Let me know what version you’re working with and if you need more details. Good luck with the unlocker—it’s a bit of a learning curve, but it’s totally worth it!
    Thx for the answer. I m working on retail. I was considering register my own function but there r too many native wow api related to grab info from a unit. So it will be annoying to register my own functions one by one. as I read from
    documentation from some old unlocker, such as EWT, it seems like they could directly use GUID as parameter to all native api, so wonder how they did that?

  4. #4
    scizzydo's Avatar Established Member
    Reputation
    193
    Join Date
    Oct 2019
    Posts
    129
    Thanks G/R
    5/86
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by singed420 View Post
    Thx for the answer. I m working on retail. I was considering register my own function but there r too many native wow api related to grab info from a unit. So it will be annoying to register my own functions one by one. as I read from
    documentation from some old unlocker, such as EWT, it seems like they could directly use GUID as parameter to all native api, so wonder how they did that?
    I answered this in your other post the other day:
    https://www.ownedcore.com/forums/wor...ml#post4504676 (How to interact Unit by GUID?)

  5. Thanks aeo (1 members gave Thanks to scizzydo for this useful post)
  6. #5
    presto112's Avatar Member
    Reputation
    1
    Join Date
    Aug 2024
    Posts
    2
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    is using objectmanager and exposing objects to lua the best way? so you can use those objects as parametrs in castspellbyname etc?

Similar Threads

  1. How to get ITEMs with your low alt, by fighting with your high main!!
    By 41p32 in forum World of Warcraft Exploits
    Replies: 15
    Last Post: 12-25-2007, 04:44 AM
  2. How to properly DL model edits?
    By Sykes14 in forum WoW ME Questions and Requests
    Replies: 7
    Last Post: 05-10-2007, 08:05 PM
  3. How to get rich with your first charr!
    By andrelie in forum World of Warcraft Guides
    Replies: 16
    Last Post: 03-26-2007, 01:25 PM
  4. How to avoid ban with CE wallclimb hacking
    By Syder in forum World of Warcraft Bots and Programs
    Replies: 0
    Last Post: 11-09-2006, 05:54 AM
All times are GMT -5. The time now is 05:50 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