Go to Page... |
Updated: | 05-18-10 08:31 AM |
Created: | unknown |
Downloads: | 2,221 |
Favorites: | 15 |
MD5: |
Tweak your interface's behavior in-game using shorthand Lua. Type /behaviors in-game to bring up a list of Lua snippets. Each snippet (or behavior) can be enabled and disabled independently.
This add-on requires a certain amount of Lua knowledge. Feedback is greatly appreciated.
Features:
music = cvarbool "Sound_EnableMusic"
trigger "load" function hello() -- This function is called when the behavior is enabled. end trigger "unload" function goodbye() -- This function is called when the behavior is disabled. end event "player regen (enabled, disabled)" function combat() -- This function is called when the player enters or leaves combat. end
left, right = MainMenuBarLeftEndCap, MainMenuBarRightEndCap trigger "unload" function show() left:Show() right:Show() end left:Hide() right:Hide()
names = cvarbool "UnitNameFriendlyPlayerName" hookscript(UIParent, "OnHide") function hide() names = false end hookscript(UIParent, "OnShow") function show() names = true end
function ChatEdit_SetLastTellTarget(name) lastTell = (name ~= "") and name or nil end function ChatEdit_SetLastToldTarget(name) if name and name ~= "" then lastTold, timeout = name, GetTime() + 30 else lastTold, timeout = nil, nil end end hook "ChatFrame_ReplyTell(2)" function reply(frame) if timeout and GetTime() > timeout then lastTold, timeout = nil, nil end local name = lastTold or lastTell if name then ChatFrame_SendTell(name, frame) end end
event "combat log event unfiltered" function echo(_, what, _, _, src, _, name, dest, _, spell) if what == "SPELL_CAST_SUCCESS" and spell == "Innervate" then local srcIsMe = bit.band(src, 0xF) == 0x1 local destIsMe = bit.band(dest, 0xF) == 0x1 local destIsPlayer = bit.band(dest, 0xFC00) == 0x400 if srcIsMe and destIsPlayer and not destIsMe then SendChatMessage("You have been innervated!", "WHISPER", nil, name) end end end
Comment Options |
0Blackmage0 |
View Public Profile |
Send a private message to 0Blackmage0 |
Find More Posts by 0Blackmage0 |
Add 0Blackmage0 to Your Buddy List |
Nexuapex |
View Public Profile |
Send a private message to Nexuapex |
Find More Posts by Nexuapex |
Add Nexuapex to Your Buddy List |
07-29-08, 11:14 AM | |
A Kobold Labourer
Forum posts: 0
File comments: 2
Uploads: 0
|
hey! great add on! Really enjoying that innervate code that you have at the bottom!
Now i just need to learn LUA a bit more... Behaviors = Macro on steriods! |
|
Eihen |
View Public Profile |
Send a private message to Eihen |
Find More Posts by Eihen |
Add Eihen to Your Buddy List |
07-31-08, 09:37 AM | |
|
This AddOn looks very promising and very innovative
|
|
Macniel |
View Public Profile |
Send a private message to Macniel |
Find More Posts by Macniel |
Add Macniel to Your Buddy List |