Lua functions menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    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)

    Lua functions

    Is anyone willing to share how you call the LUA functions that so many people link? I've looked at gamedeception, but they don't really say. I would just like a simple sample or explanation. Ex, the patch you have to do to run them, if you have to do it for each func. you use. Just a question.

    Lua functions
  2. #2
    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)
    You don't do a patch to run functions, you do a patch to register functions, then another to unprotect functions designed for Blizzard's UI components only.

    Also, look in my 3.0.2 thread for CGameLua__DoString. That's the function you use to execute a LUA string (and hence call any functions etc).


  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)
    Ok, for example. How would you call ExitGame()? I wrote a dll that has a naked function to call it, I'm gonna do a few things and see if it works... If it doesn't I'll edit this post and paste my code.

  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)
    I just told you.....

  5. #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)
    Okay. I'm trying to learn this, but it's confusing. Are there any arguments you have to pass to the function? Or is it straight forward calling the function? Woot, just got it to work. Sorry for the silly question.

  6. #6
    Xarg0's Avatar Member
    Reputation
    61
    Join Date
    Jan 2008
    Posts
    389
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You pass a lua string as an argument to the CGameLua__DoString function and it'll be executed by the games lua engine...

    You could ofcours call the LuaC_Functions directly, you'd just need to reverse them and find their position, there's a post about finding them on gamesdeception I'm pretty shure that's what you wanted to do ^^
    I hacked 127.0.0.1

  7. #7
    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)
    Xarg0. Afaik you'll also need to manage the LUA stack yourself for the functions you call if you choose to do that.

  8. #8
    Xarg0's Avatar Member
    Reputation
    61
    Join Date
    Jan 2008
    Posts
    389
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You don't need to bother with that, there are a lot of free to use cpp classes out there to simplyfie calling a LuaC_Function inside cpp code, I'm currently aware of the name but there's one licenced under the lgpl wich even allows yout to use it in comercial programms, as long as it's only a small part of the programm.
    I hacked 127.0.0.1

  9. #9
    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)
    Huh? You don't need ANY 3rd party software. My point is you'll need to manage WoWs internal stack, you can do that with a typedef, a void* and WoWs internal lua routines, but its much easier to just pass it to DoString.

  10. #10
    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)
    How do you find the current DoString() function? I just installed IDA, so I'd be curious how I could start taking advantage of it also...

  11. #11
    argh44z's Avatar Member
    Reputation
    19
    Join Date
    Nov 2007
    Posts
    93
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by lanman92 View Post
    How do you find the current DoString() function? I just installed IDA, so I'd be curious how I could start taking advantage of it also...
    Find the function that implements the RunScript Lua call (very easy to do, since all such lua_CFunctions are registered in string/function ptr tables). RunScript is just a thin wrapper around DoString (the only other thing it does it get the string argument from the lua stack and convert it to a char* using lua_tostring).

  12. #12
    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)
    Do you(how?) get the return value of Do_String ? or is it void?

  13. #13
    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)
    Originally Posted by Nesox View Post
    Do you(how?) get the return value of Do_String ? or is it void?

    Errr, open up IDA and take a look?

  14. #14
    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)
    Jesus christ, why is IDA so ****ing hard to use? I can't even search for a damn double value... Screw this, I like Olly better.

  15. #15
    Apoc's Avatar Angry Penguin
    Reputation
    1387
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/12
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by lanman92 View Post
    Jesus christ, why is IDA so ****ing hard to use? I can't even search for a damn double value... Screw this, I like Olly better.
    You're an idiot. 'Nuff said.

    P.S.: IDA is incredibly simple to use for static reversing. Not so much for live debugging.

Page 1 of 2 12 LastLast

Similar Threads

  1. Big List of Lua Functions
    By Lytle69 in forum WoW EMU Guides & Tutorials
    Replies: 0
    Last Post: 10-15-2008, 03:02 AM
  2. LUA Function Thread
    By steveo123 in forum WoW EMU Questions & Requests
    Replies: 3
    Last Post: 10-13-2008, 08:54 AM
  3. [Guide] How to use local LUA function!
    By Dartignan in forum WoW EMU Guides & Tutorials
    Replies: 0
    Last Post: 08-05-2008, 09:28 PM
  4. Replies: 22
    Last Post: 05-29-2008, 03:52 PM
  5. [Question] Lua functions
    By Lich King in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 04-10-2008, 07:39 PM
All times are GMT -5. The time now is 05:18 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