Originally Posted by
WWF
it is a simple code for Jin'rokh berserker Hard Mode
Code:
-- Ionization
if UnitDebuffID("player", 138733) ~= nil and UnitDebuffID("player", 138002) == nil and not isMoving then
if PQR_SpellAvailable(122783) and IsSpellKnown(122783) then
CastSpellByName(GetSpellInfo(122783), "player")
end
end
how could i check "no raid members within 4 yards from me"?
Code:
function RangeCheck()
if IsInRaid() then
group = "raid"
elseif IsInGroup() then
group = "party"
end
for i = 1, GetNumGroupMembers() do
if PQR_UnitDistance("player", group..i) < 4 then
return true
else
return false
end
end
end
if ( UnitDebuffID("player", 138733) ~= nil and UnitDebuffID("player", 138002) == nil ) and RangeCheck() == true and not isMoving then
if PQR_SpellAvailable(122783) and IsSpellKnown(122783) then
CastSpellByName(GetSpellInfo(122783), "player")
end
end
if you wanna test it do:
if RangeCheck() == true then
print("ERH-MAH-GERD, SOMEONE NEXT TO ME")
end