Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- shell.run('clear')
- logoSplash1 = [===[
- _____ _
- / ___| | |
- \ `--. _ __ ___ __ _ _ __| |_
- `--. \ '_ ` _ \ / _` | '__| __|
- /\__/ / | | | | | (_| | | | |_
- \____/|_| |_| |_|\__,_|_| \__|
- ]===]
- logoSplash2 = [===[
- _____ _ _
- |_ _| | | | |
- | |_ _ _ __| |_| | ___
- | | | | | '__| __| |/ _ \
- | | |_| | | | |_| | __/
- \_/\__,_|_| \__|_|\___|
- ]===]
- logoSplash3 = [===[
- _____ _____
- | _ / ___|
- | | | \ `--.
- | | | |`--. \
- \ \_/ /\__/ /
- \___/\____/
- ]===]
- print (logoSplash1)
- os.sleep(1)
- shell.run('clear')
- print (logoSplash2)
- os.sleep(1)
- shell.run('clear')
- print (logoSplash3)
- os.sleep(1)
- shell.run('clear')
- print("SmartTurtleOS 1.0")
- --[[ SMART VARIABLES ]]--
- height = 0
- --[[ END OF SMART VARIABLES ]]--
- --[[ SMART FUNCTIONS ]]--
- --[[smart refuel]]--
- function smartRefuel()
- if turtle.getFuelLevel() < 1 then
- turtle.select(1)
- turtle.refuel(1)
- end
- end
- --[[smart dig]]--
- function smartDig()
- turtle.attack()
- while turtle.detect() == true do
- turtle.dig()
- end
- end
- --[[smart digUp]]--
- function smartDigUp()
- turtle.attackUp()
- while turtle.detectUp() == true do
- turtle.digUp()
- end
- end
- --[[smart digDown]]--
- function smartDigDown()
- turtle.attack()
- while turtle.detectDown() == true do
- turtle.digDown()
- end
- end
- --[[smart moveForward]]--
- function smartMoveForward(distance)
- local distance = distance or 1
- for i=1,distance do
- smartRefuel()
- while turtle.forward() == false do
- if turtle.detect() == true then
- turtle.dig()
- else
- turtle.attack()
- end
- end
- end
- end
- --[[smart moveUp]]--
- function smartMoveUp(distance)
- local distance = distance or 1
- for i=1,distance do
- smartRefuel()
- while turtle.up() == false do
- if turtle.detectUp() == true then
- turtle.digUp()
- else
- turtle.attackUp()
- end
- height = height + 1
- end
- end
- end
- --[[smart moveDown]]--
- function smartMoveDown(distance)
- local distance = distance or 1
- for i=1,distance do
- smartRefuel()
- while turtle.down() == false do
- if turtle.detectDown() == true then
- turtle.digDown()
- else
- turtle.attackDown()
- end
- height = height - 1
- end
- end
- end
- --[[ END OF SMART FUNCTIONS ]]--
Advertisement
Add Comment
Please, Sign In to add comment