Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mon = peripheral.wrap("top")
- starting = false
- if starting == false then
- mon.clear()
- monW = mon.getSize()
- mon.setCursorPos(monW/2 - (31/2),1)
- mon.setTextScale(.5)
- mon.setTextColor(colors.orange)
- starting = true
- end
- function main()
- term.clear()
- term.setTextColor(colors.lime)
- print("Do Not Request More Than 64 Nether Stars!")
- write("# of Nether Stars Wanted : ")
- request = tonumber(read())
- if not request then
- term.clear()
- term.setCursorPos(1,1)
- term.setTextColor(colors.red)
- print("Invalid Input")
- term.setTextColor(colors.white)
- os.sleep(2)
- main()
- else -- "request" == Integer
- if request > 64 then
- term.clear()
- term.setCursorPos(1,1)
- term.setTextColor(colors.red)
- print("Amount Exceeds 64...")
- term.setTextColor(colors.white)
- os.sleep(2)
- main()
- end
- end
- orderDone = false
- time = request + 9
- while orderDone == false do
- os.sleep(.5)
- requestLeft = request
- mon.clear()
- mon.setCursorPos(1,1)
- mon.setTextScale(.5)
- local monW = mon.getSize()
- mon.setCursorPos(monW/2 - (31/2),1)
- mon.setTextColor(colors.orange)
- mon.write("Wither Farm v1.0 by RoughDragon")
- mon.setTextColor(colors.lime)
- mon.setCursorPos(1,3)
- mon.write("Approximate Time Left : " .. time .. " Seconds")
- mon.setCursorPos(1,4)
- mon.write("Wither Bosses Remaining : " .. requestLeft)
- -- Wither Spawning Here
- if request ~= 0 then
- redstone.setOutput("back", true)
- request = request - 1
- end
- if time ~= 0 then
- time = time - 1
- end
- if time == 0 then
- orderDone = true
- term.clear()
- mon.clear()
- local monW = mon.getSize()
- local orderdoneText = "ORDER COMPLETE! TAKE STARS FROM ENDER CHEST"
- mon.setCursorPos(monW/2 - (#orderdoneText/2),6)
- mon.setTextColor(colors.yellow)
- mon.write(orderdoneText)
- os.sleep(5)
- mon.clear()
- term.clear()
- os.reboot()
- end
- os.sleep(.5)
- redstone.setOutput("back", false)
- end
- end -- Closes Function "main()"
- mon.write("Wither Farm v1.0 by RoughDragon")
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement