Advertisement
EmuDevs

EmuDevs: Kill creature for PvP Titles

Nov 2nd, 2013
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.40 KB | None | 0 0
  1. local T =
  2. {
  3.     {1, 1, 0}, -- titl/kills/team - 0 = ALLY, 1 = HORDE (TEAM)
  4.     {15, 1, 1},
  5. }
  6.  
  7. function OnDied(event, killer, killed)
  8.     for k,_ in ipairs(T) do
  9.         if not killer:HasTitle(T[k][1]) then
  10.             if (killer:GetTeam() == T[k][3]) then
  11.                 killer:SetKnownTitle(T[k][1])
  12.             end
  13.         end
  14.     end
  15.     killer:SetLifetimeKills(killer:GetLifetimeKills() + 1)
  16. end
  17.  
  18. RegisterServerHook(7, OnDied)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement