AnonymusHochgenuss

send-dig

Apr 14th, 2020
565
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.27 KB | None | 0 0
  1. rednet.open("right")
  2. local tArgs = {... }
  3. if #tArgs ~= 1 then
  4.  print( "Usage: dig <lenght>" )
  5.  return
  6. end
  7. local lenght = tonumber( tArgs [1] )
  8. dig="dig"
  9. forward="forward"
  10. back="back"
  11. while lenght > 0 do
  12.  rednet.broadcast(dig)
  13.  sleep(1)
  14.  rednet.broadcast(forward)
  15.  turtle.forward()
  16.  sleep(1)
  17.  lenght=lenght-1
  18. end
Advertisement
Add Comment
Please, Sign In to add comment