Advertisement
EmuDevs

PvP Rank System For Trinity Eluna

Dec 9th, 2013
503
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.97 KB | None | 0 0
  1. -----------------------------------------------------------------------------
  2. --[[
  3. This script was made by Meiya Stormsinger    
  4. This script may be edited and changed at will, but credits must be provided.
  5. Thank you.
  6.  
  7. Converted to Eluna by Dodi
  8. ]]--                                            
  9. -----------------------------------------------------------------------------
  10.  
  11.  
  12. -------------------------------------------------------------
  13. -- Change # to the amount of kills required for each rank. --
  14. -------------------------------------------------------------
  15. local Rank1 = #
  16. local Rank2 = #
  17. local Rank3 = #
  18. local Rank4 = #
  19. local Rank5 = #
  20. local Rank6 = #
  21. local Rank7 = #
  22. local Rank8 = #
  23. local Rank9 = #
  24. local Rank10 = #
  25. local Rank11 = #
  26. local Rank12 = #
  27. local Rank13 = #
  28. local Rank14 = #
  29. -----------------------------------------------------------------------------------------
  30. -- Don't edit anything beyond this point. Unless you know what you're doing of course. --
  31. -----------------------------------------------------------------------------------------
  32. local Private = 1
  33. local Corporal = 2
  34. local Sergeant = 3
  35. local Master_Sergeant = 4
  36. local Sergeant_Major = 5
  37. local Knight = 6
  38. local Knight_Lieutenant = 7
  39. local Knight_Captain = 8
  40. local Knight_Champion = 9
  41. local Lieutenant_Commander = 10
  42. local Commander = 11
  43. local Marshal = 12
  44. local Field_Marshal = 13
  45. local Grand_Marshal = 14
  46.  
  47. local Scout = 15
  48. local Grunt = 16
  49. local Sergeant = 17
  50. local Senior_Sergeant = 18
  51. local First_Sergeant = 19
  52. local Stone_Guard = 20
  53. local Blood_Guard = 21
  54. local Legionnaire  = 22
  55. local Centurion = 23
  56. local Champion = 24
  57. local Lieutenant_General = 25
  58. local General = 26
  59. local Warlord = 27
  60. local High_Warlord = 28
  61.  
  62. function HKCheck_Proc(event, player, victim)
  63.     if (player:GetLifetimeKills() == Rank1) and (player:GetTeam() == 0) then
  64.         player:SetKnownTitle(Private)
  65.     elseif (player:GetLifetimeKills() == Rank2) and (player:GetTeam() == 0) then
  66.         player:SetKnownTitle(Corporal)
  67.         player:UnsetKnownTitle(Private)
  68.     elseif (player:GetLifetimeKills() == Rank3) and (player:GetTeam() == 0) then
  69.         player:SetKnownTitle(Sergeant)
  70.         player:UnsetKnownTitle(Corporal)
  71.     elseif (player:GetLifetimeKills() == Rank4) and (player:GetTeam() == 0) then
  72.         player:SetKnownTitle(Master_Sergeant)
  73.         player:UnsetKnownTitle(Sergeant)
  74.     elseif (player:GetLifetimeKills() == Rank5) and (player:GetTeam() == 0) then
  75.         player:SetKnownTitle(Sergeant_Major)
  76.         player:UnsetKnownTitle(Master_Sergeant)
  77.     elseif (player:GetLifetimeKills() == Rank6) and (player:GetTeam() == 0) then
  78.         player:SetKnownTitle(Knight)
  79.         player:UnsetKnownTitle(Sergeant_Major)
  80.     elseif (player:GetLifetimeKills() == Rank7) and (player:GetTeam() == 0) then
  81.         player:SetKnownTitle(Knight_Lieutenant)
  82.         player:UnsetKnownTitle(Knight)
  83.     elseif (player:GetLifetimeKills() == Rank8) and (player:GetTeam() == 0) then
  84.         player:SetKnownTitle(Knight_Captain)
  85.         player:UnsetKnownTitle(Knight_Lieutenant)
  86.     elseif (player:GetLifetimeKills() == Rank9) and (player:GetTeam() == 0) then
  87.         player:SetKnownTitle(Knight_Champion)
  88.         player:UnsetKnownTitle(Knight_Captain)
  89.     elseif (player:GetLifetimeKills() == Rank10) and (player:GetTeam() == 0) then
  90.         player:SetKnownTitle(Lieutenant_Commander)
  91.         player:UnsetKnownTitle(Knight_Champion)
  92.     elseif (player:GetLifetimeKills() == Rank11) and (player:GetTeam() == 0) then
  93.         player:SetKnownTitle(Commander)
  94.         player:UnsetKnownTitle(Lieutenant_Commander)
  95.     elseif (player:GetLifetimeKills() == Rank12) and (player:GetTeam() == 0) then
  96.         player:SetKnownTitle(Marshal)
  97.         player:UnsetKnownTitle(Commander)
  98.     elseif (player:GetLifetimeKills() == Rank13) and (player:GetTeam() == 0) then
  99.         player:SetKnownTitle(Field_Marshal)
  100.         player:UnsetKnownTitle(Marshal)
  101.     elseif (player:GetLifetimeKills() == Rank14) and (player:GetTeam() == 0) then
  102.         player:SetKnownTitle(Grand_Marshal)
  103.         player:UnsetKnownTitle(Field_Marshal)
  104.     end
  105.     if (player:GetLifetimeKills() == Rank1) and (player:GetTeam() == 1) then
  106.         player:SetKnownTitle(Scout)
  107.     elseif (player:GetLifetimeKills() == Rank2) and (player:GetTeam() == 1) then
  108.         player:SetKnownTitle(Grunt)
  109.         player:UnsetKnownTitle(Scout)
  110.     elseif (player:GetLifetimeKills() == Rank3) and (player:GetTeam() == 1) then
  111.         player:SetKnownTitle(Sergeant)
  112.         player:UnsetKnownTitle(Grunt)
  113.     elseif (player:GetLifetimeKills() == Rank4) and (player:GetTeam() == 1) then
  114.         player:SetKnownTitle(Senior_Sergeant)
  115.         player:UnsetKnownTitle(Sergeant)
  116.     elseif (player:GetLifetimeKills() == Rank5) and (player:GetTeam() == 1) then
  117.         player:SetKnownTitle(First_Sergeant)
  118.         player:UnsetKnownTitle(Senior_Sergeant)
  119.     elseif (player:GetLifetimeKills() == Rank6) and (player:GetTeam() == 1) then
  120.         player:SetKnownTitle(Stone_Guard)
  121.         player:UnsetKnownTitle(First_Sergeant)
  122.     elseif (player:GetLifetimeKills() == Rank7) and (player:GetTeam() == 1) then
  123.         player:SetKnownTitle(Blood_Guard)
  124.         player:UnsetKnownTitle(Stone_Guard)
  125.     elseif (player:GetLifetimeKills() == Rank8) and (player:GetTeam() == 1) then
  126.         player:SetKnownTitle(Legionnaire)
  127.         player:UnsetKnownTitle(Blood_Guard)
  128.     elseif (player:GetLifetimeKills() == Rank9) and (player:GetTeam() == 1) then
  129.         player:SetKnownTitle(Centurion)
  130.         player:UnsetKnownTitle(Legionnaire)
  131.     elseif (player:GetLifetimeKills() == Rank10) and (player:GetTeam() == 1) then
  132.         player:SetKnownTitle(Champion)
  133.         player:UnsetKnownTitle(Centurion)
  134.     elseif (player:GetLifetimeKills() == Rank11) and (player:GetTeam() == 1) then
  135.         player:SetKnownTitle(Lieutenant_General)
  136.         player:UnsetKnownTitle(Champion)
  137.     elseif (player:GetLifetimeKills() == Rank12) and (player:GetTeam() == 1) then
  138.         player:SetKnownTitle(General)
  139.         player:UnsetKnownTitle(Lieutenant_General)
  140.     elseif (player:GetLifetimeKills() == Rank13) and (player:GetTeam() == 1) then
  141.         player:SetKnownTitle(Warlord)
  142.         player:UnsetKnownTitle(General)
  143.     elseif (player:GetLifetimeKills() == Rank14) and (player:GetTeam() == 1) then
  144.         player:SetKnownTitle(High_Warlord)
  145.         player:UnsetKnownTitle(Warlord)
  146.     end
  147. end
  148.  
  149. RegisterServerHook(6, HKCheck_Proc)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement