It really does depend upon how you choose to display and store the 'map'.
I'd create either a memblock or an array with the cavern height information - probably at 20 pixel intervals or thereabouts and then use the line
command to draw between the dots.
for fl=1 to 100
for sx=x to x+10
That's a very rough piece of code, mostly because i'm a little 'tiddly' as I write this - but it should be enough to get the idea.
Pneumatic Dryll, Outrageous epic cleric of EQ/Xev
God made the world in 7 days, but we're still waiting for the patch.