This script, developed for RPG Maker VX Ace from pseudocode provided by FlyingJester, allows you to draw a line between two specified points on a bitmap.
To use it, simply call $game_system.draw_line(bitmap, x1, y1, x2, y2, colour) where bitmap is the bitmap object you want to draw the line on, x1 and y1 are the X and Y coordinate of the first point, x2 and y2 are the X and Y coordinate of the second point, and colour is any valid instance of the Color class.
Nice job! It looks like you tried hard too make it. I was going to make an artpad demo game and this was the best script I could find. Totall credit to you.
It seems to be code for an in-game graphics editor. The code defines drawing each pixel in a line between two points. You would have to code the other stuff in, like the stuff involved in moving some kind of cursor to the two points you want.