Hello.
Use the OnUnAcquireItem module event.
If you want actual code, you have to wait that I can access my scripts -- later.
For now I will go from memory...
When a PC unacquires something... Check the Base Item Type of it.
If it is BASE_ITEM_GOLD... check the current possesor of the unacquired item (use the GetItemPossessor() function).
If the possessor is a placeable _and_ has no inventory... you know you have a problem of phantom GP.
You fix it like this:
1) get the stack size of the pile of GP dropped.
2) destroy the GP item immediately (it exists in memory, but has no physical counterpart to interact with -- it is a "zombie" nobody will ever be able to pick up)
3) Give back to the player the GP amount from point (1).
Solved.
-fox
Modifié par the.gray.fox, 22 novembre 2010 - 12:06 .