Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local OrderPerson = ""
- local OrderAmount = ""
- local OrderItem = ""
- local RedPath = "ACS.Give."
- local GuiName = ""
- local function newLine()
- local CX, CY = term.getCursorPos()
- term.setCursorPos(1,CY +1)
- end
- term.clear()
- term.setCursorPos(1,1)
- term.write(" Welcome to our A.C.S.")
- newLine()
- term.write("-Automatic Chest System-")
- newLine()
- term.write("- Currently Beta 1.0 -")
- newLine()
- newLine()
- rednet.open("back")
- while redstone.getInput("left") == false do
- term.write("For who should I order?")
- newLine()
- OrderPerson = read()
- if OrderPerson == "exit" then
- return
- end
- newLine()
- newLine()
- term.write("What Material should I order?")
- newLine()
- OrderItem = read()
- if OrderItem == "exit" then
- return
- end
- newLine()
- newLine()
- term.write("How Much ".. OrderItem .." do you want?")
- newLine()
- OrderAmount = read()
- if OrderAmount == "exit" then
- return
- end
- newLine()
- newLine()
- term.write("Creating Order...")
- newLine()
- newLine()
- if tonumber(OrderPerson) ~= nil then
- if tonumber(OrderPerson) == 1 then
- OrderPerson = "Jensoo7"
- elseif tonumber(OrderPerson) == 2 then
- OrderPerson = "Mariomarco"
- end
- end
- if OrderPerson == "Mariomarco" then
- GuiName = " Marco "
- elseif OrderPerson == "Jensoo7" then
- GuiName = " Jens "
- end
- term.clear()
- term.setCursorPos(1,1)
- term.write("-Automatic Chest System-")
- newLine()
- term.write("- Currently Beta 1.0 -")
- newLine()
- newLine()
- rednet.broadcast(RedPath .. OrderPerson .. " " .. OrderItem .. "" .. OrderAmount)
- term.write("------------------")
- newLine()
- term.write("| Order |")
- newLine()
- term.write("|" .. GuiName .."|")
- newLine()
- term.write("------------------")
- newLine()
- term.write(OrderAmount .. " of " .. OrderItem )
- newLine()
- newLine()
- newLine()
- end
Advertisement
Add Comment
Please, Sign In to add comment