daily pastebin goal
47%
SHARE
TWEET

ComputerCraft Tutorial: stone_generator_0_1

hevohevo Mar 4th, 2014 1,278 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- ################################
  2. -- Stone Generator with a SilkTouch Turtle
  3. -- version 0.1
  4. -- http://hevohevo.hatenablog.com/
  5. -- This Program requires a SilkTouch Mining Turtle by "More Turtles" mod
  6. --  See CC forum.
  7. --  http://www.computercraft.info/forums2/index.php?/topic/16465-mc164152-more-turtles-v112/
  8.  
  9. local p = peripheral.wrap("right")
  10. assert((p and p.digSilkTouch), "required: SilkTouch Turtle")
  11.  
  12. for i=1,16 do
  13.   turtle.select(i)
  14.   turtle.refuel()
  15. end
  16.  
  17. local fuel = turtle.getFuelLevel()
  18.  
  19. while fuel > 0 do
  20.   if turtle.detect() then
  21.     p.digSilkTouch()
  22.     turtle.dropDown()
  23.     fuel = fuel - 1
  24.     print(fuel)
  25.   else
  26.     turtle.dig()
  27.     turtle.dropDown()
  28.   end
  29.   os.sleep(1.5)
  30. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top