Back
kreezxil edited this page Jul 23, 2018
·
2 revisions
Tell your turtle to go back once or a number of times. usage: b [x]
Inspired by MIZE, this program allows you to tell your turtle to go back once or a number of times.
usage: b [x]
- pastebin get CEuzpJii back
b [x]
-- 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
Find Me on Discord at https://discord.gg/ngNQjT5