npc/other/Global_Functions.txt
//////////////////////////////////////////////////////////////////////////////////
// Returns a number with commas between every three digits.
// -- callfunc "F_InsertComma",<number>
// Examples:
// callfunc("F_InsertComma",7777777) // returns "7,777,777"
//////////////////////////////////////////////////////////////////////////////////
function script F_InsertComma {
set .@str$, getarg(0);
for (set .@i,getstrlen(.@str$)-3; .@i>0; set .@i,.@i-3)
set .@str$, insertchar(.@str$,",",.@i);
return .@str$;
}
use this.