View difference between Paste ID: pKhZQjeR and vv5hsup3
SHOW: | | - or go back to the newest paste.
1-
local printer = peripheral.wrap("left")
1+
local monitor = peripheral.wrap("left")
2-
local ready = printer.newPage()
2+
3
4
ID_REQUETE = 0
5
LOX = 0
6
DRAK = 0
7
CLOCK = 24*60*60
8
DROP_LOX = 24
9
DROP_DRAK = 16
10
11
while true do
12
if ready then
13
  ID_REQUETE = ID_REQUETE+1
14
15
  -- la turtle ecrit une nouvelle page dans le printer
16-
  printer.newPage()
16+
17-
  printer.write("Iridium envoyées")
17+
  monitor.write("Iridium envoyées")
18-
  printer.setCursorPos(1, 3)
18+
  monitor.setCursorPos(1, 3)
19-
  printer.write("Requetes: ", ID_REQUETE)
19+
  monitor.write("Requetes: ", ID_REQUETE)
20
21
  sleep(1)
22
  turtle.turnRight()
23
  turtle.turnRight()
24
  sleep(1)
25
26
  -- la turtle drop les items puis print
27
  turtle.drop(DROP_DRAK)
28
  DRAK = DRAK+1
29-
  printer.setCursorPos(1, 6)
29+
  monitor.setCursorPos(1, 4)
30-
  printer.write("Iridium Drak: ",DRAK)
30+
  monitor.write("Iridium Drak: ",DRAK)
31
  
32
  sleep(1)
33
  turtle.turnRight()
34
  turtle.turnRight()
35
  sleep(1)
36
37
  -- la turtle drop les items puis print
38
  turtle.drop(DROP_LOX)
39
  LOX = LOX+1
40-
  printer.setCursorPos(1, 9)
40+
  monitor.setCursorPos(1, 5)
41-
  printer.write("Iridium LOX: ",LOX)
41+
  monitor.write("Iridium LOX: ",LOX)
42
43-
  printer.setPageTitle("")
43+
sleep(CLOCK)
44-
  printer.endPage()
44+
45
  error("Le monitor n'est pas disponible.")
46-
  error("Could not create a page. Is there any paper and ink in the printer?")
46+