Abrir Bag

Descrição

Abrir todas as bags

Autor:

                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
openBackpacks = function() containers = getContainers() if #containers < 1 and containers[0] == nil then bpItem = getBack() if bpItem ~= nil then g_game.open(bpItem) end end schedule(1000, function() local nextContainers = {} containers = getContainers() for i, container in pairs(g_game.getContainers()) do for i, item in ipairs(container:getItems()) do if item:isContainer() then table.insert(nextContainers, item) end local purse = g_game.getLocalPlayer():getInventoryItem(InventorySlotPurse) end if #nextContainers == 0 then return end local delay = 1 for i = 1, #nextContainers do schedule(delay, function() g_game.open(nextContainers[i], nil) schedule(delay, function() end) end) schedule(delay, function() end) delay = delay + 500 end end end) end -- this loads the function straighta way openBackpacks() -- this adds a button to your bot, so you can press it UI.Button("Abrir Todas as Bags", function() openBackpacks() end)