This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Zer0t3ch's profile picture

Zer0t3ch's Programs & Tuts [1 Program - 2 zAPI Functions]

Started by Zer0t3ch, 12 March 2012 - 03:04 PM
Zer0t3ch #1
Posted 12 March 2012 - 04:04 PM
I'm going to skip right past the introduction into this: Note, a lot of my coding I do on my phone at school, and usually upload there too, so I don't get to test my own code until later, so please post feedback and let me know what you think. Later I will post some in-game picture examples to show some designs that would allow the program to work.

Give me suggestions on what else to add so I can make it! I will add all suggestions to the topic poll.


zAPI v0.2 [Functions: 2] – (UNTESTED)
Spoiler
Functions:
tunnel(length)
  --Quicker-than-default tunneler program (2x3) and returns to start
treeChop()
  --Helps with chopping trees. Look at the exact code to figure out how to be able to implement (well) into your programs
Pastebin Link HERE
Logic API (For boolean logic, more complex logic coming soon!)
SpoilerWill add a list of functions later, for now, just look through the code for information.
The API currently includes all of the basic logic gates in the two tables HERE except for XOR and XNOR. They will hopefully be in the next update, I am just too tired right now. :-P
http://pastebin.com/6aD9xVsf
My Programs: [Count: 1]
SpoilerReed/Cacti Farmer
SpoilerPastebin Copy HERE
 -- Reed/Cacti Farmer -- By Zer0t3ch term.clear() term.setCursorPos(1,1) print("Welcome to farmer.") print("by Zer0t3ch") print(" ") print("Drop items on return? (y/n)") io.write("> ") drop = io.read() slot = 1 turtle.turnLeft() turtle.turnLeft() while true do if drop == "y" then turtle.drop() end turtle.turnRight() turtle.turnRight() while turtle.detect == false do if turtle.detectDown == true then turtle.digDown() end turtle.forward() end turtle.turnRight() turtle.turnRight() while turtle.detect == false do if turtle.detectDown == true then turtle.digDown() end turtle.forward() end end 
Legal Stuff:
SpoilerAny and all of my programs and APIs can be edited and used for personal use. For public use, my code may be implemented into whatever you need, so long as I get credited in the beginning of the file. Like this:
 -- Partial/All Code courtesy of Zer0t3ch 
Edited on 24 March 2012 - 02:30 AM
Wolvan #2
Posted 13 March 2012 - 08:37 AM
Nice one I may test it out later after school :mellow:/>/>
Zer0t3ch #3
Posted 13 March 2012 - 01:53 PM
Thanks! :-)
Zer0t3ch #4
Posted 13 March 2012 - 04:02 PM
Added zAPI, my new API. What else should I add into it? What do you guys want?
Zer0t3ch #5
Posted 15 March 2012 - 03:52 PM
I have updated zAPI to v0.2 with one new function. So far, the tunneler seems to be a bit too much like a single program to me, so should I simplify it down a little bit so it can be used a bit more flexibly in programs or is it okay the way it is? I would really like to know from the community.
Also, has anyone tried this out yet? I would like some input from the community.
ironsmith123 #6
Posted 17 March 2012 - 03:02 AM
I love it lol. Aww who gives a **** about this "prepositional phrase" crap! Im gonna code computer craft programs for minecraft! XD
Zer0t3ch #7
Posted 18 March 2012 - 05:23 PM
I love it lol. Aww who gives a **** about this "prepositional phrase" crap! Im gonna code computer craft programs for minecraft! XD
Do you like it, is it useful? What else should I add?
Zer0t3ch #8
Posted 22 March 2012 - 03:54 PM
@Everyone - Gonna update zAPI again soon. Currently, it mostly is just here for making ordinary every-day tasks easier, but I would like to expand, so what else do you want?
Zer0t3ch #9
Posted 24 March 2012 - 03:30 AM
Added the LogicAPI, check it out! (As usual, still untested) :-P
Zer0t3ch #10
Posted 02 April 2012 - 05:01 PM
Am I allowed to bump? (Bump…) :)/>/>