Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- charger = peripheral.wrap("front")
- function retrieveQuartz()
- turtle.suck()
- end
- function placeQuartz()
- turtle.select(16)
- turtle.drop(1)
- end
- function isCharged()
- itemName = charger.getStackInSlot(1).raw_name
- if string.match(itemName, "charged") then
- return true
- else
- return false
- end
- end
- function isEmpty()
- if (charger.getStackInSlot(1) == null) then
- return true
- else
- return false
- end
- end
- while true do
- if (isEmpty()) then
- placeQuartz()
- else if (isCharged()) then
- retrieveQuartz()
- end
- end
Add Comment
Please, Sign In to add comment