Posted 25 July 2013 - 06:44 PM
I have a zombie pigman mob farm, and I have an enchanting turtle to pick up all the xp, and to use as an enchanting table. I'm trying to make it where if I put an item in the 16'th slot, that it'll be enchanted. Help?
x = true
xp = peripheral.wrap("right")
lvl = xp.getLevels()
xp.setAutoCollect(true)
while true do
if turtle.getItemCount(16) ==< 0 then
turtle.select(16)
xp.enchant(30)
end
turtle.attack()
for i = 1, 14 do
turtle.select(i)
os.sleep(.1)
turtle.dropDown()
end
print("I have "..lvl.." levels.")
turtle.select(16)
if turtle.getItemCount(16) > 0 then
xp.enchant(30)
turtle.select(16)
turtle.dropDown()
end
end