Posted 25 February 2012 - 11:12 AM
DESCRIPTION
place this code inside a computer's startup code to have a turtle next to it reboot whenever A) the computer gets a redstone signal or :P/>/> Turtle is created next to the computer
USES
I use this code to autoload a turtle with software (from a drive underneath the turtle)
STARTUP
place this code inside a computer's startup code to have a turtle next to it reboot whenever A) the computer gets a redstone signal or :P/>/> Turtle is created next to the computer
USES
I use this code to autoload a turtle with software (from a drive underneath the turtle)
STARTUP
local function nz(c,r) if c then return c else return (r or "") end end
term.clear()
term.setCursorPos(1,1)
print("Turtle autoBoot v1")
print("===================")
local fSize=""
while true do
event,param,p2,p3 = os.pullEvent()
if event=="peripheral" then
fSide=param
peripheral.wrap(fSide).reboot()
print("BOT created, Autolaunching")
elseif event=="redstone" then
if rs.getInput("back") then
peripheral.wrap(fSide).reboot()
print("BOT on pad, REBOOT.")
end
end
end