Looking for a way to clear vendor temp inventory
Greetings!
I am Looking for a way to clear vendor temp inventory. Apparently there is no actual quest commands available for that other than: (which set, count, but don't clear) quest::MerchantCountItem(uint32 npc_id, uint32 item_id) quest::MerchantSetItem(uint32 npc_id, uint32 item_id, [uint32 quantity]) Thank You! |
LUA NPC:ClearItemList() or Perl $npc->ClearItemList() does not work?
|
Quote:
|
If all else fails you can use a perl script to run sql against your db clearing the merchant temp list then reload npc data to make it update. It may also be possible with lua but I have never tried anything along those lines in lua. It is probably best to do what your wanting within the confines of the quest system but if that doesn't work out then this can be another option.
|
I figured out a solution - by using a combination of MerchantCountItem and MerchantSetItem I managed to enforce a list clear by doing a loop on range of items. Its cumbersome but it works for now =)
My next goal is - NPC run Auction house =) I know some server implemented that few years back, so if anyone aware of any free code - I would much appreciate that =) Otherwise I will have to code it from ground up =) |
Quote:
|
Ok i think i have one question left. I been working with pre-defined list of items. What if I want to look over entire vendor inventory (I don't know what he has there) and ask him to list all items he got on him?
|
All times are GMT -4. The time now is 01:52 PM. |
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.