Some rework for your Beacon code.
It casts beacon on your mouseover for first time,then it saves target name and party/raid index and autorecasts beacon on saved target.It even checks if in some case target was swapped with someone in raid or not in raid(by name) and if it was some kind of swap it finds target and resaves index.
CastAndForget Beacon code:
Code:
<Ability><Name>Beacon (Right Alt)</Name><Default>false</Default><SpellID>53563</SpellID><Actions></Actions>
<Lua>
local hasMouseover = UnitExists(&quot;mouseover&quot;)
local mouseoverFriend = UnitIsFriend(&quot;player&quot;, &quot;mouseover&quot;)
local group = &quot;party&quot;
local members = GetNumPartyMembers()
if GetNumRaidMembers() &gt; 0 then group = &quot;raid&quot; members = GetNumRaidMembers() end
if IsRightAltKeyDown() and GetCurrentKeyBoardFocus() == nil then
if hasMouseover and mouseoverFriend then
local name = UnitName("mouseover")
for i = 1, members, 1 do
local member = group..tostring(i)
if name == UnitName(member) then
PQ_BeaconTarget = member
PQ_BeaconTargetName = name
PQR_CustomTarget = PQ_BeaconTarget
return true
end
end
end
end
if PQ_BeaconTarget then
local Beacon = UnitBuffID(PQ_BeaconTarget, 53563)
local BeaconExpire = select(7,UnitBuffID(PQ_BeaconTarget, 53563)) - GetTime()
if UnitName(PQ_BeaconTarget) == PQ_BeaconTargetName then
if Beacon then
if BeaconExpire &lt; 10 then
PQR_CustomTarget = PQ_BeaconTarget
return true
end
else
PQR_CustomTarget = PQ_BeaconTarget
return true
end
else
for i = 1, members, 1 do
local member = group..tostring(i)
if PQ_BeaconTargetName == UnitName(member) then
PQ_BeaconTarget = member
PQR_CustomTarget = PQ_BeaconTarget
return true
end
end
end
end
</Lua>
<RecastDelay>500</RecastDelay><Target>Custom</Target><CancelChannel>False</CancelChannel><LuaBefore></LuaBefore><LuaAfter></LuaAfter></Ability>
Untested,coz I'm coding from work and u know,I can't play WoW from work QQ