Advertisement
Birog

Engine Client

Nov 2nd, 2013
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. rednet.open("top")
  2. sleep(1)
  3. while true do
  4. term.clear()
  5. local w, h = term.getSize()
  6. h1=h/2
  7. w1=w-14
  8. w2=w1/2
  9. w3=(w-26)/2
  10. w4=(w-22)/2
  11. term.setCursorPos(w2,h1)
  12. print("Engine Client")
  13. term.setCursorPos(w3,h1+1)
  14. print("Zum Einschalten 1 Druecken ")
  15. print("Zum Ausschalten 2 Druecken ")
  16. auswahl = read()
  17. if auswahl =="1" then
  18.  rednet.send(1738,"on")
  19.      y,x,z = rednet.receive()
  20.      if x == "ok" then
  21.          term.clear()
  22.          term.setCursorPos(w4,h1)
  23.          print("Engine Eingeschaltet")
  24.      end
  25. elseif auswahl =="2" then
  26.  rednet.send(1738,"off")
  27.      y,x,z = rednet.receive()
  28.      if x == "ok" then
  29.          term.clear()
  30.          term.setCursorPos(w4,h1)
  31.          print("Engine Ausgeschaltet")
  32.      end
  33. elseif auswahl =="reboot" then
  34.  rednet.send(1738,"reboot")
  35.  return
  36. else
  37.  return
  38. end
  39. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement