Update bg1npc.tp2

add library functions