Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function move:ScanDest(container)
- results = {}
- for i,bagid in ipairs(container) do
- local bagtype = GetItemFamily(GetBagName(bagid))
- if not bagtype then
- bagtype = 0
- end --to take care of the nil case
- for slotid=1, getContainerNumSlotsDest(bagid) do
- local id = getContainerItemIDDest(bagid,slotid)
- if not id then
- if not results[bagtype] then results[bagtype] = {} end
- table.insert(results[bagtype],{bag = bagid, slot = slotid})
- end--end if not id
- end
- end
- return results
- end
Add Comment
Please, Sign In to add comment