Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local modem = peripheral.find("modem")
- local xi,yi,zi = gps.locate()
- local xf,yf,zf = 5600, 152, 1306
- local function GrabItems()
- local wool, monitor, computer = false, false, false
- repeat
- turtle.select(1)
- turtle.suckUp()
- local item = turtle.getItemDetail()
- if item.name == "minecraft:white_wool" then
- turtle.transferTo(5)
- wool = true
- elseif item.name == "computercraft:monitor_advanced" then
- turtle.transferTo(6)
- monitor = true
- elseif item.name == "computercraft:computer_advanced" then
- turtle.transferTo(7)
- computer = true
- end
- until wool == true and monitor == true and computer == true
- end
- local function Down(y)
- local yf = y
- local xi,yi,zi = gps.locate()
- turtle.forward()
- while yi ~= yf do
- turtle.down()
- xi,yi,zi = gps.locate()
- end
- end
- local function moveX(x,z)
- local x,z = x,z
- local xi,yi,zi = gps.locate()
- turtle.turnLeft()
- local difx = math.abs(x-xi)
- for i=1,difx do
- turtle.forward()
- end
- end
- local function moveZ(x,z)
- local x,z = x,z
- local xi,yi,zi = gps.locate()
- turtle.turnRight()
- local difz = math.abs(z-zi)
- for i =1,difz do
- turtle.forward()
- end
- end
- local function PlaceUp()
- turtle.place()
- turtle.up()
- turtle.place()
- end
- local function PlaceDown()
- turtle.place()
- turtle.down()
- turtle.place()
- end
- local function ForwardRight()
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- end
- local function ForwardLeft()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnRight()
- end
- local function backing()
- turtle.select(5)
- PlaceUp()
- ForwardLeft()
- PlaceDown()
- ForwardLeft()
- PlaceUp()
- end
- local function PlaceTV()
- turtle.select(6)
- turtle.back()
- PlaceDown()
- ForwardRight()
- PlaceUp()
- ForwardRight()
- PlaceDown()
- end
- local function PlaceComputer()
- turtle.select(7)
- turtle.back()
- turtle.turnLeft()
- turtle.back()
- turtle.place()
- end
- local function Dig()
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- end
- local function RemoveBacking()
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- turtle.forward()
- turtle.forward()
- turtle.turnLeft()
- Dig()
- turtle.forward()
- Dig()
- turtle.forward()
- Dig()
- end
- local function Return()
- local x,y,z = 5600, 155, 1308
- local xi,yi,zi = gps.locate()
- turtle.down()
- turtle.forward()
- turtle.turnLeft()
- for i=1,(math.abs(x-xi)) do
- turtle.forward()
- end
- for i=1,3 do
- turtle.up()
- end
- turtle.forward()
- turtle.turnRight()
- turtle.turnRight()
- end
- GrabItems()
- Down(yf)
- moveX(xf,zf)
- turtle.turnRight()
- turtle.up()
- turtle.forward()
- turtle.turnRight()
- backing()
- PlaceTV()
- RemoveBacking()
- PlaceComputer()
- sleep(0.1)
- local pc = peripheral.wrap("front")
- pc.turnOn()
- Return()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement