Quantcast
Download
(131 Kb)
Download
Updated: 02-08-18 07:12 AM
Pictures
File Info
Compatibility:
Shadows of Argus (7.3.0)
Updated:02-08-18 07:12 AM
Created:08-04-10 07:07 PM
Downloads:3,817
Favorites:34
MD5:
Categories:Action Bar Mods, Combat Mods, Unit Mods
7.3.0

ImpliedTarget

Version: 1.3.3
by: Vrul [More]

This addon only works with action buttons provided by the default UI. Support for Bartender4 and Dominos is provided via included modules.

Macros allow you to change the ability that you use based on whether your target is friend or foe. This addon allows you to do the opposite, change the target of an ability based on whether that ability is harmful or helpful. Support for custom paging of the main action bar is also provided (disabled if using Bartender4 or Dominos).


Anyone with several macros similar to:

/cast [harm, nodead] [@targettarget, harm, nodead] [@mouseover, harm, nodead] [@pettarget, nodead] HarmfulSpell

or

/cast [@mouseover, help, nodead] [help, nodead] [@targettarget, help, nodead] [@player] HelpfulSpell

can instead set up a targeting priority and apply it to all of your action buttons without wasting a single macro.


To further enhance your mouseover targeting, two additional options are provided. @unitframe can be used in place of @mouseover to target a unit only if it is a unit frame. @unitmodel similarly can be used to target only units that are in the 3D world.


Note: Target behavior is only changed for spells and items placed directly into an action button.

Translators: To submit a translation please just edit an existing file (example: ImpliedTarget_Config\Locales\deDE.lua) and send it to me.


API (these functions may be called in combat, but their effects won't happen until combat has ended)

ImpliedTarget.DisableKeyBinding()

Forces ImpliedTarget to disable it's key binding code and allow it to be garbage collected. Only call this if your addon will be providing this functionality.


ImpliedTarget.DisablePaging()

Forces ImpliedTarget to disable it's paging code for the primary action bar and allow it to be garbage collected. Only call this if your addon will be providing this functionality.


ImpliedTarget.AddButton(button [, bind])

Allow ImpliedTarget to alter the behavior of an action button.

Arguments:

button - (table or string) An action button or name of an action button.

bind - (string) The name of the key bind for the action button.
Returns:
button - (table or nil) If successful the action button is returned, otherwise nil.

ImpliedTarget.RemoveButton(button)

Prevent ImpliedTarget from altering the behavior of an action button.

Arguments:
button - (table or string) An action button or name of an action button.
Returns:
button - (table or nil) The action button if it was removed, nil if the action button had not been previously added.

Version 1.3.3 (02/08/2018)
- Fixed error when assigning custom parameters

Version 1.3.2 (01/21/2018)
- Corrected the classification of the Warlock ability "Phantom Singularity" from 'help' to 'harm'
- Fixed errors with harm priority and roles

Version 1.3.1 (09/02/2017)
- Updated for 7.3

Version 1.3 (07/18/2016)
- Updated for 7.0
- Significant reworking of how things are done behind-the-scenes
- Added a feature to prioritize harm/help for dual-role abilities based on role

Version 1.2.2 (10/19/2014)
- Fix for key binds not working after a reload

Version 1.2.1 (10/14/2014)
- Updated for 6.0

Version 1.2 (10/31/2013)
- Resurrection abilities are now completely separate from helpful abilities in the options
- Improved the way secure unwrapping was done to avoid conflicts with other addons
- Changing the active key bind set now updates key binds so they will still work
- Fix to allow key binds to work with the pet battle UI
- Fix for key binds containing "[" or "]"
- The Grid integration option was replaced with a more universal solution: @unitframe, @unitmodel
- Moved Bartender4 and Dominos support into separate addons as examples for any addon author looking to incorporate ImpliedTarget support
- Added some auto-correction for minor errors in parameters that are manually entered

Version 1.1.7 (09/18/2013)
- Fixed key bind issues with ExtraActionButton and PetBattleUI
- Corrected an issue with changing Paging settings

Version 1.1.6 (06/23/2013)
- Added an option to disable resurrection abilities from working with implied targeting
- Corrected the spellID for the warlock spell Soul Stone
- Improved behavior with Grid integration
- Option based code optimization

Version 1.1.5 (06/14/2013)
- Fixed an error and a bug with Grid integration

Version 1.1.4 (06/13/2013)
- Resurrection abilities will now also work with implied targeting
- Added an option for Grid users

Version 1.1.3 (09/02/2012)
- Added options for excluding entire action bars from implied targeting

Version 1.1.2 (07/28/2012)
- Updated for MoP

Version 1.1.1 (12/10/2011)
- Added compatibility for Dominos

Version 1.1 (11/26/2011)
- Added compatibility for Bartender4
- Changed options to be easier for novice users (borrowed Bartender4's style)

Version 1.0.5 (01/11/2011)
- Correct an issue with some empty vehicle buttons

Version 1.0.4 (01/04/2011)
- Fix for key binds that contain characters that have special meaning for Lua's format function

Version 1.0.3 (12/24/2010)
- Ignore spells that can't be identified as harmful or helpful (fixes errors with vehicle abilities)

Version 1.0.2 (10/13/2010)
- Updated for 4.0

Version 1.0.1 (08/06/2010)
- Fixed a bug when changing key binds for the main action bar

Version 1.0 (08/04/2010)
- Initial release
Optional Files (1)
File Name
Version
Size
Author
Date
Type
1.0
4kB
11-11-16 01:39 PM
Addon


Archived Files (16)
File Name
Version
Size
Author
Date
1.3.2
131kB
Vrul
01-21-18 12:58 PM
1.3.1
131kB
Vrul
09-02-17 12:29 PM
1.3
130kB
Vrul
07-18-16 10:05 PM
1.2.2
115kB
Vrul
10-19-14 10:12 AM
1.2.1
115kB
Vrul
10-13-14 11:43 PM
1.2
114kB
Vrul
10-31-13 03:40 PM
1.1.7
106kB
Vrul
09-18-13 05:34 PM
1.1.6
105kB
Vrul
06-23-13 02:01 PM
1.1.4
104kB
Vrul
06-13-13 05:13 PM
1.1.3
102kB
Vrul
09-02-12 11:26 AM
1.1.2
102kB
Vrul
07-28-12 02:40 PM
1.1.1
101kB
Vrul
12-10-11 07:14 PM
1.1
100kB
Vrul
11-26-11 03:55 PM
1.0.5
96kB
Vrul
01-11-11 07:16 PM
1.0.4
96kB
Vrul
01-04-11 03:19 PM
1.0.3
96kB
Vrul
12-24-10 01:45 PM


Post A Reply Comment Options
Unread 04-11-18, 04:39 PM  
Vrul
A Cobalt Mageweaver
 
Vrul's Avatar
AddOn Author - Click to view AddOns

Forum posts: 240
File comments: 261
Uploads: 27
Originally Posted by nKweo
One more thing, I took a peak at the code of this addon and noticed that it depends on spell lists that were created for each class. I know Bartender can do some things similar to what you can do with macros (e.g. 'auto assist' = try to cast on targettarget when target is not help/harm depending on spell), but I don't believe there's a manual list behind this functionality. Just out of curiosity: where does this difference stem from? It seems to me that maintaining the addon would be less work if it didn't require updating spell lists with expansions/patches.
In a secure snippet I was getting the spell ids from the second return of GetActionInfo and then running it through IsHarmfulSpell or IsHelpfulSpell. Since both return nil for spells that are both harmful and helpful (like Penance) I decided to manually add those spells as "harm/help." While going through every ability for every class I decided to add everything that has a unit target.

Some time later (not sure when), Blizzard removed the ability to pass spell ids to IsHarmfulSpell and IsHelpfulSpell and now they only take spell names. There is no way to get a spell name from a spell id in the secure environment on the fly, so I decided to keep my hard coded lists.
Report comment to moderator  
Reply With Quote
Unread 04-11-18, 09:24 AM  
nKweo
A Deviate Faerie Dragon
 
nKweo's Avatar

Forum posts: 13
File comments: 6
Uploads: 0
One more thing, I took a peak at the code of this addon and noticed that it depends on spell lists that were created for each class. I know Bartender can do some things similar to what you can do with macros (e.g. 'auto assist' = try to cast on targettarget when target is not help/harm depending on spell), but I don't believe there's a manual list behind this functionality. Just out of curiosity: where does this difference stem from? It seems to me that maintaining the addon would be less work if it didn't require updating spell lists with expansions/patches.
Last edited by nKweo : 04-11-18 at 09:32 AM.
Report comment to moderator  
Reply With Quote
Unread 04-08-18, 02:11 AM  
nKweo
A Deviate Faerie Dragon
 
nKweo's Avatar

Forum posts: 13
File comments: 6
Uploads: 0
Originally Posted by Vrul
Unfortunately the way this addon works with keybinds makes it so that pressing a keybind emulates clicking the relevant button. Changing button click behavior is beyond the scope of this addon and may not be desirable by everyone. There are addons (such as ClickDown) that will change your buttons to work on mouse down instead of mouse up which will get you the behavior you desire with this addon.
Thanks Vrul. I extracted the code I needed from ClickDown. In case anyone else is looking for this functionality, here is the Lua (haven't tested this much yet, but seems to work):
Code:
-- Make using ImpliedTarget with keybindings work on 'click' down (credit: ClickDown by Andromerius)
local actionButtons = {
	"ActionButton",
	"MultiBarBottomLeftButton",
	"MultiBarBottomRightButton",
	"MultiBarRightButton",
	"MultiBarLeftButton",
	"StanceButton",
	"PetActionButton",
	"OverrideActionBarButton",
	"ExtraActionButton",
}

local clickDown = CreateFrame("Frame")
clickDown:RegisterEvent("PLAYER_LOGIN")
clickDown:SetScript("OnEvent", function()
	for i = 1, #actionButtons do
		for id = 1, NUM_ACTIONBAR_BUTTONS or 12 do
			local button = _G[actionButtons[i] .. id]
			if button then
				button:RegisterForClicks("AnyDown")
			end
		end
	end
end)
Report comment to moderator  
Reply With Quote
Unread 04-07-18, 10:13 AM  
Vrul
A Cobalt Mageweaver
 
Vrul's Avatar
AddOn Author - Click to view AddOns

Forum posts: 240
File comments: 261
Uploads: 27
Originally Posted by nKweo
I noticed however that spells no longer get activated on 'key down' (I use keybindings) but only on 'key up', despite having the relevant CVAR enabled. I'm not sure if this is working as intended, but I'd love 'key down' to work again. Looking forward to hearing from you.
Unfortunately the way this addon works with keybinds makes it so that pressing a keybind emulates clicking the relevant button. Changing button click behavior is beyond the scope of this addon and may not be desirable by everyone. There are addons (such as ClickDown) that will change your buttons to work on mouse down instead of mouse up which will get you the behavior you desire with this addon.
Report comment to moderator  
Reply With Quote
Unread 04-07-18, 04:34 AM  
nKweo
A Deviate Faerie Dragon
 
nKweo's Avatar

Forum posts: 13
File comments: 6
Uploads: 0
Hi Vrul, first of all, thanks for this brilliant, one-of-a-kind addon. I love it that I no longer have to write/edit a bazillion macros. Everything stays consistent now with a few button presses! The paging is very nice as well.

I noticed however that spells no longer get activated on 'key down' (I use keybindings) but only on 'key up', despite having the relevant CVAR enabled. I'm not sure if this is working as intended, but I'd love 'key down' to work again. Looking forward to hearing from you.
Report comment to moderator  
Reply With Quote
Unread 03-12-18, 01:11 PM  
ziobabbo
A Kobold Labourer

Forum posts: 0
File comments: 25
Uploads: 0
Thanks!

Originally Posted by Vrul
Originally Posted by ziobabbo
Hi, [@cursor] and [@player] seems not to work, they should allow the player to release the aoe on keyrelease without need to click on the terrain.
If this can be of some help this is the string I'm using:
Also can / commands be added to the string? such as /cleartarget[dead].
Thank you very much for your work and your attention.
Sorry, I must have missed that AoE part of your question earlier. All this addon does is temporarily change the unit attribute of a button based on the current result of the conditionals provided. It cannot perform any macro style commands. You would need to use a macro for ground targeted spells to get them to auto cast on the ground like that as I believe that behavior is handled via the code that processes macros only.
Thank you very much for your clarification, I misguessed the way this addon achieves it's intended behaviour .
Thanks for your time, I love this addon and my mouseover routine.
Report comment to moderator  
Reply With Quote
Unread 03-10-18, 08:23 PM  
Vrul
A Cobalt Mageweaver
 
Vrul's Avatar
AddOn Author - Click to view AddOns

Forum posts: 240
File comments: 261
Uploads: 27
Originally Posted by ziobabbo
Hi, [@cursor] and [@player] seems not to work, they should allow the player to release the aoe on keyrelease without need to click on the terrain.
If this can be of some help this is the string I'm using:
Also can / commands be added to the string? such as /cleartarget[dead].
Thank you very much for your work and your attention.
Sorry, I must have missed that AoE part of your question earlier. All this addon does is temporarily change the unit attribute of a button based on the current result of the conditionals provided. It cannot perform any macro style commands. You would need to use a macro for ground targeted spells to get them to auto cast on the ground like that as I believe that behavior is handled via the code that processes macros only.
Report comment to moderator  
Reply With Quote
Unread 03-10-18, 06:25 AM  
ziobabbo
A Kobold Labourer

Forum posts: 0
File comments: 25
Uploads: 0
Hi, [@cursor] and [@player] seems not to work, they should allow the player to release the aoe on keyrelease without need to click on the terrain.
If this can be of some help this is the string I'm using:
[@unitframe, harm, nodead] [@mouseover, harm, nodead] [harm, nodead] [focus, harm, nodead] [@focustarget, harm, nodead] [@pettarget, harm, nodead][@cursor]
Also can / commands be added to the string? such as /cleartarget[dead].
Thank you very much for your work and your attention.
Last edited by ziobabbo : 03-10-18 at 06:33 AM.
Report comment to moderator  
Reply With Quote
Unread 03-08-18, 09:28 PM  
Vrul
A Cobalt Mageweaver
 
Vrul's Avatar
AddOn Author - Click to view AddOns

Forum posts: 240
File comments: 261
Uploads: 27
Originally Posted by ziobabbo
Hi again, is there some documentation listing the kind of modifiers I can specify in the custom section?
Any conditions you can use in a regular WoW macro can be used in the custom section. In addition @unitframe and @unitmodel can be used in place of @mouseover to specifically only work on unit frames or 3D models as desired.
Report comment to moderator  
Reply With Quote
Unread 03-08-18, 06:35 PM  
ziobabbo
A Kobold Labourer

Forum posts: 0
File comments: 25
Uploads: 0
Hi again, is there some documentation listing the kind of modifiers I can specify in the custom section?
One thing that I'm trying to achieve in particular is to understand if it's possible to use something like [@cursor][@player] at the end for instant aoe purposes.
Thank You very much, have a great day!
Last edited by ziobabbo : 03-08-18 at 06:36 PM.
Report comment to moderator  
Reply With Quote
Unread 02-11-18, 05:10 AM  
ziobabbo
A Kobold Labourer

Forum posts: 0
File comments: 25
Uploads: 0
Re: Re: Lua Error custom text

Originally Posted by Vrul
Originally Posted by ziobabbo
I got this error while trying to use a custom string
I just uploaded a new version (1.3.3) that should fix that error.
Amazing, thank you very much!
Report comment to moderator  
Reply With Quote
Unread 02-08-18, 07:13 AM  
Vrul
A Cobalt Mageweaver
 
Vrul's Avatar
AddOn Author - Click to view AddOns

Forum posts: 240
File comments: 261
Uploads: 27
Re: Lua Error custom text

Originally Posted by ziobabbo
I got this error while trying to use a custom string
I just uploaded a new version (1.3.3) that should fix that error.
Report comment to moderator  
Reply With Quote
Unread 02-08-18, 06:22 AM  
ziobabbo
A Kobold Labourer

Forum posts: 0
File comments: 25
Uploads: 0
Lua Error custom text

I got this error while trying to use a custom string:
error:
x1 ImpliedTarget_Config\Core.lua:118: attempt to call global 'Set' (a nil value)
Stack: ImpliedTarget_Config\Core.lua:118: in function <ImpliedTarget_Config\Core.lua:107>
(tail call): ?
[C] ?
[string "safecall Dispatcher[2]"]:9: in function <[string "safecall Dispatcher[2]"]:5>
(tail call): ?
...nfig-3.0\AceConfigDialog-3.0\AceConfigDialog-3.0-65.lua:818: in function <...nfig-3.0\AceConfigDialog-3.0\AceConfigDialog-3.0.lua:639>
(tail call): ?
[C] ?
[string "safecall Dispatcher[3]"]:9: in function <[string "safecall Dispatcher[3]"]:5>
(tail call): ?
...terface\Masque\Libs\AceGUI-3.0\AceGUI-3.0-34.lua:314: in function 'Fire'
...AceGUI-3.0-34\widgets\AceGUIWidget-MultiLineEditBox.lua:61: in function <...AceGUI-3.0\widgets\AceGUIWidget-MultiLineEditBox.lua:58>
Time: 2018/02/08 11:30:39 Index: 3/3
Locals:
string:
[mod:FOCUSCAST, @focustarget, harm, nodead] [@unitframe, harm, nodead] [harm, nodead] [@mouseover, harm, nodead] [@focustarget, harm, nodead] [@pettarget, harm, nodead]
edit: tried the normal string generated by the addon and got the error anyway, hope this is useful information.
Thanks for your work!
Last edited by ziobabbo : 02-08-18 at 06:23 AM.
Report comment to moderator  
Reply With Quote
Unread 02-04-18, 06:14 AM  
ziobabbo
A Kobold Labourer

Forum posts: 0
File comments: 25
Uploads: 0
Love your work.

Tank you very much, this is the most useful addon ever written.
Report comment to moderator  
Reply With Quote
Unread 11-22-16, 08:39 AM  
mkaito
A Murloc Raider

Forum posts: 5
File comments: 2
Uploads: 0
I posted to the ElvUI issue tracker a while back, and got a compat addon from them:

http://git.tukui.org/Elv/elvui/issues/1523
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: