Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Colour and Format Messages
- local function BuildMessage(sourceGUID, sourceName, destGUID, destName )
- local playerFaction, _ = UnitFactionGroup( "player" );
- local killerString, killedString;
- local killerFaction, killedFaction
- --Build Killer Info
- killerFaction, _ = UnitFactionGroup( sourceName );
- if( killerFaction == playerFaction ) then -- Killer on our Faction
- if( playerFaction == "Horde" ) then
- killerString = format("|cffFE2E2E%s|r", sourceName ); -- Print Red
- else
- killerString = format("|cff2E9AFE%s|r", sourceName ); -- Print Blue
- end
- else -- Killer opposite Faction
- if( playerFaction == "Horde" ) then
- killerString = format("|cff2E9AFE%s|r", sourceName ); -- Print Blue
- else
- killerString = format("|cffFE2E2E%s|r", sourceName ); -- Print Red
- end
- end
- killedFaction, _ = UnitFactionGroup( destName );
- if( killedFaction == playerFaction ) then -- Killed Player on our Faction
- if( playerFaction == "Horde" ) then
- killedString = format("|cffFE2E2E%s|r", destName ); -- Print Red
- else
- killedString = format("|cff2E9AFE%s|r", destName ); -- Print Blue
- end
- else -- Killed Player opposite Faction
- if( playerFaction == "Horde" ) then
- killedString = format("|cff2E9AFE%s|r", destName ); -- Print Blue
- else
- killedString = format("|cffFE2E2E%s|r", destName ); -- Print Red
- end
- end
- return format("%s killed %s", killerString, killedString);
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement