Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local bbp = Container.GetLast()
- for i = bbp:ItemCount()-1 , 0 ,-1 do
- local continue = true
- if bbp:GetItemData(i).id == 3031 then
- if Container(1):isFull() then
- if StillHasContainers(1) then
- Container(1):UseItem(Container(1):ItemCount()-1,true)
- else
- continue = false
- end
- end
- if continue then
- bossBody:MoveItemToContainer(i, 1, getSpot(1), 100)
- mod:Delay(600,800)
- end
- continue = true
- elseif table.contains(itemList, bbp:GetItemData(i).id) then
- if Container(2):isFull() then
- if StillHasContainers(2) then
- Container(2):UseItem(Container(2):ItemCount()-1,true)
- else
- continue = false
- end
- end
- if continue then
- bossBody:MoveItemToContainer(i, 2, getSpot(2), 100)
- mod:Delay(600,800)
- end
- end
- local function getSpot(to)
- local cont = Container(to)
- for i=0, cont:ItemCount()-1 do
- if (not Item.isContainer(cont:GetItemData(i).id)) then
- local slot = i
- return slot
- end
- end
- return 0
- end
- local function StillHasContainers(container, returnspot)
- local bp = Container(container)
- for i=bp:ItemCount()-1, 0, -1 do
- if Item.isContainer(bp:GetItemData(i).id) then
- if (not returnspot) then
- return true
- else
- local spot = i
- return spot
- end
- end
- end
- return false
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement