Guest User

Untitled

a guest
Feb 22nd, 2016
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.81 KB | None | 0 0
  1. if UnitAffectingCombat("player") then
  2.             local pHP = (100 * UnitHealth("target")) / UnitHealthMax("target")
  3.             local msg = UnitName("player") .. " is busy fighting against " .. UnitName("target") .. " (".. pHP .."%"
  4.             local npm = GetNumPartyMembers()
  5.             local nrm = GetNumRaidMembers()
  6.             if npm > 0 or nrm ~= 0 then
  7.                 local pma = 0
  8.                 for i=1,GetNumPartyMembers() do
  9.                     if UnitIsDeadOrGhost("party"..GetPartyMember(i)) ~= 1 then
  10.                         pma = pma + 1
  11.                     end
  12.                 end
  13.                 msg = msg .. ", " .. pma .. "/" .. npm .. " people alive)."
  14.             else
  15.                 msg = msg .. ")"
  16.             end
  17.  
  18.             SendChatMessage(msg, "WHISPER", nil, sender)
  19.         end
Advertisement
Add Comment
Please, Sign In to add comment