Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- inspired by MIZE
- -- allows a turtle to be told to go back once or a number of times
- -- usage:
- -- b [x]
- local tArgs = { ... }
- local dist = 1
- if #tArgs ~= 1 then
- dist = 1
- else
- dist = tonumber( tArgs[1] )
- end
- --Check fuel and refuel if nessesary
- --Code source: sethbling http://www.youtube.com/watch?v=DSsx4VSe-Uk&feature=share&list=SP2Qvl4gaBge02Eh4AqtDSWg3sojt3jeRO
- if turtle.getFuelLevel() < 200 then
- turtle.select(1)
- turtle.refuel(1)
- end
- -- Move Up one or more
- for n=1,dist do
- if turtle.back() then
- print( "True" )
- else
- print( "False" )
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement