Advertisement
Combreal

mpKills.lua

Mar 19th, 2014
701
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.07 KB | None | 0 0
  1. -- Multiplayer kills handdler - NE style - coded by combreal --
  2. -- Feel free to use it and change the value below --
  3.  
  4. -- killer's name blabla - keep a space char between the first double quote and your server message --
  5. doublekill_server_message = " is on a double kill!"
  6. triplekill_server_message = " is on a triple kill!"
  7. killtacular_server_message = " is on a killtacular!"
  8. killingspree_server_message = " is on a killing spree!"
  9. runningriot_server_message = " is running riot!"
  10. gratz_server_message = " has achieved 50 kills!" -- keep the nombre equal to gratzkill variable
  11.  
  12. doublekill_wisper_toplayer = "you did a double kill!"
  13. triplekill_wisper_toplayer = "you did a triple kill!"
  14. killtacular_wisper_toplayer = "you did a killtacular!"
  15. killingspree_wisper_toplayer = "you did a killing spree!"
  16. runningriot_wisper_toplayer = "you are running riot!"
  17. gratz_wisper_toplayer = "You've achieved 50 kills, good job!" -- keep the nombre equal to gratzkill variable
  18.  
  19. gratzkills = 50 -- nombre of kills to send the congratulation messages
  20.  
  21. function GetRequiredVersion() return 200 end
  22.  
  23. function OnScriptLoad(processid, game, persistent) end
  24.  
  25. function OnPlayerKill(killer, victim, mode)
  26. m_killer = getplayer(killer)
  27. local player_kills = readword(m_killer, 0x9C)
  28. if player_kills == gratzkills then
  29.     privatesay(killer, gratz_wisper_toplayer)
  30.     say(getname(killer) .. gratz_server_message)
  31. end
  32. end
  33.  
  34. function OnKillMultiplier(player, multiplier)
  35. name = getname(player)
  36.  if multiplier == 0x07 then
  37.     say(name .. doublekill_server_message)
  38.     privatesay(player, doublekill_wisper_toplayer)
  39. elseif multiplier == 0x09 then
  40.     say(name .. triplekill_server_message)
  41.     privatesay(player, triplekill_wisper_toplayer)
  42. elseif multiplier == 0x0A then
  43.     say(name .. killtacular_server_message)
  44.     privatesay(player, killtacular_wisper_toplayer)
  45. elseif multiplier == 0x0B then
  46.     say(name .. killingspree_server_message)
  47.     privatesay(player, killingspree_wisper_toplayer)
  48. elseif multiplier == 0x0C then
  49.     say(name .. runningriot_server_message)
  50.     privatesay(player, runningriot_wisper_toplayer)
  51. end
  52. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement