Template:Money

From FHX Wiki
Revision as of 10:15, 9 June 2024 by B4ttl3m4st3r (talk | contribs)

This is the "Money" template. It should be transcluded in the following format:

{{Money
|value=
}}

The input value is separated into the 3 different currencies as follow:

pp = Math.floor(value / 10000);
gp = Math.floor((value - pp * 10000) / 100);
cp = value - pp * 10000 - gp * 100;

Example with 998877:

99 coins_pp.gif 88 coins_gp.gif 77 coins_cp.gif