Altering in-game variables and switches through scripts is easy. They are located in the global arrays, $game_variables and $game_switches. So A code like: $game_variables[y] = integer would set the in-game variable with ID y to the integer, while a code like: $game_switches[z] = boolean (true/false) would set it to the new value, either ON (true) or OFF (false)
As for the solid numbers, you can draw only a portion of an external bitmap by changing the source rect when you are drawing.
So, the method in Bitmap is blt, so
bitmap.blt (x, y, bitmap_name, src_rect) is the basic code (and opacity if you wanted to change that too, but ignoting for now)
The method will draw only what is within the src_rect. So if you have a 100 x 20 pixel graphic, with each number from 0-9 being ten pixels in width, and your src_rect is Rect.new (40, 0, 10, 20), then it will only draw the 4.