A major stumbling block is always that the individual sketches are often badly written - they may 'work' individually, but are unlikely to work together in most cases.
The best approach is for you to UNDERSTAND how BOTH sketches work, make an attempt to combine them - then post the result in .
Maybe someone will help from there.