x = 0
y = 0
z = 0
f = 0





function goToCoords(targetX,targetY,targetZ,targetF,elusory)
if elusory == 1 then
while y <= 200 do
turtle.digUp()
turtle.attackUp()
goUp()
end
end
end


function goUp()
if turtle.up() == true then
y = y+1
return true
end
end

function doDown()
if turtle.down() == true then
y = y-1
end
end

function pivotLeft()
turtle.turnLeft()
if f == 0 then
f = 3
else
f = f-1
end
end

function printLocation()
print("X=",x)
print("Z=",z)
print("Y=",y)
print("F=",f)
end

function getLocationInput()
print("X?")
x = read()
print("Y?")
y = read()
print("Z?")
z = read()
print("F?")
f = read()
end

function pivotRight()
turtle.turnRight()
if f == 3 then
f = 0
else
f = f + 1
end
end

function goForward()
if turtle.forward() == true then
  if f==0 then
  z = z+1
  elseif f==1 then
  x = x-1
  elseif f==2 then
  z = z-1
  elseif f==3 then
  x = x+1
  end
return true
else
return false
end
end
