garion992
TH.net Regular
- Reaction score
- 17
I need a formula for purchasing Items:
Copper Cost of Item = (Item Level x 9) x Health of Item
In my map there are 3 kinds of Valuta:
- Copper (originaly gold. 100 Copper = 1 Silver)
- Silver (originaly lumber. 100 Silver = 1 gold)
- Gold (originaly food)
So if my item is Level 10 and has 3 Health, the Copper Cost will be 270. I can't buy an item with a copper value of 270 cause my copper will never be above 100 (100 copper = 1 silver).
So i need to set the value to 70 copper and 2 silver.
I can't set Silver just to the value "Copper / 100" cause then it wil be 3 Silver (i think), and then the copper still has a value of 270
Question: How can i set the variable copper (in this case) to 70 and the variable silver to 2?
Copper Cost of Item = (Item Level x 9) x Health of Item
In my map there are 3 kinds of Valuta:
- Copper (originaly gold. 100 Copper = 1 Silver)
- Silver (originaly lumber. 100 Silver = 1 gold)
- Gold (originaly food)
So if my item is Level 10 and has 3 Health, the Copper Cost will be 270. I can't buy an item with a copper value of 270 cause my copper will never be above 100 (100 copper = 1 silver).
So i need to set the value to 70 copper and 2 silver.
I can't set Silver just to the value "Copper / 100" cause then it wil be 3 Silver (i think), and then the copper still has a value of 270
Question: How can i set the variable copper (in this case) to 70 and the variable silver to 2?