Advertisement
Marlingaming

CC Tweaked Mail Terminal

Feb 7th, 2022
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. local Step = 1
  2. local StepDisc = {"Fill out item form","Ppace items in chest","Confirm"}
  3. local StepName = {"Fill Form","Place Items","complete"}
  4.  
  5. local function Clear()
  6. term.clear()
  7. term.setCursorPos(1,1)
  8. end
  9.  
  10. function Menu()
  11. Clear()
  12. print("Mail Dropoff Terminal")
  13. for i = 1, #StepDisc do
  14. if Step == i then print("> ",i," ",StepName[i]) else print(i, " ", StepName[i])
  15. end
  16. repeat
  17. local event, key = os.pullEvent("key")
  18. until key == keys.enter
  19. if Step == 1 then
  20. shell.run("Editor","Form")
  21. Step = 2
  22. elseif Step == 2 then
  23. Deposit()
  24. Step = 3
  25. elseif Step == 3 then
  26. repeat
  27. local event, key = os.pullEvent("key")
  28. until key == keys.enter
  29. local Printer = peripheral.wrap("top")
  30. local file = fs.open("Form","r")
  31. Printer.write(file.readAll())
  32. Printer.end()
  33. file.close()
  34. MoveStuff()
  35. Step = 1
  36. end
  37. Menu()
  38. end
  39.  
  40. Menu()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement