Trinket Addon For Arena ! ! ! !

1 Troll Druid
0
Looking for an addon that has trinket functionality like Gladius. A simple scaleable trinket icon for Arena1, Arena2, Arena3, Arena4, and Arena5. Thanks for anyone who can help me out!
Edited by Resourcer on 12/2/2011 12:13 PM PST
Reply Quote
1 Troll Druid
0
Someone has to have thought of this ? please if someone can direct me to one or possible even make the addon let me know.
Reply Quote
1 Troll Druid
0
Anyone ?
Reply Quote
1 Troll Druid
0
I think i found a script online to do it but im not sure what im suppose to do with it? any of you addon or LUA savy people can help me out? Its pasted below: ----------> ------------->


local trinkets = {}
local events = CreateFrame("Frame")

function events:ADDON_LOADED(addonName)
if addonName ~= "Blizzard_ArenaUI" then
return
end

local arenaFrame, trinket
for i = 1, MAX_ARENA_ENEMIES do
arenaFrame = "ArenaEnemyFrame"..i
trinket = CreateFrame("Cooldown", arenaFrame.."Trinket", ArenaEnemyFrames)
trinket:SetPoint("Right", arenaFrame, 29, -5)
trinket:SetSize(30, 30)
trinket.icon = trinket:CreateTexture(nil, "BACKGROUND")
trinket.icon:SetAllPoints()
trinket.icon:SetTexture("Interface\\Icons\\inv_jewelry_trinketpvp_01")
trinket:Hide()
trinkets["arena"..i] = trinket
end
self:UnregisterEvent("ADDON_LOADED")
end

function events:UNIT_SPELLCAST_SUCCEEDED(unitID, spell, rank, lineID, spellID)
if not trinkets[unitID] then
return
end
if spellID == 59752 or spellID == 42292 then
CooldownFrame_SetTimer(trinkets[unitID], GetTime(), 120, 1)
SendChatMessage("Trinket used by: "..GetUnitName(unitID, true), "PARTY")
elseif spellID == 7744 then
CooldownFrame_SetTimer(trinkets[unitID], GetTime(), 45, 1)
SendChatMessage("WotF used by: "..GetUnitName(unitID, true), "PARTY")
end
end

function events:PLAYER_ENTERING_WORLD()
local _, instanceType = IsInInstance()
if instanceType == "arena" then
self:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")
elseif self:IsEventRegistered("UNIT_SPELLCAST_SUCCEEDED") then
self:UnregisterEvent("UNIT_SPELLCAST_SUCCEEDED")
for _, trinket in pairs(trinkets) do
trinket:SetCooldown(0, 0)
trinket:Hide()
end
end
end

SLASH_BAF1 = "/baf"
SlashCmdList["BAF"] = function(msg, editBox)
if not IsAddOnLoaded("Blizzard_ArenaUI") then
LoadAddOn("Blizzard_ArenaUI")
end
ArenaEnemyFrames:Show()
local arenaFrame
for i = 1, MAX_ARENA_ENEMIES do
arenaFrame = _G["ArenaEnemyFrame"..i]
arenaFrame.classPortrait:SetTexture("Interface\\TargetingFrame\\UI-Classes-Circles")
arenaFrame.classPortrait:SetTexCoord(unpack(CLASS_ICON_TCOORDS["WARRIOR"]))
arenaFrame.name:SetText("Dispelme")
arenaFrame:Show()
CooldownFrame_SetTimer(trinkets["arena"..i], GetTime(), 120, 1)
end
end

events:SetScript("OnEvent", function(self, event, ...) return self[event](self, ...) end)
events:RegisterEvent("ADDON_LOADED")
events:RegisterEvent("PLAYER_ENTERING_WORLD")
Reply Quote
I have no idea if that code will work, but to make it into an AddOn, copy and paste it into a blank text file and save it as core.lua (make sure you don't save it as core.lua.txt).

Then copy and paste the following code block into another blank text file and save it as ArenaTrinkets.toc## Title: Arena Trinket Cooldowns
## Interface: 40300
## Notes: Shows the cooldown of arena enemy trinkets.

core.lua


Once you have the two files, make a folder called ArenaTrinkets in your WoW\Interface\AddOns\ folder and move the two files there. Restart the game to load the new AddOn.

Just for future reference, it's Lua not LUA.
http://www.lua.org/about.html#name
Edited by Choonster on 12/2/2011 6:38 PM PST
Reply Quote
1 Troll Druid
0
Doesn't seem to work, thank you for your time invested to trying to help me.
Reply Quote
12/03/2011 02:09 AMPosted by Resourcer
Doesn't seem to work, thank you for your time invested to trying to help me.
Does the AddOn show up at the character selection screen? Does it throw any Lua errors in-game? (Make sure you have Lua errors enabled from the Interface menu)
Reply Quote
1 Troll Druid
0
Doesn't show up on the character selection screen. Also i always have Lua errors showing for first few days of a new addon and first week or so after a new patch.

Also here is a link to the thread i was referring to earlier.

http://www.arenajunkies.com/topic/214092-trinket-addon/
Edited by Resourcer on 12/3/2011 7:45 AM PST
Reply Quote
12/03/2011 07:43 AMPosted by Resourcer
Doesn't show up on the character selection screen.
This is strange. Did you name the files/folder exactly as I did (including capitalisation)?
Reply Quote
1 Troll Druid
0
Yes, i did this a few hours ago, let me try once more.


Edit: Did everything again and still doesn't show on character screen when i go to addons.
Edited by Resourcer on 12/3/2011 8:09 AM PST
Reply Quote
Yes, i did this a few hours ago, let me try once more.


Edit: Did everything again and still doesn't show on character screen when i go to addons.
Are you sure you've got the right WoW folder? I just tested it myself and the AddOn showed up at the character selection screen.
Reply Quote
1 Troll Druid
0
Tested everything again, made sure its lua and toc not lua.txt and toc.txt. Also made sure i put both in the folder and named it right as well as putting in into the Addon folder which is located in the Interface folder.

If yours works would it be possible for me to just download it from an upload website of sorts?

I THINK I FOUND THE PROBLEM! when i hover over the lua file it says its an lua, but when i hover my mouse over the toc file it says its a text document. Maybe thats the problem?
Edited by Resourcer on 12/3/2011 9:09 AM PST
Reply Quote
That code is from a UI package, which can be downloaded from WoW Interface here:
http://www.wowinterface.com/downloads/info20444-EnhancedBlizzardUI.html

Once you've downloaded/extracted it, you can just copy/paste the arena folder into your AddOns folder. You can delete the aframe.lua file if you only want the trinkets without changing the frames.
Reply Quote
1 Troll Druid
0
Thank you it showed up at character selection screen. I tried downloading it from the link they gave on arenajunkies earlier perhaps that is why it didnt work?

Currently I see it but i cant put it into the position i want. is there any way to anchor it to the arena frames in Lui? currently trying to mess around with the lua coordinates with little success.
Reply Quote
12/03/2011 10:52 PMPosted by Resourcer
Currently I see it but i cant put it into the position i want. is there any way to anchor it to the arena frames in Lui? currently trying to mess around with the lua coordinates with little success.
It should be possible, but I'll need to take a look at LUI's arena frame code.
Reply Quote
To anchor the icons to the LUI frames instead of the Blizzard ones, make the following changes to the code:

Change lines 11 and 12 from this: arenaFrame = "ArenaEnemyFrame"..i
trinket = CreateFrame("Cooldown", arenaFrame.."Trinket", ArenaEnemyFrames)

To this: arenaFrame = "oUF_LUI_arena"..i
trinket = CreateFrame("Cooldown", arenaFrame.."Trinket", oUF_LUI_arena)


Change lines 55-57 from this: ArenaEnemyFrames:Show()
local arenaFrame
for i = 1, MAX_ARENA_ENEMIES do
arenaFrame = _G["ArenaEnemyFrame"..i]

To this: oUF_LUI_arena:Show()
local arenaFrame
for i = 1, MAX_ARENA_ENEMIES do
arenaFrame = _G["oUF_LUI_arena"..i]


I haven't tested this myself, but it will probably work.
Reply Quote
1 Troll Druid
0
Thank you yet again for your time and diligence. Added what you said but cant test it ingame yet because command to configure isnt showing, hopefully some friends will be on for me to wargame against soon. thank you again

1 last thing is there a command or some form of testmode where i can see where the icon is? /baf is no longer working
Reply Quote
1 last thing is there a command or some form of testmode where i can see where the icon is? /baf is no longer working
I'm not sure why it wouldn't work. Are you getting any errors when you use it?
Reply Quote
1 Troll Druid
0
This is the error that happens when i type /baf ----------------------------------->

Message: Interface\AddOns\arena\ArenaTrinkets.lua:59: attempt to index field 'classPortrait' (a nil value)
Time: 12/06/11 18:52:34
Count: 1
Stack: Interface\AddOns\arena\ArenaTrinkets.lua:59: in function `?'
Interface\FrameXML\ChatFrame.lua:4293: in function `ChatEdit_ParseText'
Interface\FrameXML\ChatFrame.lua:3992: in function `ChatEdit_SendText'
Interface\FrameXML\ChatFrame.lua:4031: in function `ChatEdit_OnEnterPressed'
[string "*:OnEnterPressed"]:1: in function <[string "*:OnEnterPressed"]:1>
[C]: ?

Locals: msg = ""
editBox = ChatFrame1EditBox {
0 = <userdata>
headerSuffix = ChatFrame1EditBoxHeaderSuffix {
}
focusLeft = ChatFrame1EditBoxFocusLeft {
}
focusRight = ChatFrame1EditBoxFocusRight {
}
text = ""
setText = 0
focusMid = ChatFrame1EditBoxFocusMid {
}
chatFrame = ChatFrame1 {
}
addSpaceToAutoComplete = true
tabCompleteTableIndex = 1
language = "Orcish"
header = ChatFrame1EditBoxHeader {
}
}
arenaFrame = oUF_LUI_arena1 {
Overlay = <unnamed> {
}
Highlight = <unnamed> {
}
__tags = <table> {
}
PLAYER_ENTERING_WORLD = <function> defined @Interface\AddOns\LUI\unitframes\core\ouf.lua:134
Full = <unnamed> {
}
UNIT_SPELLCAST_CHANNEL_START = <function> defined @Interface\AddOns\LUI\unitframes\core\elements\castbar.lua:170
SpellRange = true
UNIT_PET = <function> defined @Interface\AddOns\LUI\unitframes\core\ouf.lua:154
PLAYER_FLAGS_CHANGED = <function> defined @Interface\AddOns\LUI\unitframes\layout\layout.lua:3150
UNIT_MAXHEALTH = <function> defined @Interface\AddOns\LUI\unitframes\core\elements\health.lua:60
__unit = "arena1"
Power = <unnamed> {
}
UNIT_POWER_BAR_SHOW = <function> defined @Interface\AddOns\LUI\unitframes\core\elements\power.lua:81
UNIT_SPELLCAST_NOT_INTERRUPTIBLE = <function> defined @Interface\AddOns\LUI\unitframes\core\elements\castbar.lua:116
UNIT_HEALTH = <function> defined @Interface\AddOns\LUI\unitframes\core\elements\health.lua:60
Health = <unnamed> {
}
UNIT_EXITED_VEHICLE = <function> defined @Interface\AddOns\LUI\unitframes\core\ouf.lua:154
UNIT_CONNECTION = <table> {
}
BarFade = false
UNIT_POWER = <function> defined @Interface\AddOns\LUI\unitframes\core\elements\power.lua:81
UNIT_SPELLCAST_START = <function> defined @Interface\AddOns\LUI\unitframes\core\elements\castbar.lua:14
unit = "arena1"
UNIT_SPELLCAST_DELAYED = <function> defined @Interface\AddOns\LUI\unitframes\core\elements\castbar.lua:130
_V2Tex = <unnamed> {
}
SmoothBar = <function> defined @Interface\AddOns\LUI\unitframes\plugins\oUF_Smooth.lua:17
UNIT_MAXPOWER = <function> defined @Interface\AddOns\LUI\unitframes\core\elements\power.lua:81
UNIT_DISPLAYPOWER = <function> defined @Interface\AddOns\LUI\unitframes\core\elements\power.lua:81
UNIT_SPELLCAST_STOP = <function> defined @Interface\AddOns\LUI\unitframes\core\elements\castbar.lua:151
Info = <unnamed> {
}
UNIT_FACTION = <table> {
}
FrameBackdrop = <unnamed> {
}
UNIT_SPELLCAST_CHANNEL_STOP = <function> defined @Interface\AddOns\LUI\unitframes\core\elements\castbar.lua:247
UNIT_SPELLCAST_CHANNEL_UPDATE = <function> defined @Interface\AddOns\LUI\unitframes\core\elements\castbar.lua:223
0 = <userdata>
id = "1"
UNIT_SPELLCAST_INTERRUPTIBLE = <function> defined @Interface\AddOns\LUI\unitframes\core\elements\castbar.lua:102
UNIT_SPELLCAST_INTERRUPTED = <function> defined @Interface\AddOns\LUI\unitframes\core\elements\castbar.lua:83
UNIT_ENTERED_VEHICLE = <function> defined @Interface\AddOns\LUI\unitframes\core\ouf.lua:154
MoveableFrames = true
Castbar = oUF_LUI_arena1_Castbar {
}
colors = <table> {
}
__elements = <table> {
}
style = "LUI"
UNIT_POWER_BAR_HIDE = <function> defined @Interface\AddOns\LUI\unitframes\core\elements\power.lua:81
menu = <function> defined @Interface\AddOns\LUI\unitframes\layout\layout.lua:297
UNIT_SPELLCAST_FAILED = <function> defined @Interface\AddOns\LUI\unitframes\core\elements\castbar.lua:64
}
(for index) = 1
(for limit) = 5
(for step) = 1
i = 1
(*temporary) = nil
(*temporary) = nil
(*
Reply Quote

Please report any Code of Conduct violations, including:

Threats of violence. We take these seriously and will alert the proper authorities.

Posts containing personal information about other players. This includes physical addresses, e-mail addresses, phone numbers, and inappropriate photos and/or videos.

Harassing or discriminatory language. This will not be tolerated.

Forums Code of Conduct

Report Post # written by

Reason
Explain (256 characters max)
Submit Cancel

Reported!

[Close]