Automatic Quest Generation Function