You have to do that with the map lua script.
npc:on_interaction() then do the dialog and finally give the item to the hero with hero:start_treasure(treasure_name, [treasure_variant, [treasure_savegame_variable, [callback]]])
You can have a look in the Manual for further help on these
npc:on_interaction() then do the dialog and finally give the item to the hero with hero:start_treasure(treasure_name, [treasure_variant, [treasure_savegame_variable, [callback]]])
You can have a look in the Manual for further help on these