Advertisement
Guest User

Untitled

a guest
Jul 15th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. --[[
  2. <event type="death" name="tpMonsterPoseidon" script="tpMonsterPoseidon.lua" />
  3. ]]
  4.  
  5. function onDeath(creature, corpse, killer, mostDamage, unjustified, mostDamage_unjustified)
  6. if creature:isPlayer() then
  7. return true
  8. end
  9.  
  10. if creature:getName():lower():find('minion of azulon') or creature:getName():lower():find('greenash') then
  11. killer:setStorageValue(4325, -1)
  12. local stgmax = math.max(killer:getStorageValue(4327), 0)
  13. killer:setStorageValue(4327, stgmax + 1)
  14. if stgmax + 1 == 100 then
  15. killer:addAchievement()
  16. end
  17. else
  18. -- tem dois dias para entrar no tp
  19. killer:setStorageValue(4325, os.time() + 2 * 24 * 60 * 60)
  20. -- nao precisa mais de itens para entrar
  21. killer:setStorageValue(4326, os.time() + 2 * 24 * 60 * 60)
  22. end
  23.  
  24. return true
  25. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement