14 years late replying but after getting fed up that I couldn't find the code to do anything other than Windworks I dug a little and applied the pattern from Baka_Kyuubi84's codes for Platinum to Diamond. Hopefully this saves some poor soul in the future from doing the same.
I didn't verify every single tree but I did do about 5 or so.