Advertisement
taoshi

Harvest (for OpenComputers bios)

Jan 22nd, 2022 (edited)
975
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --Harvest_v1.02 Автор Taoshi. pastebin for dl duXuFb9n
  2.  
  3. r=component.proxy(component.list('robot')())
  4.  
  5. fw=function()--forward
  6.   while r.move(3)~=true do
  7.   r.inventorySize()
  8.   end
  9. end
  10.  
  11. drop=function()
  12.   local inv=r.inventorySize()
  13.   for f=1, inv do r.select(f) r.drop(3) end
  14. end
  15.  
  16. function doit(s)
  17.   s=s-1
  18.   local z,x=s-1,s-1
  19.   local t,t2=true,false
  20.   fw() fw() r.use(0)
  21.  
  22.   for f=1,x do
  23.     for g=1,z do
  24.       fw() r.use(0)
  25.     end
  26.     r.turn(t) fw() r.turn(t) r.use(0)
  27.     t,t2=t2,t
  28.   end
  29.  
  30.   r.turn(t)
  31.   t,t2=true,false
  32.  
  33.   for f=1,s do
  34.     fw() r.use(0) r.turn(t)
  35.     fw() r.use(0) r.turn(t)
  36.     t,t2=t2,t  
  37.   end
  38.  
  39.   fw() r.use(0) r.turn(t) r.turn(t)
  40.  
  41.   for f=1,s do
  42.     forward() r.use(0)
  43.   end
  44.  
  45.   r.turn(false) fw() drop()
  46.   r.turn(true) r.turn(true)
  47. end
  48.  
  49. while true do
  50.   doit(9)
  51.   for f=1,200 do r.inventorySize() end
  52. end
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement