Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Hi!
- -- Variables
- add1 = " "
- add2 = " "
- add3 = " "
- -- Ingredient!
- function bottle(...)
- for i = 1, 2 do
- turtle.turnRight()
- end
- for slot = 1, 3 do
- turtle.select(slot)
- turtle.suck()
- end
- for i = 1, 2 do
- turtle.turnRight()
- end
- for slot = 1, 3 do
- turtle.select(slot)
- turtle.drop()
- end
- end
- function wart(...)
- turtle.up()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnRight()
- turtle.select(13)
- turtle.suckDown()
- turtle.transferTo(1, 1)
- turtle.dropDown()
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- turtle.down()
- turtle.forward()
- turtle.select(1)
- while turtle.dropDown() == false do
- sleep(1)
- end
- turtle.back()
- end
- function magma(...)
- turtle.up()
- turtle.turnLeft()
- turtle.forward()
- turtle.forward()
- turtle.turnRight()
- turtle.select(13)
- turtle.suckDown()
- turtle.transferTo(1, 1)
- turtle.dropDown()
- turtle.turnRight()
- turtle.forward()
- turtle.forward()
- turtle.turnLeft()
- turtle.down()
- turtle.forward()
- turtle.select(1)
- while turtle.dropDown() == false do
- sleep(1)
- end
- turtle.back()
- end
- function ghast(...)
- turtle.up()
- turtle.turnLeft()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.turnRight()
- turtle.select(13)
- turtle.suckDown()
- turtle.transferTo(1, 1)
- turtle.dropDown()
- turtle.turnRight()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.turnLeft()
- turtle.down()
- turtle.forward()
- turtle.select(1)
- while turtle.dropDown() == false do
- sleep(1)
- end
- turtle.back()
- end
- function carrot(...)
- turtle.up()
- turtle.turnLeft()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- turtle.forward()
- turtle.select(13)
- turtle.suckDown()
- turtle.transferTo(1, 1)
- turtle.dropDown()
- turtle.turnRight()
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.turnLeft()
- turtle.down()
- turtle.forward()
- turtle.select(1)
- while turtle.dropDown() == false do
- sleep(1)
- end
- turtle.back()
- end
- function redstone(...)
- turtle.up()
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- turtle.select(13)
- turtle.suckDown()
- turtle.transferTo(1, 1)
- turtle.dropDown()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnRight()
- turtle.down()
- turtle.forward()
- turtle.select(1)
- while turtle.dropDown() == false do
- sleep(1)
- end
- turtle.back()
- end
- function glow(...)
- turtle.up()
- turtle.turnRight()
- turtle.forward()
- turtle.forward()
- turtle.turnLeft()
- turtle.select(13)
- turtle.suckDown()
- turtle.transferTo(1, 1)
- turtle.dropDown()
- turtle.turnLeft()
- turtle.forward()
- turtle.forward()
- turtle.turnRight()
- turtle.down()
- turtle.forward()
- turtle.select(1)
- while turtle.dropDown() == false do
- sleep(1)
- end
- turtle.back()
- end
- function sugar(...)
- turtle.up()
- turtle.turnRight()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.turnLeft()
- turtle.select(13)
- turtle.suckDown()
- turtle.transferTo(1, 1)
- turtle.dropDown()
- turtle.turnLeft()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.turnRight()
- turtle.down()
- turtle.forward()
- turtle.select(1)
- while turtle.dropDown() == false do
- sleep(1)
- end
- turtle.back()
- end
- function gunpowder(...)
- turtle.up()
- turtle.turnRight()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnRight()
- turtle.forward()
- turtle.select(13)
- turtle.suckDown()
- turtle.transferTo(1, 1)
- turtle.dropDown()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnRight()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.turnRight()
- turtle.down()
- turtle.forward()
- turtle.select(1)
- while turtle.dropDown() == false do
- sleep(1)
- end
- turtle.back()
- end
- -- Display
- function displayTipe(...)
- term.clear()
- term.setCursorPos(1, 1)
- print("press 1 for speed!")
- print(" ")
- print("press 2 for regeneration!")
- print(" ")
- print("press 3 for fire resistance!")
- print(" ")
- print("press 4 for night vision!")
- term.setCursorPos(1, 13)
- end
- function displayAdd1(...)
- term.clear()
- term.setCursorPos(25, 1)
- print(tipe)
- term.setCursorPos(3, 6)
- print("do u want to add redstone?")
- term.setCursorPos(3, 7)
- print(" 1 for Yes 2 for No ")
- end
- function displayAdd2(...)
- term.clear()
- term.setCursorPos(25, 1)
- print(tipe)
- term.setCursorPos(25, 2)
- print(add1)
- term.setCursorPos(3, 6)
- print("do u want to add glowstone?")
- term.setCursorPos(3, 7)
- print(" 1 for Yes 2 for No ")
- end
- function displayAdd3(...)
- term.clear()
- term.setCursorPos(25, 1)
- print(tipe)
- term.setCursorPos(25, 2)
- print(add1)
- term.setCursorPos(25, 3)
- print(add2)
- term.setCursorPos(3, 6)
- print("do u want to add gunpowder?")
- term.setCursorPos(3, 7)
- print(" 1 for Yes 2 for No ")
- end
- function recap(...)
- term.clear()
- term.setCursorPos(1, 5)
- write("Gonna make some ")
- write(tipe)
- write (" ")
- write (add1)
- write(" ")
- write (add2)
- write(" ")
- write (add3)
- write(" potion!")
- term.setCursorPos(12, 7)
- print("1 for Ok, 2 for No")
- term.setCursorPos(1,13)
- end
- -- Manip
- function potionToTipe(...)
- if potion == "1" then
- tipe = "speed"
- end
- if potion == "2" then
- tipe = "regeneration"
- end
- if potion == "3" then
- tipe = "fire resistance"
- end
- if potion == "4" then
- tipe = "night vision"
- end
- end
- function addiToAdd1(...)
- if addi == "1" then
- add1 = "Extended"
- else sleep(0.1)
- end
- end
- function addiToAdd2(...)
- if addi == "1" then
- if add1 == " " then
- add1 = "Level II"
- else
- add2 = "Level II"
- end
- else sleep(0.1)
- end
- end
- function addiToAdd3(...)
- if addi == "1" then
- if add1 == " " then
- add1 = "Splash!"
- elseif add2 == " " then
- add2 = "Splash!"
- else
- add3 = "Splash!"
- end
- else sleep(0.1)
- end
- end
- -- Main()
- function main(...)
- while true do
- displayTipe()
- potion = io.read()
- potionToTipe()
- displayAdd1()
- addi = io.read()
- addiToAdd1()
- displayAdd2()
- addi = io.read()
- addiToAdd2()
- displayAdd3()
- addi = io.read()
- addiToAdd3()
- recap()
- ok = read()
- if ok == "1" then
- bottle()
- turtle.up()
- wart()
- if tipe == "speed" then sugar()
- elseif tipe == "regeneration" then ghast()
- elseif tipe == "fire resistance" then magma()
- elseif tipe == "night vision" then carrot()
- else sleep(1)
- end
- if add1 == "Extended" then redstone()
- else sleep(1)
- end
- if add1 == "Level II" then glow()
- elseif add2 == "Level II" then glow()
- else sleep(1)
- end
- if add1 == "Splash!" then gunpowder()
- elseif add2 == "Splash!" then gunpowder()
- elseif add3 == "Splash!" then gunpowder()
- else sleep(1)
- end
- turtle.down()
- else sleep(1)
- end
- end
- end
- main()
Advertisement
Add Comment
Please, Sign In to add comment