Krommo
04-17-2012, 09:06 PM
--[[ USAGE: closeBackpacks() ]]--
function closeBackpacks()
while(true) do
local tempBP = Container:GetFirst()
if(tempBP:isOpen()) then
Self.UseItem(tempBP:ID())
else
break
end
wait(600, 1500)
end
end
--[[ USAGE: openBackpacks(id1, id2, id3) ]]--
function openBackpacks(...)
Self.UseItem(Self.Backpack().id)
wait(900, 1700)
for _, input in ipairs(arg) do
local Bp = Container.GetFromIndex(input[2])
for spot = 0, Bp:ItemCount() do
local item = Bp:GetItemData(spot)
if(item.id == input[1]) then
Bp:UseItem(spot)
break
end
end
wait(900, 1700)
end
end
registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
function onWalkerSelectLabel(labelName)
if (labelName == "OpenBP") then
setWalkerEnabled(false)
closeBackpacks()
wait(500)
openBackpacks({2854, 0}, {2872, 0})
setWalkerEnabled(true)
end
end
I am using that,but my "goldback" only close and open,and the other is removed from my screen,i dont know why this happends,can someone explain or just repair it?
THX
function closeBackpacks()
while(true) do
local tempBP = Container:GetFirst()
if(tempBP:isOpen()) then
Self.UseItem(tempBP:ID())
else
break
end
wait(600, 1500)
end
end
--[[ USAGE: openBackpacks(id1, id2, id3) ]]--
function openBackpacks(...)
Self.UseItem(Self.Backpack().id)
wait(900, 1700)
for _, input in ipairs(arg) do
local Bp = Container.GetFromIndex(input[2])
for spot = 0, Bp:ItemCount() do
local item = Bp:GetItemData(spot)
if(item.id == input[1]) then
Bp:UseItem(spot)
break
end
end
wait(900, 1700)
end
end
registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
function onWalkerSelectLabel(labelName)
if (labelName == "OpenBP") then
setWalkerEnabled(false)
closeBackpacks()
wait(500)
openBackpacks({2854, 0}, {2872, 0})
setWalkerEnabled(true)
end
end
I am using that,but my "goldback" only close and open,and the other is removed from my screen,i dont know why this happends,can someone explain or just repair it?
THX