Advertisement
Guest User

Untitled

a guest
Nov 20th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.05 KB | None | 0 0
  1. function onKill(cid, target, lastHit)
  2.  
  3. setPlayerStorageValue(cid, multikills.st, getPlayerStorageValue(cid, multikills.st) + 1)
  4.  
  5.  
  6. local function regressTime()
  7.  
  8. if not isCreature(cid) then
  9. return true
  10. end
  11.  
  12. if not isPlayer(target) then
  13. return true
  14. end
  15.  
  16.  
  17. if getPlayerStorageValue(cid, timeMultiKill) == 0 then
  18. setPlayerStorageValue(cid, multikills.st, 0)
  19. return true
  20. end
  21.  
  22. ---doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getPlayerStorageValue(cid, timeMultiKill))
  23.  
  24. local time = getPlayerStorageValue(cid, timeMultiKill)
  25. time = time - 1
  26. setPlayerStorageValue(cid, timeMultiKill, time)
  27. addEvent(regressTime, 1000)
  28.  
  29. return true
  30. end
  31.  
  32. if getPlayerStorageValue(cid, multikills.st) == 1 then
  33. print "Kill 1"
  34. setPlayerStorageValue(cid, timeMultiKill, multikills.delay)
  35. addEvent(regressTime, 1000)
  36. return true
  37. end
  38.  
  39.  
  40. if getPlayerStorageValue(cid, multikills.st) == 2 then
  41.  
  42. doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, getCreatureName(cid).." Fez um Drouble Kill em ".. getCreatureName(target) ..".")
  43. doBroadcastMessage(getCreatureName(cid).." fez um Drouble Kill em ".. getCreatureName(target) ..".", MESSAGE_STATUS_WARNING)
  44. setPlayerStorageValue(cid, timeMultiKill, multikills.delay + 3)
  45. print "Kill 2"
  46. addEvent(regressTime, 1000)
  47. doSendAnimatedText(getThingPos(cid), "DROUBLE KILL", 50)
  48. return true
  49. end
  50.  
  51. if getPlayerStorageValue(cid, multikills.st) == 3 then
  52.  
  53. doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, getCreatureName(cid).." fez um Triple Kill em ".. getCreatureName(target) ..".")
  54. doBroadcastMessage(getCreatureName(cid).." fez um Triple Kill em ".. getCreatureName(target) ..".", MESSAGE_STATUS_WARNING)
  55. setPlayerStorageValue(cid, timeMultiKill, multikills.delay + 5)
  56. print "Kill 3"
  57. addEvent(regressTime, 1000)
  58. doSendAnimatedText(getThingPos(cid), "TRIPLEKILL", 50)
  59. return true
  60. end
  61.  
  62. if getPlayerStorageValue(cid, multikills.st) == 4 then
  63.  
  64. doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, getCreatureName(cid).." fez um Quadra Kill em ".. getCreatureName(target) ..".")
  65. doBroadcastMessage(getCreatureName(cid).." fez um Quadra Kill em ".. getCreatureName(target) ..".", MESSAGE_STATUS_WARNING)
  66. setPlayerStorageValue(cid, timeMultiKill, multikills.delay + 7)
  67. print "kill 4"
  68. addEvent(regressTime, 1000)
  69. doSendAnimatedText(getThingPos(cid), "QUADRAKILL", 50)
  70. return true
  71. end
  72.  
  73. if getPlayerStorageValue(cid, multikills.st) == 5 then
  74.  
  75. doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, getCreatureName(cid).." fez um Penta Kill em ".. getCreatureName(target) ..".")
  76. doBroadcastMessage(getCreatureName(cid).." fez um Penta Kill em ".. getCreatureName(target) ..".", MESSAGE_STATUS_WARNING)
  77. setPlayerStorageValue(cid, timeMultiKill, multikills.delay)
  78. doSendMagicEffect(getThingPos(cid), 28)
  79. print "kill 5"
  80. setPlayerStorageValue(cid, timeMultiKill, 0)
  81. doSendAnimatedText(getThingPos(cid), "PENTAKILL", 50)
  82. return true
  83. end
  84.  
  85.  
  86. return true
  87. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement