In order to do this, you will need:
Cheat Engine 5.5
Flash Player 7
Step 1: Log on
Step 2: Unlimited HP or MP
To activate it go to cheat engine and enter in your HP and hit "First Scan". A massive list of values should show up. Ignore them for now. Now lose some health then go back to cheat engine and enter in your new health, then hit "Next Scan", and now there should be only one address (if not, lose some more health and search again). Double click on the address, and it should appear at the bottom. Now, double click the bottom, and change the number to "1E20". If you want unlimited MP, just repeat the same steps, just with your MP.
*UPDATE: I recently fought something from the dracolich quests (a dracovamp I think) that drains a certain percentage of your health each turn, and so if your health is set to 1e20, then it will fuly heal every turn. When facing something like this rather set your health to a certain number (e.g. 500) so that it does not fully regenerate.