Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Auto-Enchanting by Direwolf20 customized by Southp0le
- -----------
- --Options--
- -----------
- monitor = peripheral.wrap("front")
- t = peripheral.wrap("right")
- m.setAutoCollect(true)
- local currLevel = 0
- -------------
- --functions--
- -------------
- --grabs book and enchants it
- function enchantBook()
- turtle.select(1)
- turtle.suckUp()
- turtle.dropUp(turtle.getItemCount(1)-1)
- t.enchant(30)
- turtle.dropUp()
- end
- --function checkBook()
- ---------
- --Cycle--
- ---------
- while true do
- currLevel = t.getLevels()
- monitor.setCursorPos(1,1)
- monitor.write("Current")
- monitor.setCursorPos(1,2)
- monitor.write("Level:")
- monitor.setCursorPos(1,4)
- monitor.write(""..currLevel)
- if currLevel >=30 then --if level >= 30 calls enchant function
- enchantBook()
- else
- sleep(10)
- monitor.clear()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment