Hi all.

I'm trying to open the inventory of a npc while still alive but the player has to be able to take items from it.

I've tried with oCNpc::OpenInventory and oCNpcInventory::Open without success, and then I tried oCNpc::OpenDeadNpc.

This is the function that is called when you clicked on a dead npc. Obviouly there is a call to oCNpc::IsDead:

Code:
  736740:    8b 91 b8 01 00 00        mov    edx,DWORD PTR [ecx+0x1b8]
  736746:    33 c0                    xor    eax,eax
  736748:    85 d2                    test   edx,edx
  73674a:    0f 9e c0                 setle  al
  73674d:    c3                       ret
So I wrote SETG instead of SETLE. It was just for test, but as soon as I called the function, the inventory opened but every npc died too :P

What could be a good way to do that in your opinion?

Thank you!