View Single Post
11-27-22, 03:26 AM   #4
gmarco
An Onyxian Warder
 
gmarco's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 362
Hi all,

I am using a different and simplest approach for my autorepair.


Lua Code:
  1. local cost = GetRepairAllCost()
  2.         if cost > 0 and CanMerchantRepair() and GMDURABILITY_CFG["AUTOREPAIR"] then
  3.                    
  4.             if CanWithdrawGuildBankMoney() and CanGuildBankRepair() and GMDURABILITY_CFG["GUILDREPAIR"] == true then
  5.                 RepairAllItems(1)
  6.                 print(prgname .. ": " .. L["repair with guild funds"] .. " " .. GetCoinTextureString(cost))
  7.             else
  8.                 if mymoney >= cost then
  9.                     RepairAllItems()
  10.                     print(prgname .. ": " .. L["repair"] .. " " .. GetCoinTextureString(cost))
  11.                 else
  12.                     print(prgname .. ": " .. L["no repair, need more money"])
  13.                 end
  14.             end
  15.         end

but now you have make me dubious if it is correct or no

At the end it prints the repair cost :



and it seems to me correct.
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
  Reply With Quote