Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A new itr effect
#1
? 
First, I'm sorry for my title
I could not think another better title
because my english is very poor:'(

I want to bring a enemy to specified frame when the enemy is lower than a specified HP
I have write this code
Code:
    sub eax,2000000000    ; take off the '2' in front
    mov ebx,1000
    mov edx,0
    idiv ebx
    xor ebx,ebx
    mov ebx,eax
    xor eax,eax
    mov eax,edx
    xor edx,edx    ; separate number #2XXXYYYZZZ into #XXXYYY & #ZZZ. #XXXYYY is stored in ebx, #ZZZ is stored in eax, EDX is cleared.
    push ebx
    push eax
    mov ecx,dword ptr ds:[esi+edi*4+194h]
    mov edx,dword ptr ds:[ecx+368h]
    mov edx,dword ptr ds:[edx+304h] ;MaxHP
    mov eax,dword ptr ds:[eax+2FCh] ;RedHP
    imul ebx,eax,100
    xor eax,eax
    mov eax,ebx
    idiv edx
    mov ebx,eax
    xor eax,eax
    pop eax
    cmp ebx,eax    
    jge r2
    xor eax,eax
    xor ebx,ebx
    xor ecx,ecx
    xor edx,edx
    pop ebx
    mov eax,ebx
    xor ebx,ebx
    mov ebx,1000
    mov edx,0
    idiv ebx
    xor ebx,ebx
    mov ebx,eax
    xor eax,eax
    mov eax,edx
    xor edx,edx
    mov ecx,dword ptr ds:[esi+edi*4+194h]
    mov edx,dword ptr ds:[ecx+368h]
    cmp dword ptr ds:[edx+6F4h],eax
    jnz r2
    xor eax,eax
    mov eax,ebx
    mov ecx,dword ptr ds:[esi+edi*4+194h]
    mov dword ptr ds:[ecx+70h],eax
    jmp r2
which
XXX=Destination Frame Number
YYY=ID Number
ZZZ=Percentage of HP
but it do not work

Where should I make change?

Finally, Thank you to understand my english:D
Sorry for my poor english.
I will improve it.:D
Please try to understand my english and correct me if I use it wrong.
Thankyou
Reply
Thanks given by:


Messages In This Thread
A new itr effect - by Thomas - 09-13-2009, 02:53 PM
RE: A new itr effect - by Boop - 09-13-2009, 03:14 PM



Users browsing this thread: 1 Guest(s)