Thread Tools Display Modes
Prev Previous Post   Next Post Next
09-28-21, 02:32 AM   #1
darhanger
A Fallenroot Satyr
 
darhanger's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2017
Posts: 20
Print amount of money for repair

Wanna print massage in chat when function executed. Also wanna make printing with gold/silver/cooper logos in chat.

Lua Code:
  1. if MerchantWindow then
  2.   local Cost, NeedRapair = GetRepairAllCost()
  3.    local function CalculateCost()
  4.    local gold = floor(Cost / 10000)
  5.    local silver = mod(floor(Cost / 100), 100)
  6.    local cooper = mod(floor(Cost), 100)
  7.         return format("%gold, %silver, %bronze", gold, silver, cooper)
  8.    end;      
  9.    if NeedRapair
  10.     and GetMoney() > (Cost * 4) then
  11.             RepairAllItems()
  12.             print("All Items Repaired"..CalculateCost())
  13.         end
  14.     end
  15. end
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Print amount of money for repair

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off