Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local pimLocation = "left"
- local pimDepotLocation = "down" --Must be a direction
- local pim = peripheral.wrap(pimLocation)
- local ignoreWhitelist = true
- local whitelist = {"abc123mewot", "Liylya", "The_Atraedies"}
- function isNameEnemy(name)
- if name == "pim" then
- return false
- end
- if ignoreWhitelist then
- return true
- end
- for k, v in pairs(whitelist) do
- if name == v then
- return false
- end
- end
- return true
- end
- function clearInventory(pim)
- local c = pim.getInventorySize()
- for i=1, c do
- print(pim.getStackInSlot(i))
- pim.pushItem(pimDepotLocation, i)
- end
- end
- while true do
- invName = pim.getInventoryName()
- if isNameEnemy(invName) then
- print("Clearing inventory of" .. invName)
- clearInventory(pim)
- end
- sleep(0.1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement