Added groundwork for Lua-based items, added EVENT_EQUIP_CHANGE and some minor things.