Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getLevels()
- 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?")
- local LVLS = tonumber(m.getLevels())
- local EnchantLVL = tonumber(read())
- term.clear()
- term.setCursorPos(1,1)
- if type(EnchantLVL) ~= "number" then
- print("Cannot enchant, you probably did not enter a number.")
- sleep(2)
- elseif EnchantLVL > 30 then
- print("Cannot enchant with more then 30 Levels.")
- sleep(2)
- elseif EnchantLVL > LVLS then
- print("Cannot enchant, not enough Levels available.")
- sleep(2)
- elseif m.enchant(EnchantLVL) == true then
- print("Enchanting succeeded, please check your item.")
- sleep(5)
- else
- print("Enchanting failed, either there is no item in slot 1, or it is not enchantable.")
- sleep(2)
- end
- end
- m=peripheral.wrap("right")
- while true do
- term.clear()
- term.setCursorPos(1,1)
- print("To enchant an item, place it in slot 1 and press any character key to continue...")
- os.pullEvent("char")
- Enchant()
- end
Advertisement
Add Comment
Please, Sign In to add comment