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