Advertisement
Guest User

lol

a guest
Jan 24th, 2020
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.07 KB | None | 0 0
  1. function forward()
  2.  while true do
  3.   if turtle.forward() then
  4.    break
  5.    else
  6.    turtle.attack()
  7.    turtle.dig()
  8.   end
  9.  end
  10. end
  11.  
  12. function up()
  13.  while true do
  14.   if turtle.up() then
  15.    break
  16.    else
  17.    turtle.digUp()
  18.    turtle.attackUp()
  19.  
  20.   end
  21.  end
  22. end
  23.  
  24. function down()
  25.  while true do
  26.   if turtle.down() then
  27.    break
  28.    else turtle,attackDown()
  29.    turtle.digDown()
  30.  
  31.   end
  32.  end
  33. end
  34.  
  35.  
  36. local wherex, wherey, wherez,a,b,c,homey
  37.  
  38. function comebackhome()
  39.  
  40.  turtle.getItemCount(13) = wherex
  41.  turtle.getItemCount(14) = wherez
  42.  local  a,b,c = turtle.locate(5)
  43.  
  44.  homey - b = wherey
  45.  
  46.  for i = 1, wherey do
  47.   up()
  48.  end
  49.  
  50.  turtle.turnRight()
  51.  turtle.turnRight()
  52.  
  53.  for i = 1, wherez do
  54.   forward()
  55.  end
  56.  
  57.  turtle.turnRight()
  58.  
  59.  for i = 1,wherex() do
  60.   forward()
  61.  end
  62.  
  63.  turtle.turnRight()
  64.  
  65. end
  66.  
  67. local startbread = turtle.getItemDetail(1).name
  68.  
  69. function askhome()
  70.  
  71.  if startbread == "minecraft:bread" then
  72.   print("Enter y value of the chest")
  73.   local homey = read()
  74.   else
  75.   print("warning: home y axis not
  76. end
  77. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement