Reply
Thread Tools Display Modes
Unread 11-25-12, 06:19 AM   #1
gr0by
A Deviate Faerie Dragon
Join Date: Oct 2008
Posts: 18
Modifier target argument

I have a Macro like this

Code:
#showtooltip
/cast [nomodifier] Charge
/cast [nomodifier] Victoryrush
/cast [mod:alt] Intervene
/targetfriend
/targetlastenemy
and it work, but sometime ist stuck an stop working for me.
i need to clean up, optimize this und i need help.

1. Charge the target
2. use victoryrush it is ready

3. alt modifier's cast intervene a friendly target and target the last target.

i think the problem is i dont know how i use targetfriend and targetlastenemy with modifier's like

/[mod:alt] targetfriend
/[mod:alt] targetlastenemy
thank you for your help

Last edited by gr0by : 11-25-12 at 01:56 PM.
gr0by is offline   Reply With Quote
Unread 11-25-12, 02:57 PM   #2
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,195
You put the conditional after the command in those cases afaic.

/targetlastenemy [mod:alt]

as an example.
Dridzt is offline   Reply With Quote
Unread 11-25-12, 10:32 PM   #3
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 4,745
Dridzt is correct.

Another option would be to use the /stopmacro command before all of the [mod:alt]-only lines:

Code:
#showtooltip
/cast [nomod] Charge
/cast [nomod] Victory Rush
/stopmacro [nomod:alt]
/cast Intervene
/targetfriend
/targetlastenemy
You may also consider using a second modifier for Charge:

Code:
#showtooltip
/cast [mod:shift] Charge
/cast [nomod] Victory Rush
/stopmacro [nomod:alt]
/cast Intervene
/targetfriend
/targetlastenemy
or having the macro always show Victory Rush (by putting that first) so you can easily monitor its availability:

Code:
#showtooltip
/cast [nomod] Victory Rush
/cast [nomod] Charge
/stopmacro [nomod:alt]
/cast Intervene
/targetfriend
/targetlastenemy
__________________
Author/maintainer of Grid, PhanxChat, ShieldsUp, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
Phanx is offline   Reply With Quote
Unread 11-26-12, 11:39 AM   #4
gr0by
A Deviate Faerie Dragon
Join Date: Oct 2008
Posts: 18
sorry but it dont work i dont know why.

orginal code german spellname
Code:
#showtooltip
/cast [nomodifier] Sturmangriff
/cast [nomodifier] Siegesrausch
/cast [mod:alt] Einschreiten
/targetfriend [mod:alt]
/targetlastenemy [mod:alt]
and
Code:
/stopmacro [nomod:alt]
also dont work for me

he dont intervene the next friendly target. i have intervene on mousecursor
gr0by is offline   Reply With Quote
Unread 11-26-12, 12:17 PM   #5
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,195
You seem to have the commands reversed.
First try to intervene then target a friend.
This would only work if your target is friendly to begin with.

You probably meant something like this?
Code:
#showtooltip
/cast [nomod] Sturmangriff
/cast [nomod] Siegesrausch
/targetfriend [mod:alt,harm]
/cast [mod:alt] Einschreiten
/targetlastenemy [mod:alt,noharm]
The harm/noharm parameters I added so it would only switch to friendly target if it didn't have one already,
conversely it will only target last enemy if you had a friendly target (after intervene)
Dridzt is offline   Reply With Quote
Unread 11-26-12, 12:42 PM   #6
gr0by
A Deviate Faerie Dragon
Join Date: Oct 2008
Posts: 18
thank's! it work
1. question:
is it possible targetfriend replace with targetpartyenemy if it exist?
big thanks
gr0by is offline   Reply With Quote
Unread 11-26-12, 01:00 PM   #7
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,195
There is no generic partyenemy.

Your options with targeting are restricted to
/targetfriend (will target any friendly unit including npc/pets/totems/banners etc)
/targetfriendplayer (will only target friendly player units)
/targetparty (will target closest party member)
/targetraid (will target closest raid member)

You can probably add qualifiers to any of those to modify their behavior.

There's more flexibility by adding parameters to the /cast command itself.
Example:
/cast [@targettarget,exists,help,nodead,noplayer][@target,exists,help,nodead][@party1,exists,nodead]Einschreiten

This will try to cast Einschreiten on the first matching target evaluating from left to right:
The target's target if it's friendly and alive and is not the player themselves, (ie if you have an enemy targeted but it's targeting a frienly it will intervene the friendly)
or at the target if it's friendly and alive
or at the first party member if it exists.
Dridzt is offline   Reply With Quote
Reply

Go BackWoWInterface » AddOns, Compilations, Macros » Macro Help » Modifier target argument

Thread Tools
Display Modes

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