"Yep."
@Raphael, with the last action he do this:
Close all windows, open market and just it, dont try to do any offer, just open and stay stopped.
-- market seller
closewindows()
wait(500,600)
local sellItems = {
{name = 'hailstorm rod', price = 2950},
{name = 'magma monocle', price = 2450},
{name = 'blue piece of cloth', price = 1299},
{name = 'small oil lamp', price = 140},
{name = 'strong mana potion', price = 79}
}
openmarket()
wait(200,400)
for _,sellItem in ipairs(sellItems) do
while itemcount(sellItem.name) > 0 do
sellitemsmarket(sellItem.name, sellItem.price, math.min(itemcount(sellItem.name), 100), true)
wait(300, 500)
end
wait(500,600)
end
closemarket()
wait(500,600)
when i tried like this i get one error
while itemcount(sellitem.name) > 0 do
sellitemsmarket(sellItem.name, sellItem.price, math.min(itemcount(sellitem.name), 100), true)
wait(300, 500)
end
Erro : 22:20:34 error in Action script wptid:5:
["while itemcount(sellitem.name) > 0 do"]:Action: 5:15 attempt to index global 'sellitem' (a nil value)
Last edited by KrusT; 09-27-2014 at 01:37 AM.
BumP ! @Raphael
Last edited by KrusT; 09-27-2014 at 01:18 PM.
If all windows are closed, does itemcount count items :O?
Erro : 22:20:34 error in Action script wptid:5:
["while itemcount(sellitem.name) > 0 do"]:Action: 5:15 attempt to index global 'sellitem' (a nil value)
variable name sellitem should be sellItem. Capital 'i'
If you close all windows I think that itemcount(sellItem.name) wont count anything. So it will never enter while body. But I'm new to windbot :>.
Count items manually and try this.
PHP Code:
-- market seller
closewindows()
wait(500,600)
local sellItems = {
{name = 'hailstorm rod', price = 2950, count = 50}
}
openmarket()
wait(1000,2000)
for _,sellItem in ipairs(sellItems) do
sellitemsmarket(sellItem.name, sellItem.price, sellItem.count, 100), true)
wait(500,600)
end
closemarket()
wait(500,600)
Let me explain, the original action, she works fine, unless the item of he gonna make an offer have alot items, like 150+ small oil lamp (or any item) for example.When he goes make the offer of this item he put the name and start clicking on bar (10 in 10) until select all items on offer, but when he came on 150~200 he give up and cancel and try do the next offer (its like the time of do the action expires).
we trie with
setlifetime(120000)
but doesn't work
that idea of @Raphael is great, make a loop on this, i think it is the only way to do this action with alot items work, but that is not easy to do i think, but the idea is great XD
Open backpack with those items and use Raphael version. Function 'itemcount' counts only items that are visible.
http://tibiawindbot.com/docs.html#functions-itemcount
Returns the count of the item with id itemid that is present in your equipment and open windows.
So if you close windows the itemcount function will return 0 or nil.
Maybe there is dedicated count function for such case. For selling items to npc we have 'tradecount'. Maybe there is 'marketcount'.
BTW.
Do you have problems with looting? Sometimes my characters gets stuck for 1-3 minutes and can't loot creature. Like they are clicking wrong tile. Or can't find the body.
@kotekmlotek 9 mcs minimized, no problem with loot.