Originally Posted by
Partykilla
Oh dear, please set urself into the class your coding

As of 5.4 you no longer need to equip anything to cast spell reflect.
This scirpt is coded with a list of targets and a list of spells to match befor it casts spell reflect,
ull need to get the other parts from it within the data file.
I know it dont need shiled for spellreflect but if remove
if UseEquipmentSet("2HSet") ~= nil
Then the rotation wont work. So I just saved 2Hset and ShieldSet with my 2hander and it works. But I dont know very much about coding. Thats why I ask where to input:
Code:
if PQR_SpellAvailable(23920) == false and PQR_SpellAvailable(114028) == true then
CastSpellByName(GetSpellInfo(114028),nil)
end
in the:
Code:
for i=1, #custTars do
if (autoSpellReflect == true
and spellReflect(custTars[i]) == true)
or reflectKey == 1
then
sRcheck = true
bgreen_Notify("Attempting to reflect "..UnitCastingInfo(custTars[i]).." from "..UnitName(custTars[i]))
end
end
if sRcheck == true
and cdRemains(23920) == 0
and UnitBuffID("player",23920) == nil
then
if UseEquipmentSet("2HSet") ~= nil
then
CastSpellByName(GetSpellInfo(23920),nil)
return true
end
end
Or do I put it into PQR_JackusPVPDATA.lua file in:
Code:
function spellReflect(unit)
if UnitCastingInfo(unit) ~= nil
and UnitIsEnemy("player", unit) ~= nil
and IsSpellInRange(GetSpellInfo(57755), unit) == 1
and select(2,GetSpellCooldown(23920)) == 0
and UnitBuffID("player",23920) == nil
then
for i=1, #reflectCC do
if UnitCastingInfo(unit) == GetSpellInfo(reflectCC[i])
then
local _, _, _, _, startTimer, endTimer = UnitCastingInfo(unit)
local timeSinceStart = (GetTime() * 1000 - startTimer) / 1000
local castTime = endTimer - startTimer
local currentPercent = timeSinceStart / castTime * 100000
if currentPercent > 45
then
return true
end
end
end
for i=1, #reflectDMG do
if UnitCastingInfo(unit) == GetSpellInfo(reflectDMG[i])
and UnitIsUnit("player",unit.."target")
then
local _, _, _, _, startTimer, endTimer = UnitCastingInfo(unit)
local timeSinceStart = (GetTime() * 1000 - startTimer) / 1000
local castTime = endTimer - startTimer
local currentPercent = timeSinceStart / castTime * 100000
if currentPercent > 90
and getHp("player") >= 95
then
return true
end
end
end
end
end