Originally Posted by
popeofdope
I am trying to update the demo warlock profile but I have never written a line of code in my life so it's a challenge.
Here you go, Pope. Kudos for trying to write your own rotation. GetSpellCooldown gave me headaches in the beginning as well, but also taught me how to throw out unneeded returns.
Code:
local target = UnitExists("target")
local DSstart, DSduration, enabled1 = GetSpellCooldown(77801)
local Metastart, Metaduration, enabled2 = GetSpellCooldown(47241)
if target ~= nil and ((DSstart + DSduration) - GetTime()) < 10 and ((Metastart + Metaduration) - GetTime()) < 10 then
return true
end
Assuming my sleep-addled brain didn't mess up the SpellIDs (WoWhead can be annoying sometimes) this should cast 'Summon Felguard' whenever the cooldowns on 'Demon Soul' and 'Metamorphosis' are less than 10 seconds. I don't have a Warlock, so I can't test it and have no idea what the playstyle is like, but this will also summon a Felguard at the beginning of a fight (given that both spells will be off cooldown). I'm sure we can improve the ability, but this should be a good place to start.
Let me know if it doesn't work 
EDIT: I assume you know this, but you'll need to tell PQR to cast SpellID 30146