This tutorial will assume you have a addon_game_mode.lua file, and that is has the appropriate methods required to launch an addon.
The premise for this tutorial is the following question: "How do I make it that so having the correct items in the correct order results in the items being combined?" Note that making custom item recipes is a much easier way to go about this if recipes make sense for your mod.