[Warlock Macro]

Chiusa ad ulteriori risposte.
1. Announs Banish (Banishes a target and says what target so everyone around you see)

/cast Banish(rank 2)
/s Banishing %T - Don't bother attacking him


2. Announs Teleport (Says you are teleporting someon here and who)

/cast Ritual of Summoning()
/s Summoning %T - 2 ppl in group/raid please right click the portal and don't move.


3. Announs Charm (Charms a target if you have succabus out that is and tells everybody not to break it)

/script CastPetAction(6)
/s Charming %T - Don't touch it!


4. Remove Debuff on yourself (needs Felhunter out)

/target Ferrat
/script CastPetAction(4)
/script TargetLastEnemy();

Replace Ferrat with you own name

5. Cast different Curse depending on target class

/script c = UnitClass("target"); if ( ( c == "Rogue" ) ) then CastSpell(38,2); elseif ( ( c == "Mage" ) or ( c == "Priest" ) or ( c == "Warlock" ) or ( c == "Paladin" ) ) then CastSpell(32,2) else CastSpell(23,2);end

(If the target is a Rogue then you cast CoW, if a mage, warlock,, priest or paladin then cast CoT
(paladin due to the fact that in some instances casters are classed as paladins even if they are called warlock and stuff, blizzard whats that all about?)
And every other class you cast CoA.

WARNING!! This Macro you might need to modify due to the fact that it is fixed for my spell book, Ill explain what everything means and how you can do it yourself if you look below and make sure this macro is just one line.

Okey, a dive in to the world of Macros then.

That last script looks hard for some but it really aint, you just need to understand it so lets break it down.

First part " c = UnitClass("target") "
UnitClass("target") is a build in call in wow that tells the UnitClass of a mob or a player and in this case "target" being that it reads your selected target *doh*
the " c = " is just so you dont have to type in "UnitClass("target")" every time, you just put in c instead and wow see it as the same in this scrpit.

the " if " funktion is pretty simple just and if this then do that funktion, pretty basic.

You pack the ifs with in two ( ), you do this with most functions, its just like math ( ) is counted inside first then used.

so in the
" (( c == "Mage" ) or ( c == "Priest" ) or ( c == "Warlock" ) or ( c == "Paladin" ) ) "
The first layer [ they are the bold ( ) ] packs all the checks in on then each check has its own packing, in this case checking if the c is equal to the class in the " "

Here is the part you need to change prolly

then CastSpell(32,2)

CastSpell is a funktion build in to WoW that casts a spell but what are those numbers and what do they do? They point to the spell, that you prolly can guess but it looks weird, how can you know which spell it is?

There are a few funktions in wow that cast spells, for shorter macros that dont come close to 255 chars that are the limit, then CastSpellByName("name") or /cast "name" (if you dont need to use /script in the macro) is the easiest to use replacing "name" with the full spell name and rank like this CastSpellByName(Banish(rank 2)).
If your spell doesn't have a rank you just leave rank out like this CastSpellByName(Portal of Summoning()) - Leaving the () without anything inside.

But for longer macros like the one I've done if you use that it will easy "eat up" all the chars.

So how does CastSpell work?
Its just the same except you don't use the spell name but you tell the macro what place in your spellbook the spell is at.

If you open your spell book you as a Warlock have 4 tabbs in it, 1 is General, 2 Affliction, 3 Demonology, 4 Destruction.

as you can se in the macro CastSpell is used with a (), inside you have x,y..
Like this CastSpell(X,Y) then Y is the number of the tab in your spellbook, as you can see, I use curses in my macro, they are Affliction there for the Y is a 2 in this macro.

The X then is the button spot for the spell, you start counting at the first General page (most just have one there), you count left side top to bottom then right side top to bottom then turn page.

Every Page has 12 button spots, BUT you dont count buttons that aren't there!
In my case I have 11 button on General, so then I tab to Affliction and start counting and start at 12 on the first spell there, all Warlocks have Corruption Rank 1 there I think, so that for me is 12.
Then you just keep counting until you hit the spell you want to add.

So if I wanted the macro to cast a rank 1 Corruption then it would say CastSpell(12,2)

As I said before, I have 11 buttons in General so I start on 12 on my second tab, and put in the tab number so WoW understands that button number 12 is on the second tab.

--->> NOTE: The " ; " marks end each funktion in the macro like if and else and so on and the " ;end " ends the macro and removes stuff like c = UnitClass("target"); so that WoW doesn't flipout when you hit c and so on

Well this was just a small guide and some good macros that I use, if you have any input on it I would be more than happy to hear it, good and bad, If I get good response on this I might take the time to write a real guide to it and if you have any good macros that you are useing or guides that can help people then please share them here =)

A good site for some macro info is http://www.wowwiki.com/
Chiusa ad ulteriori risposte.