Advertisement
Guest User

Untitled

a guest
Mar 25th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. local c = {
  2. item = 5982, -- reward itemid
  3. store = 6000, -- storage for Current frags like in login script
  4. tstore = 7000, -- Total Storage value for kills
  5. dstore = 8000, -- Total Storage value for deaths
  6. table = {
  7. {"Smashed!", 189, 1},
  8. {"Dead!", 190, 1},
  9. {"Owned!", 18, 1},
  10. {"Pwnt!", 215, 1}
  11. }
  12. }
  13. function onKill(cid, target)
  14. if(not isPlayer(target)) then return true end
  15.  
  16. local getStor = getCreatureStorage(cid, c.store)
  17. local rand = math.random(1, #c.table)
  18. local name = getCreatureName(cid)
  19.  
  20. doCreatureSetStorage(cid, c.store, (getStor + 1))
  21. doCreatureSetStorage(cid, c.tstore, (getCreatureStorage(cid, c.tstore) +1))
  22. doCreatureSetStorage(target, c.dstore, (getCreatureStorage(cid, c.dstore) + 1))
  23.  
  24. doSendAnimatedText(getThingPosition(target), c.table[rand][1], c.table[rand][2])
  25.  
  26. if getPlayerIp(cid) == getPlayerIp(target) then
  27. return true
  28. end
  29.  
  30. if(getStor == 5) then
  31. doPlayerAddItem(cid, c.item, c.table[rand][3])
  32. elseif(getStor == 10) then
  33. doBroadcastMessage("".. name .. " got 10 kills in a row!")
  34. elseif(getStor == 25) then
  35. doBroadcastMessage("".. name .. " got 25 kills in a row!")
  36. elseif(getStor == 50) then
  37. doBroadcastMessage("".. name .. " got 50 kills in a row!")
  38. elseif(getStor == 100) then
  39. doBroadcastMessage("Bow down to your new god "..name.." has 100 frags!")
  40. end
  41.  
  42. return true
  43. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement