• Visit Rebornbuddy
  • Gold Manager PLugin Request.

    Discussion in 'Archives' started by krizzl3, Mar 27, 2011.

    1. krizzl3

      krizzl3 New Member

      Joined:
      Jul 11, 2010
      Messages:
      127
      Likes Received:
      2
      Trophy Points:
      0
      I was wondering if someone in the community who has a little plugin coding experience could make me a small plug :).

      I am looking for something to work along side eaction that when the seller withdraws from gbank the plugin deposits or withdraws gold so that the toon has exactly 1000g on him every time he visits the guild bank.
       
    2. Jinx

      Jinx New Member

      Joined:
      Jan 18, 2011
      Messages:
      12
      Likes Received:
      0
      Trophy Points:
      1
      Easy Enough to do yourself.

      Create a folder in your warcraft plugins folder called MaintainMoney and then create these two files.

      MaintainMoney.toc
      Code:
      ## Interface: 30300
      ## Title: MaintainMoney
      ## Notes: Moves money between you and your guild bank to keep a set amount in your pocket.
      ## SavedVariablesPerCharacter: MaintainMoneyPerCharAmt
      MaintainMoney.lua
      
      MaintainMoney.lua
      Code:
      local myguild = "YOUR GUILD NAME"
      local f = CreateFrame("Frame","MaintainMoneyFrame")
      
      f:SetScript("OnEvent",function(self, event)
      if event == "PLAYER_LOGIN" then
      MaintainMoneyPerCharAmt = MaintainMoneyPerCharAmt or -1
      else
      if GetGuildInfo("player") ~= myguild then return end
      if MaintainMoneyPerCharAmt > 0 then
      local MoneyDelta = (MaintainMoneyPerCharAmt - GetMoney())
      if (MoneyDelta < 0) then
      DepositGuildBankMoney(math.abs(MoneyDelta))
      elseif (MoneyDelta > 0) then
      WithdrawGuildBankMoney(math.abs(MoneyDelta));
      end
      end
      end
      end)
      
      f:RegisterEvent("GUILDBANKFRAME_OPENED")
      f:RegisterEvent("PLAYER_LOGIN")
      
      function MaintainMoneySlash(msg)
      if strlower(msg) == "disable" then
      MaintainMoneyPerCharAmt = -1
      else
      local g = msg:match"(%d+)g"
      local s = msg:match"(%d+)s"
      local c = msg:match"(%d+)c"
      if not (g or s or c) then
      print"|cffffaaffUsage:\n/mm disable\n/mm <#>g <#>s <#>c"
      else
      g, s, c = g or 0, s or 0, c or 0
      MaintainMoneyPerCharAmt = g * 10000 + s * 100 + c
      end
      end
      end
      
      SLASH_MAINTAINMONEY1 = "/maintainmoney"
      SLASH_MAINTAINMONEY2 = "/mm"
      SlashCmdList["MAINTAINMONEY"] = MaintainMoneySlash;
      
      
      EDIT TO match your Guild Name

      Then ingame type /mm to activate and set how much gold etc to keep on bags

      Works a treat!!
       
    3. krizzl3

      krizzl3 New Member

      Joined:
      Jul 11, 2010
      Messages:
      127
      Likes Received:
      2
      Trophy Points:
      0
      figured out what i was trying to do *for multiple guild support but no guild check remove line 1+8
       
      Last edited: Mar 27, 2011

    Share This Page