Due to popular demand (more than one person), i will make a short Basictutorial about CC-Programming, so you can program your Factory better than with Redpower (until Eloraam releases her Computertechnology). I hope you know the CC-Recipes, because i will not show them.
Direwolf20 has made a Videotutorial for CC.
The CC-Folder for programs you use in every Savegame/SMP-game is ".minecraft\mods\ComputerCraft\lua\rom\programs", the folder "Turtle" should contain only turtleprograms, and the Folder "Computer" should contain only Computerprograms. All the other Programs, which are for Turtle and Computer can be put directly in the "programs"-Folder.
You can edit all these Files with Notepad or something similar even if they have no ending. And if they have an ending (if you downloaded it from here for example), then you should remove the ".txt" on the end of the File so you dont have to Type "Programname.txt" to run the program.
If your program stucks then you can use "Ctrl + T" to terminate it (you must hold them for a moment). Holding "Ctrl + R" restarts the Computer.
1.0 Disclamer for generic Commands
"help" will display help for you.
"apis" will list all the things with helpthemes (sometimes they are not very helpfull)
"help 'Programname' " or "help 'API_Name' " will display the help for the Program/API.
"programs" will list all the programs in this Computer.
"edit 'Programname' " will edit the Program you have selected or will make a new one.
when you are naming a File "startup" then the Program will be started together with the Computer.
" 'Programname' " will start the Program, simple as that.
"exit" shuts the Computer down until you rightclick it.
"dj" if you have a Musicdisc in an adjacent Diskdrive then it will played.
1.1 Setting Redstonesignals and other Basic commands
Now you need your first non-Hello-World-Program, therefor you need to type "edit InsertYourProgramNameHere" in the Computer. You can also use Notepad if you find the Folder in your Savefile or the CC-Mainfolder (explained above where it is).
_
"rs.setOutput("left",true);" sets the Redstonsignal on the Left side of the Computer ON ("true").
"rs.setOutput("left",false);" the "false" sets it OFF.
_
You can use the following other directions instead of "left":
"right", "front", "back", "top" and "bottom".
_
"os.sleep(5);" stops the program for "5" Seconds (100 ticks).
You can use this for Timers
1.1.2 Syntax
"while 'Condition' do
'Insert Code Here'
end"
the Code between the "do" and the "end" will be processed as long as the condition is true.
if you write "while true do" then it becomes an endless Loop, which is used for Timers.
I know theres a for-Loop but i don't use it, because of it's diffrent behaviour in diffrent Programminglanguages
_
"if 'Condition' then
'Insert Code Here'
end"
It will do the lines of code once if the condition is true.
_
"
'Condition A' or 'Condition B' "
will output "true" if ONE of the conditions is met.
_
"
'Condition A' and 'Condition B' "
will output "true" if BOTH of the conditions are met.
_
"not 'Condition' "
will output "true" if the condition is NOT met.
_
"not ( 'Condition A' and 'Condition B' )"
will output "true" if NOT BOTH conditions are met.
1.1.3 Turtle your friend and helper
Now we come to the mobile Computers with Miningabilitys (if crafted together with a Diamondpick).
I've attached some good Turtleprograms i use myself so feel free to use and don't forget to delete the ".txt"-ending for easier use.
What functions are available (copied from turtleAPI):
turtle.forward()
turtle.back()
turtle.up()
turtle.down()
turtle.turnLeft()
turtle.turnRight()
turtle.select( slotNum ) // 1 - 9 are valid
turtle.getItemCount( slotNum )
turtle.getItemSpace( slotNum )
turtle.dig()
turtle.digUp()
turtle.digDown()
turtle.place()
turtle.placeUp()
turtle.placeDown()
turtle.detect()
turtle.detectUp()
turtle.detectDown()
turtle.compare()
turtle.compareUp()
turtle.compareDown()
turtle.drop()
turtle.drop( quantity )
The most important ones are selfexplaining. The drop/place-commands are placing the stuff of the SELECTED Slot.
1.2 The attached programs for your Turtle
"chop" place in front of a 1x1 Tree and activate (The turtle must look at the trees everytime).
"chop2" place in front of a 2x2 Tree and activate (left aligned frontside of the tree, maybe i will change that).
"chop3" used to harvest the stem of a 3x3-RP-Rubbertree (place middly in front of it).
"shaft" place 3 Cobbles in the first Slot and a few torches in the Last and it will mine a 3x1-Shaft for you.
"Direwolf20_House" builds a larger Direwolf20-11x11-Standardhouse for you (the program will list everything what is used to build)
I hope this explains the basics of CC, so you can build the Factory you maybe imagined.
Edit: Forum failed at using ">" and "<" as normal letters (accidently thinks its HTML-Code).
">" and "<" should be used for smileys and such, so they would be less bugged like or
Ask if you're not understand something, that's not a shame and my explainingskills are not the best (for people with social life).
And never forget: Don't use Internetexplorer!