Advertisement
Thetechnicbrick

Ftb Xp turtle Auto Enchant Program

May 21st, 2013
704
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.54 KB | None | 0 0
  1. m=peripheral.wrap("right")
  2. m.setAutoCollect(true)
  3. while true do
  4. rs.setOutput("top", false)
  5. term.clear()
  6. term.setCursorPos(1, 1)
  7. XPcount = m.getLevels()
  8. print("I have "..XPcount.." Levels of XP Stored")
  9. if XPcount >= 30 and turtle.getItemCount(1) == 1 then
  10. m.enchant(30)
  11. else if XPcount >= 30 and turtle.getItemCount(1) < 1 then
  12. term.setCursorPos(1, 3)
  13. print("Ready To Enchant")
  14. sleep(1)
  15. else if XPcount < 30 then
  16. XPneed = (30-XPcount)
  17. term.setCursorPos(1, 3)
  18. print("I need "..XPneed.." More Levels of XP")
  19. sleep(1)
  20. end
  21. end
  22. end
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement