Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- ThaWade's Botania Flower making program version 1.1
- -- changelog: version 1.0 The first release
- -- version 1.1 added print to tell the user to place buckets in turtle.
- --TODO: Add functional flora.
- local function ss(s) turtle.select(s) end
- --code from Youtuber Kaikaku start--
- local function askForInputText(textt)
- local at=""
- -- check prompting texts
- if textt==nil then textt="Enter text:" end
- -- ask for input
- write(textt)
- at=read()
- return at
- end
- --code from Youtuber Kaikaku end--
- function clearTerm()
- term.clear()
- term.setCursorPos(1,1)
- end
- function isWaterBucket()
- local dropSlot = 1
- local waterBucket = 16
- local emptyBucket = 15
- turtle.select(dropSlot)
- while turtle.compareTo(waterBucket) == false do
- if turtle.compareTo(waterBucket) == true then
- turtle.drop()
- elseif turtle.compareTo(waterBucket) == false and turtle.compareTo(emptyBucket) == true then
- turtle.dropDown()
- elseif turtle.getItemCount(1) == 0 then
- turtle.suckDown()
- elseif turtle.getItemCount(1) > 0 and turtle.compareTo(waterBucket) == false or turtle.compareTo(emptyBucket) == false then
- turtle.transferTo(14)
- turtle.suck()
- end
- end
- end
- function grabBucket()
- turtle.select(1)
- turtle.suck()
- end
- function dropOneAndTwo()
- turtle.select(1)
- turtle.drop(1)
- turtle.select(2)
- turtle.drop(2)
- end
- function howMany()
- print("How many would you like to make?")
- amount = io.read()
- end
- function bucketPlacement()
- print("Put an empty bucket in slot 15")
- print("Put a water bucket in slot 16")
- end
- --------------------------- generating flora Start ---------------------------
- function daybloom()--Tested 32
- repeat
- clearTerm()
- print("DAYBLOOM")
- print("Water bucket should be in slot 1")
- print("Put yellow petals in slot 2.")
- print("Put all other petals in slots 3 - 4.")
- print("Put seeds in slot 5.")
- bucketPlacement()
- until askForInputText("Press enter when ready:")==""
- howMany()
- for a = 1,amount do
- isWaterBucket()
- dropOneAndTwo()
- for e = 3, 5 do
- turtle.select(e)
- turtle.drop(1)
- end
- grabBucket()
- end
- end
- function endoflame()--Tested 64
- repeat
- clearTerm()
- print("ENDOFLAME")
- print("Water bucket should be in slot 1")
- print("Put petals in slots 2 - 6.")
- print("Put seeds in slot 7.")
- bucketPlacement()
- until askForInputText("Press enter when ready:")==""
- howMany()
- for a = 1,amount do
- isWaterBucket()
- for e = 1, 7 do
- turtle.select(e)
- turtle.drop(1)
- end
- grabBucket()
- end
- end
- function entropinnyum() --Tested 64
- repeat
- clearTerm()
- print("ENTROPINNYUM")
- print("Water bucket should be in slot 1")
- print("Put petals and runes in slots 2 - 9.")
- print("Put seeds in slot 10.")
- bucketPlacement()
- until askForInputText("Press enter when ready:")==""
- howMany()
- for a = 1,amount do
- isWaterBucket()
- for e = 1, 10 do
- turtle.select(e)
- turtle.drop(1)
- end
- grabBucket()
- end
- end
- function gourmaryllis() --Tested 32
- repeat
- clearTerm()
- print("GOURMARYLLIS")
- print("Water bucket should be in slot 1")
- print("Put yellow mana petals in slot 2.")
- print("Put petals and runes in slots 3 - 8.")
- print("Put seeds in slot 9.")
- bucketPlacement()
- until askForInputText("Press enter when ready:")==""
- howMany()
- for a = 1,amount do
- isWaterBucket()
- dropOneAndTwo()
- for e = 3, 9 do
- turtle.select(e)
- turtle.drop(1)
- end
- grabBucket()
- end
- end
- function hydroangeas()--Tested 32
- repeat
- clearTerm()
- print("HYDROANGEAS")
- print("Water bucket should be in slot 1")
- print("Put Cyan petals in slot 2.")
- print("Put petals in slots 3 - 6.")
- print("Put seeds in slot 7.")
- bucketPlacement()
- until askForInputText("Press enter when ready:")==""
- howMany()
- for a = 1,amount do
- isWaterBucket()
- dropOneAndTwo()
- for e = 3, 7 do
- turtle.select(e)
- turtle.drop(1)
- end
- grabBucket()
- end
- end
- function kekimurus()--Tested 32
- repeat
- clearTerm()
- print("KEKIMURUS")
- print("Water bucket should be in slot 1")
- print("Put Brown mana petals in slot 2.")
- print("Put petals, rune and pixie dust in slots 3 - 8.")
- print("Put seeds in slot 9.")
- bucketPlacement()
- until askForInputText("Press enter when ready:")==""
- howMany()
- for a = 1,amount do
- isWaterBucket()
- dropOneAndTwo()
- for e = 3, 9 do
- turtle.select(e)
- turtle.drop(1)
- end
- grabBucket()
- end
- end
- function munchdew() --Tested 64
- repeat
- clearTerm()
- print("MUNCHDEW")
- print("Water bucket should be in slot 1")
- print("Put petals in slots 2 - 9.")
- print("Put seeds in slot 10.")
- bucketPlacement()
- until askForInputText("Press enter when ready:")==""
- howMany()
- for a = 1,amount do
- isWaterBucket()
- for e = 1, 10 do
- turtle.select(e)
- turtle.drop(1)
- end
- grabBucket()
- end
- end
- function narslimmus() --Tested 64
- repeat
- clearTerm()
- print("NARSLIMMUS")
- print("Water bucket should be in slot 1")
- print("Put petals in slots 2 - 8.")
- print("Put seeds in slot 9.")
- bucketPlacement()
- until askForInputText("Press enter when ready:")==""
- howMany()
- for a = 1,amount do
- isWaterBucket()
- for e = 1, 9 do
- turtle.select(e)
- turtle.drop(1)
- end
- grabBucket()
- end
- end
- function nightshade() --tested 10
- repeat
- clearTerm()
- print("NIGHTSHADE")
- print("Water bucket should be in slot 1")
- print("Put Black petals in slot 2.")
- print("Put petals in slots 3 - 5.")
- print("Put seeds in slot 6.")
- bucketPlacement()
- until askForInputText("Press enter when ready:")==""
- howMany()
- for a = 1,amount do
- isWaterBucket()
- dropOneAndTwo()
- for e = 3, 5 do
- turtle.select(e)
- turtle.drop(1)
- end
- grabBucket()
- end
- end
- function rosaArcana()--Tested 10
- repeat
- clearTerm()
- print("Rosa Arcana")
- print("Water bucket should be in slot 1")
- print("Put Pink Mana petals in slot 2.")
- print("Put petals and runes in slots 3 - 7.")
- print("Put seeds in slot 8.")
- bucketPlacement()
- until askForInputText("Press enter when ready:")==""
- howMany()
- for a = 1,amount do
- isWaterBucket()
- dropOneAndTwo()
- for e = 3, 8 do
- turtle.select(e)
- turtle.drop(1)
- end
- grabBucket()
- end
- end
- function spectrolus()--Tested 10
- repeat
- clearTerm()
- print("SPECTROLUS")
- print("Water bucket should be in slot 1")
- print("Put petals, runes and pixie dust in slots 2 - 12.")
- print("Put seeds in slot 13.")
- bucketPlacement()
- until askForInputText("Press enter when ready:")==""
- howMany()
- for a = 1,amount do
- isWaterBucket()
- for e = 1, 13 do
- turtle.select(e)
- turtle.drop(1)
- end
- grabBucket()
- end
- end
- function thermalily()--Tested 10
- repeat
- clearTerm()
- print("THERMALILY")
- print("Water bucket should be in slot 1")
- print("Put petals in slots 2 - 6.")
- print("Put seeds in slot 7.")
- bucketPlacement()
- until askForInputText("Press enter when ready:")==""
- howMany()
- for a = 1,amount do
- isWaterBucket()
- for e = 1, 7 do
- turtle.select(e)
- turtle.drop(1)
- end
- grabBucket()
- end
- end
- function genFloraList()
- repeat
- clearTerm()
- print("GENERATING FLOWERS:")
- print("Daybloom: daybloom or dayb")
- print("Endoflame: endoflame or endo")
- print("Entropinnyum: entropinnyum or entr")
- print("Gourmaryllis: gourmaryllis or gour")
- print("Hydroangeas: hydroangeas or hydro")
- print("Kekimurus: kekimurus or keki")
- print("Munchdew: munchdew or munch")
- print("Narslimmus: narslimmus or nars")
- print("Nightshade: nightshade or nigh")
- print("Rosa Arcana: rosa arcana or rosa")
- print("Spectrolus: spectrolus or spec")
- print("Thermalily: thermalily or therm")
- until askForInputText("Press enter when ready:")==""
- return mainProgram()
- end
- --------------------------- generating flora END ---------------------------
- function funcFloraList()
- clearTerm()
- print("No functional flora available yet")
- sleep(2)
- return mainProgram()
- end
- function whichList()
- clearTerm()
- print("Which list would you like to view?")
- print(" ")
- print("Generating Flora: generating or gen")
- print(" ")
- print("Functional Flora: functional or func")
- local inputList = io.read()
- if inputList == "generating" or inputList == "gen" then
- return genFloraList()
- elseif inputList == "functional" or inputList == "func" then
- return funcFloraList()
- end
- end
- function mainProgram()
- repeat
- clearTerm()
- print("Avaiable commands:")
- print(" ")
- print("list : View a list of available flora")
- print(" ")
- print("exit : exits the program.")
- print(" ")
- until askForInputText("Press enter to continue.")==""
- while true do
- clearTerm()
- print("Which Botania flower would you like to make?")
- print(" ")
- print("If you'd like a list of what's available type: list")
- local flower = read()
- if flower == "list" then
- return whichList()
- elseif flower == "functional flora" then
- return funcFloraList()
- elseif flower == "generating flora" then
- return getFloraList()
- --------------------------- generating flora Start---------------------------
- elseif flower == "daybloom" or flower == "dayb" then
- return daybloom()
- elseif flower == "endoflame" or flower == "endo" then
- return endoflame()
- elseif flower == "entropinnyum" or flower == "entr" then
- return entropinnyum()
- elseif flower == "gourmaryllis" or flower == "gour" then
- return gourmaryllis()
- elseif flower == "hydroangeas" or flower == "hydro" then
- return hydroangeas()
- elseif flower == "kekimurus" or flower == "keki" then
- return kekimurus()
- elseif flower == "munchdew" or flower == "munc" or flower == "munch" then
- return munchdew()
- elseif flower == "narslimmus" or flower == "nars" then
- return narslimmus()
- elseif flower == "nightshade" or flower == "nigh" then
- return nightshade()
- elseif flower == "rosa arcana" or flower == "rosa" then
- return rosaArcana()
- elseif flower == "spectrolus" or flower == "spec" then
- return spectrolus()
- elseif flower == "thermalily" or flower == "therm" then
- return thermalily()
- --------------------------- generating flora END ---------------------------
- elseif flower == "exit" then
- break
- else
- print("I don't know what you're talking about!")
- print("If you would like a list of available flowers, type: list")
- sleep(3)
- end
- end
- end
- mainProgram()
- isWaterBucket()
- turtle.suck()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement