Advertisement
marko_rus

trader

Dec 30th, 2017
451
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.47 KB | None | 0 0
  1. local robot = require("robot")
  2. local computer = require("computer")
  3. local price =3
  4. local Boolean,n =false
  5. local a
  6. local Boolean,b
  7. while true do
  8. print (n)
  9. robot.suck (2)
  10. a =robot.count(1)
  11. if a >= price then
  12. computer.beep(400)
  13. computer.beep(500)
  14. robot.turnAround()
  15. robot.drop(price-1)
  16. robot.turnRight()
  17. robot.suck (1)
  18. robot.turnRight()
  19. robot.select(2)
  20. robot.drop(1)
  21. robot.select(1)
  22. a =robot.count(1)
  23. computer.beep(500)
  24. computer.beep(400)
  25. os.sleep(3)
  26. end
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement