LUA function sorcery menu

User Tag List

Page 2 of 2 FirstFirst 12
Results 16 to 21 of 21
  1. #16
    l0l1dk's Avatar Elite User

    Reputation
    499
    Join Date
    Sep 2010
    Posts
    342
    Thanks G/R
    1/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Wildbreath View Post
    yes... and it works for player, target and etc. but for "pointed" units fail
    Have you tried putting breakpoints in your detour and checking that all the values it's getting are correct?

    LUA function sorcery
  2. #17
    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)
    yes, all values correct. and before 7.0 it works correct :\
    seems they changed something
    after getting a GUID pointer, i writed new GUID to this pointer and return true. before 7.0 it works
    Last edited by Wildbreath; 11-25-2016 at 05:06 AM.

  3. #18
    aeo's Avatar Contributor
    Reputation
    135
    Join Date
    Apr 2007
    Posts
    286
    Thanks G/R
    97/68
    Trade Feedback
    7 (100%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Wildbreath View Post
    yes, all values correct. and before 7.0 it works correct :\
    seems they changed something
    after getting a GUID pointer, i writed new GUID to this pointer and return true. before 7.0 it works
    This is why i used blizzard functions to do this. It works 100% of the time.

    Code:
    public void FromString(string guid)
    {
            IntPtr unmanagedAddr = Marshal.AllocHGlobal(Marshal.SizeOf(this));
            Marshal.StructureToPtr(this, unmanagedAddr, false);
            Function<GetGUIDFromStringDelegate> internalFromString = Function<GetGUIDFromStringDelegate>.Create(Pointers64.Manager.GUIDFromString);
            internalFromString.Execute(unmanagedAddr, Marshal.StringToHGlobalAnsi(guid), 0x80);
            this =  (WowGuid)Marshal.PtrToStructure(unmanagedAddr, typeof(WowGuid));
    }
    
    
    [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
    private delegate void GetGUIDFromStringDelegate(IntPtr ptr,IntPtr guid,int unk);
    
    
    //C++ tostring is all i have old bot but same
    int toString(char *pGuidString)
        {
            typedef int (__thiscall *t_ToString) ( DWORD_PTR* pGUID, char *pGuidString, int unk );
            t_ToString ToString = reinterpret_cast<t_ToString>((DWORD_PTR)GetModuleHandle(NULL) + (WGUID_ToStringAddr - 0x140000000));
            return ToString((DWORD_PTR*)this,pGuidString,0x80);
        }
    I don't have the offset anymore because I chenged the way my bot and lua work but this should solve your problem. These sigs should work on an old 6.x.x build x64 I think, maybe early 7.0 but i dont think so.

    Code:
    name="WGUID_FromString";
    addr=FindBinary(0, SEARCH_DOWN,"48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 41 54 41 55 41 56 41 57 48 83 EC 20 33 C0 4C 8B E2 48 8B E9 48 89 41 08 48 89 01"); 
    fprintf( hFile," \tinternal static readonly IntPtr %s = Wow.Memory.ImageBase + 0x%08X;\n", name, addr-0x140000000);
    
    
    name="WGUID_ToString";
    addr=FindBinary(0, SEARCH_DOWN,"48 89 74 24 ? 48 89 7C 24 ? 41 54 48 83 EC 20 41 8B F0 48 8B FA 4C 8B E1 45 85 C0"); 
    fprintf( hFile," \tinternal static readonly IntPtr %s = Wow.Memory.ImageBase + 0x%08X;\n", name, addr-0x140000000);

  4. #19
    uncledolan's Avatar Member
    Reputation
    16
    Join Date
    Apr 2012
    Posts
    98
    Thanks G/R
    3/6
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    So question, assuming I'm trying to do this with VEH instead of inline hooking, on x64 I'd be setting RDX = pointer to unit's GUID and returning true? Still haven't quite gotten it working so I'd like to know if I'm at least on the right track.

  5. #20
    aeo's Avatar Contributor
    Reputation
    135
    Join Date
    Apr 2007
    Posts
    286
    Thanks G/R
    97/68
    Trade Feedback
    7 (100%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    One of my original posts has the HWBP(VEH) hook signature in it. No point in messing with registers as blackbone does all the work for you.

  6. #21
    uncledolan's Avatar Member
    Reputation
    16
    Join Date
    Apr 2012
    Posts
    98
    Thanks G/R
    3/6
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I can't get blackbone to work properly, tried to PM you but your inbox is full. Just stops calling my hook function and I haven't the slightest idea why.

    Edit: Hooked function fires but not when I pass a custom string, only when it's player/target/etc. :gusta::gusta::gusta: As soon as I try a custom string it just stops working entirely.

    Edit2: After maybe 50+ hours literally I got it working finally. Huge thanks to everyone who helped, I've been wanting to learn these things for a very long time and finally decided to dive in and it was amazing to be able to receive guidance from talented people.
    Last edited by uncledolan; 11-26-2016 at 11:47 AM.

Page 2 of 2 FirstFirst 12

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 07:33 PM. 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