Clearing Merchant Inventory
I could had sworn I used to be able to clear merchant inventory like this.
Code:
quest::merchantclear($npc->GetNPCTypeID()); |
I don't see that command. Are you thinking the ClearMerchantTemp()?
|
I am thinking a few years ago I may had created a custom command. Is that ClearMerchantTemp valid and working?
|
It is in the code, but I don't think there is a perl export for it.
|
Would $npc->ClearItemList() not work?
|
Quote:
|
Quote:
|
Not yet, have not had a chance yet.
|
Quote:
|
That looks like it is for loot only.
|
Quote:
|
It did not seem to work, I put a
Code:
$npc->ClearItemList(); |
Quote:
|
Is this what you are looking for? If not perhaps it can do what you need..
Code:
quest::MerchantSetItem(merchant's npc id, item id, quanity of item) - changes the number of the item that the merchant has available to sell |
I knew about those two, I need a simple clear inventory.
|
I had to edit around 4~5 .cpp files but now it is working like a champ. I created a function in C++ to delete the table rows for that NPC and made the companion PERL function and it works like a champ. One step closer.
|
Okay one last thing, I can clear the merchant's inventory in the database but it does not seem to reflect the change until the zone loads again. Is there some way to make the merchant reread the table?
|
All times are GMT -4. The time now is 12:28 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.