You can call Ramza.CS.findRecipe(ingredients, quantity) from the console to test if it will find a recipe with any ingredients.
ingredients is an array of 2-4 (or 5 in your case) items, so [$dataItems[12], $dataItems[13], $dataItems[14], $dataItems[15]] would be an example of four ingredients being provided to the function. quantity is also an array, this is the for quantity of items given. So calling the above function with the below code is a good test to see if it's working, and in fact, was how I did testing on the recipe functions before I'd coded the interface for it:
var inglist = [$dataItems[12], $dataItems[13], $dataItems[14], $dataItems[15]] var qtylist = [1,1,1,1] Ramza.CS.findRecipe(inglist, qtylist)
That should return some stuff in the console if it found a match. It returns true, the result item (which is the first list in the recipe list plugin parameter), and then the recipe element of that result item. So if you have multiple recipes for one item, it'll tell you which recipe it found successfully.
In the case of a partial match, the first value it returns will be false, but the other two will be the same thing. If no match at all is found, it only returns false.
Your other issue is probably because the function Scene_Crafting.prototype.onIngredientSlotOk is used both for clicking on an empty (or filled) ingredient slot as well as the craft button, because all of those are all items in the command list. I had to make it so it knew which one of those things you were clicking 'Ok' on, so it does an index check. Change the <= 3 to <= 4 and it should work from there.
-Ramza