Satyrist Posted January 5, 2015 Share Posted January 5, 2015 How do you add an item to a merchant by a quest script? I've tried using AddItem to add the item to the merchant's container reference, but the added items never show up! Link to comment
fejeena Posted January 5, 2015 Share Posted January 5, 2015 Don't know. But in some quests in which you must buy a item from a merchant you ask for and buy the item by dialogue. ( so no new item in the merchant's Container)  Perhaps the Problem is the Oblivion save, after you have visited the merchant all is in your game save so you must wait 3 days (without too visit the merchant) before the item shows up. (don't know if that's true) ? perhaps works a script that disable the original Container and adds a new Container with original and your items. Link to comment
kingkong Posted January 6, 2015 Share Posted January 6, 2015 why not simply open CSÂ Â find the merchant container and add the choosen item to it. and save as a new file.esp Link to comment
fejeena Posted January 6, 2015 Share Posted January 6, 2015 I think the item should be only available after the quest update. Â Link to comment
kingkong Posted January 6, 2015 Share Posted January 6, 2015 oh !     like the thieves merchant .     you need to be in the thieves guild to be able to sell stollen things !    you might look at those particular scripts . Link to comment
fejeena Posted January 6, 2015 Share Posted January 6, 2015 Oblivion merchants who sell playerhouse addons get a new chest with the addon papers. e.g. the Skingrad merchant has 3 merchant chests. Â So don't add new item in the chest , add a new chest. Link to comment
Satyrist Posted January 8, 2015 Author Share Posted January 8, 2015 Thanks fejeena and kingkong, I've managed to get it working. Link to comment
movomo Posted January 9, 2015 Share Posted January 9, 2015 Maybe it's too late... sorry for that but anyway, you can add items to vendor chests via script. Probably to avoid conflict, or maybe because even you can't predict who will be the target vendor. It works like this: (from one of my private plugins) Begin MenuMode 1009 if rMerchant == GetActiveMenuRef 1009 return endif Let rMerchant := GetActiveMenuRef 1009 Let rClass := rMerchant.GetClass if MerchEnchanter != rClass && MerchAlchemist != rClass return endif Let rContainer := rMerchant.GetMerchantContainer if 0 == rContainer.GetItemCount aaerCrystalBall rContainer.AddItem aaerCrystalBall 1 endif End Link to comment
Satyrist Posted January 9, 2015 Author Share Posted January 9, 2015 Thanks movomo, that was similar to what I was trying to do, unfortunately silly me was using the wrong reference , it works now.  But Im going to remember your script for future reference. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.