Advertisement
taoshi

robot witcher

Feb 14th, 2023 (edited)
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.82 KB | Gaming | 0 0
  1. --robot-wither
  2. os=require('os')
  3. term=require('term')
  4. math=require('math')
  5. c=require('component')
  6. r=c.proxy(c.list('robo')())
  7.  
  8. term.clear()
  9. local s,t,p,m =r.suck,r.turn,r.place,r.move
  10. while math.huge do
  11.  
  12. r.select(1)
  13. t(false)
  14. s(3,4)
  15. t(true)
  16. t(true)
  17. s(3,3)
  18. t(false)
  19.  
  20. while (not p(3)) do end
  21. while (not m(1)) do end
  22. while (not p(3)) do end
  23. t(false)
  24. while (not m(3)) do end
  25. t(true)
  26. while (not p(3)) do end
  27. t(true)
  28. while (not m(3)) do end
  29. while (not m(3)) do end
  30. t(false)
  31. while (not p(3)) do end
  32.  
  33. r.select(2)
  34. while (not m(1)) do end
  35. while (not p(3)) do end
  36. t(false)
  37. while (not m(3)) do end
  38. t(true)
  39. while (not p(3)) do end
  40. t(false)
  41. while (not m(3)) do end
  42. t(true)
  43. while (not p(3)) do end
  44. t(true)
  45. while (not m(3)) do end
  46. while (not m(0)) do end
  47. while (not m(0)) do end
  48. t(false)
  49.  
  50. os.sleep(30)
  51.  
  52. end
  53.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement