Originally Posted by
callmerobbo
Hi everyone!
I'm pretty new to coding in/with PQR so bare with me please.
I'm currently trying to write the data.lua files for a profile I'm going to make. So this isn't urgent.
I want to know if its possible to change a rotation based on HP
My scenario is this :
Unholy DK - Going to implement a modifier for Necrotic strike rotation & normal DPS rotation to switch as and when I want
However I want to automate it so if I was to go to say less than 30% HP it will switch out to a defensive rotation for me untill im over 50% HP
Is it possible or will it lag out from doing too many checks?
If it is possible how would I go about it?
Cheers
Robbo
im to tired to code out what you want, but here's how my profiles handle rotation switches
PHP Code:
-- Only takes effect when we are 90
if UnitLevel("player") == 90
and not UnitIsDeadOrGhost("player")
and Nova_CheckLastCast(6, 2) then
-- If we are in a 5 man instance
if IsInInstance() and select(2, GetInstanceInfo()) == "party" then
FirstRun = false
PQR_SwapRotation("Party (Nova [Resto])")
-- If we are in a raid of any size
elseif IsInInstance() and select(2, GetInstanceInfo()) == "raid" then
FirstRun = false
PQR_SwapRotation("Raid (Nova [Resto])")
-- If we are in a Battleground
elseif IsInInstance() and select(2, GetInstanceInfo()) == "pvp" and not IsActiveBattlefieldArena() and not IsRatedBattleground() then
FirstRun = false
PQR_SwapRotation("BG (Nova [Resto])")
-- If we are in an Arena Battle
elseif IsInInstance() and ( IsActiveBattlefieldArena() or IsRatedBattleground()) then
FirstRun = false
PQR_SwapRotation("Arena (Nova [Resto])")
end
end
you can edit that to what you need, and it should work fine