Thank Shynd or I should call u shine XD. I didnt knew that the objects inluded mobs arround me thx.
Thank Shynd or I should call u shine XD. I didnt knew that the objects inluded mobs arround me thx.
Cypher, how do you come up with the offsets for the CGObject_C class? I've looked in the memory, but I have no idea how you manage to dump all of those offsets within ~12 hours of a patch.
Mainly, the pointers to the movementState, X, Y, Z, etc. The pointers to the DB/Cache or whatever also. I'm gonna start looking at that, I've never looked at it... Seems nice.
Ohhhh, I didn't think about that. I really need to start using FIndpattern()... I'm sick of updating EVERYTHING.
EDIT: XREF's FTW for that method I'm assuming. Heh.
Last edited by lanman92; 11-30-2008 at 09:27 AM.
Small IDA script i made to rename LUA functions to readable state...
the script tries to identify LUA tables ie:
.data:00FCDBF0 dd offset aGetunitspeed ; "GetUnitSpeed"
.data:00FCDBF4 dd offset sub_00FCDBF4
and rename to
.data:00FCDBF0 dd offset aGetunitspeed ; "GetUnitSpeed"
.data:00FCDBF4 dd offset myluaf_GetUnitSpeed
sometime helpfull :-)
#include <idc.idc>
static main(){
auto x, ea, end_seg, write, OutFName, Outfile;
auto sname, fname ;
auto fptr, nptr, fstart ;
ea = FirstSeg();
// ea = here ;
end_seg = SegEnd(ea);
while ( ea != BADADDR) {
if( substr( Name(ea), 0, 1) == "a" && DfirstB(ea) != BADADDR ) {
nptr = DfirstB(ea) ;
fptr = Dword(nptr+4) ;
fstart = LocByName(GetFunctionName(fptr));
Message("String %s @ %x -> %x <> %x/%x : ", Name(ea), ea, nptr, fptr, fstart) ;
if ( nptr != BADADDR && GetStringType(ea) == 0 && strlen(GetFunctionName(fptr)) != 0 && fstart == fptr)
{
fname = GetFunctionName(fptr) ;
sname = GetString(ea, -1, 0) ;
Message("Detected @ %08X : <%s> (%d) -> <%s>\n", ea, sname, GetStringType(nptr), fname) ;
MakeNameEx(fptr, form("myluaf_%s", sname), 1) ;
// break ;
}
else
{
Message(" Wrong: %d %s/%d\n", GetStringType(nptr), GetFunctionName(fptr), strlen(GetFunctionName(fptr))) ;
}
}
if (ea == end_seg)
{
ea = NextSeg(ea);
if (ea!=BADADDR) end_seg = SegEnd(ea);
}
else
{
ea = NextHead(ea, 0xffffffff);
}
}
Message( "String Search complete!\n\n" );
}
How can I use the lua function with the BlackMagic Library?
i dont know... have no idea what BlackMagic is.
BlackMagis is shynd's library it helps to read/write process memory and inject code or dll...
Don't mind BlackMagic how can I use the function?
I'll manage to convert it by myself..
You can use it when you learn what the hell you're doing. Its an IDA script, not something you inject into the game. Unless, of course, you're talking about something else.
I want to call a lua function from my bot...
Then you should probably figure out what you need to do to achieve that. If you're trying to call a protected LUA function, you have to disable the protection; if you're not, then what's the problem?
Can you show me an example please?