features:
Spoiler
version()--returns the version
turn(direction,times)--direction accepts:left, right and back,you also need to specify how many times it needs to turn
move(direction,times)--direction accepts all directions except up and down.
code:
Spoiler
function version()
print("1.0.0.0")
end
function turn(direction,times)
if direction == "right" then
for i=1,times[1] do
turtle.turnRight()
end
if direction == "left" then
for i=1,times[1] then
turtle.turnleft()
end
end
end
function move(direction,times)
if direction == "forward" then
for i=1,times[1] do
turtle.forward()
end
if direction == "back" then
for i=1,times[1] do
turtle.back()
end
if direction == "right" then
turtle.turnRight()
for i=1,times[1] do
turtle.forward()
end
turtle.turnLeft()
end
if direction == "left" then
turtle.turnLeft()
for i=1,times[1] do
turtle.turnLeft()
end
turtle.turnRight()
end
end
if direction == "up" then
for i=1,times[1] do
turtle.up()
end
end
if direction == "down" then
for i=1,times[1] do
turtle.down()
end
end
end
http://pastebin.com/Z2hAcYpu
pastebin get Z2hAcYpu move
Upcoming features:
-diagonal movement
note: this code isn`t tested yet, feel free to test it.
bugs
the most helpful way to report a bug is:
What I expected to happen was:
What actually happened was:
Steps to Reproduce: