Advertisement
Guest User

storage

a guest
Apr 28th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.10 KB | None | 0 0
  1. peripheral.call("back","clear")
  2. peripheral.call("back","setCursorPos",10,1)
  3. peripheral.call("back","write","Lethal Inc.")
  4. peripheral.call("back","setCursorPos",10,2)
  5. peripheral.call("back","write","Storage")
  6. peripheral.call("back","setCursorPos",2,6)
  7. peripheral.call("back","write","tank1")
  8. peripheral.call("back","setCursorPos",2,9)
  9. peripheral.call("back","write","tank2")
  10. peripheral.call("back","setCursorPos",2,12)
  11. peripheral.call("back","write","tank3")
  12. peripheral.call("back","setCursorPos",2,15)
  13. peripheral.call("back","write","Cell1")
  14. peripheral.call("back","setCursorPos",2,18)
  15. peripheral.call("back","write","Exit")
  16.  
  17. shell.run("tank1")
  18. shell.resolve("cell1")
  19.  
  20. while true do
  21. event, side, x,y = os.pullEvent()
  22. print(event .."=> Side " .. tostring(side))
  23. print("X:" .. tostring(x) .. " Y: " .. tostring(y))
  24. if y==6 then
  25. shell.run("tank1")
  26. end
  27. if y==9 then
  28. shell.run("tank2")
  29. end
  30. if y==12 then
  31. shell.run("tank3")
  32. end
  33. if y==15 then
  34. shell.run("cell1")
  35. if y==18 then
  36. shell.run("reboot")
  37. end
  38.  
  39. if x==17 and y==6 then
  40.  
  41.  
  42. end
  43.  
  44.  
  45. if x == 1 and y ==1 then
  46. shell.run("reboot")
  47. end
  48. end
  49. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement