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?")
- print("Choose from 5,10,15,20,25 or 30")
- local EnchantLVL = tonumber(read())
- if EnchantLVL > Levels then
- print("Cannot enchant, not enough Levels available.")
- sleep(3)
- else
- m.enchant(EnchantLVL)
- 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