It looks like you're new here. If you want to get involved, click one of these buttons!
<<set $Shop =
"LeatherArmor" {
name: "Leather Armor",
type: "Armor",
price: 50,
desc: "a simple leather armor"
},
"PotS" {
name: "small Heal Pot",
type: "useable"
price: 10,
desc: "a small Heal Pot which regenerate 25 life"
},
}>>
Now I search for and easy way that list all items in the shop like this (without writing every by my own)
Item Name + Item Description + Item Price + Buy button
At the same moment, the item should disappear from the shop and have to be adding to the inventory, which list:
Item name + Item Description + wear/use
I hope that you can show me an easy way
Comments
<<set $armor to 1>>
<<if $armor is 1>>Armour. This armour is leather.<<if $coins gte 50>>[[Cost 50|purchase armor passage that sets armor to 2 and takes 50 from coins]].<<elseif>>Cost 50>>.<</if>><</if>
Then for inventory:
<<if $armor is 2>>Armour. This armour is leather.<</if>
In this way you could set shops up by simply copying your master shop list, and at the top of the passage, using the <<set>> command to set the variables to what you want the shop to display. That way you'd simply have to copy paste one list out for every shop, and then just change the <<set>> commands at the top of each page to choose what each displays. It seems just as easy to me as what you are trying to do.
E.g. if you want a shop without armour, you simply write:
<<set $armor to 0>>
<<if $armor is 1>>Armour. This armour is leather.<<if $coins = gte 50>>[[Cost 50||purchase armor passage that sets armor to 2 and takes 50 from coins]].<<elseif>>Cost 50>>.<</if>><</if>
If you then defined the shop in the widgets passage, you could just write in individual passages:
<<set $armor to 0>>
<<shop>>
Whatever solution you go with, you need to create a master list ~somewhere~.
Okay thats an miss understood. I have a masterlist.
example: now i create 2 passages. a shop and an inventory.
the shop should look like this: And this list should be generated out of my "masterlist". And if you buy a item it should be removed out of the shop and should be added to the player inventory. which should look like: And all of this should be created automatically so that i only have to add items to my "masterlist" and it appear at the shop by its own.
Actually i have to create 2 lists, 1 for shop and 1 for the inventory. And i have to type all by my own and I have to create a new variable for every item. and that i want to make easier. Is it possible or not? Anyone has a idea?