big update: spells, combat, creatures

added /read and learn for spellbooks
/cast to cast spells
new magic php page
repitition in combat
randomness in combat
blacksmiths can get materials from last hit
playerID saved in js
adding/removing items restrictions
crating takes resources
view items shows materials as well