Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- KVARIIT - quary builder robot
- -- by giny8i8
- --
- -- __History__
- -- 2013-04-01 -- v1p01 -- initial release
- -- __Variables__
- local FoSize = 0
- local RiSize = 0
- -- __Functions__
- function goFor(GoBlocks)
- print("Advancing "..GoBlocks.." blocks")
- for i=1,GoBlocks do
- turtle.dig()
- turtle.forward()
- end
- end
- function placeMark()
- turtle.digDown()
- turtle.select(2)
- turtle.placeDown()
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- turtle.turnRight()
- turtle.select(1)
- turtle.place()
- turtle.turnRight()
- turtle.turnRight()
- print("LandMark placed.")
- end
- -- __Execution__
- print()
- print("--== KVARIIT ==--")
- print("[i] Put LandMarks in slot-1")
- print("[i] Put solid blocks in slot-2")
- print()
- print("-- Inputs --") -- inupts
- print("Quary size Forward - Specify!")
- write ("[^]:")
- local FoSize = tostring( read() )
- print("Quary size Right - Specify! ")
- write ("[>]:")
- local RiSize = tostring( read() )
- print()
- print("Quary size is: "..FoSize.." x "..RiSize)
- print("Let's go...")
- print()
- print ("Preparing to start") -- Preparations
- for i=1,16 do
- turtle.select(i)
- turtle.refuel()
- end
- FuelQuant = turtle.getFuelLevel()
- print ("Fuel level: "..FuelQuant)
- turtle.select(1)
- print("Starting to build Quary") -- Start of Cycle
- print("Advancing -- Side-AB") -- Side-AB ----------------------------
- goFor(FoSize)
- print("Placing LandMark -- Point-B")
- placeMark()
- print("Advancing -- Side-BC") -- Side-BC ----------------------------
- SideBC = RiSize-2
- goFor(SideBC)
- print("Placing LandMark -- Point-C")
- placeMark()
- print("Advancing -- Side-CD") -- Side-CD ----------------------------
- SideCD = FoSize-2
- goFor(SideCD)
- print("Placing LandMark -- Point-D")
- placeMark()
- print("Advancing -- Side-DA") -- Side-DA ----------------------------
- goFor(SideBC) -- equals to Side-DA
- print("Placing LandMark -- Point-A")
- placeMark()
- print("All LandMarks placed")
- print("Bye bye")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement