Download
(7 Kb)
Download
Updated: 11-01-10 07:22 AM
Pictures
File Info
Updated:11-01-10 07:22 AM
Created:10-22-10 09:45 AM
Downloads:1,973
Favorites:9
MD5:
DepositBox2
Version: 2.3
by: Vladinator [More]
Followup on SkOODaT's addon "DepositBox" that was up to patch 3.X.

Updated to work with Cataclysm 4.X, now I did not actually use any code from DepositBox but the function is the same. I also stripped away a lot of code and made it much more performance friendly, you only use a slash command to manage how much you put away when you gain money (like taxes) and you can set how much money you wish to put away for storage.

When you login you are told how much the tax is and how much you have specifically stored away. Try it yourself, use /dbox /dbox2 or /deposit to manage the addon in-game.

Note: the "tax" works like this, from your actual gold amount it first subtracts the gold you specifically save and then it simply removes the % you specify from that total amount. The leftovers are put as your actual gold in your bags.
I also made it so you can't buy items you can't afford. The only way to "disable" the addon is to set taxes to 0 and use the "tak" command to take all money that you have deposited/reserved.

Data Broker: you can toggle the data broker label by holding down either ALT, CTRL or SHIFT while clicking the text on the broker addon. You can not do this in-combat (made it so you can't toggle this by mistakes). The tooltip shows the expected information so you do not have to /dbox to find out the gold status every time.
2.3:
- Made the Data Broker module load with the addon, instead trying to only load when a Broker Display addon is installed -it seems it is really hard to track these kind of addons and there are many of them.
- Fixed the max limit of 2^30 copper in the reserve box, now it should be over a million gold (gl&hf)
- Added Auction House block when trying to buy items you can't afford.

2.2:
- Data Broker support (works on ChocolateBar and should work on Bazooka, Broker_Extractor, DockingStation, Fortress and StatBlockCore). Hold down ALT, CTRL or SHIFT while Left/Right-clicking the frame to toggle between 15 label types. Note: can not do this in combat.

2.1:
- Added profile system, settings are stored on a character per realm basis. The old one just stored everything for everyone in one database, if you login on your level 1 you would have problems when you put it to store 10000g on your level 85.

2.0:
- Initial release for patch 4.0.
Optional Files (0)


Archived Files (3)
File Name
Version
Size
Author
Date
2.2
5kB
Vladinator
10-30-10 07:22 AM
2.1
3kB
Vladinator
10-22-10 01:08 PM
2.0
3kB
Vladinator
10-22-10 09:45 AM


Post A Reply Comment Options
Old 01-05-11, 02:41 PM  
Zephinos
A Kobold Labourer

Forum posts: 0
File comments: 18
Uploads: 0
I love depositbox2 but...

I just wish it had the GUI and the GOLD Display on the screen like the old one.
^_~ I love GUI's
Zephinos is offline Report comment to moderator  
Reply With Quote
Old 11-30-10, 05:13 AM  
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view AddOns

Forum posts: 745
File comments: 382
Uploads: 39
Originally posted by kiingz
Still pretty buggy.

I had 11g 38s 55c
I type /dbox tax 80

It now shows I have 2g 27s 70c with 0g in reserve. 9g 10s 85c disappears.
Even if I type /dbox tak, that 9g is still gone.
If you type /dbox tax 0 then you get the 9g back. If you have a tax turned on, you automatically remove a percentage of the total gold you own and store it away (not deposited).

The deposit is when you want to put aside money that you wish to use later, like let's say you want to save 1000g for flyer so you deposit 1000g of your 1500g and now you got 500g left, if you then have /dbox tax 80 you will also put away 400g (wont end up in the deposit box) and have 100g to spend.

If you really want to see your full gold you need type /dbox tak and also remember to set /dbox tax 0.

I agree, I'll find a way to make taxes only take the percentage of the money you loot in future so it's not a constant. But first exams!
Last edited by Vlad : 11-30-10 at 05:14 AM.
Vlad is offline Report comment to moderator  
Reply With Quote
Old 11-29-10, 11:01 PM  
kiingz
A Deviate Faerie Dragon
AddOn Author - Click to view AddOns

Forum posts: 11
File comments: 64
Uploads: 1
Still pretty buggy.

I had 11g 38s 55c
I type /dbox tax 80

It now shows I have 2g 27s 70c with 0g in reserve. 9g 10s 85c disappears.
Even if I type /dbox tak, that 9g is still gone.
kiingz is offline Report comment to moderator  
Reply With Quote
Old 11-03-10, 05:31 AM  
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view AddOns

Forum posts: 745
File comments: 382
Uploads: 39
Originally posted by kaimox
Thanks for the new version, now the deposit fits exactly.

But the broker display toggle "by holding down either ALT, CTRL or SHIFT while clicking the text" seems to be gone? That worked before. There is only a golden icon left on the bar.
I'll look into it, grr. I guess it's what happens when people make a thousand broker addons...
Vlad is offline Report comment to moderator  
Reply With Quote
Old 11-02-10, 05:48 PM  
kaimox
A Murloc Raider

Forum posts: 7
File comments: 90
Uploads: 0
Thanks for the new version, now the deposit fits exactly.

But the broker display toggle "by holding down either ALT, CTRL or SHIFT while clicking the text" seems to be gone? That worked before. There is only a golden icon left on the bar.
kaimox is offline Report comment to moderator  
Reply With Quote
Old 11-01-10, 07:05 AM  
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view AddOns

Forum posts: 745
File comments: 382
Uploads: 39
Originally posted by kaimox
Anyway, I still miss the frame where I can deposit and withdraw gold (without typing long chat commands) because I do that whenever I want to buy soething and always typing stuff is annoying.
Have not forgotten, just have not implemented yet.

Originally posted by kaimox
Maybe my usage of Depositbox was totally different from yours because I never used that tax stuff. I need it to hide my gold from those auction house scammers that use lag to induce clicks on ridiculosely priced junk. And to make shure that my kid can't buy several mammoths by accident
Yes the DepositBox and mine are almost non-related when it comes to code, the common thing is the idea to store money away from once bags.
On the other hand I noticed I didn't add any handlers for the Auction House so I will take a look into that and also prevent you from buying stuff you don't got money for.

Originally posted by kaimox
[13:24:31] DepositBox2: Taxes at 0% and 0 Gold in reserve.
[13:24:31] DepositBox2: You actually have 141817 Gold, 57 Silber, 67 Kupfer in total.
[13:24:55] DepositBox2: Deposited 140000 Gold into the reserve. Now you have a total of 107374 Gold, 18 Silber, 24 Kupfer stored.

I want to store away 140000 and not 107374 ... Tax was set to 0 before. I can still spend 34443 g. No matter what I type I can't store any more. I don't understand this but depositbox is useless if I can't store away the amount I want.
Now I understand what the posts further down where all about ... but it can't be that complicated to store away the exact amount ordered? Why do you need formulas for that?
Hmm, if tax is set to 0 then the storing commands should store the exact amounts. There is only confusion when you have a tax level, you would still deposit let's say 1000gold, while the bag would show you stored a bit less (that's just visually).
I will look into the storing issue you had, it should have stored your 140000 but I noticed a issue storing too much money at once so I put a "max" per transaction, yet I believe that was over millions so it should not have modified your value either. Again I will look into it and have a fix.
Edit: I've added the fix in 2.3, I had added a useless line where I limit the gold in the reserve to max 2^30.

Originally posted by kaimox
... you implemented a condition searching for certain Broker addons and activated broker support only when one of these addons is found ...
Yes it was yet I tried making it only load the code for those that have a broker addon on (and not just the library). It seems to be very hard to figure out... I could simply just enable the code and put the frame to hide so the onupdate does not waste CPU. Putting this next version.
Last edited by Vlad : 11-01-10 at 07:20 AM.
Vlad is offline Report comment to moderator  
Reply With Quote
Old 11-01-10, 06:17 AM  
kaimox
A Murloc Raider

Forum posts: 7
File comments: 90
Uploads: 0
I'm glad people out there invest time in writing addons and I'm feeling bad about being the one who is just asking for something but can't code it myself ...

Anyway, I still miss the frame where I can deposit and withdraw gold (without typing long chat commands) because I do that whenever I want to buy soething and always typing stuff is annoying.

Maybe my usage of Depositbox was totally different from yours because I never used that tax stuff. I need it to hide my gold from those auction house scammers that use lag to induce clicks on ridiculosely priced junk. And to make shure that my kid can't buy several mammoths by accident.

Edit: I tried to use the chat commands and huh?

[13:24:31] DepositBox2: Taxes at 0% and 0 Gold in reserve.
[13:24:31] DepositBox2: You actually have 141817 Gold, 57 Silber, 67 Kupfer in total.
[13:24:55] DepositBox2: Deposited 140000 Gold into the reserve. Now you have a total of 107374 Gold, 18 Silber, 24 Kupfer stored.

I want to store away 140000 and not 107374 ... Tax was set to 0 before. I can still spend 34443 g. No matter what I type I can't store any more. I don't understand this but depositbox is useless if I can't store away the amount I want.
Now I understand what the posts further down where all about ... but it can't be that complicated to store away the exact amount ordered? Why do you need formulas for that?
Last edited by kaimox : 11-01-10 at 06:41 AM.
kaimox is offline Report comment to moderator  
Reply With Quote
Old 11-01-10, 05:46 AM  
kaimox
A Murloc Raider

Forum posts: 7
File comments: 90
Uploads: 0
Thank you very much for implementing broker support. Strange thing is it doesn't show up on Broker2Fubar, an addon that catches LDB sources and launchers and puts them on Fubar. I know I should switch to chocolate bar and I promise myself I will do that SOON (TM). ;-)

But anyway, source of the problem is that you implemented a condition searching for certain Broker addons and activated broker support only when one of these addons is found. I think that is a bad idea because there are lots of different bar mods with broker support which you can't catch using that way (there might be a new one tomorrow). The idea of DataBroker is that it always works, if there is a supporting data source (your addon) and a data display (whichever the user chooses) present.

Maybe have a look at how http://www.wowinterface.com/download...cyTracker.html does it's Broker stuff, this works without problems and seems to be very simple and short code.

Edit: I fixed this for myself by adding Broker2Fubar to your list of conditions and it's working now but still ...
Last edited by kaimox : 11-01-10 at 05:59 AM.
kaimox is offline Report comment to moderator  
Reply With Quote
Old 10-30-10, 07:24 AM  
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view AddOns

Forum posts: 745
File comments: 382
Uploads: 39
Originally posted by kaimox
I'm missing the old Fubar support ... don't bother with fubar really, but Data Broker support would be great. I'm just using it as a lock box and without display on Broker/Fubar and just using chat commands to store or withdraw this is not really a replacement of Skoodats old version :-(

Anyway, great you are working on it.
Figured as it was not too hard to implement I did that in a jiffy. Noticed ChocolateBar is basically a Fubar/Titanbar mod for Data Broker addons. I've made it so I can add Fubar in addition in the future but don't know if that's top priority at the moment.
Vlad is offline Report comment to moderator  
Reply With Quote
Old 10-29-10, 05:14 PM  
kaimox
A Murloc Raider

Forum posts: 7
File comments: 90
Uploads: 0
I'm missing the old Fubar support ... don't bother with fubar really, but Data Broker support would be great. I'm just using it as a lock box and without display on Broker/Fubar and just using chat commands to store or withdraw this is not really a replacement of Skoodats old version :-(

Anyway, great you are working on it.
kaimox is offline Report comment to moderator  
Reply With Quote
Old 10-24-10, 09:34 AM  
lewal
A Kobold Labourer

Forum posts: 0
File comments: 158
Uploads: 0
hmm just a thought

I know your going a new route with this but maybe the answer is as simply as looking at the old dbox code and how it put its money away less the gui
lewal is offline Report comment to moderator  
Reply With Quote
Old 10-23-10, 01:06 PM  
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view AddOns

Forum posts: 745
File comments: 382
Uploads: 39
Re: hmm

I've tried some things but no luck so far, will ask a good friend of mine tomorrow (masters in math so he better know a simple way). Basically the problem is calculating how much I must take from the serve if you for example want 100g from it, and make it actually give you 100g as well after it runs trough the formula.

I tried stuff without any luck, but once I got the formula for the deposit/withdrawal it will work just fine. Only think that may be a issue is if you want let's say 100g from the 100g you got in reserve in total, the % will always cut you short by a bit. Meaning as long you got the tax above a 0 you will always "loose" some money in the sense you will be putting it away.

Nuff said, I'll try at least make it withdraw the amount you really want -since you may be off 50g and you want to take 50g exactly so I understand why it's lame that the addon don't include the required calculations to actually give you that amount. No worries, will be coming in the future.
Vlad is offline Report comment to moderator  
Reply With Quote
Old 10-23-10, 10:42 AM  
lewal
A Kobold Labourer

Forum posts: 0
File comments: 158
Uploads: 0
hmm

ok i see what you did however putting in the % would solve alot of the REAL money issue

Dont know to many dumb orc's on wallstreet..zug zug

However I have seen cave men in insurance commercials
lewal is offline Report comment to moderator  
Reply With Quote
Old 10-23-10, 06:09 AM  
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view AddOns

Forum posts: 745
File comments: 382
Uploads: 39
Re: ok weres my money ????

One trick is that when you deposit money it's including the % so if you say you wish to put 400g and it shows you got 500g then you won't put in exactly 400g, I know it sounds weird.

The reason is because the calculation when you deposit or withdraw money does not include the % in the calculation at the moment, thus you day you want to get 400g but you actually get less as there is a 25% tax on it. Also in the formula for calculating how much you are able to spend, it goes like this:
math.floor((realmoney - howmuchyoureserve) * (1 - 0.25)) -- for 25% tax
You got 500g as "realmoney" and you have 0g in reserve. (500-0)*0.75=375g is what you can spend.
You got 500g as "realmoney" and you have 375g in reserve. (500-375)*0.75=93.75g is what you can spend.
You got 500g as "realmoney" and you have 375g in reserve, you withdraw 100g so you get 275g in reserve and the total sum is now (500-275)*0.75=168.75g is what you can spend -and not 93.75+100=193.75g as you would think you get when taking 100g out.
I could fix this easily by making the transactions include the % in their calculation. As it is right now it does not. I guess I should as if you know you got money and you need 100g you really wish to take 100g and not 90g or what ever. Good point mate, I'll look into it and post an update.

That's why I added the "/dbox tak" for now, to take all the money back, also you can set "/dbox tax 0" and you will see exactly the total gold you got (or just use /dbox and it says it in the chat). Like "omg I am lost I want out of here" kind of escape.

As for "WERES the other 46.62.87", they got lost in transaction. I guess no one got that joke /ho ho.

Oh about "id like to say i like the gui so i can SEE were my moneys going in the old one" you can see how much you really got by typing /dbox -the reason the old one was easier to use with it's GUI is because I kind of took another route by altering the GetMoney() API directly. In essence it's easier and less work but requires some sacrifice, building a GUI takes time and I don't got much of it right now.

Originally posted by lewal
first off id like to say i like the gui so i can SEE were my moneys going in the old one. heres my ?

1. says i have a total of 586.51.48, which is what i had when i started.
2. tax is at 25%
3. says 400 gold resv., which i moved
4. bag says 139.88.61
5. 139.88.61 + 400.00.00 = 539.88.61
6. WERES the other 46.62.87
7. this is why i like to see my money
Last edited by Vlad : 10-23-10 at 06:48 AM.
Vlad is offline Report comment to moderator  
Reply With Quote
Old 10-23-10, 01:08 AM  
lewal
A Kobold Labourer

Forum posts: 0
File comments: 158
Uploads: 0
Unhappy ok weres my money ????

first off id like to say i like the gui so i can SEE were my moneys going in the old one. heres my ?

1. says i have a total of 586.51.48, which is what i had when i started.
2. tax is at 25%
3. says 400 gold resv., which i moved
4. bag says 139.88.61
5. 139.88.61 + 400.00.00 = 539.88.61
6. WERES the other 46.62.87
7. this is why i like to see my money
lewal is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: