Disclaimer: I don't own the game and don't have hardware to troubleshoot this.
I "made" this code from ranma99vn's first auto-pickup code. From looking at the assembly, my guess is that it seems to completely bypass the distance check. This is why it picks up EVERYTHING, and it cannot be altered for distance. ranma99vn has since made another code (the one quoted, not shown here) and it includes a modifier for distance.
The problem with the version I "created" is that the code is performed in-place. There's no room to add anything else, you are literally overwriting existing assembly. It works because because your only changing a small part.
The original and updated versions ranma99vn created use code caves. That is, he finds a spot in memory that is open, and tells the existing assembly to go there to continue executing, and he can write as much as he needs and returns to the original code after. It's an easy way to expand functionality for code that that was never intended and 'wont fit' in the original assembly. The only problem with code caves is that it can't be in use with another code that uses the same code cave. The original code didn't even require a code cave, but I think that's just his thing or the tools he was using. (or alternately, maybe I was just lucky that moving it out of the code cave 'just worked'). I think ranma99vn initially used the same code caves for all his codes, which is why they conflicted.
TLDR; That's all to say, I think ranma99vn made a new code list that made all his codes use different code caves so they would not conflict. You might want to check his more recent posts to see if any of them work.