Hey,
then here the script.
I commented all important things.
[code=asm]
alloc(newmem,2048) //2kb should be enough
label(returnhere)
label(originalcode)
label(exit)
newmem: //this is allocated memory, you have read,write,execute access
pushfd
cmp [ebx+128], 2 //cmp ebx structure to decide between player or npc
je originalcode //if ebx+128 holds 2, then the player was hitted
mov eax, #999 //if not, then move into eax 999 hex
originalcode: //this original codes gets only executed if an enemy or you gets hitted
popfd
mov ebx,[ebx]
sub [ebx],eax //and now you decrease the health of the npc with 999 hex
mov ecx,[esp+14]
exit:
jmp returnhere
"SawGame.exe"+161C68:
jmp newmem
nop
nop
nop
returnhere:
[/code]
then here the script.
I commented all important things.
[code=asm]
alloc(newmem,2048) //2kb should be enough
label(returnhere)
label(originalcode)
label(exit)
newmem: //this is allocated memory, you have read,write,execute access
pushfd
cmp [ebx+128], 2 //cmp ebx structure to decide between player or npc
je originalcode //if ebx+128 holds 2, then the player was hitted
mov eax, #999 //if not, then move into eax 999 hex
originalcode: //this original codes gets only executed if an enemy or you gets hitted
popfd
mov ebx,[ebx]
sub [ebx],eax //and now you decrease the health of the npc with 999 hex
mov ecx,[esp+14]
exit:
jmp returnhere
"SawGame.exe"+161C68:
jmp newmem
nop
nop
nop
returnhere:
[/code]
"Auf dieser Welt gibt es mehr Scheisse als auf Festivalklos"