Does basically what the name says. Enter the starting position by magicTurtle.setPos(x, y, z) make it to face North (f=2 on F3 screen) and type magicTurtle.setNorth(). Then move it around by the use of magicTurtle.up() etc. There's a special function magicTurtle.goToPos(x,y,z,mode) which moves the turtle to the given coords. Set mode to true if you want it to break blocks that come its way, otherwise set to false.
functions:
setPos(x,y,z)
getPos()
goToPos(x,y,z)
turnLeft()
turnRight()
forward(n)
back(n)
up()
down()
tunnel(w,h,l)
staircase(w,h,l)
build(blueprint)
sketch()
mine(mode,l) --modes are diamond/regular
autoUpdate() --runs an autoupdate/remote control function in the background
setUpdateID() --sets the ID of remote control terminal
sendCommand(id, side, command) --sends remote command
road() --follow a road of redtorches
wander() --wanders aimlessly around
wanderer(func) --the above but while doing a function func
jack(sap) --plants, watches and cuts down a single tree (param is the slot with saplings)
treefarm(sap) --the same but on full auto (param as above)
landmine(slot, net) --turtle buries itself in the ground and places TNT that is triggered when someone walks on top of it. Can be armed/disarmed by rednet if net is set to true. (slot is the slot containing TNT)
patch(slot, l, w) --patches holes in the ground (slot is the slot for filling material, like dirt/gravel, l is length and w is width)
guardArea(exec, w, l) --patrols an area, if detects a hole/obstacle triggers function exec
remoteArm(id) --arms the mine of the ID given (the arming terminal must be tuned with the mine, see below setMineID())
remoteDisarm(id) -- disarms the mien
remoteSleep(id, t) -- disarms, waits 't' time and arms again
setMineID(arming, disarming) -- sets mine arming/disarming IDs (these are separate and can differ from each other)
savePos() --saves turtle pos to a file
getPosF() --gets turtle pos from file
mineGrid(slot) --makes a grid of TNT placed 1 block beneath surface
camoMine(slot) --same as above but a single TNT
digSlot(slot) --digs the given slot, if wrong material dug, drops to the ground
quarry(width,length) -- BETA quarry function
architect(width, height, length) --destroys a building to make a blueprint of it
path(facing) --experimental pathfinder to find a way when facing is clear. moves in 3d
stf(blueprint, filename) --saves a blueprint to a file filename EXPERIMENTAL
tff(filename) --returns a blueprint from file filename EXPERIMENTAL
You may use this code for your own APIs for public use for as long as you either attribute this to me or distribute unaltered. You're free to do with it whatever you want for your personal use.
Download
[attachment=84:magicTurtle1.31.txt] –newest
[attachment=67:magicTurtle1.3.txt]
[attachment=63:magicTurtle1.252.txt]
[attachment=60:magicTurtle1.251.txt] –bugged isSpace
[attachment=59:magicTurtle1.25.txt] –bug in mine() command
[attachment=54:magicTurtle1.24.txt]
[attachment=50:magicTurtleUpdate1.23.zip]
[attachment=44:magicTurtle1.22.txt]
[attachment=42:magicTurtle.txt]
TEAM:
- Liraal (me)
- EatenAlive3
Keycard lock
A small side-project, a keycard lock with random passwords and multi-user support. Has an admin system with control panel. Adjustable by variables within the program. Try it!
Download
[attachment=64:lock.txt] –version 1.0 (newest)