Advertisement
Guest User

startup

a guest
Aug 28th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.02 KB | None | 0 0
  1. m = peripheral.wrap("monitor_19")
  2. m.clear()
  3. m.setCursorPos(4, 3)
  4. m.write("Marabouter mon computer")
  5. redstone.setOutput("bottom", true)
  6.  
  7. while true do
  8.   r = redstone.getInput("left")
  9.   if r then
  10.     m.clear()
  11.     m.setCursorPos(5,3)
  12.     m.write("Maraboutage en cours")
  13.     if fs.exists("disk") then
  14.       shell.run("mkdir disk/rescue")
  15.       shell.run("mv disk/startup disk/rescue/")  
  16.       shell.run("cp pub disk")
  17.       shell.run("mv disk/pub disk/startup")
  18.       redstone.setOutput("bottom", false)
  19.       sleep(3)
  20.       m.setCursorPos(5, 3)
  21.       m.clear()
  22.       m.write("Maraboutage terminé")
  23.       redstone.setOutput("bottom", true)
  24.     else
  25.       m.clear()
  26.       m.setCursorPos(4,2)
  27.       m.write("Ma telepatie ne marche")
  28.       m.setCursorPos(7,3)
  29.       m.write("pas sur cet item")
  30.       redstone.setOutput("bottom", false)
  31.       sleep(3)
  32.       redstone.setOutput("bottom", true)
  33.     end
  34.   else
  35.     m.clear()
  36.     m.setCursorPos(4, 3)
  37.     m.write("Marabouter mon computer")
  38.   end
  39.   sleep(1)
  40. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement