Well, if your numbers have some form of pattern, then yes its possible.
NPC Code:
//Example Only.
//This is a simple one that increases the Experience Gap between each level by 100.
//Assumes you dont reset Experience each level.
if (Experience > (Level^2 + Level)*50) {
...
}
You could also have all the ammounts stored in an array and then just look through it using thier current level as the index.
NPC Code:
//Example Only.
ExperienceAmmounts = {0,100,300,600,1000}; //Etc...
if (Experience > ExperienceAmmounts[Level]) {
...
}
If the scripts are wrong well meh its late. They're just examples anyway.