For anyone that wants to use the original recipes in this script, instead of making your own, in v18 replace the RECIPIES array with the following:
RECIPES=[
[:POKEBALL,3,[:REDAPRICORN,2],nil, false],
[:GREATBALL,3,[:REDAPRICORN,2],[:BLUEAPRICORN,1], false]...