If item count (gold / platinum) = 100 use that item..


I tried that:
local GoldBpName = "brocade backpack"
if (itemcount(3031, GoldBPName) >= 100) then
useitem(3031, GoldBPName)
wait(500,1000)
elseif (itemcount(3035, GoldBPName) >= 100) then
useitem(3035, GoldBPName)
wait(500,1000)
end
but i have 150 gp and didn't work.