Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cleanGoldSlot= 5
- dirtyGoldSlot= 6
- goldOreSlot = 7
- reducedGoldChunksSlot = 8
- emptyBucketSlot = 13
- sludge = 14
- filledBucketSlot = 15
- function compare()
- turtle.select(1)
- if turtle.compareTo(cleanGoldSlot) then
- turtle.transferTo(cleanGoldSlot,64)
- elseif turtle.compareTo(emptyBucketSlot) then
- turtle.transferTo(emptyBucketSlot,64)
- elseif turtle.compareTo(sludge) then
- turtle.transferTo(sludge,64)
- elseif turtle.compareTo(dirtyGoldSlot) then
- turtle.dropDown()
- end
- end
- function fillBucket()
- if turtle.getItemCount(emptyBucketSlot) > 1 then
- turtle.select(emptyBucketSlot)
- turtle.forward()
- turtle.placeDown()
- turn180()
- turtle.forward()
- turn180()
- turtle.select(1)
- end
- end
- function supplyBucket()
- if turtle.getItemCount(filledBucketSlot) == 1 then
- turtle.select(filledBucketSlot)
- turtle.dropDown()
- turtle.select(1)
- end
- end
- function moveToSlagFurnace()
- turn180()
- for i=1,2 do
- turtle.forward()
- end
- end
- function moveToSlagFurnaceOutput()
- moveToSlagFurnace()
- turtle.turnLeft()
- turtle.forward()
- turtle.down()
- turn180()
- end
- function resetPositionFromSlagFurnaceOutput()
- turtle.up()
- turtle.forward()
- turtle.turnRight()
- for i=1,2 do
- turtle.forward()
- end
- end
- function resetPositionFromSlagFurnace()
- turn180()
- for i=1,2 do
- turtle.forward()
- end
- end
- function deliverCleanChunks()
- moveToSlagFurnace()
- turtle.select(cleanGoldSlot)
- while turtle.getItemCount(cleanGoldSlot) > 1 do
- turtle.dropDown(1)
- end
- resetPositionFromSlagFurnace()
- turtle.select(1)
- end
- function turn180()
- for i=1,2 do
- turtle.turnLeft()
- end
- end
- function moveToMixerOutput()
- turtle.forward()
- turtle.down()
- turn180()
- end
- function resetPositionFromMixerOutput()
- turtle.up()
- turtle.forward()
- turn180()
- end
- function grabChestContents()
- if turtle.getItemCount(goldOreSlot) == 0 then
- turtle.select(goldOreSlot)
- turtle.turnLeft()
- turtle.suck(64)
- turtle.turnRight()
- turtle.select(1)
- end
- end
- function goToGrinderInput()
- turn180()
- turtle.forward()
- end
- function resetPositionFromGrinderInput()
- turn180()
- turtle.forward()
- end
- function deployOreInGrinder()
- turtle.select(goldOreSlot)
- turtle.dropDown()
- turtle.select(1)
- end
- function goToGrinderOutput()
- turn180()
- turtle.forward()
- turtle.turnLeft()
- turtle.forward()
- turtle.down()
- turn180()
- end
- function resetPositionFromGrinderOutput()
- turtle.up()
- turtle.forward()
- turtle.turnRight()
- turtle.forward()
- end
- function grabContentsFromGrinderOutput()
- goToGrinderOutput()
- turtle.select(dirtyGoldSlot)
- turtle.suck()
- turtle.select(1)
- resetPositionFromGrinderOutput()
- end
- function grabContentsFromSlagFurnaceOutput()
- moveToSlagFurnaceOutput()
- turtle.select(reducedGoldChunksSlot)
- turtle.suck()
- resetPositionFromSlagFurnaceOutput()
- turtle.select(1)
- end
- function moveToCrystalInput()
- turn180()
- for i=1,4 do
- turtle.forward()
- end
- turtle.turnLeft()
- turtle.forward()
- turtle.down()
- turn180()
- end
- function resetPositionFromCrystalInput()
- turtle.up()
- turtle.forward()
- turtle.turnRight()
- for i=1,4 do
- turtle.forward()
- end
- end
- function deployToCrystal()
- moveToCrystalInput()
- turtle.select(reducedGoldChunksSlot)
- turtle.dropDown()
- turtle.select(1)
- resetPositionFromCrystalInput()
- end
- function deployDirtyGold()
- turtle.select(dirtyGoldSlot)
- turtle.dropDown()
- turtle.select(1)
- end
- while 0 == 0 do
- turtle.select(1)
- grabChestContents()
- goToGrinderInput()
- deployOreInGrinder()
- resetPositionFromGrinderInput()
- moveToMixerOutput()
- turtle.select(1)
- for i=1,4 do
- turtle.suck()
- compare()
- end
- resetPositionFromMixerOutput()
- fillBucket()
- supplyBucket()
- if turtle.getItemCount(cleanGoldSlot) > 1 then
- deliverCleanChunks()
- end
- grabContentsFromGrinderOutput()
- grabContentsFromSlagFurnaceOutput()
- deployDirtyGold()
- moveToCrystalInput()
- turtle.select(reducedGoldChunksSlot)
- turtle.drop()
- turtle.select(1)
- resetPositionFromCrystalInput()
- os.sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment