I need to warn that this information will help very little with surviving. Writing scrolls is something I rarely do at all. It's much easier to find or buy scrolls than to write them.
That being said, it is possible. You need a writing set, a blank scroll and high literacy. You can only write scrolls that you have read before (or maybe it's enough to have identified one before, not sure). Be warned that writing the really interesting scrolls, like chaos removal, will drain a lot of power points and hitpoints and permanently reduce your mana score.
You steal a scroll labelled HITME. The orc hits you.