Orcinuss

IRConfigCeator

Jun 1st, 2016
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.29 KB | None | 0 0
  1. local config = fs.open("ItemRestrictConfig".."w")
  2. local chest = peripheral.wrap("left")
  3. local size = chest.getInventorySize()
  4.  
  5. config.writeLine("Worlds:")
  6. config.writeLine("- All")
  7. config.writeLine("Scanner:")
  8. config.writeLine("  event:")
  9. config.writeLine("  - onPlayerJoin: 1")
  10. config.writeLine("  - onChunkLoad: 0.1")
  11. config.writeLine("Bans:")
  12. config.writeLine("  Usage:")
  13. for x = 1,size do
  14.     local slot = chest.getStackInSlot(x)
  15.     local id = tostring(slot.id)
  16.     local damage = tostring(slot.damage)
  17.     config.writeLine("  - "..id.."-"..damage)
  18. end
  19. config.writeLine("  Ownership:")
  20. for x = 1,size do
  21.     local slot = chest.getStackInSlot(x)
  22.     local id = tostring(slot.id)
  23.     local damage = tostring(slot.damage)
  24.     config.writeLine("  - "..id.."-"..damage)
  25. end
  26. config.writeLine("  World:")
  27. config.writeLine("Messages")
  28. config.writeLine("  labels:")
  29. for x = 1,size do
  30.     local slot = chest.getStackInSlot(x)
  31.     local id = tostring(slot.id)
  32.     local damage = tostring(slot.damage)
  33.     local name = tostring(slot.name)
  34.     config.writeLine("  - "..id.."-"..damage..": "..name)
  35. end
  36. config.writeLine("  reasons:")
  37. for x = 1,size do
  38.     local slot = chest.getStackInSlot(x)
  39.     local id = tostring(slot.id)
  40.     local damage = tostring(slot.damage)
  41.     config.writeLine("  - "..id.."-"..damage..": xxx")
  42. end
  43.  
  44. config.close()
Advertisement
Add Comment
Please, Sign In to add comment