[Release] Asm function - geons

Results 1 to 1 of 1
  1. #1
    Valued Member mar is offline
    MemberRank
    Nov 2006 Join Date
    142Posts

    wink [Release] Asm function - geons

    Another asm function. Function returns in EAX how much geons player has in his inventory.

    Code:
    push ebp
    mov ebp,esp
    mov ecx,[ebp+08]
    mov edx,[ecx+448]
    test edx,edx
    jz FINISH1
    mov eax,[edx+34]
    jmp FINISH2
    FINISH1:
    xor eax,eax
    FINISH2:
    mov esp,ebp
    pop ebp
    ret
    Example of using:

    Code:
    push userId (beginning of player's memory)
    call FUNCTION
    add esp,04
    cmp eax,.................. check  if player have at least X geons......




Advertisement