Adding inventory items to a neutral store

Level 26
Joined
Dec 24, 2019
Messages
507
Hi everyone, I hope someone can help me with this little problem.

I have a couple of heroes cached, the idea is to restore them and mark the items they have in their inventories. Then I want to add those items to the neutral store on the map, that is, I want the store to sell the items that those heroes had in their inventories.

Any ideas on how to do it? I started thinking about it and started to smell something burning so I gave up :ogre_hurrhurr:

Thanks and regards.
 
I'd do something like this

  • Actions
    • For each (Integer A) from 1 to 6, do (Actions)
      • Loop - Actions
        • Set VariableSet ItemType[(Integer A)] = (Item-type of (Item carried by MyHero in slot (Integer A)))
        • Neutral Building - Add ItemType[(Integer A)] to Goblin Merchant 0000 <gen> with 0 in stock and a max stock of 1
Dunno how many heroes you have but you can repeat as needed, basically scan their inventory slots 1 -> 6, store the items in a variable and add said items to the shop
 
I'd do something like this

  • Actions
    • For each (Integer A) from 1 to 6, do (Actions)
      • Loop - Actions
        • Set VariableSet ItemType[(Integer A)] = (Item-type of (Item carried by MyHero in slot (Integer A)))
        • Neutral Building - Add ItemType[(Integer A)] to Goblin Merchant 0000 <gen> with 0 in stock and a max stock of 1
Dunno how many heroes you have but you can repeat as needed, basically scan their inventory slots 1 -> 6, store the items in a variable and add said items to the shop
You're a real genius! I always drown in the smallest puddles :ogre_hurrhurr:

Thank you very much and regards.
 
Back
Top