Skip to content

Instantly share code, notes, and snippets.

@Citrus34
Citrus34 / update.lua
Created July 6, 2021 01:34
update programs using Pastebin
function update()
term.setCursorPos( 1, -5 ) -- Hide the pastebin retrivial
shell.run( "rm", shell.getRunningProgram() ) -- Delete the current program
shell.run( "pastebin", "get", "PASTEBIN CODE", shell.getRunningProgram() ) -- Update it
shell.run( shell.getRunningProgram() ) -- Restart it
end
@Citrus34
Citrus34 / Lumberjack.lua
Last active December 22, 2024 14:14
Extremely basic tree harvesting for turtles in CC: Tweaked
function fuelCheck()
if turtle.getFuelLevel() <20 then
turtle.select(1)
turtle.refuel()
print("Refueling...")
end
end
local logs = {
["forge:logs"] = true,
@Citrus34
Citrus34 / test
Created June 25, 2021 12:24
testing robots in CC: Tweaked
turtle.refuel()
print("Refueling...")
while turtle.detectDown() do
turtle.digDown()
print("Moving Down...")
turtle.down()
turtle.dig()
print("Moving Foward...")
turtle.forward()
turtle.digUp()
@Citrus34
Citrus34 / New Tree Farming.lua
Created June 25, 2021 12:22
Tree Farming for tthe turtles in CC:Tweaked
turtle.refuel()
print("Refueling")
if turtle.detect() then
turtle.dig()
turtle.up()-- boday
end
if not turtle.Detect() and turtle.detectDown() then
turtle.down()
end