• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Lua dll

    Discussion in 'Archives' started by king, Aug 7, 2010.

    1. king

      king Member

      Joined:
      Jan 15, 2010
      Messages:
      463
      Likes Received:
      1
      Trophy Points:
      18
      What Dll's are being used for the LUA functions and what would be the:
      using ______________;
      I have searched for 2 days but yet to find something working or a straight answer.
      Also if possible anexample of the Lua.DoString();
       
      Last edited: Aug 7, 2010
    2. highvoltz

      highvoltz Well-Known Member

      Joined:
      Mar 22, 2010
      Messages:
      1,729
      Likes Received:
      141
      Trophy Points:
      63
      If you're using Visual studio add reference to Honorbuddy.exe.

      using Styx;

      example code
      Code:
      Lua.Dostring("DoEmote(\"dance\")";
      if you're looking for a return from a LUa function then use use either
      List<string> LuaGetReturnValue(string lua, string scriptName); for multiple returns. scriptname can be any random lua file name that you make up.

      Code:
      [URL="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.Collections.Generic.List%3C%3E"]List[/URL]<[URL="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.String"]string[/URL]> <string>retVals = Lua.LuaGetReturnValue("GetLFGMode()","highvoltz.lua");
      or you can try
      static T GetReturnVal<T>(string lua, uint retVal); for single returns., I've never tried this one though.

      I assume retval is the index to item in the return list that you want to have this function return.

      <int><int><int>
      </int></int></int></string>
       
      Last edited: Aug 7, 2010
    3. CodenameG

      CodenameG New Member

      Joined:
      Jan 15, 2010
      Messages:
      38,369
      Likes Received:
      231
      Trophy Points:
      0
      if you wanted to get a value from lua, you would want to do something like this. this is the code i used in tombstone (my dk CC) to return currently active runes.
      Code:
       private void RunesCheck()
              {
                  
      
                  List<string> rune1 = Lua.LuaGetReturnValue("return GetRuneCount(1)", "hawker.lua");
                  List<string> rune2 = Lua.LuaGetReturnValue("return GetRuneCount(1)", "hawker.lua");
                  List<string> rune3 = Lua.LuaGetReturnValue("return GetRuneCount(1)", "hawker.lua");
                  List<string> rune4 = Lua.LuaGetReturnValue("return GetRuneCount(1)", "hawker.lua");
                  List<string> rune5 = Lua.LuaGetReturnValue("return GetRuneCount(1)", "hawker.lua");
                  List<string> rune6 = Lua.LuaGetReturnValue("return GetRuneCount(1)", "hawker.lua");
                  if (rune1[0] == "1")
                  {
                      BloodRunesList.Add(1);
                      
                  }
                  else
                  {
                      BloodRunesList.Remove(1);
                   
                  }
                  if (rune2[0] == "1")
                  {
                      BloodRunesList.Add(1);
                   
                  }
                  else
                  {
                      BloodRunesList.Remove(1);
                     
                  }
                  if (rune3[0] == "1")
                  {
                      FrostRunesList.Add(1);
                  }
                  else
                  {
                      FrostRunesList.Remove(1);
      
                  }
                  if (rune4[0] == "1")
                  {
                      FrostRunesList.Add(1);
                  }
                  else
                  {
                      FrostRunesList.Remove(1);
      
                  }
                  if (rune5[0] == "1")
                  {
      
                      UndeadRunesList.Add(1);
                  }
                  else
                  {
                      UndeadRunesList.Remove(1);
      
                  }
                  if (rune6[0] == "1")
                  {
                      UndeadRunesList.Add(1);
                  }
                  else
                  {
                      UndeadRunesList.Remove(1);
      
                  }
              }
      
       
    4. king

      king Member

      Joined:
      Jan 15, 2010
      Messages:
      463
      Likes Received:
      1
      Trophy Points:
      18
      Cool Thank you so much, I am trying to use the LUA in a new program not attached to HB so do I need a special .dll and a different using _______; Thanks again for the help so far.
       
    5. fusspawn

      fusspawn New Member

      Joined:
      Jul 27, 2010
      Messages:
      14
      Likes Received:
      0
      Trophy Points:
      1
      You cant, the logic behind hooking wow wont be ran just by reference.

      Try writing your own. Its not that hard with some research.
      Take a look at the mmowned forums they seem to have a good idea of what there doing there memory editing section is also really good.

      Infact i think there is even a complete source code for doing exactly what you want on there.
       
    6. fpsware

      fpsware Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      5,287
      Likes Received:
      133
      Trophy Points:
      63
      Last edited: Aug 7, 2010
    7. highvoltz

      highvoltz Well-Known Member

      Joined:
      Mar 22, 2010
      Messages:
      1,729
      Likes Received:
      141
      Trophy Points:
      63
    8. king

      king Member

      Joined:
      Jan 15, 2010
      Messages:
      463
      Likes Received:
      1
      Trophy Points:
      18
      Thanks they were both big helps but when using highvoltz link I am getting a error


      The example code:

      It throws the error as soon as the method starts, It doesn't even get to any of the code lines.
       
    9. thedrunk

      thedrunk New Member

      Joined:
      Apr 1, 2010
      Messages:
      207
      Likes Received:
      8
      Trophy Points:
      0
      If you dont know what you are doing with injection, DONT DO IT!

      King: What are you trying to achieve?
       
    10. king

      king Member

      Joined:
      Jan 15, 2010
      Messages:
      463
      Likes Received:
      1
      Trophy Points:
      18
      I just want to attach my program to a WoW at the login screen, and through LUA log into a character. Really frustrating
       

    Share This Page