Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mon = peripheral.wrap("left")
- xp = peripheral.wrap("right")
- xp.setAutoCollect(true)
- mon.setTextColor(colors.red)
- mon.setBackgroundColor(colors.black)
- mon.setTextScale(1)
- function enchant()
- turtle.select(1)
- turtle.suckUp()
- turtle.transferTo(16, 1)
- turtle.select(16)
- xp.enchant(30)
- turtle.dropDown()
- inventclr()
- inventclr()
- end
- function inventclr()
- z = 1
- repeat
- turtle.select(z)
- turtle.dropUp()
- z = z + 1
- until z == 17
- end
- while true do
- if xp.getLevels() > 29 then
- enchant()
- else
- mon.clear()
- mon.setCursorPos(1, 3)
- mon.write("Enchanting:")
- mon.setCursorPos(12, 3)
- mon.write(math.floor(((xp.getLevels() / 30) * 100)))
- mon.write("%")
- mon.setCursorPos(1, 1)
- mon.write("Level:")
- mon.write(xp.getLevels())
- sleep(5)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement