say your bar is at maximum 200 pixels wide, maximum achievement points = 500, and you currently have 5 points.
bar.maxwidth = 200
bar.maxpoints = 500
bar.currentpoints = 5
bar set bar.width = bar.maxwidth * (bar.currentpoints/bar.maxpoints)
would get you a 2 pixels wide bar.
bar.currentpoints = 300
would get you a 120 pixels wide bar.