Advertisement
appollon41

facturation

Feb 18th, 2020
435
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. printer = peripheral.wrap("right")
  2. printer_2 = peripheral.wrap("left")
  3. while printer.getPaperLevel() == 0 or printer_2.getPaperLevel() == 0 do
  4. term.clear()
  5. term.setCursorPos(1,1)
  6. print("Pas de papier")
  7. os.sleep(0.5)
  8. end
  9. while printer.getInkLevel() == 0 or printer_2.getInkLevel() == 0 do
  10. term.clear()
  11. term.setCursorPos(1,1)
  12. print("Pas d'encre")
  13. os.sleep(0.5)
  14. end
  15.  
  16. --printer.endPage()
  17. --printer_2.endPage()
  18. term.clear()
  19. term.setCursorPos(1,1)
  20. y = 1
  21. print("Entrez le pseudo du joueur")
  22. pseudo = io.read()
  23. printer.newPage()
  24. printer_2.newPage()
  25. printer.setCursorPos(1,y)
  26. printer.write("Facture")
  27. printer_2.setCursorPos(1,y)
  28. printer_2.write("Facture")
  29. y = y+2
  30. printer.setCursorPos(1,y)
  31. printer.write("Vendeur: appollon41")
  32. printer_2.setCursorPos(1,y)
  33. printer_2.write("Vendeur: appollon41")
  34. y = y+2
  35. printer.setCursorPos(1,y)
  36. printer.write("Client: "..pseudo)
  37. printer_2.setCursorPos(1,y)
  38. printer_2.write("Client: "..pseudo)
  39. y = y+2
  40. print("Entrez les objets de vente et leur nombre")
  41. print("Entrez total pour la fin de la liste")
  42. while item ~= "total" do
  43. item = io.read()
  44. printer.setCursorPos(1,y)
  45. printer.write(item)
  46. printer_2.setCursorPos(1,y)
  47. printer_2.write(item)
  48. y = y+1
  49. end
  50. printer.write("= ")
  51. printer_2.write("= ")
  52. print("Entrez le montant total")
  53. total = io.read()
  54. printer.write(total)
  55. printer_2.write(total)
  56. print("facture editee")
  57. y = y+2
  58. printer.setCursorPos(1,y)
  59. printer.write("Merci pour l'achat")
  60. y = y+1
  61. printer.setCursorPos(1,y)
  62. printer.write("SAV dispo si besoin")
  63. printer.endPage()
  64. printer_2.endPage()
  65. shell.run("reboot")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement