mIRC Homepage
Posted By: KubosKube Replace Numbers with their Name - 29/10/18 03:48 AM
Pretty straight-forward, I want to replace numbers with words. I have a script that reads out numbers, but the output always looks inorganic and somewhat confusing, like this:
Code:
You rolled 4 6-sided dice! |  6 2 8 1 3


I want it to look more natural, like this:
Code:
You rolled four six-sided dice! |  6 2 8 1 3


Is there a built-in feature like this? Or has someone else made a script for that purpose? I searched on Google, but they couldn't find anything for "mirc replace numbers with their names", or "mirc replace numbers with words".
Posted By: maroon Re: Replace Numbers with their Name - 29/10/18 04:16 AM
for a small range of numbers, it's simple to use $gettok to list them.

Code:
//var %a 4 | echo -a you rolled $gettok(one two three four five six,%a,32) 6-sided sice!
Posted By: KubosKube Re: Replace Numbers with their Name - 29/10/18 04:27 PM
Sweet! That looks like a great idea! Thank you!
© mIRC Discussion Forums