Advertisement
peptide

Test

Jul 20th, 2013
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.06 KB | None | 0 0
  1. for i = 1, 5 do
  2.     turtle.suckDown()
  3.     turtle.forward()
  4. end
  5.  
  6. turtle.turnLeft()
  7. turtle.turnLeft()
  8.  
  9. for i = 1, 5 do
  10.     turtle.suckDown()
  11.     turtle.forward()
  12. end
  13.  
  14. turtle.turnLeft()
  15. turtle.turnLeft()
  16.  
  17.  
  18.  
  19.  
  20.  
  21. --turtle.select(16)
  22.  
  23. --os.loadAPI("ocs/apis/sensor")
  24. --os.loadAPI("rom/apis/sensors")
  25. --os.loadAPI("openp/apis/sensors")
  26.  
  27. -- the location of the redstone lamp relative to the sensor
  28. --local offset = {
  29. --  X = 1,
  30. --  Y = 1,
  31. --  Z = 0
  32. --}
  33.  
  34. -- how close a player has to be to activate the lamp
  35. --local radius = 5
  36.  
  37.  -- find the distance from the player position to the offset
  38. --function distance(pos)
  39. --  local xd = pos.X - offset.X
  40. --  local yd = pos.Y - offset.Y
  41. --  local zd = pos.Z - offset.Z
  42. --  return math.sqrt(xd*xd + yd*yd + zd*zd)
  43. --end
  44.  
  45.  
  46. --local proximity = sensor.wrap("left")
  47. --while true do
  48. --  local signal = false
  49. --  local targets = proximity.getTargets()
  50. --  for k, v in pairs(targets) do
  51. --        if distance(v.Position) < radius then
  52. --          signal = true  
  53. --        end
  54. --  end
  55. --  rs.setOutput("top", signal)
  56. --end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement