# Forum > World of Warcraft > World of Warcraft Bots and Programs > Probably Engine >  [Guide] Writing a profile in PE for beginners.

## Nevodark

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 )



```
 {"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



```
 {"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



```
 {“ 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



```
 {"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



```
 {"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 ) 



```
 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



```
 {"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.



```
	{"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.

----------


## Nevodark

////////////////

----------


## Eryx

It's a good guide  :Smile:  Thanks for making this and sharing with us!

+rep

----------


## TheQt

Thanks for the guide, It helped me write my first few profiles and they've worked rather well!

One thing I would add to this, which was sometihng I had a lot of trouble with is mentioning that once you have a finished profile, you need to then take the .toc and .lua and put them into their own seperate addon folder in interface\addons. It took me some time to figure this out after sifting through the PE forums and in the IRC, 

Also it's worth mentioning that if you're new to writing PE profiles using the template generator, to not change the name of rotation.lua , for the reason that in the .toc it has the name rotation.lua specifically stated, now if you wanted to you can just change it yourself of course, but that was something I as a beginner didn't realize I had done mistakenly.

Otherwise though ty very much for your quick beginner guide on making PE profiles ^>^.

----------


## Nevodark

> Thanks for the guide, It helped me write my first few profiles and they've worked rather well!
> 
> One thing I would add to this, which was sometihng I had a lot of trouble with is mentioning that once you have a finished profile, you need to then take the .toc and .lua and put them into their own seperate addon folder in interface\addons. It took me some time to figure this out after sifting through the PE forums and in the IRC, 
> 
> Also it's worth mentioning that if you're new to writing PE profiles using the template generator, to not change the name of rotation.lua , for the reason that in the .toc it has the name rotation.lua specifically stated, now if you wanted to you can just change it yourself of course, but that was something I as a beginner didn't realize I had done mistakenly.
> 
> Otherwise though ty very much for your quick beginner guide on making PE profiles ^>^.


In one of the first paragraphs i do meantion to extract the .zip to your addons folder :P this should make it so it should load properly as the .toc and rotation are allready correctly named ^^

----------


## Kranjcar

Any way to create a .toc file, since the link to phelps site doesn't work anymore?

----------


## ImogenOC

Basic ToC, sorry for the delay.


```
## Interface: 50400
## Title: TitleHere
## Notes: Description
## Dependencies: Probably

rotation.lua
```

----------


## boxo

Gonna want to change the first line to:

## Interface: 60000

----------


## HolyST

Thank you very much for the post, but the PE website has won't work, function can be used to list whether you can provide PE?

----------


## ImogenOC

This guide is officially deprecated, an update will be coming soon.

----------


## Bongz

"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 very similar way



```
 {"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



```
 {“ 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 making you will ALLWAYS be 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, simple enough to remember."

--------------------------------------------------------

Okay so i am sorry if im doing this incorrectly at all but this is the first time posting to ownedcore / mmowned after finally making an account. I have been trying to get these two lines of code to work for my frost mage rotation and cant seem to get them to cast with the conditions. i have tried putting the lines above frostbolt but for some reason it just keeps skipping over the 2 spells with the conditions and goes right to frostbolt again. Here are the lines i am working with: 

{ "44614", "player.buff(44549)" }, --Frostfire Bolt
{ "30455", "player.buff(112965)" }, -- Ice Lance

I have tried putting .count == 2 and = 2 for ice lance after the player buff and number but it doesnt work as well along with FFB


Am i missing something? like calling a function of some sort? 

This is the first time coding lua for me as i used PQR in cata when no one needed to write their own profiles but now that ive taken a basic programming 1 java class I am understanding how to write this code. Ive tried googleing how to write the .lua code and it says that u can use while / for loops in the code but ive even tried that and PE doesnt seem to read it. Idk if this is because of the type of LUA unlocker i am using or what? currently i am using EWT as Offspring does not work for me and im pretty sure that it has a wrapper program / some kind of malware attatched to it as i couldnt load WoW up or even connect to any blizzard server after attatching it. Bottomline - never trust unknown russain programs. Had to reinstall my entire OS and WoW to connect again so the problem was definitly Offspring probably screwing around with my ports finding backdoors. ANYWAYS - thank you for reading my first post and i hope someone with the right knowledge can help me with these lines of code. thank you!

----------


## ImogenOC

> -holy snip batman-


You're new, thats normal. Let's investigate!



```
{ "Frostfire Bolt", { 
"player.moving",
"player.buff(Brain Freeze)" },

{ "Ice Lance", {
"player.buff(112965).count >= 2", --FoF (Fingers of Frost) Count
"player.moving",
}},

{ "Ice Lance", {
"player.moving",
"!player.buff(Brain Freeze)",
"!player.buff(Fingers of Frost)",
}},

{ "Frost Bolt" }, -- Cause Yolo?

{ "Frostfire Bolt", { 
"!player.moving",
"player.buff(Brainfreeze)",
}},
```

This should better fleshout what you wanted, feel free to ask about anything.

Valid in-line args for PE are:


```
= -- Equals
< -- Less Than
> -- Greater Than
!= -- Dosen't Equal
>= -- Greater Than or Equal To
<= -- Less Than or Equal To
```

Assuming X is our condition and Y is our integer, we can see the arguments as below.

*X = Y*


```
-- If X is the same as Y, we return true.
2 = 2
return = true
```

*X < Y*


```
-- If X is less than Y, we return true.
9 < 10
return = true
```

*X > Y*


```
If X is greater than Y, we return true.
10 > 9
return = true
```

*X != Y*


```
-- As long as X isnt Y, we return true.
9 != 10
return true
4136 != 12
return true
10 != 10
return false
```

*X >= Y*


```
-- As long as X is, or is greater than, Y, we return true.
9 >= 9
return true
44 >= 9
return true
8 >= 9
return false
```

*X <= Y*


```
-- As long as X is, or is less than, Y, we return true.
9 <= 9
return true
44 <= 9
return false
8 <= 9
return true
```


*Part 2*
While PE holds the essence of Lua, you can't use everything Lua unless you build a custom function (which we support!) and call it in your rotation.
We use DSL-Lua, which streamlines the development process. You can check out the entire source in the addon itself, look inside the probably/system/ folder!

*Part 3*
As long as your unlocked unlocks CastSpellByName() in WowAPI, PE will function at it's core level.


*Part 4*
EWT is fine; sounds like you had something else going on. Dude that does EWT is pretty cool, but yeah Russies are shady without their vodka, just as you should never trust a scott in a kilt and no beer. Won't end well.


As always, welcome to the community, and thanks for the inquisition.  :Wink:

----------


## Bongz

Hello again! Thank you for the response! I have tried the above code and replaced all the spell names with their # ID's retrospectively and even tried it with just the spell names you had and the profile still skips over frostfire bolt entirely whether or not i am standing still. The Ice lance .count >= 2 line will not cast ice lance when FoF hits 2 while not moving so i will assume that line does not run.It does not give me any errors when loading the rotation up though so the formatting must be correct. What does still run though is:

{ "Ice Lance", {
"player.moving",
"!player.buff(Brain Freeze)",
"!player.buff(Fingers of Frost)",
}},

as it will cast Ice lance while moving. But it will cast it even though it has 2 counts of FoF or Brain Freeze.

I am also wondering why there is a "player.moving" line within: 

{ "Ice Lance", {
"player.buff(112965).count >= 2", --FoF (Fingers of Frost) Count
"player.moving",
}},

as i want it to cast both ice lances whether or not the player is moving.

Both of the Frostfire Bolt lines you posted do make sense to me though and i am unsure of why it still skips over the code. I have tried placing them above the others but it still will not seem to cast them. I also fixed the missing closing bracket for the first FFB line. 

Also, i understand the arguments above but have a question. Are the Return = True just to show that it is a valid argument or am I supposed to use that under every line that i use the .count condition? 

Here is the entire file i am working with. It is a modified version of the default frost mage rotation that is included in the PE addon. - Credits to whoever originally wrote it. 
--------------------------------------------------------------------

-- SPEC ID 64
_ugly_buffs_table = {
"Arcane Brilliance",
"Frost Armor"
}
ProbablyEngine.library.register('magicBuff', {
spells = function()
for _, spell in ipairs(_ugly_buffs_table) do
if ProbablyEngine.dsl.get('buff')('player', spell) then
print(ProbablyEngine.dsl.get('buff')('player', spell))
return spell
end
end
return false
end
})



ProbablyEngine.rotation.register(64, {

--------------------
-- Start Rotation --
--------------------


{ "31687", "!pet.exists"}, -- Summon Elemental
{ "1459", "!player.buff(1459)" }, --Arcane Brilliance


-- Cooldowns

{ "12472", "modifier.cooldowns" }, -- Icy Veins

{ "45438", {
"modifier.cooldowns", 
"player.health <= 30",
}},-- Ice Block

{ "11958", {
"modifier.cooldowns", 
"player.health <= 25",
"player.spell(4543 :Cool: .cooldowns", --doesn't cast at or below 25% health (smiley got put in by forum or something supposed to show as a ) )
}},-- Cold Snap

{ "157997", "modifier.cooldowns" }, -- Ice Nova
{ "55342", "modifier.cooldowns" }, -- Mirror Image
{ "108978", "modifier.cooldowns" }, -- Alter Time
{ "12043", "modifier.cooldowns" }, -- Presence of Mind


-- Interrupts
{ "2139", "modifier.interrupts" }, -- Counterspell

-- AoE
{ "10", "modifier.control", "ground" }, -- Blizzard
{ "152087", "modifier.alt", "ground" }, -- Prysmatic Crystal

-- Survivability

{ "475", { "!modifier.last(475)", "player.dispellable(475)" }, "player" }, --Remove Curse
{ "122", "target.range <= 9" }, -- Frost Nova
{ "116011", "modifier.shift", "ground" }, -- Rune of Power
{ "11426", "player.health <= 80" }, -- Ice Barrier

-- Rotation

{ "84714", "player.buff(112965).count < 2" }, -- Frozen Orb

{ "44614", { 
"player.moving", --First FFB while moving + BF buff (skipping over)
"player.buff(44549)" }},

{ "30455", {
"player.buff(112965).count >= 2", --Ice Lance when FoF Count 2(not working)
"player.moving" --should there be a .moving condition here? Maybe both !player / player or none?
}},
--One of the above/below ice lance's are casting it while moving im not sure which though
{ "30455", {
"player.moving", 
"!player.buff(44549)", -- while i have these two buffs it will cast anyways while moving
"!player.buff(112965)" 
}},

{ "116" }, -- Frostbolt

{ "44614", { 
"!player.moving", --Second FFB while not moving with BF buff (skipping over)
"player.buff(44549)"
}}

------------------
-- End Rotation --
------------------
})

Thank you again for your two sense on the matter!

----------


## Adauchi

2 questions, I am using firehack so I am able to use smart aoe but how do i go about doing that? Second question is how can I use a trinket.

----------


## ImogenOC

> 2 questions, I am using firehack so I am able to use smart aoe but how do i go about doing that? Second question is how can I use a trinket.


#1 it's somewhere in the core, I'll find it when I get home and edit this. 
#2 "/use 13" or "/use 14"

EDIT:

As promised! Probably/system/protected/firehack.lua

This can be checked via player.firehack (if it is loaded). From there you can call it vita [targ].area(VAR).enemies


e.g. player.area(20).enemies > 10

Parenthesis is the area to check, your var past the arg checks the count.

Check out probably/system/conditions/core.lua for a full list of conditions

----------


## ImogenOC

> #1 it's somewhere in the core, I'll find it when I get home and edit this. 
> #2 "/use 13" or "/use 14"
> 
> EDIT:
> 
> As promised! Probably/system/protected/firehack.lua
> 
> This can be checked via player.firehack (if it is loaded). From there you can call it vita [targ].area(VAR).enemies
> 
> ...


Updated. Additionally, FH has a full API available on their site.

----------


## LazyRaider

Yea consdering now the pe forum link to how to actually create a PE file is gone is worthless, I really need ot figure this out as to write my own profiles

----------


## ImogenOC

> Yea consdering now the pe forum link to how to actually create a PE file is gone is worthless, I really need ot figure this out as to write my own profiles


Blame blizzard for that. :P I'm still working on a platform for us.  :Smile: 

In the meantime, a rotation is easy to make.

*File Layout*
*wow/interface/addons/Probably_YourRotation/*
/Probably_YourRotation/Probably_YourRotation.toc


```
## Interface: 50400
## Title: Rotation Title
## Notes: ProbablyEngine Custom Rotation or Whatever
## Dependencies: Probably
rotation.lua
```

/Probably_YourRotation/rotation.lua


```
ProbablyEngine.rotation.register_custom(SpecID, "YourRotationName", { 

"Incombat",

}, { 

"OutOfCombat",

},
function() -- If you add extra toggles
ProbablyEngine.toggle.create('burst', 'Interface\\Icons\\ability_warrior_decisivestrike', 'Burst Button', 'Get ****ed')
end)
```

Further dependancies are just added to the .toc

Hope that helps!

----------


## Mackdaddy2887

where do you add the healing part.

The giant function you used to put in the beginning.. blah blah @coregroupneedhealing or something

----------


## ImogenOC

> where do you add the healing part.
> 
> The giant function you used to put in the beginning.. blah blah @coregroupneedhealing or something


That function was reaallly never meant to be used; but if you really want to, you call it in the condition part of your spell call.

----------


## Adauchi

Thank you for all your help so far. This is not hindering anything but would be useful if I could get it to work. I would like to wrap a rotation with a buff or modifier so I do not have to add it in each line.

This is what it currently is:


```
{ "Final Verdict" , "player.buff(Avenging Wrath)" },  },                                                                                           
{ "Crusader Strike" , "player.buff(Avenging Wrath)" },  },
```

What I am trying to do


```
{{
{ "Final Verdict" },                                                                                      
{ "Crusader Strike" }  
}, "player.buff(Avenging Wrath)" },
```

The second one does not work, it breaks the code and does not allow the profile to be loaded.

----------


## ImogenOC

> Thank you for all your help so far. This is not hindering anything but would be useful if I could get it to work. I would like to wrap a rotation with a buff or modifier so I do not have to add it in each line.
> 
> This is what it currently is:
> 
> 
> ```
> { "Final Verdict" , "player.buff(Avenging Wrath)" },  },                                                                                           
> { "Crusader Strike" , "player.buff(Avenging Wrath)" },  },
> ```
> ...


Comma.
You missed a comma.
{ "Crusader Strike" } <----

We all do it.

----------


## Malloot

Is it possible to make a or in PE? And how do i do it?

----------


## boxo

as in an "or" ? no. basically you write the same thing twice with different conditions.

----------


## thefrobel

Just getting into PE and looking to replicate old 1button macro style raiding.
I see this guide (thread?) is deprecated. Just wondering how long until the new one is up, or should I just ask my questions here?

----------


## Lightbrand

Is there a way to "pause" PE when a target circle (AOE spell) is in target mode?

As in I don't want it to keep spamming spells and overriding my target circle when I want to heroic leap or throw ravager.

----------


## Mackdaddy2887

put heroic leap or ravager into your rotation.


{"heroic leap", "modifier.lalt", "mouseover"}

then while ingame hold lalt

----------


## Lightbrand

I can't do that because some of my binding is Alt or Shift + something and it'll trigger by accident.

----------


## Mackdaddy2887

> I can't do that because some of my binding is Alt or Shift + something and it'll trigger by accident.


what about Control?

Also you can add a pause into your CR. Dont know what you would do for jus tthe targeting thing. 

For example I have a few !SPELLNAME, which makes the spell cast immdieatly regardless of your current cast, so sometimes it would interrupt my divine hymn or tranquility, so i added a:

{ "pause", "player.buff(Divine Hymn)" }, at the very top of my routine. to pause it so it wouldnt accidently cancel.

as for your case though.. I dont see a way to pause it just for targeting circle.

now, there is a way to create custom function and make a spell queue. so that ingame you click a macro and itll jump (macro replaces the ability) I dont know how to do this though. See other people routines maybe you can figure it out.

----------


## Lightbrand

Well in PQR what I had was a "Setting" ability which does nothing, so essentially "pause" in which I put conditions for it to trigger such as when target is not attackable, when they have divine shield, when target is dead, AND lastly SpellIsTargeting()

if IsLeftAltKeyDown() 
or IsMounted()
or SpellIsTargeting()
or UnitBuffID("player",80169)
or UnitBuffID("player",87959)
or UnitChannelInfo("player") 
or UnitIsDeadOrGhost("player") 
or UnitIsDeadOrGhost("target") 
then return true end

Is that something PE is able to reproduce?

----------


## Mackdaddy2887

> Well in PQR what I had was a "Setting" ability which does nothing, so essentially "pause" in which I put conditions for it to trigger such as when target is not attackable, when they have divine shield, when target is dead, AND lastly SpellIsTargeting()
> 
> if IsLeftAltKeyDown() 
> or IsMounted()
> or SpellIsTargeting()
> or UnitBuffID("player",80169)
> or UnitBuffID("player",87959)
> or UnitChannelInfo("player") 
> or UnitIsDeadOrGhost("player") 
> ...


Yes.

It would look like:
{"Pause", "modifier.lalt" } 
{"Pause", "player.buff(80169)" } 
{"Pause", "player.buff(87959)" }
{"Pause", "player.dead" }
{"Pause", "target.dead" }

Not sure about mounted or spells targeting. Although player dead and mounted it's redundant because pe only runs if your dismounted and alive

----------


## automationarmy

thanks for this post  :Smile:  +rep

----------


## leonel916

http://pe.phelps.io/forums/create_addon.php

link is broken  :Frown:

----------


## zeldaboch

> http://pe.phelps.io/forums/create_addon.php
> 
> link is broken


have you looked in the forum???

----------


## ImogenOC

> http://pe.phelps.io/forums/create_addon.php
> 
> link is broken





> have you looked in the forum???


Theres a guide to making your own profile around here somewhere.

----------


## divio

What am I doing wrong with this range?

{ "Dragon Roar", "target.range <= 8", "modifier.cooldowns" },

That works fine without the target range , but when I put it in there it is never used. What am I doing wrong?

----------


## StinkyTwitch

Might try nesting the conditionals, see if that works.


```
{ "Dragon Roar", { "target.range <= 8", "modifier.cooldowns", }, },
```

----------


## divio

> Might try nesting the conditionals, see if that works.
> 
> 
> ```
> { "Dragon Roar", { "target.range <= 8", "modifier.cooldowns", }, },
> ```


Thanks, figured this out last night. Ended up using:

{ "Dragon Roar", { "!player.buff(Shield Charge)", "player.buff(Bloodbath)", "target.range <= 6", "modifier.cooldowns" } },

On another note. Is there a list of available hotkeys to use with "modifier.?"

----------


## StinkyTwitch

in PE you can use the following:


```
modifier.lshift
modifier.lcontrol
modifier.lalt
modifier.rshift
modifier.rcontrol
modifier.ralt
```

As well as globals that would capture left or right (mainly implemented for mac users):


```
modifier.shift
modifier.control
modifier.alt
```

----------


## Shark5060

is it possible to use an "OR" statement?

I would like to use a spell if
-> potion is ticking OR (potion is on CD + (Legendary ring Proc OR trinket proc))

or should I split this up into several spellcasts with the according conditions?

also how do I check for item cooldowns and how does the "ttd" condition work?

is this code correct (assuming there is no OR statement, since I haven't seen one being used in any CR I've looked at)



```
{ "Stampede", {
		"player.spell(Stampede).exists",
		"player.buff(Draenic Agility Potion)",
		"modifier.cooldowns",
	},
}, -- Stampede if Potion is up
{ "Stampede", {
		"player.spell(Stampede).exists",
		"#109217.cooldown > 0"
		"player.buff(Archmage's Greater Incandescence)"
		"modifier.cooldowns",
	}
}, -- Stampede if Potion is on CD, but Legendary Ring Proc
{ "Stampede", {
		"player.spell(Stampede).exists",
		"#109217.cooldown > 0"
		"player.buff(Lub-Dub)"
		"modifier.cooldowns",
	}
}, -- Stampede if Potion is on CD, but On-Use Trinket is up
{ "Stampede", {
		"player.spell(Stampede).exists",
		"ttd <=25",
		"modifier.cooldowns",
	}
}, -- Stampede if Target dies in 25 sec
```

----------


## StinkyTwitch

> is it possible to use an "OR" statement?
> 
> I would like to use a spell if
> -> potion is ticking OR (potion is on CD + (Legendary ring Proc OR trinket proc))
> 
> or should I split this up into several spellcasts with the according conditions?
> 
> also how do I check for item cooldowns and how does the "ttd" condition work?
> 
> ...


Split it up into a couple of lines with the same spellcast, just with the different conditionals.

----------


## Shark5060

Awesome. That worked like a charm.

One question tho - does "#109217.cooldown > 0" (to check for Agi Potion cooldown) work, or is that a different syntax?

----------


## ImogenOC

> Awesome. That worked like a charm.
> 
> One question tho - does "#109217.cooldown > 0" (to check for Agi Potion cooldown) work, or is that a different syntax?


Wouldn't work, improper target syntax.

Or it shouldn't, at least. IF it does thats pretty cool.

You would want to use a direct api poll, I can't remember how our item CD check works.

----------


## StinkyTwitch

What we need is an item.cooldown register.

----------


## ImogenOC

Chances are it would be very resource intensive unless we did a once per second check.

----------

