Thread Tools Display Modes
02-10-11, 04:35 AM   #1
DeMadsMerrin
A Murloc Raider
Join Date: Nov 2010
Posts: 6
Dbm Bg..

Hi there, was wondering if anyone has an addon similar to DBM Boss warning whiper that someone`s mid-boss fight, but for battlegrounds.

Something that sends a reply back to whomever whispered that the player is in a bg & will reply when can, but is busy.
__________________
"You don`t want to piss off me & my christmas jumper!"
-----------------------------------------------------
┌∩┐(◣_◢)┌∩┐
  Reply With Quote
02-10-11, 07:45 AM   #2
sacrife
An Onyxian Warder
 
sacrife's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 384
I just dry coded this at work (someone probably needs to make this better or make it work :P)
Basically what this does is just set you as DND when you enter a battleground and updates the dnd message with the battleground score when something happens in the combat log (which should be very often in a BG :P) Kinda hacky, I know, but should serve it's purpose.

But put this code inside a new addon or at the top of any lua file.

lua Code:
  1. local bgdnd = CreateFrame("frame",nil)
  2. bgdnd:RegisterEvent("PLAYER_ENTERING_WORLD")
  3. bgdnd:RegisterEvent("COMBAT_LOG_UNFILTERED")
  4. bgdnd:SetScript("OnEvent", function()
  5.     if UnitInBattleground("player") and UnitIsDND("player") then
  6.         _, _, scoreAlliance, _, _, _, _, _, _, _, _ = GetWorldStateUIInfo(1) -- alliance
  7.         _, _, scoreHorde, _, _, _, _, _, _, _, _ = GetWorldStateUIInfo(2) -- horde
  8.         scoreInfo = "Score = Horde: "..scoreHorde.." - Alliance: "..scoreAlliance
  9.     elseif UnitInBattleground("player") and not UnitIsDND("player") then
  10.         SendChatMessage(("I'm currently doing PvP in "..GetRealZoneText()..scoreInfo), "DND" )
  11.     else
  12.         SendChatMessage("", "DND")
  13.     end
  14. end)
__________________

  Reply With Quote
02-10-11, 12:20 PM   #3
Diagnostics
Medic!
 
Diagnostics's Avatar
Premium Member
Join Date: Jul 2009
Posts: 71
DBM has not been updated on WoWI for some time now. You need to pull the latest off Curse for updates. That should remove your error.
__________________
  Reply With Quote
02-11-11, 12:14 PM   #4
DeMadsMerrin
A Murloc Raider
Join Date: Nov 2010
Posts: 6
Originally Posted by sacrife View Post
I just dry coded this at work (someone probably needs to make this better or make it work :P)
Basically what this does is just set you as DND when you enter a battleground and updates the dnd message with the battleground score when something happens in the combat log (which should be very often in a BG :P) Kinda hacky, I know, but should serve it's purpose.

But put this code inside a new addon or at the top of any lua file.

lua Code:
  1. local bgdnd = CreateFrame("frame",nil)
  2. bgdnd:RegisterEvent("PLAYER_ENTERING_WORLD")
  3. bgdnd:RegisterEvent("COMBAT_LOG_UNFILTERED")
  4. bgdnd:SetScript("OnEvent", function()
  5.     if UnitInBattleground("player") and UnitIsDND("player") then
  6.         _, _, scoreAlliance, _, _, _, _, _, _, _, _ = GetWorldStateUIInfo(1) -- alliance
  7.         _, _, scoreHorde, _, _, _, _, _, _, _, _ = GetWorldStateUIInfo(2) -- horde
  8.         scoreInfo = "Score = Horde: "..scoreHorde.." - Alliance: "..scoreAlliance
  9.     elseif UnitInBattleground("player") and not UnitIsDND("player") then
  10.         SendChatMessage(("I'm currently doing PvP in "..GetRealZoneText()..scoreInfo), "DND" )
  11.     else
  12.         SendChatMessage("", "DND")
  13.     end
  14. end)

Thanks, I`ll try this out.
Does it matter into which LUA I stick it or just any I currently have?
__________________
"You don`t want to piss off me & my christmas jumper!"
-----------------------------------------------------
┌∩┐(◣_◢)┌∩┐
  Reply With Quote
02-11-11, 02:13 PM   #5
Waky
A Cobalt Mageweaver
 
Waky's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2010
Posts: 200
Originally Posted by Diagnostics View Post
DBM has not been updated on WoWI for some time now. You need to pull the latest off Curse for updates. That should remove your error.
lol he said "Dbm BG" not "Bug" :P
  Reply With Quote
02-11-11, 03:03 PM   #6
sacrife
An Onyxian Warder
 
sacrife's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 384
Originally Posted by DeMadsMerrin View Post
Thanks, I`ll try this out.
Does it matter into which LUA I stick it or just any I currently have?
As long as it is not inside a function or if statement
So basically at the top/bottom somewhere

Also, not 100% sure it works properly as I just coded it without testing.
I "THINK" thats how you set DND with lua, so if not someone say so! :P
__________________

  Reply With Quote
02-12-11, 03:34 PM   #7
DeMadsMerrin
A Murloc Raider
Join Date: Nov 2010
Posts: 6
Hi again.

I entered the codes into the BG_Emotefix LUA as follows:



local Fixer = CreateFrame("Frame")

local RaidBossEmoteFrame = RaidBossEmoteFrame
local unregistered

Fixer:SetScript("OnEvent",
function()
if select( 2, IsInInstance() ) == "pvp" then
RaidBossEmoteFrame:UnregisterEvent("CHAT_MSG_RAID_BOSS_EMOTE")
unregistered = true
elseif unregistered then
RaidBossEmoteFrame:RegisterEvent("CHAT_MSG_RAID_BOSS_EMOTE")
unregistered = false
end
end
)

Fixer:RegisterEvent("PLAYER_ENTERING_WORLD")


local bgdnd = CreateFrame("frame",nil)
bgdnd:RegisterEvent("PLAYER_ENTERING_WORLD")
bgdnd:RegisterEvent("COMBAT_LOG_UNFILTERED")
bgdnd:SetScript("OnEvent", function()
if UnitInBattleground("player") and UnitIsDND("player") then
_, _, scoreAlliance, _, _, _, _, _, _, _, _ = GetWorldStateUIInfo(1) -- alliance
_, _, scoreHorde, _, _, _, _, _, _, _, _ = GetWorldStateUIInfo(2) -- horde
scoreInfo = "Score = Horde: "..scoreHorde.." - Alliance: "..scoreAlliance
elseif UnitInBattleground("player") and not UnitIsDND("player") then
SendChatMessage(("I'm currently doing PvP in "..GetRealZoneText()..scoreInfo), "DND" )
else
SendChatMessage("", "DND")
end
end)

Not overly sure if did it right, but it does tend to make me dnd when I`m in bgs or raids, which is good

I`d asked a guildie to whisper me in the bg (makes change from asking them not to ;P)

He said there wasn`t a reply regarding bg current results, so I`ve possibly messed up somewhere hehe
__________________
"You don`t want to piss off me & my christmas jumper!"
-----------------------------------------------------
┌∩┐(◣_◢)┌∩┐
  Reply With Quote
02-12-11, 03:35 PM   #8
DeMadsMerrin
A Murloc Raider
Join Date: Nov 2010
Posts: 6
Oops, it doesn`t quite show the spacing right here, but they are in the original one..
__________________
"You don`t want to piss off me & my christmas jumper!"
-----------------------------------------------------
┌∩┐(◣_◢)┌∩┐
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » Dbm Bg..


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