Magic refill hint:
To refill your magic, find two sorcerers and use your special magic to kill them. Then, immediately get their Spell Books and, before they disappear, use your magic again. This will trigger an error, causing the sorcerers to give you two more Spell Books. Repeat this until your Spell Meter is full.
Infinite magic hint:
When surrounded by a bunch of enemies and at least one sorcerer, hit the sorcerer somehow (magic or sword), grab his magic, then quickly use it. A bug will cause the sorcerer's magic to reappear on the ground where you can repeat the process.
To resurrect your friend, just use your magic as soon as he dies. This will trigger an error and keep your friend alive. Note: This does not refill their Hit Points, so one hit will kill them.