Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
local function clear() turtle.digUp() turtle.digDown() turtle.dig() end local function clearLine(n) for _ = 1, n do clear() if not turtle.forward() then return false end end return true end local function clearArea(f, l) if not clearLine(f - 1) then return false end turtle.turnLeft() if not clearLine(l - 1) then return false end turtle.turnLeft() if not clearLine(f - 1) then return false end local repeats = math.floor(l / 2) - 1 for _ = 1, repeats do turtle.turnLeft() clear() if not turtle.forward() then return false end turtle.turnLeft() if not clearLine(f - 2) then return false end turtle.turnRight() clear() if not turtle.forward() then return false end turtle.turnRight() if not clearLine(f - 2) then return false end end end local args = { ... } local f = args[1] or 0 local l = args[2] or 0 local fl = turtle.getFuelLevel() if fl >= f * l then clearArea(f, l) else print 'not enougth of fueld' end
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)