Aller au contenu

Photo

How to flag an item in merchant's inventory to infinite via script?


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

#1
orderlyrandom

orderlyrandom
  • Members
  • 80 messages
 I posted this Q on the wrong forum. Apology. "It's my First Day" (Homer Simpson).

Is there a function we could use to flag a merchant item, such as Elfroot to infinite, upon adding? Or we have to ask the game to count,  then loop some lines to repeat CreateItemOnObject.

#2
TimelordDC

TimelordDC
  • Members
  • 923 messages
CreateItemOnObject has a parameter to specify the stack size but you cannot use it to set the item count to Infinite. The max value is 99 and the store cannot hold more than 99 at any time (so, looping won't help unless you do a check on the store's inventory every time the store is used). There is a flag to set the item to Infinite in the store inventory while creating it in the Toolset but I can't find anything in the scripts to do that.

#3
orderlyrandom

orderlyrandom
  • Members
  • 80 messages
Thanks, TimelordDC.



Is there a way to flag it via script after the item had been put inside a merchant's inventory?

#4
Magic

Magic
  • Members
  • 187 messages
From what I read it's not possible to make it infinite later on, so I suggest the following. Create a second merchant (or container) with Elfroot. Set this stack to infinite. When you need the infinite amount, use MoveItem() to move the stack to the your merchant.

#5
orderlyrandom

orderlyrandom
  • Members
  • 80 messages
Oh wow, that's smart. Thanks, Magic.