This is going to be a guide for the very beginner. If you already know a bit about profiles this might not help. Also thanks to Phelps / CodeMyLife / Pheartehcute1
First off your going to need a text editor of some sort such as Notepad++ or Sublime Text. I suggest using Sublime Text as it’s free and looks sexy and is just fantastic in general. It can be downloaded here Sublime Text: The text editor you'll fall in love with Or if your on Mac Bare Bones Software | TextWrangler (thanks eryxon)
Once you’ve got that you’re going to want to go to http://pe.phelps.io/forums/create_addon.php and choose a class name and spec for your rotation. Download the file and extract it to your addons folder in wow.
Now that’s sorted open the folder you just downloaded and extracted and open the rotation .lua file. It should look something like this If not you did something incredibly wrong and I don’t know how try again.
I’m going to be doing a frost mage rotation as an example and so the first thing I’m going to tell it to do is cast FrostBolt whenever the player is standing still and not doing anything else. So we will need the SpellID of FrostBolt (116) and put it along with a condition into the rotation, something like this. (You can check different ways to put a condition into a rotation with this guide Rotation Formatting Guidelines (Page 1) / Guides / ProbablyEngine )
Code:
{"116", "!player.moving"},
The spell you want to cast always goes first after opening the brackets and the conditions you want it cast under always come afterwards. In PE the exclamation mark (!) reverses a condition or means Not so !player.moving means cast when the player is NOT moving.
There are a metric ****ton of conditions that can be used. Player.XXX can be swapped out with many other things such as Target, Focus, Tank, Arena1/2/3, etc. Basically anything targetable in some way, whilst the XXX.Moving can be replaced with a huge amount of things too such as Buff, Debuff, Health, Spell, Exists etc.
Next thing I want it to do is cast Icelance whenever I am moving so again, I find the spell ID for Icelance and put it into the rotation in a similar way
Code:
{"30455", "player.moving"},
It’s important to use SpellID rather than spell names whilst making a rotation so that people from other country’s using the non-English client can use your rotation. It can be a good idea to label what each section of your code does so you don’t get lost later using - - to mark something as a comment.
So now I want to cast FrostfireBolt whenever I gain the Brainfreeze proc . To do this you need both the ID of FFB and Brainfreeze which are 44614 and 44549 respectively. The code segment to make it cast on the proc of a buff is
Code:
{“ 44614”, “player.buff(44549)” },
This tells it to only cast FFB when the player has the buff 44549, It is possible to add things after “player.buff(44549) Such as .Duration, .Count etc, for example if I wanted it to only cast FFB in the last second of the buff (which I don’t suggest btw) I would make the condition “player.buff(44549).duration <= 1” This condition will only be true during the last second of the buff.
When you place that line into your code you are going to want to make sure that it is placed ABOVE the parts for your Frostbolt / Icelance, this is because PE runs though the rotation very quickly from the top to bottom and casts the first thing that has conditions all return true. As a result if you place high priority things below lower priority things the low priority will end up being cast first, and sometimes the higher priority will never be cast if the conditions are simple enough on others.
For example in the rotation we are always checking if you are either moving or not moving. As a result if you placed everything below what we had already written it would never cast anything but Icelance / Frostbolt, as its only condition to fulfil is if you are moving or not, so higher priority gets placed higher in the rotation,
For things like defensive cooldowns or utility you might want the rotation to cast some of them for you, like iceblock. Again get the ID of the spell you want to cast (45438) for casting iceblock I don’t want it to just randomly be cast on cooldown or in the middle of my rotation only when I’m in danger of death, so probably at sub 20% health. To make it cast whenever I go below 20% health is very simple
Code:
{"45438", "player.health <= 20"},
Again I place this at the top of the rotation to ensure it is cast first when the conditions are met, If you want to add cooldowns or interrupts to your profile you will probably want to add a modifier to the conditions like
Code:
{"2139", "modifier.interrupts"},
The modifiers such as modifier.interrupts, modifier.cooldowns, modifier.multitarget make it so that the spell it is attached to will only be cast when the relevant toggle button on PE is turned on. There are also button modifiers such as modifier.lalt, modifier.lshift etc, for these modifies you can only use left/right alt shift and ctrl they will as you can probably guess only cast the spell when the corresponding button is pressed.
If you want to add your own toggle for something specific such as blinking whenever the enemy is within melee range you will need to add a bit of code at the end of the rotation between the last }, and )
Code:
function()
ProbablyEngine.toggle.create(‘blink’, ‘Interface\\Icons\\spell_arcane_blink’, ‘BlinkInMelee’, ‘Enable blinking in melee range’)
Within the ( ) the first “blink” is the name of your new toggle that you will call in the cast condition and is not seen by the user. The Interface\\Icons\\spell_arcane_blink is the name of the icon you wish to use for the toggle in game, To find the name of the icon you want to use find the icon of the ability on wowhead
And click on the actual icon near the tooltip of the spell
A popup will appear telling you the name of the spell, now just put Interface\\Icons\\Name you copy pasted here, as this is the location and name of the icon on your computer (or something). The “BlinkInMelee” is the name of the toggle which will be seen by the user when hovering over the toggle and “enable blinking in melee range” is the description of the toggle which will also appear.
Now to actually make it blink whilst in melee range you simply grab the ID of blink and make a line saying
Code:
{"1953", {
"target.range <= 4",
"toggle.blink"
}},
This checks if you have the custom toggle enabled and if the target you have selected is within 4 yards. Notice that now there is more than 1 condition there needs to be another set of wiggly brackets {} around the conditions themselves.
Here are also a few examples of some more complex sets of conditions to give you an idea of stuff you can do.
Code:
{"1856", { --Vanish
"toggle.vanish",
"!player.buff(1784)", --Stealth buff
"!player.energy >= 100",
"!player.spell(79140).cooldown <= 30",
"target.range <= 5",
"!player.buff(121152)", --Blindside
"!modifier.multitarget"
}},
{{
{"Shadow dance", "target.debuff(Garrote).duration >= 8.5"},
{"Shadow dance", "target.debuff(Hemorrhage).duration >= 8.5"},
{"Shadow dance", "target.debuff(Rupture).duration >= 8.5"}
},{
"modifier.cooldowns",
"player.energy >= 70",
"target.range <= 5",
"!player.buff(Stealth)",
"!player.buff(Vanish)",
"target.debuff(Find weakness).duration <= 3",
}},
And that just about wraps it up.