daily pastebin goal
88%
SHARE
TWEET

Wander

a guest Mar 25th, 2019 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. while true do
  2.   local Fuel = turtle.getFuelLevel()
  3.   if Fuel <= 5 then
  4.     turtle.refuel()
  5.   end
  6.   local Distance = math.random(4,20)
  7.   local Rotate = math.random(0,1)
  8.   print(Distance .. "/" .. Rotate)
  9.   if Rotate == 1 then
  10.     turtle.turnLeft()
  11.   else
  12.     turtle.turnRight()
  13.   end
  14.  
  15.   for i=0,Distance do
  16.     turtle.suck()
  17.     os.sleep(0.5)
  18.     if turtle.detect() == true then
  19.       turtle.turnLeft()
  20.     end
  21.     turtle.forward()
  22.   end
  23.  
  24. 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