Advertisement
Guest User

Wither

a guest
Jun 23rd, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.50 KB | None | 0 0
  1. --Pastas Witherfarm v 1.2
  2. --by Spaghetti_Pasta
  3. function place() --Platziert Wither
  4.   while(true) do
  5.     if turtle.forward() then
  6.       turtle.forward()
  7.       turtle.select(1)
  8.       turtle.placeDown()
  9.       turtle.turnLeft()
  10.       turtle.place()
  11.       turtle.turnRight()
  12.       turtle.turnRight()
  13.       turtle.place()
  14.       turtle.up()
  15.       turtle.placeDown()
  16.       turtle.select(2)
  17.       turtle.place()
  18.       turtle.turnLeft()
  19.       turtle.turnLeft()
  20.       turtle.place()
  21.       turtle.turnRight()
  22.       turtle.back()
  23.       turtle.place()
  24.       turtle.down()
  25.       turtle.back()
  26.       break
  27.     else
  28.       redstone.setOutput("bottom", true)
  29.       sleep(1)
  30.       redstone.setOutput("bottom", false)
  31.       sleep(6)
  32.     end
  33.   end
  34. end
  35.  
  36. function refill()  --Fuellt Material nach
  37.   turtle.turnLeft()
  38.   while (true) do
  39.   turtle.select(1)
  40.     if turtle.suck(4) then
  41.       turtle.turnRight()
  42.       turtle.turnRight()
  43.       turtle.select(2)
  44.       while(true) do
  45.         if turtle.suck(3) then
  46.           turtle.turnLeft()
  47.         end
  48.         break
  49.       end
  50.     end
  51.     break
  52.   end
  53. end
  54.  
  55. function refillFuel()
  56.   while(true) do
  57.     turtle.select(16)
  58.     if turtle.suckUp() then
  59.       turtle.refuel()
  60.       turtle.dropUp()
  61.     end
  62.     break
  63.   end
  64. end
  65. while (true) do
  66.   if not redstone.getInput("back") then
  67.   sleep(10)
  68.   else
  69.   refill()
  70.   place()
  71.   redstone.setOutput("bottom", true)
  72.   os.sleep(1)
  73.   redstone.setOutput("bottom", false)
  74.   refillFuel()
  75.   sleep(10)
  76.   end
  77. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement