View Single Post
04/15/23, 01:47 AM   #3
sinnereso
AddOn Author - Click to view addons
Join Date: Oct 2022
Posts: 245
no event for it... other than openbank which calls the rest of the function but at the end it checks balance then deposits telvar and outputs to chat the sum of balance and deposit becase if i check balance again after its the same as before deposit.

I dont see why this wont work:

Code:
local amount = GetCarriedCurrencyAmount(CURT_TELVAR_STONES)
if (amount > 0) then
	local bankAmount = GetBankedCurrencyAmount(CURT_TELVAR_STONES)
	DepositCurrencyIntoBank(CURT_TELVAR_STONES, amount)
	df("|c6666FF[RidinDirty]|r Deposited |c33CCCC" .. amount .. "|r telvar. " .. " Bank balance: |c33CCCC" .. amount+bankAmount .. "|r")
	****** for example if i did GetBankedCurrencyAmount(CURT_TELVAR_STONES) right here id get back same as previous one before the deposit
end
as you can see i have to add amount+bankAmount for accurate bank balance because if i do a "GetBankedCurrencyAmount(CURT_TELVAR_STONES)" at anytime after without opening bank again its always the previous balance.

Last edited by sinnereso : 04/15/23 at 01:56 AM.
  Reply With Quote