Lua:
local killedMonstersCountStorage = 77777
(make sure to set the variable to something not already used)
Keep track of killed monsters with creaturescripts death event then add exp in NPC like this:
Lua:
player:addExperience(20 * (player:getStorageValue(killedMonstersCountStorage) > 0 and player:getStorageValue(killedMonstersCountStorage) or 0))