• Visit Rebornbuddy
  • Deposit Gold in Guild Bank

    Discussion in 'Archives' started by Croga, Oct 17, 2011.

    1. Croga

      Croga Well-Known Member

      Joined:
      Jun 7, 2010
      Messages:
      1,636
      Likes Received:
      27
      Trophy Points:
      48
      Hey guys,

      I'm trying to add a line to the end of my Dailies profile to force the toon to drop gold into the guild bank.

      So my questions:
      - Is there currently something available that will allow me to tell the profile to "Deposit all but 50G into the guild bank" or something like that?
      - If there isn't, I'll make a QB for it. What's the best way to let the QB open the guild bank and use the Deposit function?

      Thanks for the help!
      If there is need for a QB here I will, of course, publish it.
       
    2. Croga

      Croga Well-Known Member

      Joined:
      Jun 7, 2010
      Messages:
      1,636
      Likes Received:
      27
      Trophy Points:
      48
      Okay, I've come a bit further....
      I found that the GuildBank is just a WoWGameObject so I can get that from the ObjectManager.
      I've also found that the Lua command GuildBankDepositMoney() can be used to deposit gold in the guild bank (weird ey, with that command ;)).

      The main challenge remaining:
      - GuildBankDepositMoney() most probably needs the gold deposit dialog to be open (the one you get when you click "Deposit" in the guild bank window). How do I get that to open?
       
      Last edited: Oct 17, 2011
    3. sadistlex

      sadistlex New Member

      Joined:
      Apr 17, 2011
      Messages:
      22
      Likes Received:
      0
      Trophy Points:
      0
      You can do that using PB.
      HTML:
       <InteractionAction Entry="0" InteractDelay="1000" InteractType="GameObject" GameObjectType="GuildBank" SpellFocus="Anvil" />
          <WaitAction Condition="false" Timeout="5000" />
          <CustomAction Code="Lua.DoString(string.Format(&quot;RunMacroText(\&quot;{0}\&quot;)&quot;, &quot;/run DepositGuildBankMoney(GetMoney() - 3000000);&quot;), 0);" /> 
      That is how i've done it. Basicly you have to get to a GuildBank(preferrably using coords, couldnt find the nearest GB for me), interact with it, wait 5 seconds(to let the window open properly) and then run a macro which deposits all your gold except for "amount in copper", in my case its 300g.
       
    4. Croga

      Croga Well-Known Member

      Joined:
      Jun 7, 2010
      Messages:
      1,636
      Likes Received:
      27
      Trophy Points:
      48
      Can't use PB Sadis :( I want to do it inside a Questing profile so ProfessionBuddy isn't available.

      I've managed to find that you don't need to open the Deposit window.
      When I use "/script DepositGuildBankMoney(100)" directly in the chat window in WoW it will nicely deposit 1 silver into the GB.
      When I use Styx.WoWInternals.Lua.DoString("DepositGuildBankMoney(100)") nothing happens :(
       
    5. sadistlex

      sadistlex New Member

      Joined:
      Apr 17, 2011
      Messages:
      22
      Likes Received:
      0
      Trophy Points:
      0
      You have to make it do a macro, not just a string, i couldnt get it to work this way either, until i tried to make it to run it as a macro.

      P.S. Its strange that you dont have to open GuildBank window, i am pretty sure i tried it and it didnt work if i didnt have a GB window opened.
       
      Last edited: Oct 17, 2011
    6. Croga

      Croga Well-Known Member

      Joined:
      Jun 7, 2010
      Messages:
      1,636
      Likes Received:
      27
      Trophy Points:
      48
      I'll go check that out tomorrow... Time for some sleep first :D
      Yeah, I *do* have to open the GB window. I thought I also had to click the "Deposit" button but that isn't necessary.
       
    7. Croga

      Croga Well-Known Member

      Joined:
      Jun 7, 2010
      Messages:
      1,636
      Likes Received:
      27
      Trophy Points:
      48
      Nevermind sleep.... Got it working now!

      I'll do some more tests tomorrow and if it all works as intended I'll publish it.
       
    8. Croga

      Croga Well-Known Member

      Joined:
      Jun 7, 2010
      Messages:
      1,636
      Likes Received:
      27
      Trophy Points:
      48
      *insert random colorful metaphor*

      As of this morning I get the error:
      "A macro script has been blocked from an action only available to the Blizzard UI"

      The Lua code I'm sending is:
      RunMacroText "/run DepositGuildBankMoney(100)"

      Anyone got any bright ideas left? :(
       
    9. Apoc

      Apoc Moderator Staff Member Moderator

      Joined:
      Jan 16, 2010
      Messages:
      2,790
      Likes Received:
      94
      Trophy Points:
      48
      Just...
      Code:
      Lua.DoString("DepositGuildBankMoney(100)")
      There are no protections on Lua when called from HB's API.
       
    10. Croga

      Croga Well-Known Member

      Joined:
      Jun 7, 2010
      Messages:
      1,636
      Likes Received:
      27
      Trophy Points:
      48
      That's the first thing I tried and that didn't work at all :(
       
      Last edited: Oct 18, 2011
    11. Croga

      Croga Well-Known Member

      Joined:
      Jun 7, 2010
      Messages:
      1,636
      Likes Received:
      27
      Trophy Points:
      48
      I've discontinued this effort. The behavior of this LUA thing is utterly unpredictable. It'll work perfectly one day then do nothing the other day, independent of plugins or addons :(
       
    12. no1knowsy

      no1knowsy Well-Known Member

      Joined:
      Feb 28, 2010
      Messages:
      3,927
      Likes Received:
      57
      Trophy Points:
      48
      It's something with blizzard serverside. Nothing we can do but clickety click ones that didn't go in.
       
    13. Croga

      Croga Well-Known Member

      Joined:
      Jun 7, 2010
      Messages:
      1,636
      Likes Received:
      27
      Trophy Points:
      48
      I'm not sure if it's serverside or clientside but I am sure it's Blizzard. I'll just log on to my toons manually once a week and drop the gold in the bank :)
       
    14. no1knowsy

      no1knowsy Well-Known Member

      Joined:
      Feb 28, 2010
      Messages:
      3,927
      Likes Received:
      57
      Trophy Points:
      48
      It's blizzard doing something stupid between client/server. My character showed 15k after mailbox, but it only let me deposit the 2k I had on him prior. Maybe a system in place to 'release' funds, but a relog fixed it.
       
    15. Croga

      Croga Well-Known Member

      Joined:
      Jun 7, 2010
      Messages:
      1,636
      Likes Received:
      27
      Trophy Points:
      48
      hmm.... that implies that if I put it at the start of my profile it should work better..... I'll try that out tomorrow.
       

    Share This Page