Thread Tools Display Modes
09/16/15, 01:49 PM   #1
thisischris84
Join Date: Sep 2015
Posts: 1
[Request] LF add-on that displays banked gold.

I'm just looking for a simple add-on that will show me whatever gold/currency I have banked. I saw one that kind of did it, but it had all this extra stuff (I think it was called InfoHub or something). I don't want all that. If there is one already, please link in comments. If you're able to create one, get in touch with me @thisischris84 in-game so I could give you some compensation for your time.

Thank you
  Reply With Quote
09/17/15, 02:26 AM   #2
t31os
AddOn Author - Click to view addons
Join Date: Jun 2015
Posts: 26
  1. Open the addons folder and create a new folder named "BankedGold" (without the quotes).
  2. Create 3 files in that directory with the following names.
    ------------------------
    • BankedGold.lua
    • BankedGold.txt
    • BankedGold.xml
    ------------------------
  3. Copy and paste the following code into the BankedGold.lua file.

    Code:
    BankedGold = {}
    BankedGold.name = 'BankedGold'
    BankedGold.author = 't31os'
    BankedGold.version = '1.0'
    BankedGold.settingsVersion = 1
    BankedGold.defaults = { panelX = 0, panelY = 0 }
    
    function BankedGold:UpdatePanel()
    
        BankedGold.bankGold = GetBankedMoney()
        tBGBankCoins:SetText( BankedGold.bankGold )
    
    end
    function BankedGold:MoveStop()
        
        BankedGold.savedOptions.panelX = tBG:GetLeft()
        BankedGold.savedOptions.panelY = tBG:GetTop()
        
    end
    function BankedGold:RestorePanelPosition()
                
        tBG:ClearAnchors()
        tBG:SetAnchor( TOPLEFT, GuiRoot, TOPLEFT, BankedGold.savedOptions.panelX, BankedGold.savedOptions.panelY )
    
    end
    function BankedGold.AddonLoaded( eventCode, addOnName )
        
        if BankedGold.name ~= addOnName then return end
        
        BankedGold.savedOptions = ZO_SavedVars:NewAccountWide( "tBG_vars", BankedGold.settingsVersion, nil, BankedGold.defaults )
        BankedGold:RestorePanelPosition()
        
        -- Banked gold update events
        EVENT_MANAGER:RegisterForEvent("BankedGold", EVENT_BANKED_MONEY_UPDATE, BankedGold.UpdatePanel )
        
    end
    
    EVENT_MANAGER:RegisterForEvent("BankedGold", EVENT_ADD_ON_LOADED, BankedGold.AddonLoaded )
  4. Copy and paste the following code into the BankedGold.txt file.

    Code:
    ## Title: Banked |cffcc33Gold|r
    ## Description: Displays how much gold is in your bank
    ## APIVersion: 100012
    ## Version: 1.0
    ## Author: t31os
    ## SavedVariables: tBG_vars
    
    ; Addon main files
    BankedGold.lua
    BankedGold.xml
  5. Copy and paste the following code into the BankedGold.xml file.

    Code:
    <GuiXml>
        <Controls>
            <TopLevelControl name="tBG" movable="true" mouseEnabled="true" clampedToScreen="true" DrawLayer="0">
                <Dimensions x="100" y="20" />
                <Anchor point="CENTER" />
                <OnMoveStop>
                    BankedGold:MoveStop()
                </OnMoveStop>
                <Controls>
                    <Backdrop name="$(parent)Backdrop" alpha="1" inherits="ZO_DefaultBackdrop" layer="BACKGROUND" />
                    <Texture name="$(parent)CoinIcon" textureFile="/EsoUI/Art/Currency/currency_gold.dds" verticalAlignment="CENTER">
                        <Dimensions x="16" y="16" />
                        <Anchor point="left" relativeTo="$(parent)" relativePoint="left" offsetX="" offsetY="" />
                    </Texture>
                    <Label name="$(parent)BankCoins" font="ZoFontGameOutline" wrapMode="ELLIPSIS" verticalAlignment="CENTER" text="">
                        <AnchorFill />
                        <Anchor point="left" relativeTo="$(parent)CoinIcon" relativePoint="right" offsetX="5" offsetY="" />
                        <OnInitialized>
                            BankedGold:UpdatePanel()
                        </OnInitialized>
                    </Label>
                </Controls>
            </TopLevelControl>
        </Controls>
    </GuiXml>
  6. Save the files, load up the game and check it out.
  7. Tweak code to suit.
  8. Enjoy!
Hope that helps and feel free to ask questions if you want help making adjustments.

Originally Posted by Marazota View Post
afaik you cant turn off all extra stuff in infohub
Sure you can(assuming we're both talking about RAETIA Info Hub), you can have as many or as few modules as you want in the info bar, take a look at the Legatus feature, i use it myself.

Last edited by t31os : 09/17/15 at 02:33 AM.
  Reply With Quote

ESOUI » AddOns » AddOn Search/Requests » [Request] LF add-on that displays banked gold.


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