|
triiger (%x)两黄金
#var list_gold {十|百|千|万}
#var gold %1
#var gold_1 0
#var gold_2 0
#var gold_num 0
#if (%pos( "十", @gold)=1) {#var gold_num 10} {
#forall @list_gold {
#math gold_1 [email={@gold_1+1]{@gold_1+1[/email]}
gold_2=%pos( %i, @gold)
#if (@gold_2<>0) {
#math gold_2 [email={@gold_2-2]{@gold_2-2[/email]}
gold_2=%copy( @gold, @gold_2, 2)
#math gold_2 {(%pos( @gold_2, "一二三四五六七八九")+1)/2}
gold_3=1
#loop @gold_1 {#math gold_3 [email={@gold_3*10]{@gold_3*10[/email]}}
#math gold_num [email={@gold_num+@gold_2*@gold_3]{@gold_num+@gold_2*@gold_3[/email]}
}
}
}
#if (%pos( "零十", @gold)<>0) {#math gold_num [email={@gold_num+10]{@gold_num+10[/email]}}
gold_2=%rightback( @gold, 2)
#math gold_2 {(%pos( @gold_2, "一二三四五六七八九")+1)/2}
#math gold_num @gold_num+@gold_2
#say 苍天啊,大地阿,我怎么只有@gold_num 黄金啊,让我怎么活啊
只能转化一万一下的大写数值
有兴趣的同学修改修改,扩大扩大,精简精简~~~ |
|