Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ench = peripheral.wrap("left")
- anv = peripheral.wrap("right")
- --ench.setAutoCollect(true)
- function findSlot()
- for i=2,16,1 do
- -- turtle.select(i)
- if turtle.getItemCount(i) > 0 then return i end
- end
- end
- while true do
- sleep(10)
- ench.collect()
- local lv = ench.getLevels()
- local sl = findSlot()
- local rlv = anv.getRepairCost(1,sl)
- print("My Level: " .. lv)
- print("Req LV: " .. rlv)
- if lv > rlv then
- anv.repair(1,sl)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement