Returning variable via Lua? menu

Shout-Out

User Tag List

Results 1 to 5 of 5
  1. #1
    -Ryuk-'s Avatar Elite User CoreCoins Purchaser Authenticator enabled
    Reputation
    529
    Join Date
    Nov 2009
    Posts
    1,028
    Thanks G/R
    38/51
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Returning variable via Lua?

    EDIT:

    Figured it out... its really simple and now I feel like an idiot -.-

    Code below for anyone else that has this issue in the future.

    Code:
    Lua.FrameScript_Execute("visible = ClassTrainerFrame:IsVisible(); return visible;", "visible");
    --------------------------------------------


    Hey all,

    I had a chat with some people in the bawx earlier today about this issue.

    I'm trying to get a variable from Lua, in this case I am using

    Code:
    visible = ClassTrainerFrame:IsVisible()
    My C# code is like this: (I won't post the code for the function as its the same as normally used)

    Code:
    string value = Lua.FrameScript_Execute("visible = ClassTrainerFrame:IsVisible()", "visible");
    I know the Lua works, as I have tried it in a macro, this however returns nothing even when the frame is visible when called from my bot.

    It should be noted that I can get return values for Script_ functions, so I am really at a loss here.

    Does anyone have any ideas?

    Thanks!
    Last edited by -Ryuk-; 08-18-2014 at 04:06 PM.
    |Leacher:11/2009|Donor:02/2010|Established Member:09/2010|Contributor:09/2010|Elite:08/2013|

    Returning variable via Lua?
  2. #2
    Wildbreath's Avatar Contributor
    Reputation
    162
    Join Date
    Feb 2012
    Posts
    121
    Thanks G/R
    2/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    second attr for execute buffer just name of lua file and third is isProtected flag
    you can use getlocalizedtext to get value or gettop and lua_tostring
    Last edited by Wildbreath; 08-18-2014 at 11:07 PM.

  3. #3
    -Ryuk-'s Avatar Elite User CoreCoins Purchaser Authenticator enabled
    Reputation
    529
    Join Date
    Nov 2009
    Posts
    1,028
    Thanks G/R
    38/51
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I know how to use ExecuteBuffer & GetLocalizedText... I also know how to use the GetTop/SetTop method, however I stopped using this when the Honorbuddy detection method was started.

    My issue was purely I was using my lua statement incorrectly; and I had already fixed this before you posted ^^, Thanks anyway!


    Note: Before anyone gets mad... I am NOT saying HB is detected!
    |Leacher:11/2009|Donor:02/2010|Established Member:09/2010|Contributor:09/2010|Elite:08/2013|

  4. #4
    Wildbreath's Avatar Contributor
    Reputation
    162
    Join Date
    Feb 2012
    Posts
    121
    Thanks G/R
    2/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ouch! they now checking functions detouring?
    really painful detour/undetour it each warden activity and sync with main thread -_-

  5. #5
    -Ryuk-'s Avatar Elite User CoreCoins Purchaser Authenticator enabled
    Reputation
    529
    Join Date
    Nov 2009
    Posts
    1,028
    Thanks G/R
    38/51
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Wildbreath View Post
    ouch! they now checking functions detouring?
    really painful detour/undetour it each warden activity and sync with main thread -_-

    They have been doing this for some time now...
    |Leacher:11/2009|Donor:02/2010|Established Member:09/2010|Contributor:09/2010|Elite:08/2013|

Similar Threads

  1. Can't access variable in Lua
    By Nadromar in forum WoW EMU Questions & Requests
    Replies: 6
    Last Post: 04-15-2015, 07:45 AM
  2. [WoW][3.0.9] A way to get return values from Lua Functions
    By ramey in forum WoW Memory Editing
    Replies: 6
    Last Post: 03-22-2009, 10:09 PM
  3. [Help] Lua Variable question
    By Swarfega in forum WoW EMU Questions & Requests
    Replies: 0
    Last Post: 03-21-2009, 03:19 PM
  4. LUA Variable Help (NOT A BIG SCRIPT)
    By Envoke in forum WoW EMU Questions & Requests
    Replies: 5
    Last Post: 03-19-2009, 08:14 PM
All times are GMT -5. The time now is 06:52 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