Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for i = 1, 5 do
- turtle.suckDown()
- turtle.forward()
- end
- turtle.turnLeft()
- turtle.turnLeft()
- for i = 1, 5 do
- turtle.suckDown()
- turtle.forward()
- end
- turtle.turnLeft()
- turtle.turnLeft()
- --turtle.select(16)
- --os.loadAPI("ocs/apis/sensor")
- --os.loadAPI("rom/apis/sensors")
- --os.loadAPI("openp/apis/sensors")
- -- the location of the redstone lamp relative to the sensor
- --local offset = {
- -- X = 1,
- -- Y = 1,
- -- Z = 0
- --}
- -- how close a player has to be to activate the lamp
- --local radius = 5
- -- find the distance from the player position to the offset
- --function distance(pos)
- -- local xd = pos.X - offset.X
- -- local yd = pos.Y - offset.Y
- -- local zd = pos.Z - offset.Z
- -- return math.sqrt(xd*xd + yd*yd + zd*zd)
- --end
- --local proximity = sensor.wrap("left")
- --while true do
- -- local signal = false
- -- local targets = proximity.getTargets()
- -- for k, v in pairs(targets) do
- -- if distance(v.Position) < radius then
- -- signal = true
- -- end
- -- end
- -- rs.setOutput("top", signal)
- --end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement