[WoW] [3.0.9] [Info] LUA Callbacks menu

User Tag List

Page 3 of 4 FirstFirst 1234 LastLast
Results 31 to 45 of 47
  1. #31
    slcavos's Avatar Member
    Reputation
    1
    Join Date
    Jan 2008
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's mine...
    Aha! That's got it! Such a silly mistake to miss. I was adding the wrong offset when updating s_curMgr.

    Yours:
    Code:
    bm.Asm.AddLine("add eax, 0x10");
    Mine:
    Code:
    wow.Asm.AddLine("add eax, 8");
    Thank you so much, I was sure I was losing my mind. Of course, now that I have gone and made a fool of myself I remember seeing early in 3.1 that the offset had changed.

    Regardless +Rep

    [WoW] [3.0.9] [Info] LUA Callbacks
  2. #32
    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)
    Originally Posted by slcavos View Post
    Not to resurrect a dead thread, but this is the closest, most recent match to what I am doing. I am currently trying to get simple DoString support in C# using BlackMagic, and have hit a brick wall.

    When I invoke the function, it doesn't crash the client, it doesn't throw an exception, but nothing happens. No response whatsoever. Same story with CastSpellById, incidentally. I have double checked the function offsets in IDA to verify the parameters and everything looks ok there. I have all the required DLLs in the executable folder. I have read every LUA thread I could find, and aside from constantly being reminded that I should be using C++ for this, I can't find anything that I might be doing wrong.

    Here's what I am using:
    Code:
            public static void Lua_DoString(string command)
            {
               // command is something like "DoEmote(\"dance\")"
    
                wow.Asm.AddLine("fs mov eax, [0x2C]");
                wow.Asm.AddLine("mov eax, [eax]");
                wow.Asm.AddLine("add eax, 0x10");
                wow.Asm.AddLine("mov dword [eax], {0}", s_curMgr);
    
                wow.Asm.AddLine("mov eax, 0");
                wow.Asm.AddLine("push eax");
                wow.Asm.AddLine("mov eax, {0}", stringcave);
                wow.Asm.AddLine("push eax");
                wow.Asm.AddLine("push eax");
                wow.Asm.AddLine("call {0}", 0x0049AE30);
                wow.Asm.AddLine("add esp, 0xC");
                wow.Asm.AddLine("retn");
    
                wow.Asm.InjectAndExecute(codecave);
                wow.FreeMemory(codecave);
                wow.FreeMemory(stringcave);
                wow.ResumeThread();
            }
    This seems like it should be quite simple and I can't help the nagging feeling that I am missing something obvious. I don't really care about getting return values at this point, just basic commands. If anyone could give my function a looksie, I would really appreciate it.
    The tls offset changed to 0x10
    and for the last argument, instead of pushing 0 you can try to move it to eax first and then push eax. I think it should work now

  3. #33
    slcavos's Avatar Member
    Reputation
    1
    Join Date
    Jan 2008
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, Nesox. I knew it was something simple, it just never clicked (even though I read several times that the offset had changed).

    By the way, did you ever get that callback registration ported? Just curious if you found that is was feasible / worthwhile to try that in C#.

  4. #34
    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)
    Originally Posted by slcavos View Post
    Thanks, Nesox. I knew it was something simple, it just never clicked (even though I read several times that the offset had changed).

    By the way, did you ever get that callback registration ported? Just curious if you found that is was feasible / worthwhile to try that in C#.
    No. Registering a lua function with c# seems like a pain in the ass.
    Im writing a lua manager for calling functions and popping values managing the stack by myself
    Last edited by Nesox; 04-21-2009 at 06:49 AM.

  5. #35
    slcavos's Avatar Member
    Reputation
    1
    Join Date
    Jan 2008
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Nesox View Post
    No. Registering a lua function with c# seems like a pain in the ass.
    Im writing a lua manager for calling functions and popping values managing the stack by myself
    Oomph. Good luck!

  6. #36
    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 SKU View Post
    Ah good to know, not that I was trying to get the value off the stack for 3 hours. Gonna look into it, although my brain refuses to convert C++ to sense.

    Until then, my 'loldetour' of the print() function has to be enough. :/

    I'd simply LOVE this released

  7. #37
    SKU's Avatar Contributor
    Reputation
    306
    Join Date
    May 2007
    Posts
    565
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://www.mmowned.com/forums/wow-me..._dostring.html

    outdated and uglier than French. Robske wrote an awesome wrapper, might wanna ask him for a cleaner solution. ( That's what you get for dodging, rob! :P )

  8. #38
    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 SKU View Post
    http://www.mmowned.com/forums/wow-me..._dostring.html

    outdated and uglier than French. Robske wrote an awesome wrapper, might wanna ask him for a cleaner solution. ( That's what you get for dodging, rob! :P )

    Thanks, I'll have a look

  9. #39
    Robske's Avatar Contributor
    Reputation
    305
    Join Date
    May 2007
    Posts
    1,062
    Thanks G/R
    3/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by SKU View Post
    http://www.mmowned.com/forums/wow-me..._dostring.html

    outdated and uglier than French. Robske wrote an awesome wrapper, might wanna ask him for a cleaner solution. ( That's what you get for dodging, rob! :P )
    You... you...

    well...

    Your mom's french

    Windows Live service down dumdedum >.>
    "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
    "I cried a little earlier when I had to poop" - Sku

  10. #40
    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 SKU View Post
    Robske wrote an awesome wrapper, might wanna ask him for a cleaner solution. ( That's what you get for dodging, rob! :P )
    Couldn't find his, by listing the threads he made, does anyboy have link for it?

  11. #41
    Robske's Avatar Contributor
    Reputation
    305
    Join Date
    May 2007
    Posts
    1,062
    Thanks G/R
    3/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by miceiken View Post
    Couldn't find his, by listing the threads he made, does anyboy have link for it?
    C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\Cynder\Cynder\WoWLua.cs
    "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
    "I cried a little earlier when I had to poop" - Sku

  12. #42
    Apoc's Avatar Angry Penguin
    Reputation
    1388
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/13
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Robske007a View Post
    C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\Cynder\Cynder\WoWLua.cs
    I lol'd irl.

  13. #43
    slcavos's Avatar Member
    Reputation
    1
    Join Date
    Jan 2008
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Bumping again... sorry. I am now trying to use some of the callbacks directly.

    An IDA search in 3.1.1 has given me (can someone verify?):
    UnitCanAttack: 0069F970
    UnitReaction: 0069F4C0

    Based on some of the posts scattered around, I am trying to call them using BlackMagic with:

    Code:
    wow.Asm.AddLine("mov ecx, {0}", LocalPlayer.BaseAddress);
    wow.Asm.AddLine("push {0}", LocalPlayer.Target.BaseAddress);
    wow.Asm.AddLine("call {0}", 0x0069F970);
    wow.Asm.AddLine("retn");
    result = wow.Asm.InjectAndExecute(codecave);
    Pretty straightforward, I thought. When calling either funtion I get the same access violation:

    The instruction at "0x00915FE5" referenced memory at "0x0000000C".
    The memory could not be "read".
    The instruction is always the same but the memory it's trying to access varies from 8 to C. The instruction at that address is "mov eax, [eax+8]". So, apparently I am screwing eax some how.

    Any thoughts? Is this something I should even be trying to do?

  14. #44
    jjaa's Avatar Contributor
    Reputation
    245
    Join Date
    Dec 2006
    Posts
    562
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by slcavos View Post
    Bumping again... sorry. I am now trying to use some of the callbacks directly.

    An IDA search in 3.1.1 has given me (can someone verify?):
    UnitCanAttack: 0069F970
    UnitReaction: 0069F4C0

    Based on some of the posts scattered around, I am trying to call them using BlackMagic with:

    Code:
    wow.Asm.AddLine("mov ecx, {0}", LocalPlayer.BaseAddress);
    wow.Asm.AddLine("push {0}", LocalPlayer.Target.BaseAddress);
    wow.Asm.AddLine("call {0}", 0x0069F970);
    wow.Asm.AddLine("retn");
    result = wow.Asm.InjectAndExecute(codecave);
    Pretty straightforward, I thought. When calling either funtion I get the same access violation:



    The instruction is always the same but the memory it's trying to access varies from 8 to C. The instruction at that address is "mov eax, [eax+8]". So, apparently I am screwing eax some how.

    Any thoughts? Is this something I should even be trying to do?

    You’re trying call an Lua function and your pushing the wrong arguments....

    Some simple googling of lua functions shall inform you how arguments for lua functions are passed.


    Simply put lua functions take the lua stack as an argument and use the lua stack to get the passed arguments and return values

    This has been covered many times before please just search the forums, and read the rules.

  15. #45
    slcavos's Avatar Member
    Reputation
    1
    Join Date
    Jan 2008
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by jjaa View Post

    You’re trying call an Lua function and your pushing the wrong arguments....

    Some simple googling of lua functions shall inform you how arguments for lua functions are passed.


    Simply put lua functions take the lua stack as an argument and use the lua stack to get the passed arguments and return values

    This has been covered many times before please just search the forums, and read the rules.
    Yeah, I know.

    I am not trying to invoke any lua, but rather call the C callback, so that I can skip the stack altogether. For example: this and this

Page 3 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Replies: 10
    Last Post: 02-13-2011, 01:21 AM
  2. WoW May 2008 Banwave Info
    By iamyour41 in forum World of Warcraft General
    Replies: 15
    Last Post: 05-22-2008, 12:50 AM
  3. [Release]WoW Fansite Tools and Info
    By xsyx in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 05-10-2008, 07:19 PM
All times are GMT -5. The time now is 09:44 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