Guest User

getLevels

a guest
Apr 9th, 2013
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.65 KB | None | 0 0
  1. function GetLevels()
  2.   m = peripheral.wrap("left")
  3.   local Levels = m.getLevels()  
  4.   print("There are "..Levels.." levels stored")
  5. end
  6.  
  7. function EnchantFunction()
  8.   print("Would You like to enchant an item?")
  9.   local EnchantTrue = "Yes"
  10.   local input = read()
  11.     if input == EnchantTrue then
  12.       print("Place item in slot 1")
  13.         select(1)
  14.         print("Enchanting Slot 1 At Which Level?")
  15.           local enchantLevel = read()
  16.           m.enchant(enchantLevel)
  17.       else
  18.         print("You have not chosen to enchant, restarting")
  19.         term.clear()
  20.         term.setCursorPos(1,1)
  21.       end
  22.   end
  23.  
  24. GetLevels()
  25. EnchantFunction()
Advertisement
Add Comment
Please, Sign In to add comment