Warning! I'm still on my first cup of coffee so not fully human yet.
'>
If you want the tree to ONLY spawn if the journal (nInt) is 3... change this:
if (nInt == 3) -- if the journal is 3, you tell the script to stop
to
if (nInt != 3) -- if the journal is not 3, stop planting trees.
Good luck!
-- Mistress