Merchant inventory
#1
Posté 12 septembre 2011 - 04:59
I have already created the merchant in the toolset, associated it with an NPC, and it opens and has the regular junk I set it up to have in it. Now, I'd like to occasionally have it add other items depending on certain factors. Do I use CreateItemOnObject()? Or if I want to remove something: cycle thru the store's inventory to find what I want to remove? Do those things work for merchants?
#2
Posté 12 septembre 2011 - 08:27
Modifié par Xardex, 12 septembre 2011 - 08:27 .
#3
Posté 12 septembre 2011 - 03:51
object CreateItemOnObject(
string sItemTemplate,
object oTarget = OBJECT_SELF,
int nStackSize = 1,
string sNewTag = ""
);
Modifié par _Guile, 12 septembre 2011 - 03:54 .
#4
Posté 12 septembre 2011 - 08:09
Terrorble wrote...
How do I add/remove items from a merchant inventory via scripting? I am assuming it is done via the OnOpenStore and OnStoreClosed events, but I guess I do not know which functions to use.
I have already created the merchant in the toolset, associated it with an NPC, and it opens and has the regular junk I set it up to have in it. Now, I'd like to occasionally have it add other items depending on certain factors. Do I use CreateItemOnObject()? Or if I want to remove something: cycle thru the store's inventory to find what I want to remove? Do those things work for merchants?
Yes, those things work for merchants.





Retour en haut






