Fixed! I've updated the OP, but to fix it without having to redownload:
change line 402 to:
@goods.push([1, i, 0, 0, false]) if include == true && !@goods.include?([1, i, 0, 0, false])
and line 423 to:
@goods.push([2, i, 0, 0, false]) if include == true && !@goods.include?([2, i, 0, 0, false])
That should fix the issue. Sorry about that!
Edit: My client has requested that I not make his script commissions public until the release of his project, so I will no longer be providing or supporting this script here. See the OP for details.