My Svn - https://subversion.assembla.com/svn/averykeys-svn/
Im not that great at coding either but i believe its something like this.
if PQR_SpellAvailable(119975) and not UnitBuffID("player",119975) then
local Myhealth = 100 * UnitHealth("player") / UnitHealthMax("player")
if Myhealth <= 80 then
CastSpellByName(GetSpellInfo(119975),"player")
end
end
Is there any way to get Pqr working for the PTR ?
Thanks alot man added a check to see if it has at least 20 runic power to cast and it works like a charm![]()
I couldn't find an example so here it goes:
How do I manage the spells that have "charges" (as the warrior Shield Block)? Is it possible do check the charges count and the "charge cooldown" (when you use a charge the spell it still available if another charge is left, but the used charge cooldown loops in the icon)?
Thanks and sorry for the poor english.
Bug: PQR_UnitDistance("player","target") returns nil
Malefic Grasp doesn't have charges, it's a simple channel spell. However Demonology has Hand Of Guldan which has max 2 charges and you can check charges and cooldown.
local HoGCD = select(3,GetSpellCharges(105174)) + select(4,GetSpellCharges(105174)) - GetTime()
Supporter of Frozen.
yea i'm wrong i told you the wrong spell. Long days little sleep, sorry for the confusion.
i meant Hand of Gul'Dan
PHP Code:
local Flame,_,_,_,_,_,FlameTimer = UnitDebuffID("target",PQ_SFlame,"player")
local GDCD = select(3,GetSpellCharges(PQ_GulDan)) + select(4,GetSpellCharges(PQ_GulDan)) - GetTime()
if TargetValidation("target",PQ_GulDan) and PQR_SpellAvailable(PQ_GulDan) and GetSpellCharges(PQ_GulDan) > 0 then
if GetSpellCharges(PQ_GulDan) < 2 then
if GDCD <= 3.5 then
SpellCancelQueuedSpell()
CastSpellByName(GetSpellInfo(PQ_GulDan),"target")
return true
end
if Flame then
if FlameTimer - GetTime() <= 4 then
SpellCancelQueuedSpell()
CastSpellByName(GetSpellInfo(PQ_GulDan),"target")
return true
end
end
end
if GetSpellCharges(PQ_GulDan) > 1 then
SpellCancelQueuedSpell()
CastSpellByName(GetSpellInfo(PQ_GulDan),"target")
return true
end
end
Last edited by crystal_tech; 05-30-2013 at 07:44 AM.
Please if someone helped you donate rep to them.
Works now.... Weird. Sorry.
Valma used to have a neat trick in his profiles where your profile or mode would pop up like a raid warning or pop up text, midscreen instead of just printing to the chat box. Is that still possible? What function would one leverage to do this?
exactly what Crystal_Tech said its just a frame with text. here is a modified version of the Nova Debug & Notification Frame found in their data file that i use for my utilities profile:
just put the following anywhere in the profile, will only be used once.
To send a message to the frame do the following:PHP Code:
if NotifyFrame_Set == nil then
NotifyFrame_Set = true
NotifyFrame = nil
function NotifyFrame_OnUpdate()
if NotifyFrameTime < GetTime() then
local alpha = NotifyFrame:GetAlpha()
if (alpha ~= 0) then NotifyFrame:SetAlpha(alpha - .000001) end
if (aplha == 0) then NotifyFrame:Hide() end
end
end
function Notify_Long(message)
NotifyFrame.text:SetText(message)
NotifyFrame:SetAlpha(1)
NotifyFrame:Show()
NotifyFrameTime = (GetTime() + 15)
end
function Notify_Short(message)
NotifyFrame.text:SetText(message)
NotifyFrame:SetAlpha(1)
NotifyFrame:Show()
NotifyFrameTime = (GetTime() + 2)
end
NotifyFrame = CreateFrame('Frame')
NotifyFrame:ClearAllPoints()
NotifyFrame:SetHeight(300)
NotifyFrame:SetWidth(650)
NotifyFrame:SetScript('OnUpdate', NotifyFrame_OnUpdate)
NotifyFrame:Hide()
NotifyFrame.text = NotifyFrame:CreateFontString(nil, 'BACKGROUND', 'PVPInfoTextFont')
NotifyFrame.text:SetAllPoints()
NotifyFrame:SetPoint('CENTER', 0, 200)
NotifyFrameTime = 0
end
Notify_Long( "Your message" ) or Notify_Short( "Your message" )
depending on the amount of time you want the message to stay on the screen.
to set it when the mode changes just find where the PQR_WriteToChat() or print() is and right next to it add the Notify long or short message and you are good to go. =D
Alpha Profiles: - All profiles with PQInterface support!
Alpha Interrupt: https://goo.gl/OLhGi - Ignore List, Random Percentage, Time Delays, & much More!
Alpha Utilities: https://goo.gl/rt7WA - Farming, Prospecting, Disenchanting, Milling, & Questing
Alpha Moonkin: https://goo.gl/gjxw0 - Optimized DPS Rotation for PvE, Mashup of 3 Profiles
Avery's Ret: https://goo.gl/GhurM - My take on Avery's outstanding Ret profile with PQI