Aller au contenu

Photo

Update Store Inventory?


  • Veuillez vous connecter pour répondre
3 réponses à ce sujet

#1
MERP_UK

MERP_UK
  • Members
  • 96 messages

I'm working on a feature whereby completing a quest adds new items to the inventory of a store. I don't wish to simply copy the store and open a clone, as this would potentially allow unique items to be purchased a second time.

 

So, I have a hunch that running CreateItemOnObject, with the object being the store object will do this for me.

 

Will it work?

 

Many thanks

Kevin



#2
Tchos

Tchos
  • Members
  • 5 054 messages

Yes.  Very simple.

 

(I used that method to add gems to my crafting dealer.)


  • MERP_UK aime ceci

#3
MERP_UK

MERP_UK
  • Members
  • 96 messages

Thanks Tchos, much appreciated. I'll get onto that next :)



#4
Dann-J

Dann-J
  • Members
  • 3 161 messages

I used the following simple conversation script in a quest to deliver some chests to a merchant. Once you delivered them, the contents became available for sale in his store.

// ga_stock_store

void main(string sResref, string sStoreTag, int iNumber)
{
object oStore = GetObjectByTag(sStoreTag);
CreateItemOnObject(sResref, oStore, iNumber);
}