Not a big fan of this guide...not enough number crunching to prove that it is really the most efficient way to raise magic...however that is not my major beef. AFK is illegal. Especially if you are truly away from your computer (not just multitasking between webpages and such).
"What is AFK Training?
AFK training is Away From Keyboard training. Whilst you are playing on RuneScape, you must be at the computer. Away from keyboard training is not allowed, and you should log out when you leave the computer."
-Under rule 7 macroing
Here is link...to runescape.com (I think that is allowed right?)
http://kbase.runescape.com/lang/en/aff/runescape/viewarticle.ws?article_id=2077