@Dehan Hi, i use this action on my scripts for sell stuff in market.
When he has to sell in small quantities he works great, but when he have to sell more then 100~200 for the same item, he did not move the bar on the direct market for all items, it goes from 10 to 10 by clicking until get all items, however when he is in the middle depending on the number of items he stop the action and dont sell, jump for next item.
Action
openmarket()
wait(200,400)
for _,sellItem in ipairs(sellItems) do
sellitemsmarket(sellItem.name, sellItem.price, 9999, true)
wait(500,600)
end
closemarket()
wait(500,600)
The "sellItems" (list of items) stay on persistent.
The action work great, just with much items he does'nt work.
Have possibility to change instead up 10 to 10 by clicking, he move the bar on market until full items?
TY
09-20-2014, 11:01 PM
Dehan
Quote:
Originally Posted by KrusT
The "sellItems" (list of items) stay on persistent.
The action work great, just with much items he does'nt work.
Have possibility to change instead up 10 to 10 by clicking, he move the bar on market until full items?
TY
You can't change it, try to add it to your code (add to the firsts lines):
setlifetime(120000)
09-21-2014, 04:43 AM
KrusT
Quote:
Originally Posted by Dehan
You can't change it, try to add it to your code (add to the firsts lines):
setlifetime(120000)
doesn't work bro.
i try to put this line before, i try after, in the middle of action, not work.
when he have to make a offer with much items he click on bar 10 in 10 and time over.
openmarket()
wait(200,400)
for _,sellItem in ipairs(sellItems) do
setlifetime(120000)
sellitemsmarket(sellItem.name, sellItem.price, 9999, true)
wait(500,600)
end
closemarket()
wait(500,600)
And i test the action with a common item in large quantity ( 500 worms ), and the time of action really increases.
But when i made a test with bot minimized, same problem, even with the "lifetime" line he cant make an offer with big amounts.
when the client are maximized the action work great, but when client are minimized and he have to make an offer with much items,he can't.
EDIT: when i activate a HUD "Simulated Cursor" i see the action working. When he go make a offer he doesn't use the "mouse wheel" for roll until select all items, he click on the bar going with "10 in 10".
ty
09-22-2014, 04:24 PM
Lucas Terra
So try making it focus the client before running the actions.
focusclient()
09-22-2014, 04:34 PM
KrusT
Quote:
Originally Posted by Lucas Terra
So try making it focus the client before running the actions.
focusclient()
I thought about this today, focus "before do" and minimize client "after do", if dont have another way i gonna give up for this thing. because every hour 5~6 chars gonna up the screen, gonna be such a mess on my pc.
but thx again for the help , you guys are awesome.
openmarket()
wait(200,400)
for _,sellItem in ipairs(sellItems) do
sellitemsmarket(sellItem.name, sellItem.price, 9999, true)
wait(500,600)
end
closemarket()
wait(500,600)
openmarket()
wait(200,400)
while for _,sellItem in ipairs(sellItems) > 0 do
sellitemsmarket(sellItem.name, sellItem.price, 9999, true)
wait(500,600)
end
closemarket()
wait(500,600)
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)
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)
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'
09-27-2014, 02:17 PM
KrusT
Quote:
Originally Posted by kotekmlotek
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'
on my last post i test with the 2 ways and post the feedback of 2 ways.
With variable name "sellitem" get the error and with variable name "sellItem" (Capital 'i'), he close all windows and not do nothing.
09-27-2014, 02:53 PM
kotekmlotek
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 :>.
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)
09-27-2014, 03:11 PM
KrusT
Quote:
Originally Posted by kotekmlotek
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 :>.
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
09-27-2014, 03:34 PM
kotekmlotek
Open backpack with those items and use Raphael version. Function 'itemcount' counts only items that are visible.
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.
09-27-2014, 03:37 PM
KrusT
@kotekmlotek 9 mcs minimized, no problem with loot.
Your window setup is similar to mine. What looting policy do you use? I can't figure out what is going out. Sometimes they are working perfectly for hours and sometimes they are getting stuck all the time ;/. I don't know if this is issue of mine script or bot setting or bot bug. I know that bot can't loot some bodies sometimes... but why I can't figure this out.
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)
With variable name "sellitem" get the error and with variable name "sellItem" (Capital 'i'), he close all windows and not do nothing.
10-05-2014, 12:21 PM
KrusT
BUMP
nothing new about this problem?
10-06-2014, 04:17 PM
KrusT
bump on the question
10-07-2014, 02:06 PM
KrusT
bump!
06-08-2020, 11:19 PM
doxmey
yeah i know thread is old but i'm having the same problem it's like the action stops half way selecting the amount of item to sell and goes to the next action... I cant't for example buy all items in the market i have to do it 50 at a time.