The setting for that is in the chat settings, I believe. As for the GUID thing, here's a proof of concept that should work reasonably well:
Code:
local updateInterval = 1
local guids = {
["0xF530007EAC083004"] = true
}
local IsInRaid, GetNumGroupMembers, UnitGUID, UnitExists, SetRaidTarget =
IsInRaid, GetNumGroupMembers, UnitGUID, UnitExists, SetRaidTarget
local currentIndex = 1
local updateFrame = CreateFrame("Frame")
updateFrame:Hide()
updateFrame:SetScript("OnEvent",function(self)
if IsInRaid() then
if not self:IsShown() then
self.elapsed = updateInterval
self:Show()
else
self:Hide()
end
end)
updateFrame:RegsiterEvent("GROUP_ROSTER_UPDATE")
updateFrame.elapsed = 0
updateFrame:SetScript("OnUpdate",function(self,elapsed)
self.elapsed = self.elapsed+elapsed
if self.elapsed >= updateInterval then
while self.elapsed >= updateInterval do
self.elapsed = self.elapsed-updateInterval
end
for i=1,GetNumGroupMembers() do
local tarID = ("raid%dtarget"):format(i)
if UnitExists(tarID) then
local tarGUID = UnitGUID(tarID)
if guids[tarGUID] then
guids[tarGUID] = false
SetRaidTarget(tarID,currentIndex)
currentIndex = (currentIndex%8)+1
end
end
end
end
end)
Should set the next raid target that hasn't been used by the addon yet (wrapping around after 8 (skull)) when the GUID is first encountered.
I'm not quite sure what you'd want to do with specific GUIDs though, as these are unique every time a mob is spawned. If you want NPC IDs, these can be extracted from the GUID (see this for details).