bWolfie 138 Posted June 5, 2017 (edited) Ordinal Suffix FunctionFile Name: Ordinal SuffixFile Submitter: MyriadFile Submitted: 5 June 2017File Category: Quests, Shops, Functions & Algorithms Releases Ever been constructing a string and wanted to turn 1 into 1st? Or 2 -> 2nd? Well, there is now an answer! I call it 'Ordinal Suffix'. It adds a suffix to the end of your number using the callfunc() script command. Example below: .@first = 1; .@second = 2; mes("That's the " + callfunc("Ordinal_Suffix", .@first) + " time you told me that!"); // Will return "That's the 1st time you told me that!" mes("That's the " + callfunc("Ordinal_Suffix", .@second) + " time you told me that!"); // Will return "That's the 2nd time you told me that!" mes("That's the " + callfunc("Ordinal_Suffix", 11) + " time you told me that!"); // Will return "That's the 11th time you told me that!" → Special cases such as '11th', '12th' and '13th' are accounted for. → Can only be used with integers. → Works for all possible numbers (except 0 will return 0th, not sure what that is supposed to be). Script can be 'downloaded' at this pastebin link: https://pastebin.com/6Z5k1S70 Edited June 5, 2017 by Myriad Made a Pastebin account so I can edit the script when needed. 1 Legend reacted to this Quote Share this post Link to post Share on other sites