So, I've made a simple action to sell a few items and what happens is that it will count the first one and will stick with it, without selling the others. Maybe it's because of the way I'm calling count, but someone more experienced on Lua can explain me why it's not working.
local StackableSell = {"Minotaur Horn", "Broken Crossbow", "Purple Robe", "Piece of Warrior Armor", "Piece of Archer Armor"}
for r = 1, #StackableSell do
count = tradecount('sell', StackableSell[r])
npctalk('hi', 'trade')
waitping()
while count > 0 do
sellitems(StackableSell[r], count)
wait(505,1010)
end
waitping()
end
Can someone give me a hand? Thanks ;-)