the code isnt that clean
print"do help to see instructions"
local function help()
print"w - forward"
print"s - backward"
print"a - left"
print"d - right"
print"e - up"
print"q - down"
print"fuel - show fuel level"
print"refuel - refuel"
print"f - attack"
print"u - place items into chest"
print"1 - mine up"
print"do help2 for next page!"
end
local function help2()
print"2 - mine ahead"
print"3 - mine down"
print"8 - place up"
print"9 - place ahead"
print"0 - place down"
print"30 - dig down then place down"
print"clear - clear"
print"shutdown - shut down"
end
local function r()
g = io.read()
end
local firstItem,lastItem = 1,16
while true do
x = io.read()
if x == "w" then
turtle.forward()
elseif x == "s" then
turtle.back()
elseif x == "a" then
turtle.turnLeft()
elseif x == "d" then
turtle.turnRight()
elseif x == "q" then
turtle.down()
elseif x == "e" then
turtle.up()
elseif x == "1" then
turtle.digUp()
elseif x == "2" then
turtle.dig()
elseif x == "3" then
turtle.digDown()
elseif x == "refuel" then
turtle.refuel()
elseif x == "8" then
turtle.placeUp()
elseif x == "9" then
turtle.place()
elseif x == "0" then
turtle.placeDown()
elseif x == "f" then
turtle.attack()
elseif x == "30" then
turtle.digDown()
sleep(0,5)
turtle.placeDown()
elseif x == "fuel" then
print("Fuel:-"..turtle.getFuelLevel() )
elseif x == "slot" then
print"enter slot number"
r()
turtle.select(tonumber(g))-- thanks Ninetainedo for this part :)/>/>
elseif x == "u" then
turtle.drop()
elseif x == "help" then
help()
elseif x == "help2" then
help2()
elseif x == "shutdown" then
print"good bye"
sleep(2)
os.shutdown()
elseif x == "clear" then
os.reboot()
else
print"unknown command, type 'help' for help"
end
end
NOTE:- this is NOT rednet! this is ran through a turtle console as "startup" or it will not work as planned!
i repeat! run this as STARTUP! i am not responsible for any turtle caniblisam!!
PS:- you need to have the fuel in the active slot to refuel! *this is to stop turtle using all wood, coal .etc*
Credits:- Ninetainedo:- Change slot script! ... No one else besides myself and Ninetainedo
download!
startup.zip 704bytes
83 downloads












