I read this thread, actually. I saw that all his code examples used BlackMagic. When I remembered reading somewhere else that you didn't need BlackMagic to call an LUA function (which is BS, now that I see), I thought I was looking in the wrong place. I figured you meant for me to go somewhere else.
Alright, so if I can get this code example:
Code:
wow.Asm.Clear();
uint codeCave = wow.AllocateMemory(0x1000);
uint GetSpellIdByName = (uint)Offsets.eStaticPointers.GetSpellIdByName;
//Start UpdateCurMgr
wow.Asm.AddLine("fs mov eax, [0x2C]");
wow.Asm.AddLine("mov eax, [eax]");
wow.Asm.AddLine("add eax, 8");
wow.Asm.AddLine("mov dword [eax], {0}", ObjectMgr.GetCurMgr(wow.ProcessHandle));
//End UpdateCurMgr
wow.Asm.AddLine("push " + 0x0019F9BC);//not sure what this is, seems to be static in olly
wow.Asm.AddLine("push " + (codeCave + 0x500));
wow.Asm.AddLine("call " + GetSpellIdByName);
wow.Asm.AddLine("add esp,8");
wow.Asm.AddLine("retn");
wow.WriteASCIIString(codeCave + 0x500, name);
uint result = wow.Asm.InjectAndExecute(codeCave);
wow.FreeMemory(codeCave);
Console.WriteLine("Getspellidbyname {0} result {1}", name, result);
if (result != uint.MaxValue)
return result;
else
return 0;
Converted to C++, it should do what I need?
Just switch out the names of the functions? Could I also use Wowhead: We've got more style than a fashion designer who knows CSS. to get the spell ID by name? I seem to remember Spell IDs and item IDs being the same on WoW Head that they are in-game.
Whew! Doesn't seem so hard after all =D
Right, then! Thanks guys! That just brings me to converting that piece of code to C++... Something I'm probably going to have to get more help with, but I'm gonna try, anyway.