Another thought would be to play with an existing script that does some of what you want to do, and see if you can figure out what modifications you should make. This is what I have been doing to learn. I have modified maybe a half dozen scripts to do something I wanted done and I am finally about ready to bang out one of my own. I am building it one task at a time, each one in a sub. You are probably more advanced than me as I have virtually no programming experience, but playing with other folks' scripts was a good way for me to learn. A lot of the time I will pull out a piece of script, paste it into another EUO window, throw a halt at the end and then see what it does as I tinker with it. The only training I have had was an introduction to BASIC and FORTRAN more than 20 years ago, so I offer any suggestions with the caveat that I lack skills.
So with that caveat, here s how I might approach your project: An example of a script that does a lot of your Gaman farmer is Jebbit's port about leather hunter. You might consider modifying that script to target new creatures and pick up the resources your are looking for. I have changed that script to attack different creatures and pick up different resources and it works pretty well. I would be happy to share those modifications with you if you are interested. It doesn't have an escape feature, -- but there is a relatively complete escape feature in Spewy's Rune Mining that you could incorporate...
I don't actually know what the protocol is for posting modifications to someone else's script. I put some up for Spewy's Miner, but I am not 100% on what is kosher in that regard. Maybe TM can give us some guidance there?
Regardless, good luck!
-P