PDA

View Full Version : [Help]How to check if there is items to deposit?



mikjail
08-23-2016, 12:22 AM
Hi, I'm trying to implement a checker to see if there is any items in the lootBP to deposit this is what I got


elseif (labelName == "DepositItems") then
if (Container:ItemCount() > 0) then
print("Found " .. Container.ItemCount() .. " items to deposit.")
wait(1500)
Walker.Goto("Reach Depot")
else
Walker.Goto("CheckSupp")
end

mikjail
08-23-2016, 02:09 PM
anyone?

mikjail
08-23-2016, 06:49 PM
nobody?

Zingron
08-23-2016, 10:19 PM
This is your problem


Container:ItemCount()


You need to specify which container to search for the itemCount function.

For example..



local lootBP = "Blue Backpack"
local iBP = Container.GetByName(lootBP)

if (iBP.ItemCount() > 0) then