|
-- Do thousands |
result = floor(num / units); |
BattleHerald_AddSoundToQueueByKey("EXTRA", "NUM_" .. (result*units)); |
BattleHerald_AddSoundToQueueByKey("GENERAL", "NUM_" .. (result*units)); |
num = num % units; |
units = units / 10; |
|
-- Do hundreds |
result = floor(num / units); |
BattleHerald_AddSoundToQueueByKey("EXTRA", "NUM_" .. (result*units)); |
BattleHerald_AddSoundToQueueByKey("GENERAL", "NUM_" .. (result*units)); |
num = num % units; |
units = units / 10; |
|
-- Check whether it's from 11 to 19; |
-- otherwise, continue normally |
if (num >= 11 and num <= 19) then |
BattleHerald_AddSoundToQueueByKey("EXTRA", "NUM_" .. result); |
BattleHerald_AddSoundToQueueByKey("GENERAL", "NUM_" .. result); |
return; |
end |
|
-- Do tens |
result = floor(num / units); |
BattleHerald_AddSoundToQueueByKey("EXTRA", "NUM_" .. (result*units)); |
BattleHerald_AddSoundToQueueByKey("GENERAL", "NUM_" .. (result*units)); |
num = num % units; |
units = units / 10; |
|
-- Do ones |
BattleHerald_AddSoundToQueueByKey("EXTRA", "NUM_" .. result); |
BattleHerald_AddSoundToQueueByKey("GENERAL", "NUM_" .. result); |
|
end |
|