manuwwa

DrwalTurtle

May 18th, 2014
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.73 KB | None | 0 0
  1. function refuel()
  2. if (turtle.getFuelLevel()<20)
  3. then
  4. shell.run('refuel all')
  5. turtle.select(1)
  6. end
  7. end
  8. ---------------------------------------------------
  9. function scinanie()
  10. a=0
  11. while a>7
  12. do
  13. turtle.dig()
  14. turtle.digUP()
  15. a=a+1
  16. end
  17. while (a==0)
  18. do
  19. turtle.down()
  20. a=a-1
  21. end
  22. end
  23. ---------------------------------------------------
  24. local time = os.time()
  25. time = tonumber(time)
  26. --------------------------------------------------
  27. textutils.slowPrint("(b)-przerwanie pracy")
  28. while true do
  29. local sEvent,time = os.time()
  30. time = tonumber(time)
  31.         local sEvent, param = os.pullEvent("key")
  32. if param == 48 then
  33.            break
  34.             end
  35. if (time>10 and time<11)
  36. then
  37. textutils.slowPrint("okolo 10")
  38. end
  39. end
Advertisement
Add Comment
Please, Sign In to add comment