Thread Tools Display Modes
11-06-12, 10:34 AM   #1
Kapone
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 16
Say addon?

As many have noticed the dragon roar reminds allot FUS RO DAH!
So i wanted too make a addon where you /Say fus ro dah! or yell in game when dragon roar gets clicked.
Ive take a peak on other peoples addons that has a say on spell but there is just too much code too understand where it even could be for a noob like me.

I'm already done and uploaded a addon that plays the FUS RO DAH!.mp3
All i want is help with the Say string. i could get it done with macro but then if i click the macro button i say fus ro dah without doing it.. and that is fail enough as it could be =P.
  Reply With Quote
11-06-12, 11:17 AM   #2
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
Something like this should work.
Lua Code:
  1. local f = CreateFrame('frame')
  2. f:SetScript('OnEvent', function(_, _, _, event, _, guid, _, _, _, _, _, _, _, spell)
  3.     if event == 'SPELL_CAST_SUCCESS' and spell == 118000 and guid == UnitGUID('player') then
  4.         SendChatMessage('rawr')
  5.     end
  6. end)
  7. f:RegisterEvent('COMBAT_LOG_EVENT_UNFILTERED')
  Reply With Quote
11-06-12, 12:13 PM   #3
Kapone
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 16
Thanks allot semlar! for quick and more information then i needed =)

This is what i had
Code:
		local _, eventType, _, _, srcName = select(1, ...)
		if (eventType == "SPELL_CAST_SUCCESS") and (srcName == UnitName("player")) then
			local spellId = select(12,...);
			if (spellId == 118000) or (spellId == 118000) then --Dragon Roar, Bladestorm
What i needed too change was
Code:
		local _, eventType, _, _, srcName = select(1, ...)
		if (eventType == "SPELL_CAST_SUCCESS") and (srcName == UnitName("player")) then
            SendChatMessage('FUS RO DAH')
			local spellId = select(12,...);
			if (spellId == 118000) or (spellId == 118000) then --Dragon Roar, Bladestorm
Basically nothing but as a noob i learned something tooday atleast ^^
And once again thanks for more info then i needed made me self-learning.
  Reply With Quote
11-06-12, 12:53 PM   #4
Kapone
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 16
so too make him yell i have too just do it like this?
Code:
SendChatMessage("rawr ", "YELL", nil, name)

Last edited by Kapone : 11-06-12 at 12:58 PM.
  Reply With Quote
11-06-12, 02:45 PM   #5
Julchen
A Deviate Faerie Dragon
Join Date: Dec 2009
Posts: 17
http://wowprogramming.com/docs/api/SendChatMessage
  Reply With Quote
11-06-12, 05:31 PM   #6
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
Lua Code:
  1. SendChatMessage("rawr", "YELL")
Is enough to yell the message.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Say addon?


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