#script_game_get_money_text:
# This script is called from the game engine when an amount of money needs to be displayed.
# INPUT: arg1 = amount in units
# OUTPUT: result string = money in text
("game_get_money_text",
[
(store_script_param_1, ":amount"),
(try_begin),
(eq, ":amount", 1),
(str_store_string, s1, "@a point"),
(else_try),
(lt, ":amount", 100), # Fewer than 100
(assign, reg1, ":amount"),
(str_store_string, s1, "@{reg1} points"),
(else_try),
(store_div, reg2, ":amount", 100), # Dividing by 100 will remove 10s and 1s places
(store_mod, reg1, ":amount", 100), # Mod 100 will leave ~just~ the 10s and 1s places
(str_store_string, s1, "@{reg2} BIGpoints and {reg1} points"),
(try_end),
(set_result_string, s1),
]),