jawbreaker Posted August 29, 2014 Posted August 29, 2014 Can you help me with message display or announce display format? Thank you mes "How much do you buy it?"; input .@price; next; mes "Buying Price: ^FF0000"+.@price+"^000000z"; // sample: if i input: 1000000 // This will display: // Buying Price: 1000000z // How can i make it to this format: // Buying Price: 1m // Buying Price: 1.1m // Buying Price: 600k // Buying Price: 1,000,000z Quote
Emistry Posted August 29, 2014 Posted August 29, 2014 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. 1 Quote
Question
jawbreaker
Can you help me with message display or announce display format?
Thank you
mes "How much do you buy it?";
input .@price;
next;
mes "Buying Price: ^FF0000"+.@price+"^000000z";
// sample: if i input: 1000000
// This will display:
// Buying Price: 1000000z
// How can i make it to this format:
// Buying Price: 1m
// Buying Price: 1.1m
// Buying Price: 600k
// Buying Price: 1,000,000z
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.