Just the plain, normal procedure I guess:
attached the script to the character or item, and create an osiris story that listen when a flag is set in the script
IF
ObjectFlagSet("usedtracksfailure",_Source,_), and fires the osiris XP giving part.
Bulky, IMHO, because in all other scripted mods I created (NWN2, MB warband, Legend of grimrock, to name the most important ones), it was usually only in one place, and I could create a function to call and make things much more cleaner and simpler.