Call LUA[Classic] menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    qewd's Avatar Member
    Reputation
    1
    Join Date
    Sep 2019
    Posts
    2
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Call LUA[Classic]

    Hi, couple questions.

    Firstly, I was wondering if anyone knew how to determine the unitType just from the entity object.

    Secondly, I was wondering how to call a lua function. I found the lua function UnitGUID(Char*?); @ 0x10D3160. But I have no idea how to actually setup the function call.

    Thanks.

    Call LUA[Classic]
  2. #2
    ejt's Avatar Contributor
    Reputation
    209
    Join Date
    Mar 2008
    Posts
    166
    Thanks G/R
    3/111
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Both questions can be answered by simply searching.

  3. #3
    qewd's Avatar Member
    Reputation
    1
    Join Date
    Sep 2019
    Posts
    2
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by ejt View Post
    Both questions can be answered by simply searching.
    Couldn't find with searching. Most were very old forum posts which said to parse the full GUID. But the entity list only uses the last part of it as an identifier.

    I did find it in your post history though, so thanks.

    Offset 0x20 from entity.

  4. #4
    xbec's Avatar Member
    Reputation
    3
    Join Date
    Jun 2019
    Posts
    31
    Thanks G/R
    12/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    inject dll into wow,
    uintptr_t FrameScriptExecuteAddr= 0x32DD40; //classic 33728
    static auto const luaDoString = reinterpret_cast<uintptr_t(__fastcall*)(const char*, const char*,int64_t)>((uintptr_t)GetModuleHandle(NULL) + FrameScriptExecuteAddr);
    luaDoString("UnitGUID("target")", "helloworld", 0);

  5. Thanks qewd (1 members gave Thanks to xbec for this useful post)
  6. #5
    Jadd's Avatar 🐸 Premium Seller
    Reputation
    1511
    Join Date
    May 2008
    Posts
    2,432
    Thanks G/R
    81/333
    Trade Feedback
    1 (100%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by xbec View Post
    inject dll into wow,
    uintptr_t FrameScriptExecuteAddr= 0x32DD40; //classic 33728
    static auto const luaDoString = reinterpret_cast<uintptr_t(__fastcall*)(const char*, const char*,int64_t)>((uintptr_t)GetModuleHandle(NULL) + FrameScriptExecuteAddr);
    luaDoString("UnitGUID("target")", "helloworld", 0);
    A fantastic way to lose the account of yours and everyone who uses it.

  7. Thanks aeo (1 members gave Thanks to Jadd for this useful post)
  8. #6
    xbec's Avatar Member
    Reputation
    3
    Join Date
    Jun 2019
    Posts
    31
    Thanks G/R
    12/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Jadd View Post
    A fantastic way to lose the account of yours and everyone who uses it.
    This is the easiest way to do it. Do you have a better way to share?

  9. #7
    airjqqq's Avatar Member Authenticator enabled
    Reputation
    4
    Join Date
    Jan 2013
    Posts
    19
    Thanks G/R
    4/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Jadd View Post
    A fantastic way to lose the account of yours and everyone who uses it.
    do you mean this is **detectable** by blizzard? even if call in Present hook.

  10. #8
    Jadd's Avatar 🐸 Premium Seller
    Reputation
    1511
    Join Date
    May 2008
    Posts
    2,432
    Thanks G/R
    81/333
    Trade Feedback
    1 (100%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by airjqqq View Post
    do you mean this is **detectable** by blizzard? even if call in Present hook.
    Yes, Blizzard has detected third-party use of this function on numerous occasions - the large majority of bots (especially rotation bots, which Blizzard *really* seem to hate) used it to easily interact with the huge API they provide so it's always been a big target.

    Originally Posted by xbec View Post
    This is the easiest way to do it. Do you have a better way to share?
    I stay away from their Lua API entirely and avoided all those banwaves in the past. The "better way" would be to call the underlying functions directly, in a context that isn't easily distinguished from a regular call made by the game (spoofed stack trace, ROP, etc.)

  11. Thanks GlittPrizes (1 members gave Thanks to Jadd for this useful post)
  12. #9
    airjqqq's Avatar Member Authenticator enabled
    Reputation
    4
    Join Date
    Jan 2013
    Posts
    19
    Thanks G/R
    4/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Jadd View Post
    Yes, Blizzard has detected third-party use of this function on numerous occasions - the large majority of bots (especially rotation bots, which Blizzard *really* seem to hate) used it to easily interact with the huge API they provide so it's always been a big target.



    I stay away from their Lua API entirely and avoided all those banwaves in the past. The "better way" would be to call the underlying functions directly, in a context that isn't easily distinguished from a regular call made by the game (spoofed stack trace, ROP, etc.)
    great information. so do you use c# with clr injection or pure c++ injection or even not inject anything?

    i am considering whether should i change my project from c# to c++ to avoid getting banned
    Last edited by airjqqq; 04-04-2020 at 10:26 AM.

  13. #10
    Icesythe7's Avatar Contributor
    Reputation
    230
    Join Date
    Feb 2017
    Posts
    168
    Thanks G/R
    10/111
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by qewd View Post
    Hi, couple questions.

    Firstly, I was wondering if anyone knew how to determine the unitType just from the entity object.

    Secondly, I was wondering how to call a lua function. I found the lua function UnitGUID(Char*?); @ 0x10D3160. But I have no idea how to actually setup the function call.

    Thanks.
    You can directly call the luaC api to call wow lua functions heres a simple example (note in actual implementation you will want to error check this)
    Code:
    lua_getglobal(luastate, "UnitGUID");
    lua_pushstring(luastate, "player");
    lua_call(luastate, 1, 1);
    const char* result = lua_tostring(luastate, -1);
    lua_pop(luastate, -1);
    std::cout << result << "\n";
    furthermore if you have about 12 hours to reverse the entire lua source api and rewrite the lua source code to match wows (like i did) you can use lua bindings like sol to call and retrieve functions extremely easily like so
    Code:
    sol::state_view l(*reinterpret_cast<lua_State**>(s_context));
    const char* result = l["UnitGUID"]("player").get<const char*>();
    further furthermore you can also make your own framescript execute so your not calling wows by calling lua_loadbuffer() lol, in short theres 100 different ways to do it i prefer to first attempt to call the c++ function that the lua calls and if that's to complex or the operation is done entirely in lua i will just directly use the luaC api
    Last edited by Icesythe7; 04-04-2020 at 08:13 AM.

  14. Thanks aeo (1 members gave Thanks to Icesythe7 for this useful post)
  15. #11
    GlittPrizes's Avatar Active Member CoreCoins Purchaser Authenticator enabled
    Reputation
    58
    Join Date
    Nov 2019
    Posts
    104
    Thanks G/R
    53/33
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry for the necro, but I'm looking into a safe(er) form of getting lua access. I was trying to do the generic present hook and call FramescriptExecute, but that looks to be easily detected. What I don't understand is the last post about rebuilding lua. Isn't Wow's implementation of 5.1 part of the executable, so how do you get it to interact with the reconstructed lua? Does it require extensive patching of the client?

    If using WiNiFiX's lua unlocker was a hard no and zero, and just hooking Present with FramescriptExecute is a 3, what would an acceptable lua unlock method to attempt (asking for a friend)?

  16. #12
    aeo's Avatar Contributor
    Reputation
    126
    Join Date
    Apr 2007
    Posts
    270
    Thanks G/R
    84/62
    Trade Feedback
    7 (100%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    probably a 6 or 7. There are many definitions of unlocked lua. Do you want to just call protected functions ? Do you want to make new functions and use them?

  17. #13
    GlittPrizes's Avatar Active Member CoreCoins Purchaser Authenticator enabled
    Reputation
    58
    Join Date
    Nov 2019
    Posts
    104
    Thanks G/R
    53/33
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think I just need the ability to call protected functions. Most of the stuff I would use for a custom function would likely be combat related, so I could just call a macro. I'm not sure why I'm having so much trouble just firing FramescriptExecute internally. I did it in the past when I was more fresh to this, but somehow can't retrace my progress. As others have mentioned though, that is probably asking for a ban since it's such a common lua workaround to call it in a Direct X hook. I guess I'm looking for the next best approach, something that is relatively safe and not overkill.

  18. #14
    34D's Avatar Member
    Reputation
    4
    Join Date
    May 2020
    Posts
    57
    Thanks G/R
    10/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Icesythe7 View Post
    You can directly call the luaC api to call wow lua functions heres a simple example (note in actual implementation you will want to error check this)
    Code:
    lua_getglobal(luastate, "UnitGUID");
    lua_pushstring(luastate, "player");
    lua_call(luastate, 1, 1);
    const char* result = lua_tostring(luastate, -1);
    lua_pop(luastate, -1);
    std::cout << result << "\n";
    furthermore if you have about 12 hours to reverse the entire lua source api and rewrite the lua source code to match wows (like i did) you can use lua bindings like sol to call and retrieve functions extremely easily like so
    Code:
    sol::state_view l(*reinterpret_cast<lua_State**>(s_context));
    const char* result = l["UnitGUID"]("player").get<const char*>();
    further furthermore you can also make your own framescript execute so your not calling wows by calling lua_loadbuffer() lol, in short theres 100 different ways to do it i prefer to first attempt to call the c++ function that the lua calls and if that's to complex or the operation is done entirely in lua i will just directly use the luaC api
    Is the luaStatus ** obtained from a certain address in the game or is it from the newtable(L) in the luac api?
    I saw you mentioned an address in one of your responses

  19. #15
    aeo's Avatar Contributor
    Reputation
    126
    Join Date
    Apr 2007
    Posts
    270
    Thanks G/R
    84/62
    Trade Feedback
    7 (100%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    the state/context is a global variable.

Page 1 of 2 12 LastLast

Similar Threads

  1. Call Lua callback in DLL cause some Error
    By rafaelcn in forum WoW Memory Editing
    Replies: 3
    Last Post: 08-04-2010, 03:32 AM
  2. Calling Lua Functions from DLL
    By Viano in forum WoW Memory Editing
    Replies: 19
    Last Post: 07-28-2009, 07:56 PM
  3. Call LUA and poppin that stack
    By ggg898 in forum WoW Memory Editing
    Replies: 1
    Last Post: 02-16-2009, 04:41 PM
  4. Calling LUA Functions
    By cloud_wizard in forum WoW Memory Editing
    Replies: 7
    Last Post: 01-04-2009, 08:24 AM
  5. Call lua function and get result
    By starfish99 in forum WoW Memory Editing
    Replies: 4
    Last Post: 12-26-2008, 05:15 AM
All times are GMT -5. The time now is 10:14 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