Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Break()
- function dig()
- turtle.attack()
- turtle.dig()
- end
- function liniel()
- turtle.forward()
- dig()
- turtle.forward()
- dig()
- turtle.forward()
- dig()
- turtle.forward()
- dig()
- turtle.forward()
- dig()
- turtle.forward()
- dig()
- turtle.forward()
- dig()
- turtle.forward()
- dig()
- turtle.forward()
- dig()
- turtle.forward()
- end
- function TurnLeft()
- turtle.turnLeft()
- dig()
- turtle.forward()
- turtle.turnLeft()
- dig()
- end
- function TurnRight()
- turtle.turnRight()
- dig()
- turtle.forward()
- turtle.turnRight()
- dig()
- end
- --ANIMATIE START
- turtle.up()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.down()
- --SPARGEREA PRIMUL START
- turtle.select(1)
- turtle.turnLeft()
- dig()
- turtle.forward()
- turtle.turnRight()
- dig()
- liniel()
- TurnRight()
- liniel()
- TurnLeft()
- liniel()
- --URCARE
- turtle.digUp()
- turtle.up()
- turtle.turnLeft()
- turtle.turnLeft()
- --SPARGEREA CELUI DE AL DOILEA STRAT
- liniel()
- turtle.dig()
- turtle.forward()
- TurnRight()
- liniel()
- TurnLeft()
- liniel()
- --URCARE
- turtle.digUp()
- turtle.up()
- turtle.turnLeft()
- turtle.turnLeft()
- --SPARGEREA CELUI DE AL TREILEA STRAT
- liniel()
- turtle.dig()
- turtle.forward()
- TurnRight()
- liniel()
- TurnLeft()
- liniel()
- --URCARE
- turtle.digUp()
- turtle.up()
- turtle.turnLeft()
- turtle.turnLeft()
- --SPARGEREA CELUI DE AL PATRULEA STRAT
- liniel()
- turtle.dig()
- turtle.forward()
- TurnRight()
- liniel()
- TurnLeft()
- liniel()
- --URCARE
- turtle.digUp()
- turtle.up()
- turtle.turnLeft()
- turtle.turnLeft()
- --SPARGEREA CELUI DE AL CINCELEA STRAT
- liniel()
- turtle.dig()
- turtle.forward()
- TurnRight()
- liniel()
- TurnLeft()
- liniel()
- --GO HOME
- turtle.turnLeft()
- turtle.forward()
- turtle.down()
- turtle.down()
- turtle.down()
- turtle.down()
- turtle.turnLeft()
- for i = 1, 10 do
- turtle.forward()
- end
- for i = 1, 2 do
- turtle.turnLeft()
- end
- end
- function Build()
- function part2()
- turtle.turnLeft()
- turtle.place()
- turtle.turnRight()
- turtle.turnRight()
- turtle.place()
- turtle.turnLeft()
- turtle.back()
- end
- --CONSTRUIREA PRIMULUI STRAT
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.back()
- turtle.back()
- turtle.select(1)
- turtle.place()
- turtle.back()
- turtle.place()
- turtle.back()
- turtle.place()
- turtle.back()
- turtle.place()
- turtle.back()
- turtle.place()
- turtle.back()
- turtle.place()
- turtle.back()
- turtle.place()
- turtle.back()
- turtle.place()
- turtle.back()
- turtle.place()
- turtle.up()
- turtle.forward()
- --CONSTRUIREA CELUI DE AL DOILEA STRAT
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.place()
- part2()
- part2()
- part2()
- part2()
- part2()
- part2()
- part2()
- part2()
- --CONSTRUIREA CELUI DE AL TREILEA STRAT
- turtle.up()
- turtle.place()
- turtle.turnRight()
- turtle.place()
- turtle.turnRight()
- turtle.turnRight()
- turtle.place()
- turtle.turnRight()
- turtle.up()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.down()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.place()
- turtle.back()
- turtle.place()
- turtle.up()
- turtle.turnLeft()
- turtle.turnLeft()
- --CONSTRUIREA CELUI DE AL PATRULEA STRAT
- turtle.back()
- turtle.place()
- part2()
- part2()
- part2()
- turtle.turnLeft()
- turtle.place()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.place()
- turtle.turnRight()
- turtle.place()
- turtle.up()
- turtle.forward()
- turtle.forward()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.down()
- turtle.down()
- turtle.forward()
- --TERMINAREA MASINII
- turtle.place()
- turtle.back()
- turtle.up()
- turtle.up()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.select(2)
- turtle.placeDown()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.down()
- turtle.down()
- turtle.select(3)
- turtle.placeDown()
- turtle.up()
- turtle.up()
- turtle.back()
- turtle.back()
- turtle.back()
- turtle.back()
- turtle.back()
- turtle.back()
- turtle.back()
- turtle.back()
- turtle.back()
- turtle.back()
- turtle.down()
- turtle.down()
- turtle.down()
- turtle.forward()
- end
- function destroy()
- turtle.back()
- for i = 1, 3 do
- turtle.up()
- end
- for i = 1, 5 do
- turtle.forward()
- end
- turtle.select(2)
- turtle.placeDown()
- for i = 1, 5 do
- turtle.forward()
- end
- for i = 1, 2 do
- turtle.down()
- end
- turtle.select(3)
- turtle.placeDown()
- for i = 1, 2 do
- turtle.up()
- end
- for i = 1, 10 do
- turtle.back()
- end
- for i = 1, 3 do
- turtle.down()
- end
- turtle.forward()
- end
- function producere(produs)
- function breakobs()
- turtle.up()
- turtle.select(1)
- turtle.place()
- turtle.down()
- sleep(2)
- turtle.select(4)
- turtle.place()
- turtle.up()
- turtle.select(1)
- turtle.dig()
- turtle.down()
- sleep(3)
- turtle.select(16)
- turtle.dig()
- end
- print("Cate bucati de obsidian vrei?")
- print("Pune " .. p .. " bucati de redstone in slotul numarul 4")
- print("Dupa ce ai pus redstoneul apasa pe ENTER")
- ceva = os.pullEvent("key")
- for i = 1, produs do
- breakobs()
- end
- turtle.up()
- turtle.select(1)
- turtle.place()
- turtle.down()
- end
- function Mesaj1(mess)
- function Check()
- while true do
- local event, key, isHeld = os.pullEvent("key")
- return keys.getName( key )
- end
- end
- function first()
- for i = 1, 3 do
- print("| |")
- end
- print("| Breaking first layer |")
- for i = 1, 4 do
- print("| |")
- end
- print("+-------------------------------------+")
- end
- term.clear()
- term.setCursorPos(1, 1)
- print("+-------------------------------------+")
- print("| Clearing space |")
- print("+-------------------------------------+")
- if (mess == "First") then
- varchar = Check()
- if not (varchar == "pause") then
- print("ok")
- Check()
- else
- first()
- end
- end
- end
- Mesaj1("First")
- --print("Eliberarea locului!")
- --Break()
- --print("Locul a fost eliberat!")
- --print("Incepe construirea masinii!")
- --Build()
- --print("Masina a fost construita cu succes!")
- --producere(read())
- --print("Gata am terminat!")
- --destroy()
- --turtle.down()
- --Break()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement