Download
(121Kb)
Download
Updated: 07-05-07 02:34 AM
Pictures
File Info
Updated:07-05-07 02:34 AM
Created:unknown
Downloads:2,219
Favorites:5
MD5:

Transforuid

Version: 0.1
by: goldnetx [More]

Requires Ace2

A simple addon that plays the Transformer's transformation sound when shapeshifting as a Druid.

Optional Files (0)


Post A Reply Comment Options
Unread 07-06-07, 02:28 PM  
Tekkub
A Molten Giant
 
Tekkub's Avatar
AddOn Author - Click to view AddOns

Forum posts: 960
File comments: 334
Uploads: 67
gee, Josh's is almost exactly the same as mine, who'd've thunked it...

http://tekkub-wow.googlecode.com/svn...s/Transforuid/
Report comment to moderator  
Reply With Quote
Unread 07-06-07, 08:57 AM  
JoshBorke
A Chromatic Dragonspawn
 
JoshBorke's Avatar
AddOn Author - Click to view AddOns

Forum posts: 185
File comments: 59
Uploads: 5
Code:
local _, class = UnitClass('player')
if class ~= "DRUID" then return end
local getForm = GetShapeshiftForm
local form = getForm(true)
local f = CreateFrame('Frame')
f:RegisterEvent("PLAYER_AURAS_CHANGED")
f:SetScript("OnEvent", function(frame, event, ...) 
    local cur = getForm(true)
    if form ~= cur then
        PlaySoundFile("Interface\\AddOns\\Transforuid\\sound\\transform.mp3")
        form = cur
    end
end)
How many lines is that?

This will fit in a macro:
Code:
/run local g=GetShapeshiftForm
local s,f=g'',CreateFrame'Frame'
f:RegisterEvent("PLAYER_AURAS_CHANGED")
f:SetScript("OnEvent",function(f,e) local c=g(1) if s~=c then PlaySoundFile("Interface\\AddOns\\Transforuid\\sounds\\transform.mp3") s=c end end)
Untested obviously.

PS: just trying to demonstrate how you don't need to use Ace for this addon. It doesn't save you any time and actually is detrimental due to increased loading time. For those of you who would like to run this as solely a macro, you could do:

Code:
/run local g,f,s,c=GetShapeshiftForm,CreateFrame'Frame'
s=g''
f:RegisterEvent("PLAYER_AURAS_CHANGED")
f:SetScript("OnEvent",function(f,e) c=g'' if s~=c then PlaySoundFile("Interface\\sounds\\shapeshift.mp3") s=c end end)
Place your sound file in Interface\\sounds\\shapeshift.mp3 (or you can change it to a wav easily). NOT TESTED.
Last edited by JoshBorke : 07-06-07 at 09:26 AM.
Report comment to moderator  
Reply With Quote
Unread 07-06-07, 08:22 AM  
Wowgamer233
A Flamescale Wyrmkin
 
Wowgamer233's Avatar

Forum posts: 126
File comments: 66
Uploads: 0
Originally posted by Tekkub
Why, why, WHY do people put Ace into such tiny addons? What a waste. I've rewritten your addon to take a whopping 12 lines of code, no frameworks needed. Would you like my version?
Yes pleeeeeze. We would
__________________
Erm, yes, I would like to get mana back before you start tanking again...
No healer mana = dead tank
Report comment to moderator  
Reply With Quote
Unread 07-05-07, 06:38 PM  
Tekkub
A Molten Giant
 
Tekkub's Avatar
AddOn Author - Click to view AddOns

Forum posts: 960
File comments: 334
Uploads: 67
Why, why, WHY do people put Ace into such tiny addons? What a waste. I've rewritten your addon to take a whopping 12 lines of code, no frameworks needed. Would you like my version?
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: