What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

Gold Manager PLugin Request.

krizzl3

New Member
Joined
Jul 11, 2010
Messages
127
Reaction score
2
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.
 
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!!
 
figured out what i was trying to do *for multiple guild support but no guild check remove line 1+8
 
Last edited:
Back
Top