Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local mode = {"mekanism", "thermalexpansion"}
- local tiers = {}
- tiers.thermalexpansion = {"Hardened", "Electrum", "Signalum", "Resonant"}
- tiers.mekanism = {"Basic", "Advanced", "Elite", "Ultimate"}
- local machines = {}
- machines.thermalexpansion = {"thermalexpansion:cell", "thermalexpansion:machine", "thermalexpansion:dynamo", "thermalexpansion:strongbox", "thermalexpansion:cache", "thermalexpansion:tank"}
- machines.mekanism = {"mekanism:machineblock", "mekanism:gastank"}
- local upgradeables = {}
- upgradeables.mekanism = {"mekanism:tierinstaller"}
- upgradeables.thermalexpansion = {"thermalfoundation:upgrade"}
- function checkInventoryAndUpgrade()
- term.clear()
- term.setCursorPos(1,1)
- if turtle.getItemCount(16) == 0 then
- for i = 1,15 do
- local current = turtle.getItemDetail(i)
- if current ~= nil then
- print("'"..current.name.."' in Slot "..i)
- for k,v in pairs(machines) do
- for a,b in pairs(v) do
- if current.name == b then
- turtle.select(i)
- turtle.placeDown()
- turtle.select(1)
- end
- end
- end
- sleep(0.5)
- for k,v in pairs(upgradeables) do
- for a,b in pairs(v) do
- if current.name == b then
- turtle.select(i)
- turtle.placeDown()
- turtle.select(1)
- end
- end
- end
- end
- end
- end
- end
- while true do
- checkInventoryAndUpgrade()
- sleep(0.5)
- turtle.select(16)
- if turtle.getItemCount(16) == 0 then
- turtle.digDown()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement