Advertisement
Vodka51200

scancachebookenchant

Jun 26th, 2017
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.73 KB | None | 0 0
  1. local mon = peripheral.wrap("left")
  2. local cache = {peripheral.find("powered_tile")}
  3. local ligne = 0
  4.  
  5. --p = peripheral.wrap("right")
  6. --local items = {}
  7.  
  8. mon.setBackgroundColor(colors.lime)
  9. mon.clear()
  10. mon.setCursorPos(1,1)
  11. mon.setTextScale(1)
  12. mon.setTextColor(colors.black)
  13. for r,u in pairs(cache) do
  14.   scan = u.getStackInSlot(2)    
  15.   if scan then
  16.     if #scan.enchanted_book == 1 then
  17.       mon.setCursorPos(1,ligne)
  18.       mon.write(scan.enchanted_book[1].fullName)
  19.       ligne = ligne + 1
  20.     else
  21.       mon.write("")
  22.       for k,v in pairs(scan.enchanted_book) do
  23.         mon.write(v.fullName)
  24.       end
  25.       --print("")
  26.     end
  27.   else
  28.   mon.setCursorPos(1,ligne)
  29.   mon.write("-Vide")
  30.   ligne = ligne + 1
  31.   end
  32. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement