Advertisement
Guest User

dueldie.lua

a guest
Jul 15th, 2013
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. function onDeath(cid, corpse, deathList)
  2. local killer = deathList[1]
  3. if getPlayerStorageValue(cid, 15122) >= 1 then
  4.  
  5. doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
  6. setPlayerStorageValue(cid, 12577, getPlayerStorageValue(cid, 12577) + 1)
  7. setPlayerStorageValue(killer, 12578, getPlayerStorageValue(killer, 12578) + 1)
  8. doPlayerSendTextMessage(cid, 27, "Voce perdeu o duelo, e tem o total de "..getPlayerStorageValue(cid, 12577).." derrotas.")
  9. doTeleportThing(cid, {x = getPlayerStorageValue(cid, 18210), y = getPlayerStorageValue(cid, 18211), z = getPlayerStorageValue(cid, 18212)}, false)
  10. setPlayerStorageValue(cid, 15122, -1)
  11. setPlayerStorageValue(killer, 15122, -1)
  12. doPlayerSendTextMessage(killer, 27, "Voce ganhou o duelo, e tem o total de "..getPlayerStorageValue(killer, 12578).." vitórias")
  13. setPlayerStorageValue(killer, 15215, -1)
  14. setPlayerStorageValue(cid, 15215, -1)
  15. doCreatureSetSkullType(killer, 0)
  16. doCreatureSetDropLoot(cid, false)
  17. end
  18. return true
  19. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement