Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local pim = require("component").pim
- local event = require("event")
- local term = require('term')
- local CHEST_SIDE = 'south'
- --предметы, которые подлежат конфискации
- term.clear()
- function scanPlayer()
- while true do
- e, nick, uuid, adr = event.pull('player_on')
- if nick and nick ~= "Truncator" then
- return
- end
- term.clear()
- print('>>> Игрок: ' .. nick)
- for i = 1, 8 do
- if pim.getStackInSlot(i) then
- local count = pim.getStackInSlot(i).qty
- print("Слот " .. i .. ': ' .. pim.getStackInSlot(i).display_name .. ' - ' .. count .. ' шт.')
- for j = 1, #ITEMS do
- if pim.getStackInSlot(i).name == "ultimatePortableCell" or pim.getStackInSlot(i).name == "draconiumFluxCapacitor" then
- pim.pushItemIntoSlot(CHEST_SIDE, i, 1, i)
- print('Импортировано ' .. ITEMS[j] .. ' - ' .. count .. ' шт.')
- break
- end
- end
- end
- if pim.getStackInSlot(i).name == "ultimatePortableCell" or pim.getStackInSlot(i).name == "draconiumFluxCapacitor" then
- pim.pull(CHEST_SIDE, i*2, 1, i)
- print('Импортировано ' .. ITEMS[j] .. ' - ' .. count .. ' шт.')
- break
- end
- end
- end
- end
- scanPlayer()
Add Comment
Please, Sign In to add comment