Remove Advertisements

Set focus / cast spell

All things /script related

Moderators: Fridmarr, Worldie, Aergis, _Chloe

Set focus / cast spell

Postby Ata » Thu Sep 03, 2009 10:19 am

Wondering if anyone knows how to make; or if there already exists, a macro to set a target as focus, and then cast a spell (Repentance, Sheep, Hex, etc), and keep it available to cast fast should it break early?
Image
Ata
 
Posts: 45
Joined: Mon Oct 20, 2008 11:49 am

Re: Set focus / cast spell

Postby kanst » Thu Sep 03, 2009 10:48 am

Ata wrote:Wondering if anyone knows how to make; or if there already exists, a macro to set a target as focus, and then cast a spell (Repentance, Sheep, Hex, etc), and keep it available to cast fast should it break early?


I am not entirely sure what you are asking for. If you want to cast sheep on a focus target you could use:

/cast [target=focus] polymorph

I think, if you want one macro to set a focus then cast sheep on that focus that wouldnt really be a repeatable macro as everytime you pressed it, it would reset your focus
Image
kanst
 
Posts: 405
Joined: Wed May 21, 2008 9:02 am

Re: Set focus / cast spell

Postby fuzzygeek » Thu Sep 03, 2009 10:54 am

Try

/cast [target=focus,harm,nodead][target=mouseover,harm,nodead][] offensive spell
/stopmacro [target=focus,harm,nodead]
/focus [target=mouseover]
Image
User avatar
fuzzygeek
Maintankadonor
 
Posts: 5130
Joined: Wed Aug 01, 2007 1:58 pm

Re: Set focus / cast spell

Postby Spectrum » Thu Sep 03, 2009 11:08 am

First off, refer to this wonderful document for all your macro-making reference: http://www.wowwiki.com/Making_a_macro

Fuzzy's macro should work pretty well, but to simplify things a little and improve the /stopmacro part.

Code: Select all
/cast [target=focus,nodead] [nodead] spell
/stopmacro [target=focus,nodead] [noexist]
/focus target


Going line by line this macro does the following:
  1. Conditionals (the stuff in brackets) are checked in order until one comes up true, if one comes up true, the action goes off. The first conditional sets the target of the spell to your focus, and checks if it isn't dead (which implies that the focus exists), if it isn't, then the spell is cast. If your focus doesn't exist or isn't alive, it will check if your current target isn't dead, if it isn't it will cast on your target. If your target and focus are dead or don't exist, nothing happens.
  2. Next, we use similar conditions to check whether we should continue to setting the focus. The first condition will cause the macro to stop if your focus isn't dead. The second condition will stop the macro if you don't have a target.
  3. Finally, now that we know from the last line that you don't have a live focus and you have something targeted (exists), we set your target to your focus.

So basically, if you target something and use this macro, it will cast on that target and set it as your focus. Further casts will go to your focus until you reset your focus such as with /clearfocus.
Spectrum
Maintankadonor
 
Posts: 1488
Joined: Thu Feb 14, 2008 4:40 pm
Location: Silvermoon, Alliance

Re: Set focus / cast spell

Postby Ata » Thu Sep 03, 2009 11:13 am

Thanks, I was never really good with writing the macro's; I'll try to remember to check that guide before posting again
Image
Ata
 
Posts: 45
Joined: Mon Oct 20, 2008 11:49 am

Re: Set focus / cast spell

Postby Aubade » Thu Sep 03, 2009 11:14 am

To make sure my macro's always worked. As a mage I'd just have a big button on it's own bar that would set/clear focus with

/focus

Realllllly complicated I know.

Then i'd set all of my spells to

/cast [mod:shift] [target=focus] Polymorph
/cast [mod:none] Polymorph

I think that last one is kinda out-dated but you get the point
Image
- Awbade Level 85 Human Paladin - <Tsunami> Frostmourne - Retired.
Deliriously wrote:I prefer the, "Lonely Hand Approach" (trademark pending)
User avatar
Aubade
Moderator
 
Posts: 4877
Joined: Sun Jan 18, 2009 12:51 am
Location: Tacoma, WA

Re: Set focus / cast spell

Postby KysenMurrin » Thu Sep 03, 2009 11:24 am

I have a macro on my mage for Polymorph, I can't remember where I got it from but it seems to do the same as the above. Only posting it now because, looking at the above examples and my own, I'm not sure why mine works. I don't quite understand the conditionals in the first line of mine (I know it also clears my focus if it's dead):

/focus [target=focus, noharm] [target=focus, dead] [modifier]
/stopmacro [target=focus, noexists]
/cast [target=focus] Polymorph

It doesn't seem to be as clearly written as the other one. I'll probably replace it.
I don't play WoW any more.
Donnan - Nangun - Kysen - Kysen - Mardun - Timkins

Mostly-Book Blog.
KysenMurrin
 
Posts: 6831
Joined: Thu Jun 26, 2008 6:37 am
Location: UK

Re: Set focus / cast spell

Postby Jerey-Darkspear » Fri Sep 04, 2009 7:23 pm

Spectrum wrote:First off, refer to this wonderful document for all your macro-making reference: http://www.wowwiki.com/Making_a_macro

Fuzzy's macro should work pretty well, but to simplify things a little and improve the /stopmacro part.

Code: Select all
/cast [target=focus,nodead] [nodead] spell
/stopmacro [target=focus,nodead] [noexist]
/focus target


Going line by line this macro does the following:
  1. Conditionals (the stuff in brackets) are checked in order until one comes up true, if one comes up true, the action goes off. The first conditional sets the target of the spell to your focus, and checks if it isn't dead (which implies that the focus exists), if it isn't, then the spell is cast. If your focus doesn't exist or isn't alive, it will check if your current target isn't dead, if it isn't it will cast on your target. If your target and focus are dead or don't exist, nothing happens.
  2. Next, we use similar conditions to check whether we should continue to setting the focus. The first condition will cause the macro to stop if your focus isn't dead. The second condition will stop the macro if you don't have a target.
  3. Finally, now that we know from the last line that you don't have a live focus and you have something targeted (exists), we set your target to your focus.

So basically, if you target something and use this macro, it will cast on that target and set it as your focus. Further casts will go to your focus until you reset your focus such as with /clearfocus.


Wouldn't this macro also set your target to focus if your focus dies? If not, could you remove the /stopmacro line and replace the /focus line with

Code: Select all
/focus [target=focus,nodead] focus; [target=focus,exist] focus; target


Or is the /focus command not eligible to receive conditionals? Don't see why it would be ineligible since every other command seems to allow them.
Image
Jerey-Darkspear
 
Posts: 183
Joined: Tue Jun 17, 2008 12:38 am

Re: Set focus / cast spell

Postby Sturmm:) » Sat Sep 05, 2009 7:51 am

download CCFocus addon it'll give you some nice macros for sheeping focus targets and other similar CC abilities.
Sturmm:)
 
Posts: 20
Joined: Mon Dec 08, 2008 8:02 am


Return to Add-ons, UI, and Macros

Who is online

Users browsing this forum: No registered users and 1 guest

cron

Remove Advertisements

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 380 on Tue Oct 14, 2008 6:28 pm

Users browsing this forum: No registered users and 1 guest
?php } else { ?