Look in script section PField_Battles, under the function "def pbPickup(pkmn)". The line where the Pokemon actually gains an item is this:
So you can edit this line to instead store the item in the Bag and display a message, like so:
$PokemonBag.pbStoreItem(items[i])
pbMessage(_INTL("{1} found a {2}!", pkmn.name, PBItems.getName(items[i])))
I get this error whenever the ability is triggered:
---------------------------
Pokemon Immortal X/Oblivion Y
---------------------------
[Pokémon Essentials version 17.2]
Exception: NameError
Message: undefined local variable or method `pkmn' for Kernel:Module
PField_Battles:519:in `pbPickup'
PField_Battles:515:in `each'
PField_Battles:515:in `pbPickup'
PField_Battles:420
PField_Battles:419:in `each'
PField_Battles:419
PField_Battles:409:in `call'
EventHandlers:54:in `trigger'
EventHandlers:49:in `each'
EventHandlers:49:in `trigger'
This exception was logged in
C:\Users\Darci\Saved Games\Pokemon Immortal X_Oblivion Y\errorlog.txt.
Press Ctrl+C to copy this message to the clipboard.
---------------------------
OK
---------------------------