Advertisement
heerenp

MC forward

Aug 1st, 2014
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.32 KB | None | 0 0
  1. local args = { ... }
  2. if #args ~= 1 then
  3.   print( "Usage: fwd <param1>" )
  4.   print( "-------------------" )
  5.   print( "Moves forward <param1> blocks." )
  6. else
  7.   times = tonumber(args[1])
  8.   if turtle.getFuelLevel() >= times then
  9.     print( "Not enough fuel.")
  10.   else
  11.     for i=1,times do
  12.         turtle.forward()
  13.     end
  14.   end
  15. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement