Akaji
04-03-2005, 07:19 AM
function Arc_OnEvent(event)
if (not Arc_Enabled) then return end
if ( (event == "CHAT_MSG_COMBAT_SELF") and (arg1 == "gain Detect Traps.") ) then
Sea.io.banner("Testbanner")
PlaySoundFile("Sound\\Doodad\\BellTollAlliance.wav");
if ( Arc_Announce ) then
SendChatMessage("Test", "RAID");
end
elseif ( (string.find(arg1, "Detect Traps fades from you.") ) then
Sea.io.banner("Testbanneroff");
PlaySoundFile("Sound\\Doodad\\BellTollAlliance.wav");
if ( Arc_Announce ) then
SendChatMessage("Testoff", "RAID");
end
end
end
Okay, I've got everything else to work - intialization, the /arc on|off|announce commands, etc. The problem is; this part doesn't work. I used Detect Traps and.... nothing. At all. Not even an error message. I think the event (CHAT_MSG_COMBAT_LOG_SELF) may be incorrect, but according to http://www.cosmosui.org/texts/BlizzardCommands.xml it is an accurate command, and seems to be the only command that I could use for this.
Before you flame me, I'm an absolute noob to scripting/modding/whatever. I decided to do this for the fun of it, so please don't flame me :x
if (not Arc_Enabled) then return end
if ( (event == "CHAT_MSG_COMBAT_SELF") and (arg1 == "gain Detect Traps.") ) then
Sea.io.banner("Testbanner")
PlaySoundFile("Sound\\Doodad\\BellTollAlliance.wav");
if ( Arc_Announce ) then
SendChatMessage("Test", "RAID");
end
elseif ( (string.find(arg1, "Detect Traps fades from you.") ) then
Sea.io.banner("Testbanneroff");
PlaySoundFile("Sound\\Doodad\\BellTollAlliance.wav");
if ( Arc_Announce ) then
SendChatMessage("Testoff", "RAID");
end
end
end
Okay, I've got everything else to work - intialization, the /arc on|off|announce commands, etc. The problem is; this part doesn't work. I used Detect Traps and.... nothing. At all. Not even an error message. I think the event (CHAT_MSG_COMBAT_LOG_SELF) may be incorrect, but according to http://www.cosmosui.org/texts/BlizzardCommands.xml it is an accurate command, and seems to be the only command that I could use for this.
Before you flame me, I'm an absolute noob to scripting/modding/whatever. I decided to do this for the fun of it, so please don't flame me :x