[Question] Lua Callback: Return table of values menu

User Tag List

Results 1 to 7 of 7
  1. #1
    DrakeFish's Avatar Lazy Leecher

    Reputation
    634
    Join Date
    Nov 2008
    Posts
    569
    Thanks G/R
    0/14
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Question] Lua Callback: Return table of values

    Hi there. I'm not sure if this was answered before, search didn't return anything when I searched for the functions I will be asking info about. I am currently working on Lua Callbacks for an injected app and I would need to return a table of values (so we can return the list from CurrObjectMgr). My idea with this function is actually to return a table of the GUID of all loaded Objects so the Lua scripts can get information from them by calling other functions that take GUID as parameter (and eventually return all objects by type). This idea should work pretty good, but I'm really unsure on how I can return a table. I've searched a bit on google and found this post which explain just well the concept of it. My problem now is that we don't have the lua_settable function in the dump here. And search showed me that nobody ever talked about it here, so I guess there must be an alternative or something.

    I would like some tips on either an alternative to this or where/how to get the lua_settable function address.

    Thanks for any help.
    Last edited by DrakeFish; 06-16-2011 at 11:56 AM.

    [Question] Lua Callback: Return table of values
  2. #2
    Aldun's Avatar Banned
    Reputation
    616
    Join Date
    Feb 2009
    Posts
    1,365
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I answered your thread. No problem.

  3. #3
    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)
    Look at Script_GetItemStats. It calls a function to set a tables values. 0x433B0 is lua_settable.

  4. #4
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1356
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Beaten by lanman.

    I'm surprised when you say nobody has posted the address before though. I'm almost certain they did, because I have it in my old dumps, and I never used it for anything. The only other explanation would be that Greyman or Kynox used it for something (we shared IDBs) and never bothered to post it here...

  5. #5
    DrakeFish's Avatar Lazy Leecher

    Reputation
    634
    Join Date
    Nov 2008
    Posts
    569
    Thanks G/R
    0/14
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey. Thanks for the address and the tips, it ended up working very well. But I still have another question about the lua_Xxx functions. I'm currently trying to do some other stuff using lua, but I, once again, found a function address I'll need to use that isn't in the dump. This one is lua_newuserdata. I'm actually wondering if there's a way to get those functions other than (trying to) compare WoW functions with the Lua.dll (I'm using v5.1.4) functions. As I expected, the WoW functions aren't identical to the Lua.dll functions, and some of them just look very different , making it hard to end up finding the good function using this method. I would probably end up finding it, but an "easier" method wouldn't be refused.

    Thanks for any help about this.

    ps. this is what I'm currently working on
    Last edited by DrakeFish; 06-18-2011 at 12:00 AM.

  6. #6
    TOM_RUS's Avatar Legendary
    Reputation
    914
    Join Date
    May 2008
    Posts
    699
    Thanks G/R
    0/52
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by DrakeFish View Post
    I'm currently trying to do some other stuff using lua, but I, once again, found a function address I'll need to use that isn't in the dump. This one is lua_newuserdata.
    You can find all those functions in leaked Mac binary with function names.

  7. #7
    serock1's Avatar Member
    Reputation
    2
    Join Date
    Feb 2009
    Posts
    17
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by DrakeFish View Post
    Hey. Thanks for the address and the tips, it ended up working very well. But I still have another question about the lua_Xxx functions. I'm currently trying to do some other stuff using lua, but I, once again, found a function address I'll need to use that isn't in the dump. This one is lua_newuserdata. I'm actually wondering if there's a way to get those functions other than (trying to) compare WoW functions with the Lua.dll (I'm using v5.1.4) functions. As I expected, the WoW functions aren't identical to the Lua.dll functions, and some of them just look very different , making it hard to end up finding the good function using this method. I would probably end up finding it, but an "easier" method wouldn't be refused.

    Thanks for any help about this.

    ps. this is what I'm currently working on
    Lua function 'newproxy' will call lua_newuserdata. In v4.1.0.14007, the address of luaB_Lnewproxy is 0099DC10, I think the second function it calls: '0099DC22 call sub_443BC0' is lua_newuserdata.

    I checked ida only, please confirm by yourself.

Similar Threads

  1. FrameScript_RegisterFunction callback return strange value
    By Wildbreath in forum WoW Memory Editing
    Replies: 5
    Last Post: 03-03-2014, 03:29 AM
  2. Lua injection return value.
    By LogicWin in forum WoW Bots Questions & Requests
    Replies: 1
    Last Post: 03-28-2011, 09:45 AM
  3. Replies: 10
    Last Post: 02-13-2011, 01:21 AM
  4. [Question] LUA problem
    By Peter1337 in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 02-01-2008, 09:21 AM
  5. Couple questions, lua involved + other?
    By blah7 in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 01-18-2008, 03:42 PM
All times are GMT -5. The time now is 10:48 PM. 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