Originally Posted by
kevink88
I'am trying to add Charge to my rotation but I don't know the code wich needs to come on the second line it should be like
if PQR_SpellAvailable(5308 )
and target is 10 yards away << how do I write that
and ... then
return true
Thanks in advance,
Kevin
function RangeCheck(spellid, t)
if IsSpellInRange(GetSpellInfo(spellid), t) == 1 then
return true
end
return false
end
RangeCheck(charge id, "target")
IsSpellInRange(chargeid, "target") == 1 -- 0 = false 1 = true
local chargeid = GetSpellInfo(####)
example
IsSpellInRange(chargeid, "target") == 0 then
cast other closer spell
there is a way to get getspellinfo inside the range check, something like this, I don't know how though.
IsSpellInRange(GetSpellInfo(####), "target")) == 0
if PQR_UnitDistance > 8 and PQR_UnitDistance < 25 then
in firepong, might be what you need
edit:
code I found in other profiles
firepong
Code:
local hasTarget = UnitExists("Target")
local Enemy = UnitCanAttack("Player","Target")
local chKnown = IsSpellKnown(100)
local isDead = UnitIsDead("Target")
if hasTarget and not isDead and Enemy and chKnown then
local PQR_UnitDistance = PQR_UnitDistance("Target", "Player")
if PQR_UnitDistance > 8 and PQR_UnitDistance < 25 then
CastShapeshiftForm(1)
return true
end
end
dont know, profile is named leveling
Code:
if IsLeftShiftKeyDown()
and select(2, GetSpellCooldown(100)) == 0
and IsSpellInRange(GetSpellInfo(100), "target") == 1
and not PQR_IsOutOfSight("target")
and UnitExists("target")
and UnitCanAttack("player", "target") then
return true
end
bubba
Code:
if PQR_SpellAvailable(100)
and Nova_Pause(3)
and UnitExists("mouseover")
and IsSpellInRange(GetSpellInfo(100), "mouseover") == 1
and UnitCanAttack("player", "mouseover") then
PQR_CustomTarget = "mouseover"
return true
end