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

Wired2Coffee's Programs

Started by Wired2coffee, 27 February 2012 - 08:56 PM
Wired2coffee #1
Posted 27 February 2012 - 09:56 PM
Turtle Coordinates Saver:
Link: http://pastebin.com/G27wLVj3
Link (API Version): http://pastebin.com/qURqLBp7

Installation (non-API version):
1. Save as 'startup'
2. Type 'lua'
3. Type 'setUp()'
4. Type in current coordinates.

Installation (API):
1. Load as any API.

Use (non-API version):
Use up() instead of turtle.up() ;
Use turnLeft() instead of turtle.turnLeft()
etc. (won't work with non-movement related turtle functions)
Tip: Refrain from back(), this will simply make you do a 180 and go forward, unless that's what you want.

x,y,z,d = getXYZD() to get current coordinates. D stands for direction (north/south/east/west)
printXYZD() to print current coordinates and direction.

Use (API):
*Works on servers*
Use tortoise.up() instead of turtle.up() ;
Use tortoise.turnLeft() instead of turtle.turnLeft()
etc. (won't work with non-movement related turtle functions)
Tip: Refrain from back(), it doesn't work.

*NEW*
You can use tortoise.goto(x,y,z) to move to that area (if obstructed returns false).
*NEW*

x,y,z,d = tortoise.getXYZD() to get current coordinates. D stands for direction (north/south/east/west)
tortoise.printXYZD() to print current coordinates and direction.



Maze Runner (turtle):
Link: http://pastebin.com/bzMg93Pr

Installation:
1. Save as any program.

Use:
1. At the end of the maze, dig one block down to mark the end.
3. Make sure there are no spaces larger than 2 wide in the maze.
2. Run the program.



Rectangular Prism Creator (turtle):
Link: http://pastebin.com/DSrn5bkX

Installation:
1. Save as any program.

Use:
1. Make sure there are no parameters less than 3.
2. Run the program.
3. Type 'lua'
4. Type prism(x,y,z)
Liraal #2
Posted 27 February 2012 - 09:59 PM
it'd be better if you save this as an API, works much the same, but gets called by apiname.functionname() and needs os.loadAPI(APIfilepath) to work.
Wired2coffee #3
Posted 27 February 2012 - 10:01 PM
it'd be better if you save this as an API, works much the same, but gets called by apiname.functionname() and needs os.loadAPI(APIfilepath) to work.
I've attempted this. It failed to work due to issues with external file saving not working correctly.
Liraal #4
Posted 27 February 2012 - 10:03 PM
can you tell what the exact errors were? maybe I (or someone else) can help?
Wired2coffee #5
Posted 27 February 2012 - 10:07 PM
can you tell what the exact errors were? maybe I (or someone else) can help?
If you run the program with os.loadAPI() then attempt to use it, it'll become fairly clear. The issue was the file saving part.
Wired2coffee #6
Posted 27 February 2012 - 11:24 PM
Figured out the issue, fixed it. Thanks for the suggestion <_</>/>