Jump to content

How to add items to merchants by scripting?


Satyrist

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...