Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function GetLevels()
- m=peripheral.wrap("right")
- local Levels = m.getLevels()
- print("There are ".. Levels.." levels stored")
- end
- function Enchant()
- term.clear()
- term.setCursorPos(1,1)
- select(1)
- GetLevels()
- print("Enchanting item at Which Level?")
- m=peripheral.wrap("right")
- local LVLS = tonumber(m.getLevels())
- local EnchantLVL = tonumber(read())
- if EnchantLVL > LVLS then
- print("Cannot enchant, not enough Levels available.")
- sleep(2)
- else
- m.enchant(EnchantLVL)
- print("Enchanting succeeded, please check your item.")
- sleep(3)
- end
- end
- while true do
- term.clear()
- term.setCursorPos(1,1)
- print("To enchant an item, place it in slot 1 and press any character key...")
- os.pullEvent("char")
- Enchant()
- end
Advertisement
Add Comment
Please, Sign In to add comment