Created
October 11, 2015 22:52
-
-
Save nicklanng/eeb9ee57c96a13bc11c8 to your computer and use it in GitHub Desktop.
Mapping turtle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local mapLevel = 110 | |
local flightLevel = 120 | |
-- hook up peripherals and perform preflight checks | |
-- connect to server | |
-- set name to be server designation | |
-- request patrol area | |
-- go back up to Flight Level | |
local x, y, z = gps.locate(GPSTimeout) | |
local upNumber = flightLevel - z | |
for i = 0, upNumber, 1 do | |
turtle.up() | |
end | |
-- go to first corner of patrol area | |
-- drop down | |
while not turtle.detectDown() do | |
turtle.down() | |
end | |
-- get block id | |
local success, data = turtle.inspectDown() | |
local name = data.name | |
-- transfer to server | |
-- go back up to Map Level | |
--local x, y, z = gps.locate(GPSTimeout) | |
--local upNumber = mapLevel - z | |
--for i = 0, upNumber, 1 do | |
-- turtle.up() | |
--end | |
-- move to next block in patrol area | |
-- go back to first block in patrol area |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment