Probably the best part of the program is the function based on the very flexible and useful replacement for go utility (which I refer to as "gox") by tele_iz_dva4a. This function accepts a string of commands encompassing most of the available turtle functions and allows loops and enumerated iterations, so it can do most of the things that novice users spend time programing to get some basic utility out of their turtles.
I've also included a function based on the nifty Satellite Builder by dustpuppy. Though this is a somewhat more specialized function, which just launches a four-node GPS array to the top of the map, it can be a real time saver for a new world (it also illustrates some of the principles of turtle/computer interaction that are of interest to those who want to eventually have an automated machine nation). It can be used to place multiple arrays and makes an effort to keep them consistent with each other (though success is spotty, sometimes the automatic GPS finding works and sometimes it doesn't). The function only overrides the user provided coordinates if it finds a valid GPS system in place, so if it doesn't work then nothing bad happens.
I also included a couple of functions that I find useful, such as a simple bone-meal based wheat farmer (to use up all the bones you aren't feeding to dogs), a gravel sifter (in case you want to turn a hundreds of blocks of gravel into flint rather than using it to make paths that collapse when their underlayment gets removed), and a basic remote control function.
I now have a user guide for clfn in the spoiler below.
The program can be considered more of a starting point, if you want to build on it. The code is in the following spoiler, check the bottom of this post for the pastebin links.
On the other hand, if you spot areas where the functionality (not just the notation style) of the code can be improved, please share.
Oh, I should include the program for controlling a turtle remotely. It isn't strictly necessary (you can just send the commands by rednet in lua mode), but it could be helpful.
User/customization guide for rctrl, also substantially applicable to rcpda:
The code has been updated and now provides the ability for the remote control terminal to send entered strings, and the remote turtle will now accept loadstring commands (Shift+s to enter text send, send "loadstring", when the turtle gets the command you'll be prompted to "send lua code chunk"). If the text is not valid lua code then you'll get back the error message, but if you send syntactically valid lua code that produces an error then the remote control function will terminate. The functions "rcvfl" and "srvfl" have also been added, so that you can remotely write/read files on the turtle (or on a disk in a drive next to the turtle).
The code has been updated again and now supports passing a numeric variable to the turtle API commands. This means that you can now use turtle.select(n) by sendind "select n" (where n is the number of the slot to select). The turtle also responds to all turtle commands by reporting the function result (if any). The "loadstring" command has been replaced by "ldstrng" (to avoid confusion in the code). I think there were also some other minor improvements, but don't remember what they are.
Fixed inability to remote terminate remote control.
Early versions of clfn and rctrl posted on pastebin. Newer versions are in development, later in the thread. These will be posted to pastebin after some more development and testing.
Newest versions of clfn and rctrl now posted. There is also a version of rctrl that utilizes the CCPortable pda, named rcpda. The newest version of clfn is designed to work with rnhst, in development in the Programs forum (specifically, the Launch GPS Array functionality now launches an array of rnhst nodes rather than standard gps nodes). If you cannot (or just don't wish to) install rnhst in rom, then a copy has to be on the turtle that places the array (this is also useful because turtles can be used as temporary rnhst nodes themselves). The copy on the turtle will be copied to the disk and thence to the computers in the array.
Mad props to Ralnick for patient testing of bugged versions, the latest bugfix/update is up.
Experimental rcpda with menu for easy access to rnhst options, and now the ability to use up/down and PgUp/PgDn keys to revisit previous inputs (and returns) when sending text. Feedback always welcome. Another new version of clfn, this one adds a chst command that places a block from slot 16 and attempts to dump the rest of the inventory into it. It can be used with gox as "C". Bugfix/update for clfn (bugs discovered while reading the code to create the user guide, none found in "chst"/"C"), new updates for latest rcpda and rctrl.
Further development will require separation into an api and other parts, and thus clfn will no longer be an integrated, standalone program. Therefore, this will probably be the final update for the standalone clfn, barring the discovery of any further bugs, which I shan't be doing because I'll be using an api based collection of programs I'm developing.
Edited by ChunLing, 18 November 2012 - 11:09 PM.