.meta name="MAG alert" .meta description="Plays a sound when\nyour MAG is hungry" # Original code by Ralf @ GC-Forever and Aleron Ives # https://www.gc-forever.com/forums/viewtopic.php?t=2050 # https://www.gc-forever.com/forums/viewtopic.php?t=2049 # Xbox port by fuzziqersoftware .versions 4OJB 4OJD 4OJU 4OED 4OEU 4OPD 4OPU entry_ptr: reloc0: .offsetof start start: .include WriteCodeBlocksXB .data .data 0x0A .address hook_call: jmp hook1 int 3 int 3 hook_ret_sound: add esp, 0x10 hook_ret_no_sound: .data .deltaof hook1, hook1_end .address hook1: xor eax, eax mov dword [esi + 0x00000194], eax jmp hook2 hook1_end: .data .deltaof hook2, hook2_end .address hook2: mov edx, dword [esi + 0x000000F0] movzx edx, word [edx + 0x0000001C] # edx = this->owner_player->entity_id jmp hook3 hook2_end: .data .deltaof hook3, hook3_end .address hook3: cmp [], edx # local_client_id jmp hook4 hook3_end: .data .deltaof hook4, hook4_end .address hook4: jne hook_ret_no_sound jmp hook5 hook4_end: .data .deltaof hook5, hook5_end .address hook5: push eax push eax push eax add al, 0x8D push eax mov edx, # play_sound jmp hook6 hook5_end: .data .deltaof hook6, hook6_end .address hook6: call edx jmp hook_ret_sound hook6_end: .data 0x00000000 .data 0x00000000