could check for the debuff that the hammer gives, look something like this:
PHP Code:
if not select(7, UnitDebuffID(id,"target")) then --get the remaining time of the hammer debuff
if PQR_SpellAvailable(id) then --id of hammer
CastSpellByName(GetSpellInfo(id)) --id of hammer
return true
end
elseif select(7, UnitDebuffID(id, "target") - GetTime() <= 2 then --refresh debuff
if PQR_SpellAvailable(id) then --id of hammer
CastSpellByName(GetSpellInfo(id)) --id of hammer
return true
end
else
if PQR_SpellAvailable(id) then --id of strike
CastSpellByName(GetSpellInfo(id)) --id of strike
return true
end
end
you could/should add in melee checks combat checks, etc
hope this helps ya, you don't have to have it as one ability and you can break it up just remove the elseif and use ifs and make sure to add the end statements.