kimokimo
Kimo
Code:
function doAddCopiedContainer(it, new) --By Doggynub
local uid,its,news = it.uid, {},{}
local size = getContainerSize(uid)
local test = {}
for i = 0, size-1 do
local item = getContainerItem(uid,i)
table.insert(test,{item, item.type})
if isContainer(item.uid) then
table.insert(its,item)
end
end
for i = #test,1,-1 do
local call = test[i]
local ufg = doAddContainerItem(new,call[1].itemid,(call[2] < 1 and 1 or call[2]) )
if isContainer(ufg) then
table.insert(news,ufg)
end
end
for i = 1,#its do
doAddCopiedContainer(its[i], news[i])
end
return true
end
Gyazo
gyazo.com