Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tArgs = { ...}
- size=tonumber(tArgs[1])
- height=tonumber(tArgs[2])
- qx1,qy1,qz1 = gps.locate(1,false)
- cx,cy,cz = gps.locate(1,false)
- if size == nil then
- print ('size = nil')
- size = 10
- end
- if height == nil then
- height = 10
- end
- qx2 = qx1 + size
- qz2 = qz1 + size
- for i = 1 , height do
- for i = 0 , (size/2) - 1 do
- shell.run('Df',(math.abs(cx-qx2)))
- shell.run('TurnRight',(1))
- shell.run('Df',(1))
- shell.run('TurnRight',(1))
- shell.run('Df',(math.abs(cx-qx2)))
- shell.run('TurnLeft',(1))
- shell.run('Df',(1))
- shell.run('TurnLeft',(1))
- shell.run('Df',(math.abs(cx-qx2 )))
- shell.run('TurnRight',(1))
- shell.run('Df',(1))
- shell.run('TurnRight',(1))
- shell.run('Df',(math.abs(cx-qx2 )))
- shell.run('TurnLeft',(1))
- shell.run('Dd',(1))
- shell.run('TurnLeft',(1))
- end
- -- for i = 0 , (size/2) - 1 do
- -- shell.run('Df',(math.abs(cx-qx2 )))
- --shell.run('TurnLeft',1)
- -- shell.run('Df',(1))
- -- shell.run('TurnLeft',(1))
- -- shell.run('Df',(math.abs(cx-qx2)))
- -- shell.run('TurnRight',(1))
- -- shell.run('Df',(1))
- -- shell.run('TurnRight',(1))
- -- shell.run('Df',(math.abs(cx-qx2 )))
- -- shell.run('TurnLeft',(1))
- --shell.run('Df',(1))
- -- shell.run('TurnLeft',(1))
- -- shell.run('Df',(math.abs(cx-qx2)))
- -- shell.run('TurnRight',(1))
- -- shell.run('Dd',(1))
- -- shell.run('TurnRight',(1))
- -- end
- end
Add Comment
Please, Sign In to add comment