Mariomarco

SendMission

Feb 3rd, 2013
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.82 KB | None | 0 0
  1. local OrderPerson = ""
  2. local OrderAmount = ""
  3. local OrderItem = ""
  4. local RedPath = "ACS.Give."
  5. local GuiName = ""
  6. local function newLine()
  7.     local CX, CY = term.getCursorPos()
  8.     term.setCursorPos(1,CY +1)
  9. end
  10. term.clear()
  11. term.setCursorPos(1,1)
  12. term.write(" Welcome to our A.C.S.")
  13. newLine()
  14. term.write("-Automatic Chest System-")
  15. newLine()
  16. term.write("-  Currently Beta 1.0  -")
  17. newLine()
  18. newLine()
  19. rednet.open("back")
  20. while redstone.getInput("left") == false do
  21.     term.write("For who should I order?")
  22.     newLine()
  23.     OrderPerson = read()
  24.     if OrderPerson == "exit" then
  25.         return
  26.     end
  27.     newLine()
  28.     newLine()
  29.     term.write("What Material should I order?")
  30.     newLine()
  31.     OrderItem = read()
  32.     if OrderItem == "exit" then
  33.         return
  34.     end
  35.     newLine()
  36.     newLine()
  37.     term.write("How Much ".. OrderItem .." do you want?")
  38.     newLine()
  39.     OrderAmount = read()
  40.     if OrderAmount == "exit" then
  41.         return
  42.     end
  43.     newLine()
  44.     newLine()
  45.     term.write("Creating Order...")
  46.     newLine()
  47.     newLine()
  48.     if tonumber(OrderPerson) ~= nil then
  49.         if tonumber(OrderPerson) == 1 then
  50.             OrderPerson = "Jensoo7"
  51.         elseif tonumber(OrderPerson) == 2 then
  52.             OrderPerson = "Mariomarco"
  53.         end
  54.     end
  55.     if OrderPerson == "Mariomarco" then
  56.         GuiName = "      Marco     "
  57.     elseif OrderPerson == "Jensoo7" then
  58.         GuiName = "      Jens      "
  59.     end
  60.     term.clear()
  61.     term.setCursorPos(1,1)
  62.     term.write("-Automatic Chest System-")
  63.     newLine()
  64.     term.write("-  Currently Beta 1.0  -")
  65.     newLine()
  66.     newLine()
  67.     rednet.broadcast(RedPath .. OrderPerson .. " " .. OrderItem .. "" .. OrderAmount)
  68.     term.write("------------------")
  69.     newLine()
  70.     term.write("|      Order     |")
  71.     newLine()
  72.     term.write("|" .. GuiName .."|")
  73.     newLine()
  74.     term.write("------------------")
  75.     newLine()
  76.     term.write(OrderAmount .. " of " .. OrderItem )
  77.     newLine()
  78.     newLine()
  79.     newLine()
  80. end
Advertisement
Add Comment
Please, Sign In to add comment