Code:
-----
if player:getStorageValue(9398329) == 1 and player:getCapacity() > 100 then
containerItem:moveTo(player)
elseif player:getCapacity() > 100 then
containerItem:moveTo(bag)
elseif player:getCapacity() < 100 then
player:sendCancelMessage("It is too heavy or you have not enough space.")
end
---
I'm trying to put a check cap on my self loot more without much success