Quantcast
WoWInterface - View Single Post - money format gold etc coins
View Single Post
06-17-20, 12:28 PM   #5
nirran
A Murloc Raider
Join Date: Mar 2005
Posts: 8
Originally Posted by Fizzlemizz View Post
Code:
return calc.."|TInterface\\MoneyFrame\\UI-GoldIcon:0:0:2:0|t "..silver.."|TInterface\\MoneyFrame\\UI-SilverIcon:0:0:2:0|t "..copper.."|TInterface\\MoneyFrame\\UI-CopperIcon:0:0:2:0|t"
That's inserting the standard coins into a string using |T |t (texture) start/end escape sequences.

For more information on escape sequences, See

[Another awesome page btw, greatly appreciated]
thank you very much,appreciate it,thisis my finnal

Code:
    local copper, silver, gold, calc, ccoin, scoin, gcoin

	copper = (("%d"):format(value % 100))

	silver = (("%d"):format((value / 100) % 100))
	
	gold = (("%d"):format(value / 100 / 100))

	calc = FormatLargeNumber(gold)

	ccoin = "|TInterface\\MoneyFrame\\UI-CopperIcon:0:0:2:0|t "
	
	scoin = "|TInterface\\MoneyFrame\\UI-SilverIcon:0:0:2:0|t "
	
	gcoin = "|TInterface\\MoneyFrame\\UI-GoldIcon:0:0:2:0|t "
		
	return (calc..gcoin..silver..scoin..copper..ccoin)
  Reply With Quote