Yes, this is a tutorial including converting simple AA script, to codecave scripts. 
It will be short and sweet. I don't include any dll stuff inside just merge it with the dll you've made.
Ok, let's start it.

We take this simple Instant Drop script

CODE: SELECT ALL
//instant drop
// updated to MSEA 93 by nerrazzuri
[enable]
00ad0dd0:
add [eax],al
add [eax],al
add [eax],al
add [eax],al

[disable]
00af0dd0:
add [eax],al
add [eax],al
add [eax-71],al
inc eax


now to convert to a C++ script, you need to have it's bytes, which located in the memory view of Cheat Engine. (To learn on how to view Cheat Engine memory without getting HAD, LOOK HERE.)

I'll just give you the bytes here.

CODE: SELECT ALL
add [eax], al //bytes 00 00
add [eax-71], al//bytes 00 40 8f
inc eax// bytes 40


The byte should be, 00 00 00 00 00 40 8f 40. This is the [disable] part, while for the [enable] part, we see that,

CODE: SELECT ALL
add [eax], al // bytes 00 00


So, the bytes should be 00 00 00 00 00 00 00 00.

Create variables for the address that will be edited in the script.

CODE: SELECT ALL
DWORD dwInstantDropAddy = 0x00af0dd0;


Declare a variable that will hold the bytes when the hack is enabled.

CODE: SELECT ALL
BYTE Enabledbytes[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};


Declare a variable that will hold the bytes when the hack is disabled.

CODE: SELECT ALL
BYTE Disabledbytes[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x8f, 0x40};


And write a function for the hacks

CODE: SELECT ALL
void InstantDrop (__in BOOL bEnable)
{
     if(bEnable)
     {
           memcpy((void*)dwInstantDropAddy, Enabledbytes, sizeof(Enabledbytes));
     }
     else
     {
           memcpy((void*)dwInstantDropAddy, Disabledbytes, sizeof(Disabledbytes));
     }
}


now you are successfully converted a simple AA script to C++. :D


We are going to a more advance step, codecave, TBH, sometimes I have difficulties to convert some script also, but in these tutorial, I'll just teach you how to convert scripts that I know.

We are using full monster book script. Here is it.

CODE: SELECT ALL
[ENABLE] 
alloc(MonsterBook,24) 
registersymbol(MonsterBook) 

0095d048:
jmp MonsterBook

MonsterBook: 
mov eax,5
jmp 0095d04d

[disable] 
0095d048:
call 007018c0

dealloc(MonsterBook,24) 
unregistersymbol(MonsterBook)


Alright, for codecave script, you could use inline ASM to insert the script directly. But first, you have to define jump globally so that the function could jump into the inline ASM script.

CODE: SELECT ALL
#define jmp(frm, to) (int)(((int)to - (int)frm) - 5);


And then, we declare the address.

CODE: SELECT ALL
DWORD g_dwBook = 0x0095d048, g_dwBooKRet = g_dwBook + 5;
char  g_szBookMem[5];


I know a lot of people doesn't really understand this, just follow the tutorial and you'll eventually understand it. :D 

Create a function for inline ASM and add the AA script into it.

CODE: SELECT ALL
__declspec(naked) void __stdcall MonsterBook()
{
    __asm 
    {
         mov eax,5
         jmp dword ptr [g_dwBookRet]
    }
}


Ok, I'll explain this one by one, why

CODE: SELECT ALL
g_dwBooKRet = g_dwBook + 5;

It's because the codecave need to jump to the address 0095d04d, which have 5 bytes at the original address 0095d048.

Well for the 

CODE: SELECT ALL
jmp dword ptr [g_dwBookRet]

It's kinda like, jump a word instead of byte(correct me if i'm wrong).

Now, we need to create a function to call the inline ASM.

CODE: SELECT ALL
void tglMonsterBook(__in BOOL bEnable)
{
     memcpy(g_szBookMem, (void*)g_dwBook, 5)//copy clean memory
     if(bEnable)
     {
          *(BYTE*)  g_dwBook = 0xe9; // 0xe9 = jmp
          *(DWORD*)(g_dwBook + 1) = jmp(g_dwBook, MonsterBook); // jmp to cave
     }
     else
     {
           memcpy( (void*)g_dwBook, g_szBookMem, 5);//copy the original bytes back to the address
     }
}


This is basically how a codecave script could be written in C++. I'll explain what is in the function.

CODE: SELECT ALL
*(BYTE*)  g_dwBook = 0xe9;

as I stated, it is a jump into the inline assembly script. We declare a jump that will jump to the codecave.


CODE: SELECT ALL
*(DWORD*)(g_dwBook + 1) = jmp(g_dwBook, MonsterBook);

This is where will jump into the codecave script.

Well that's all from my tutorial, correct me if I had written anything wrong, we can learn together. =)