Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cv_AltoOS = 1.2
- casedisplay = 0
- lastbutton = "just started"
- if fs.exists("helpcenter") then
- HelpCenterbutton = "?"
- elseif fs.exists("helpcenter") == false then
- shell.run("pastebin get WBHDDpch helpcenter")
- HelpCenterbutton = " "
- end
- if fs.exists("sorter") then
- Sorteri = "i"
- elseif fs.exists("sorter") == false then
- Sorteri = " "
- end
- local function labelget()
- if os.getComputerLabel() == nil then
- tlabel = " ID: "..os.getComputerID()
- infoget = "Label your computer!"
- else
- tlabel = string.sub(os.getComputerLabel(),1,18)
- infoget = nil
- end
- end
- local function getperipheraltype()
- if peripheral.getType("right") == "workbench" then
- peripheraltype = "c"
- else
- peripheraltype = " "
- end
- end
- getperipheraltype()
- labelget()
- local function checkFuel()
- if turtle.getFuelLevel() <50 then
- infoget = nil
- if turtle.refuel() == false then
- x = 1
- repeat
- turtle.select(x)
- turtle.refuel()
- x = x+1
- until turtle.getFuelLevel() > 50 or x == 17
- end
- if turtle.getFuelLevel() > 50 then
- infoget = "turtle needs fuel"
- else
- infoget = nil
- end
- turtle.select(1)
- end
- end
- local function movementdisplay()
- checkFuel()
- labelget()
- if casedisplay == 0 then
- term.clear()
- term.setCursorPos(1, 1)
- print("Lower case display: "..tlabel)
- if turtle.getFuelLevel() == 0 then
- while turtle.getFuelLevel() <= 9 do
- term.clear()
- term.setCursorPos(1,1)
- print("Waiting for fuel")
- checkFuel()
- sleep(4)
- end
- os.reboot()
- elseif turtle.getFuelLevel() <= 50 then
- print("What shall I do? Very Low Fuel: "..turtle.getFuelLevel())
- elseif turtle.getFuelLevel() <= 150 then
- print("What shall I do? Low Fuel: "..turtle.getFuelLevel())
- elseif turtle.getFuelLevel() > 999999 then
- print("What shall I do? Fuel level: Enough")
- elseif turtle.getFuelLevel() <= 999999 then
- print("What shall I do? Fuel level: "..turtle.getFuelLevel())
- end
- print("Press ~ to run any program.")
- print("Press ' to change display case.")
- print("~ - +")
- print("q w e r y "..Sorteri.." | -")
- print("a s d h ' 4 5 6 +")
- print("z "..peripheraltype.." v , . "..HelpCenterbutton.." 2 ")
- print("I "..lastbutton..".")
- if infoget == nil then
- if turtle.getFuelLevel() < 50 then
- infoget = "turtle needs fuel"
- end
- else
- print("Extra info: "..infoget)
- end
- else
- term.clear()
- term.setCursorPos(1, 1)
- print("Upper case display: "..tlabel)
- if turtle.getFuelLevel() == 0 then
- while turtle.getFuelLevel() <= 9 do
- term.clear()
- term.setCursorPos(1,1)
- print("Waiting for fuel")
- checkFuel()
- sleep(4)
- end
- os.reboot()
- elseif turtle.getFuelLevel() <= 50 then
- print("What shall I do? Very Low Fuel: "..turtle.getFuelLevel())
- elseif turtle.getFuelLevel() <= 150 then
- print("What shall I do? Low Fuel: "..turtle.getFuelLevel())
- elseif turtle.getFuelLevel() > 999999 then
- print("What shall I do? Fuel level: Enough")
- elseif turtle.getFuelLevel() <= 999999 then
- print("What shall I do? Fuel level: "..turtle.getFuelLevel())
- end
- print("Press ~ to run any program.")
- print("Press ' to change display case.")
- print("~ ^ _ ")
- print(" W | -")
- print(" S 4 5 6 +")
- print(" < > "..HelpCenterbutton.." 2 ")
- print("I "..lastbutton..".")
- if infoget == nil and turtle.getFuelLevel() < 50 then
- print("turtle needs fuel")
- elseif infoget ~= false then
- print("Extra info: "..infoget)
- end
- end
- end
- local function flip()
- turtle.turnLeft()
- turtle.turnLeft()
- end
- local function checkdig()
- x = 0
- attacknumber = 0
- if turtle.detect() == true then
- if turtle.suck() == true then
- lastbutton = "got an item from inventory"
- infoget = nil
- elseif turtle.detect() and turtle.dig() == true then
- x = x+1
- lastbutton = "mined "..x.." blocks"
- infoget = nil
- movementdisplay()
- sleep(.5)
- while turtle.dig() == true do
- x = x+1
- lastbutton = "mined "..x.." blocks"
- movementdisplay()
- sleep(.5)
- end
- elseif turtle.detect() and turtle.dig() == false then
- lastbutton = "attempted to break block"
- infoget = "failed to break"
- movementdisplay()
- end
- elseif turtle.detect() == false then
- while turtle.attack() == true do
- turtle.attack()
- attacknumber = attacknumber+1
- lastbutton = "attacked: "..attacknumber
- infoget = nil
- movementdisplay()
- end
- if turtle.suck() then
- lastbutton = "sucked up an entity"
- while turtle.suck() == true do
- turtle.suck()
- end
- elseif turtle.suck() == false and x == 0 and attacknumber == 0 then
- lastbutton = "had nothing to mine"
- infoget = nil
- end
- end
- end
- local function checkdigUp()
- x = 0
- attacknumber = 0
- if turtle.detectUp() then
- if turtle.suckUp() == true then
- lastbutton = "got an item from top inventory"
- infoget = nil
- elseif turtle.detectUp() and turtle.digUp() == true then
- x = x+1
- turtle.digUp()
- lastbutton = "mined "..x.." blocks above me"
- infoget = nil
- movementdisplay()
- sleep(.5)
- while turtle.digUp() == true do
- x = x+1
- lastbutton = "mined "..x.." blocks above me"
- movementdisplay()
- sleep(.5)
- end
- elseif turtle.detectUp() and turtle.digUp() == false then
- lastbutton = "attempted to break block above me"
- infoget = "failed to break"
- movementdisplay()
- end
- elseif turtle.detectUp() == false then
- while turtle.attackUp() == true do
- attacknumber = attacknumber+1
- lastbutton = "attacked up "..attacknumber
- infoget = nil
- movementdisplay()
- end
- if turtle.suckUp() then
- lastbutton = "sucked up an entity from above"
- while turtle.suckUp() == true do
- end
- elseif turtle.suckUp() == false and x == 0 and attacknumber == 0 then
- lastbutton = "had nothing to mine above me"
- infoget = nil
- end
- end
- end
- local function checkdigDown()
- x = 0
- attacknumber = 0
- if turtle.detectDown() then
- if turtle.suckDown() == true then
- lastbutton = "got an item from bottom inventory"
- infoget = nil
- else
- while turtle.detectDown() do
- x = x+1
- turtle.digDown()
- lastbutton = "mined "..x.." blocks below me"
- infoget = nil
- movementdisplay()
- sleep(.5)
- end
- end
- elseif turtle.detectDown() == false then
- while turtle.attackDown() == true do
- turtle.attackDown()
- attacknumber = attacknumber+1
- lastbutton = "attacked down "..attacknumber
- infoget = nil
- movementdisplay()
- end
- if turtle.suckDown() then
- lastbutton = "sucked up an entity from below"
- while turtle.suckDown() == true do
- turtle.suckDown()
- end
- elseif turtle.suckDown() == false and x == 0 and attacknumber == 0 then
- lastbutton = "had nothing to mine below me"
- infoget = nil
- end
- end
- end
- local function checkdigLeft()
- turtle.turnLeft()
- checkdig()
- if lastbutton == "got an item from inventory" then
- lastbutton = "grabbed item from left inventory"
- infoget = nil
- elseif lastbutton == "mined "..x.." blocks" then
- lastbutton = "mined "..x.." blocks to the left"
- infoget = nil
- elseif lastbutton == "sucked up an entity" then
- lastbutton = "sucked entity from the left"
- infoget = nil
- elseif infoget == "failed to break" then
- lastbutton = "failed to break block to the left"
- infoget = nil
- elseif lastbutton == "had nothing to mine" then
- lastbutton = "had nothing to mine to the left"
- elseif attacknumber > 0 then
- lastbutton = "attacked "..attacknumber.." to the left"
- end
- turtle.turnRight()
- end
- local function checkdigRight()
- turtle.turnRight()
- checkdig()
- if lastbutton == "got an item from inventory" then
- lastbutton = "grabbed item from right inventory"
- infoget = nil
- elseif lastbutton == "mined "..x.." blocks" then
- lastbutton = "mined "..x.." blocks to the right"
- infoget = nil
- elseif lastbutton == "sucked up an entity" then
- lastbutton = "sucked entity from the right"
- infoget = nil
- elseif infoget == "failed to break" then
- lastbutton = "failed to break block to the right"
- infoget = nil
- elseif lastbutton == "had nothing to mine" then
- lastbutton = "had nothing to mine to the right"
- elseif attacknumber > 0 then
- lastbutton = "attacked "..attacknumber.." to the right"
- end
- turtle.turnLeft()
- end
- local function moveForward()
- checkdig()
- if lastbutton == "got an item from inventory" then
- lastbutton = "couldn't move forward due to chest"
- infoget = "sucked an item from chest"
- elseif lastbutton == "mined "..x.." blocks" then
- turtle.forward()
- lastbutton = "mined "..x.." blocks and moved forward"
- elseif lastbutton == "sucked up an entity" then
- turtle.forward()
- lastbutton = "sucked from front and moved forward"
- elseif infoget == "failed to break" then
- lastbutton = "cannot move forward"
- elseif lastbutton == "had nothing to mine" then
- lastbutton = "moved forward"
- turtle.forward()
- elseif attacknumber > 0 then
- turtle.forward()
- lastbutton = "attacked "..attacknumber.." and moved forward"
- else
- turtle.forward()
- end
- end
- local function moveLeft()
- checkdig()
- if lastbutton == "got an item from inventory" then
- lastbutton = "couldn't move left due to chest"
- infoget = "sucked an item from chest"
- elseif lastbutton == "mined "..x.." blocks" then
- turtle.forward()
- lastbutton = "mined "..x.." blocks and moved left"
- elseif lastbutton == "sucked up an entity" then
- turtle.forward()
- lastbutton = "sucked from front and moved left"
- elseif infoget == "failed to break" then
- lastbutton = "cannot move left"
- elseif lastbutton == "had nothing to mine" then
- lastbutton = "moved left"
- turtle.forward()
- elseif attacknumber > 0 then
- turtle.forward()
- lastbutton = "attacked "..attacknumber.." and moved left"
- else
- turtle.forward()
- end
- end
- local function moveRight()
- checkdig()
- if lastbutton == "got an item from inventory" then
- lastbutton = "couldn't move right due to chest"
- infoget = "sucked an item from chest"
- elseif lastbutton == "mined "..x.." blocks" then
- turtle.forward()
- lastbutton = "mined "..x.." blocks and moved right"
- elseif lastbutton == "sucked up an entity" then
- turtle.forward()
- lastbutton = "sucked from front and moved right"
- elseif infoget == "failed to break" then
- lastbutton = "cannot move right"
- elseif lastbutton == "had nothing to mine" then
- lastbutton = "moved right"
- turtle.forward()
- elseif attacknumber > 0 then
- turtle.forward()
- lastbutton = "attacked "..attacknumber.." and moved right"
- else
- turtle.forward()
- end
- end
- local function moveBack()
- flip()
- checkdig()
- if lastbutton == "got an item from inventory" then
- lastbutton = "couldn't move back due to chest"
- infoget = "sucked an item from chest"
- elseif lastbutton == "mined "..x.." blocks" then
- turtle.forward()
- lastbutton = "mined "..x.." blocks and moved back"
- elseif lastbutton == "sucked up an entity" then
- turtle.forward()
- lastbutton = "sucked entity and moved back"
- elseif infoget == "failed to break" then
- lastbutton = "cannot move back"
- elseif lastbutton == "had nothing to mine" then
- lastbutton = "moved back"
- turtle.forward()
- elseif attacknumber > 0 then
- turtle.forward()
- lastbutton = "attacked "..attacknumber.." and moved back"
- end
- end
- local function moveBackward()
- infoget = "Something's in the way. Resolving the issue now."
- movementdisplay()
- flip()
- checkdig()
- if lastbutton == "got an item from inventory" then
- lastbutton = "couldn't move backward due to chest"
- infoget = "sucked an item from chest"
- elseif lastbutton == "mined "..x.." blocks" then
- lastbutton = "mined "..x.." blocks and moved backward"
- elseif infoget == "failed to break" then
- lastbutton = "cannot move backward"
- elseif attacknumber > 0 then
- lastbutton = "attacked "..attacknumber.." and moved backward"
- end
- flip()
- turtle.back()
- end
- local function moveUp()
- if turtle.detectUp() then
- checkdigUp()
- if lastbutton == "got an item from top inventory" then
- lastbutton = "couldn't move up due to chest"
- infoget = "sucked an item from chest"
- elseif lastbutton == "mined "..x.." blocks above me" then
- turtle.up()
- lastbutton = "mined "..x.." blocks and moved up"
- elseif lastbutton == "sucked up an entity from above" then
- turtle.up()
- lastbutton = "sucked entity and moved up"
- elseif infoget == "failed to break" then
- lastbutton = "cannot move up"
- elseif lastbutton == "had nothing to mine above me" then
- lastbutton = "moved up"
- turtle.up()
- elseif attacknumber > 0 then
- turtle.up()
- lastbutton = "attacked "..attacknumber.." and moved up"
- end
- else
- turtle.up()
- end
- end
- local function moveDown()
- checkdigDown()
- if turtle.up() == true then
- while turtle.suckUp() do
- end
- infoget = "Nothing was there"
- movementdisplay()
- elseif turtle.up() == false then
- while turtle.up() == false do
- infoget = "Possibly someone in the way."
- movementdisplay()
- turtle.attackUp()
- end
- end
- end
- local function put()
- attacknumber = 0
- infoget = nil
- x = 1
- while turtle.suck() do
- end
- if turtle.detect() then
- if turtle.compare() == false then
- checkdig()
- infoget = "a block is already there. Replacing it now"
- turtle.place()
- elseif turtle.compare() == true then
- infoget = "No need to replace the block"
- end
- elseif turtle.detect() == false then
- while turtle.attack() do
- turtle.attack()
- attacknumber = attacknumber+1
- infoget = "attacked: "..attacknumber
- movementdisplay()
- sleep(.5)
- end
- turtle.place()
- if turtle.place() == false then
- print("nothing to place")
- elseif turtle.detect() == false and attacknumber == 0 then
- turtle.place()
- infoget = "placed a block"
- movementdisplay()
- end
- end
- end
- local function putUp()
- attacknumber = 0
- infoget = nil
- x = 1
- while turtle.suckUp() do
- end
- if turtle.detectUp() then
- if turtle.compareUp() == false then
- checkdigUp()
- infoget = "a block is already there. Replacing it now"
- turtle.placeUp()
- elseif turtle.compareUp() == true then
- infoget = "No need to replace the block"
- end
- elseif turtle.detectUp() == false then
- while turtle.attackUp() do
- turtle.attackUp()
- attacknumber = attacknumber+1
- infoget = "attacked: "..attacknumber
- movementdisplay()
- sleep(.5)
- end
- turtle.placeUp()
- elseif turtle.detectUp() == false and attacknumber == 0 then
- turtle.placeUp()
- infoget = "placed a block"
- movementdisplay()
- end
- end
- local function putDown()
- attacknumber = 0
- infoget = nil
- x = 1
- while turtle.suckDown() do
- end
- if turtle.detectDown() then
- if turtle.compareDown() == false then
- checkdigDown()
- infoget = "a block is already there. Replacing it now"
- turtle.placeDown()
- elseif turtle.compareDown() == true then
- infoget = "No need to replace the block"
- end
- elseif turtle.detectDown() == false then
- while turtle.attackDown() do
- turtle.attackDown()
- attacknumber = attacknumber+1
- infoget = "attacked: "..attacknumber
- movementdisplay()
- sleep(.5)
- end
- turtle.placeDown()
- elseif turtle.detectDown() == false and attacknumber == 0 then
- turtle.placeDown()
- infoget = "placed a block"
- movementdisplay()
- end
- end
- local function putLeft()
- turtle.turnLeft()
- put()
- turtle.turnRight()
- end
- local function putRight()
- turtle.turnRight()
- put()
- turtle.turnLeft()
- end
- local function headroomnarrowdig()
- y = x
- term.write("How far shall I go? ")
- times = read()
- checkdigUp()
- turtle.up()
- for i = 0, times-1 do
- checkdigUp()
- checkdig()
- turtle.forward()
- turtle.digUp()
- turtle.digDown()
- end
- turtle.down()
- end
- local function stunnel()
- term.clear()
- term.setCursorPos(1, 1)
- term.write("How far shall I go? ")
- times = read()
- checkdigUp()
- for i=1,times do
- turtle.placeDown()
- checkdig()
- turtle.forward()
- checkdigUp()
- end
- end
- local function currentplace()
- for i = 1, 4 do
- if turtle.detect() then
- turtle.turnLeft()
- currentplacesuccess = false
- elseif not turtle.detect() then
- turtle.forward()
- flip()
- turtle.place()
- currentplacesuccess = true
- break
- end
- end
- if currentplacesuccess == false then
- if turtle.detectUp() then
- if turtle.detectDown() then
- infoget = "Trapped"
- elseif not turtle.detectDown() then
- turtle.down()
- turtle.placeUp()
- end
- else
- turtle.up()
- turtle.placeDown()
- end
- end
- end
- local function runprogram()
- infoget = "What program do you want to run?"
- movementdisplay()
- input = read()
- if string.sub(input, 1, 5) == "edit " then
- lastbutton = "cannot edit programs from here"
- --[[ elseif fs.exists(input) == false then
- lastbutton = "can't find "..input
- infoget = "no such program"]]
- elseif input == "" then
- lastbutton = "can't run nothing"
- else
- infoget = nil
- lastbutton = "ran an external program"
- shell.run(input)
- infoget = "I ran "..input
- lastbutton = "ran an external program"
- end
- -- lastbutton = "ran an external program"
- movementdisplay()
- end
- local function digaround()
- checkdig()
- turtle.turnRight()
- checkdig()
- turtle.turnRight()
- checkdig()
- turtle.turnRight()
- checkdig()
- turtle.turnRight()
- end
- local function allforward()
- lastbutton = "am moving forward"
- movementdisplay()
- x = 0
- repeat
- if turtle.detect() == false then
- if turtle.attack() == false then
- while turtle.suck() do
- end
- turtle.forward()
- x = x+1
- lastbutton = "went forward "..x
- movementdisplay()
- else
- while turtle.attack() == true do
- turtle.attack()
- end
- end
- elseif turtle.detect() == true then
- infoget = "Nowhere to go"
- end
- until turtle.detect()
- end
- local function slotselection()
- infoget = "Select a slot with arrows"
- movementdisplay()
- x = 1
- turtle.select(x)
- while true do
- event, pl = os.pullEvent("key")
- if pl == 200 then
- x=x-4
- if x<1 then
- x=x+16
- end
- lastbutton = "am selecting slot "..x
- movementdisplay()
- elseif pl == 17 then
- x=x-4
- if x<1 then
- x=x+16
- end
- lastbutton = "am selecting slot "..x
- movementdisplay()
- elseif pl == 203 then
- x=x-1
- if x<1 then
- x=x+16
- end
- lastbutton = "am selecting slot "..x
- movementdisplay()
- elseif pl == 30 then
- x=x-1
- if x<1 then
- x=x+16
- end
- lastbutton = "am selecting slot "..x
- movementdisplay()
- elseif pl == 208 then
- x=x+4
- if x>16 then
- x=x-16
- end
- lastbutton = "am selecting slot "..x
- movementdisplay()
- elseif pl == 31 then
- x=x+4
- if x>16 then
- x=x-16
- end
- lastbutton = "am selecting slot "..x
- movementdisplay()
- elseif pl == 205 then
- x=x+1
- if x>16 then
- x=x-16
- end
- lastbutton = "am selecting slot "..x
- movementdisplay()
- elseif pl == 32 then
- x=x+1
- if x>16 then
- x=x-16
- end
- lastbutton = "am selecting slot "..x
- movementdisplay()
- elseif pl == 28 or 13 then
- lastbutton = "selected slot "..x
- movementdisplay()
- sleep(.01)
- shell.dir()
- break
- end
- turtle.select(x)
- end
- end
- local function sortinventory()
- shell.run("sorter")
- turtle.select(1)
- end
- while true do
- movementdisplay()
- local evt, c = os.pullEvent("char")
- if c == "w" then
- if turtle.detect() == false and turtle.suck() == false and turtle.attack() == false then
- turtle.forward()
- lastbutton = "moved forward"
- else
- moveForward()
- movementdisplay()
- end
- elseif c == "W" then
- allforward()
- movementdisplay()
- elseif c == "a" then
- turtle.turnLeft()
- if turtle.detect() == false and turtle.suck() == false and turtle.attack() == false then
- turtle.forward()
- lastbutton = "moved left"
- else
- moveLeft()
- movementdisplay()
- end
- elseif c == "d" then
- turtle.turnRight()
- if turtle.detect() == false and turtle.suck() == false and turtle.attack() == false then
- turtle.forward()
- lastbutton = "moved forward"
- else
- moveRight()
- movementdisplay()
- end
- elseif c == "s" then
- if turtle.back() == true then
- lastbutton = "moved backward"
- infoget = "Nothing was in the way"
- movementdisplay()
- else
- moveBackward()
- movementdisplay()
- end
- elseif c == "S" then
- moveBack()
- movementdisplay()
- elseif c == "4" then
- turtle.turnLeft()
- lastbutton = "turned left"
- infoget = nil
- movementdisplay()
- elseif c == "6" then
- turtle.turnRight()
- lastbutton = "turned right"
- infoget = nil
- movementdisplay()
- elseif c == "2" then
- flip()
- lastbutton = "turned around"
- infoget = nil
- movementdisplay()
- elseif c == "q" then
- if turtle.detectUp() == false and turtle.suckUp() == false and turtle.attackUp() == false then
- turtle.up()
- lastbutton = "moved up"
- else
- moveUp()
- end
- movementdisplay()
- elseif c == "z" then
- checkFuel()
- checkdigDown()
- turtle.down()
- lastbutton = "moved down"
- movementdisplay()
- elseif c == "5" then
- x = 0
- flip()
- currentplace()
- lastbutton = "placed block at old position"
- movementdisplay()
- elseif c == "e" then
- checkdig()
- movementdisplay()
- elseif c == "r" then
- put()
- lastbutton = "placed a block forward"
- movementdisplay()
- elseif c == "|" then
- headroomnarrowdig()
- lastbutton = "dug a 3 high hole"
- movementdisplay()
- elseif c == "~" then
- runprogram()
- movementdisplay()
- elseif c == "'" then
- if casedisplay == 0 then
- casedisplay = 1
- infoget = "display is now uppercase"
- elseif casedisplay == 1 then
- casedisplay = 0
- infoget = "display is now lowercase"
- end
- lastbutton = "changed display screens"
- movementdisplay()
- elseif c == "-" then
- lastbutton = "am digging a 2 high hole"
- movementdisplay()
- stunnel()
- lastbutton = "dug a 2 high hole"
- movementdisplay()
- elseif c == "y" then
- putUp()
- lastbutton = "placed a block up"
- movementdisplay()
- elseif c == "h" then
- putDown()
- lastbutton = "placed a block down"
- movementdisplay()
- elseif c == "^" then
- checkdigUp()
- movementdisplay()
- elseif c == "v" then
- checkdigDown()
- movementdisplay()
- elseif c == "<" then
- checkdigLeft()
- movementdisplay()
- elseif c == ">" then
- checkdigRight()
- movementdisplay()
- elseif c == "," then
- putLeft()
- lastbutton = "placed a block left"
- movementdisplay()
- elseif c == "." then
- putRight()
- lastbutton = "placed a block right"
- movementdisplay()
- elseif c == "+" then
- digaround()
- lastbutton = "dug the blocks on all my sides"
- movementdisplay()
- elseif c == "/" then
- lastbutton = "refreshed"
- infoget = nil
- getperipheraltype()
- labelget()
- checkFuel()
- movementdisplay()
- elseif c == "=" then
- lastbutton = "am waiting to select a slot"
- movementdisplay()
- slotselection()
- elseif c == "i" then
- if fs.exists("sorter") then
- sortinventory()
- lastbutton = "sorted my inventory"
- infoget = nil
- elseif fs.exists("sorter") == false then
- lastbutton = "cannot run. File doesn't exist"
- end
- movementdisplay()
- elseif c == "?" then
- if fs.exists("helpcenter") then
- lastbutton = "went into the helpcenter"
- shell.run("helpcenter")
- infoget = ("Thank you for using the HelpCenter. Please direct any problems or suggestions to Jared")
- elseif fs.exists("helpcenter") == false then
- lastbutton = "cannot run. File doesn't exist"
- infoget = "File: helpcenter"
- end
- movementdisplay()
- elseif c == "c" and peripheraltype == "c" then
- if turtle.craft() == true then
- lastbutton = "crafted an item"
- infoget = nil
- elseif turtle.craft() == false then
- lastbutton = "attempted to craft an item"
- infoget = "failed to craft"
- end
- movementdisplay()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment