SHOW:
|
|
- or go back to the newest paste.
| 1 | function GetLevels() | |
| 2 | - | m=peripheral.wrap("right")
|
| 2 | + | |
| 3 | print("There are ".. Levels.." levels stored")
| |
| 4 | end | |
| 5 | ||
| 6 | - | |
| 6 | + | |
| 7 | term.clear() | |
| 8 | term.setCursorPos(1,1) | |
| 9 | select(1) | |
| 10 | GetLevels() | |
| 11 | print("Enchanting item at Which Level?")
| |
| 12 | local LVLS = tonumber(m.getLevels()) | |
| 13 | - | m=peripheral.wrap("right")
|
| 13 | + | |
| 14 | if EnchantLVL > 30 then | |
| 15 | print("Cannot enchant with more then 30 Levels.")
| |
| 16 | - | if EnchantLVL > LVLS then |
| 16 | + | |
| 17 | elseif EnchantLVL > LVLS then | |
| 18 | print("Cannot enchant, not enough Levels available.")
| |
| 19 | sleep(2) | |
| 20 | - | m.enchant(EnchantLVL) |
| 20 | + | elseif m.enchant(EnchantLVL) == true then |
| 21 | print("Enchanting succeeded, please check your item.")
| |
| 22 | - | sleep(3) |
| 22 | + | sleep(5) |
| 23 | else | |
| 24 | print("Enchanting failed, either there is no item in slot 1, or it is not enchantable.")
| |
| 25 | - | |
| 25 | + | |
| 26 | end | |
| 27 | end | |
| 28 | ||
| 29 | m=peripheral.wrap("right")
| |
| 30 | while true do | |
| 31 | term.clear() | |
| 32 | term.setCursorPos(1,1) | |
| 33 | print("To enchant an item, place it in slot 1 and press any character key...")
| |
| 34 | os.pullEvent("char")
| |
| 35 | Enchant() | |
| 36 | end |