Advertisement
Guest User

startup

a guest
Jan 24th, 2015
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.15 KB | None | 0 0
  1. while true do
  2. print("")
  3. write("KevSG > ")
  4. local e = io.read()
  5. local s = peripheral.wrap("back")
  6. if e == "jan" then
  7.   print("KevSG > Disconnecte...")
  8.   s.disconnect()
  9.   os.sleep(4)
  10.   ok, r = pcall(s.dial, "ZFRNXDKXB")
  11.   if ok then
  12.     print("KevSG > Verbinde zu Jan...")
  13.     print("Kosten: ", s.energyToDial("ZFRNXDKXB"))
  14.     print("Verfuegbar: ",s.energyAvailable())
  15.   else
  16.     print("KevSG > Fehler: ", r)
  17.   end
  18. end
  19. if e == "kev" then
  20.   print("KevSG > Disconnecte...")
  21.   s.disconnect()
  22.   os.sleep(4)
  23.   print("KevSG > Warnung! Kann nicht sich selbst connecten")
  24. end
  25. if e == "jonas" then
  26.   print("KevSG > Disconnecte...")
  27.   s.disconnect()
  28.   os.sleep(4)
  29.   ok,r = pcall(s.dial, "3FFYEQG89")
  30.   if ok then
  31.     print("KevSG > Verbinde zu Jonas...")
  32.     print("Kosten: ", s.energyToDial("3FFYEQG89"))
  33.     print("Verfuegbar: ", s.energyAvailable())
  34.   else
  35.     print("KevSG > Fehler: ", r)
  36.   end
  37. end
  38. if e == "irison" then
  39.   s.closeIris()
  40.   print("KevIris > Closing Iris...")
  41. end
  42. if e == "irisoff" then
  43.   s.openIris()
  44.   print("KevIris > Opening Iris...")
  45. end
  46. if e == "aus" then
  47.   s.disconnect()
  48.   print("KevSG > Disconnecte...")
  49. end
  50. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement