Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Harvest_v1.03 Автор Taoshi. pastebin dl: vdbQgd8M
- --can be run from eeprom
- r=component.proxy(component.list('robot')())
- --field side length
- sz=9
- --its charging time!
- wt=192
- tn,ris=r.turn,r.inventorySize
- fw=function()--forward
- while r.move(3)~=true do
- r.inventorySize()
- end
- return
- end
- drop=function()
- local inv=ris()
- for f=1, inv do r.select(f) r.drop(3) end
- return
- end
- doit=function(s)
- s=s-1
- local z,x=s-1,s-1
- local t,t2=true,false
- fw() fw() r.use(0)
- for f=1,x do
- for g=1,z do
- fw() r.use(0)
- end
- tn(t) fw() tn(t) r.use(0)
- t,t2=t2,t
- end
- tn(t)
- t,t2=true,false
- for f=1,s do
- fw() r.use(0) tn(t)
- fw() r.use(0) tn(t)
- t,t2=t2,t
- end
- fw() r.use(0) tn(t) tn(t)
- for f=1,s do
- forward() r.use(0)
- end
- tn(false) fw() drop()
- tn(true) tn(true)
- return
- end
- main=function()
- doit(sz)
- for f=1,wt do ris() end
- return main()
- end
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement