EDIT: includes some additional changes in 834f3ba.
Not technically script commands, but anyway~ With the intent of making npc/other/Global_Functions.txt more useful, I've added the following functions in 97687ca:
"F_GetPlural": Returns the plural of a noun - only follows basic rules, with few exceptions!
callfunc "F_GetPlural","<noun>"{,<0:normal/1:uppercase>}
// Examples:
callfunc("F_GetPlural","dog") // returns "dogs"
callfunc("F_GetPlural","fox",1) // returns "FOXES"
callfunc("F_GetPlural","knife") // returns "knives"
"F_InsertPlural": Returns the plural of a noun if the given number is not 1. <format string> uses sprintf(), and MUST contain %d (arg0) and %s (arg1), in that order.
callfunc "F_InsertPlural",<number>,"<noun>"{,<0:normal/1:uppercase>{,"<format string>"}}
// Examples:
callfunc("F_InsertPlural",1,"dog") // returns "1 dog"
callfunc("F_InsertPlural",3,"fox",1) // returns "3 FOXES"
callfunc("F_InsertPlural",5,"knife",0,"^FF0000%d^000000 %s") // returns "^FF00005^000000 knives"
"F_InsertArticle": Returns 'a' or 'an' based on a word - only follows basic rules, without exceptions!
callfunc "F_InsertArticle","<word>"{,<0:lowercase a/1:uppercase A>}
// Examples:
callfunc("F_InsertArticle","apple") // returns "an apple"
callfunc("F_InsertArticle","dog",1) // returns "A dog"
"F_InsertComma": Returns a number with commas between every three digits.
callfunc "F_InsertComma",<number>
// Examples:
callfunc("F_InsertComma",7777777) // returns "7,777,777"
"F_GetNumSuffix": Returns a number with a '-st', '-nd', '-rd', or '-th' suffix.
callfunc "F_GetNumSuffix",<number>
// Examples:
callfunc("F_GetNumSuffix",1) // returns "1st"
callfunc("F_GetNumSuffix",11) // returns "11th"
callfunc("F_GetNumSuffix",32) // returns "32nd"