Created
October 15, 2015 07:32
-
-
Save dbjorkholm/bd3d8ff5030cd1c258aa to your computer and use it in GitHub Desktop.
test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function onKill(creature, target) | |
if not target:isMonster or target:getMaster() then | |
return true | |
end | |
local targetName = target:getName():lower() | |
if targetName ~= 'demon' then | |
return true | |
end | |
for attackerId, damage in pairs(target:getDamageMap()) do | |
local tmpPlayer = Player(attackerId) | |
if tmpPlayer then | |
-- do something | |
-- e.g tmpPlayer:addItem(2195, 1) | |
end | |
end | |
return true | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment