Hi again, I was wondering if someone known an easy short way to code this in an expr. I currently got this:
{{#expr:({{{Earn}}}+{{{EarnB}}}*({{{Lv}}}-1)) round0}}
Or in simply language: Earn+EarnB*(lv-1)
Now my problem comes afther level 10. Than the value change:
{{#ifexpr:{{{Lv}}}<=10|yes|no}}
To this: Earn+EarnB*9+EarnB/2*(lv-10)
The problem is the rounding. EarnB/2 need to be round ceil on the values 11, 13, 15, 17, ... when they need to be ceil on 12, 14, 16, .... In fact you get this: Earn+EarnB*9+ceil(EarnB/2)+floor(EarnB/2)+ceil(EarnB/2) for level 13
Does anyone known an eay code for this problem? It's an bit of anyoing to code 30 switch lines for this
Current code (yes there is an bug inside this one) What makes this source kinda useless:
{{#ifexpr:{{{Lv}}}<=10 |{{#expr:({{{Earn}}}+{{{EarnB}}}*({{{Lv}}}-1)) round0}} |{{#ifexpr:{{{Lv}}}>10 |{{#expr:{{{Earn}}}+{{{EarnB}}}*9+((ceil({{{EarnB}}}*({{{Lv}}}-10)/2)))round0*{{#switch: {{{Lv}}} |10=0 |11=1 |12=1 |13=2 |14=2 |15=3 |16=3 |17=4 |18=4 |19=5 |20=5 |21=6 |22=6 |23=7 |24=7 |25=8 |26=8 |27=9 |28=9 |29=10 |30=10}}+(floor({{{EarnB}}}*({{{Lv}}}-10)/2))*{{#switch: {{{Lv}}} |10=0 |11=0 |12=1 |13=1 |14=2 |15=2 |16=3 |17=3 |18=4 |19=4 |20=5 |21=5 |22=6 |23=6 |24=7 |25=7 |26=8 |27=8 |28=9 |29=9 |30=10}}}} |no }} }}