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
Enchanting Program Help?
Started by popdog15, Jul 25 2013 05:44 PM
3 replies to this topic
#1
Posted 25 July 2013 - 05: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?
#2
Posted 25 July 2013 - 05:48 PM
check line 6. We only have those compare methods:
Also for future reference, please put in the error that the program gave you. Also some background information on your program is appreciated.
== -- Equals ~= -- is not equal to <= -- Less then or equals to >= -- Greater then or equals to > -- Greater then < -- Less thenAlso use sleep, rather than os.sleep.
Also for future reference, please put in the error that the program gave you. Also some background information on your program is appreciated.
#3
Posted 25 July 2013 - 05:49 PM
Well with the new update, you might not have it on modpacks, if you use os.pullEvent() there is a turtle inventory event. So you could make it pull event and do that? Have I got what you want right?
#4
Posted 25 July 2013 - 05:55 PM
Thanks for that information, I fixed the code.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











