EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Looking for a way to clear vendor temp inventory (https://www.eqemulator.org/forums/showthread.php?t=43080)

ChaosSlayerZ 10-15-2020 10:22 PM

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!

Thalix 10-16-2020 06:41 AM

LUA NPC:ClearItemList() or Perl $npc->ClearItemList() does not work?

ChaosSlayerZ 10-16-2020 07:32 AM

Quote:

Originally Posted by Thalix (Post 265598)
LUA NPC:ClearItemList() or Perl $npc->ClearItemList() does not work?

Sadly no. KinglyKrab explains that they are for clearing of loot of npc.

blackdragonsdg 10-16-2020 08:37 PM

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.

ChaosSlayerZ 10-16-2020 09:34 PM

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 =)

demonstar55 10-16-2020 09:36 PM

Quote:

Originally Posted by Thalix (Post 265598)
LUA NPC:ClearItemList() or Perl $npc->ClearItemList() does not work?

Those are loot functions it looks like (if anyone was wondering why they didn't work)

ChaosSlayerZ 10-16-2020 09:53 PM

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 08:46 AM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.