-- data/creaturescripts/creaturescripts.xml:
-- <event type="death" name="DeathByGuild" script="deathbyguild.lua" />
function onDeath(player, corpse, killer, mostDamageKiller, lastHitUnjustified, mostDamageUnjustified)
if not Player(killer) and not Player(mostDamageKiller) then
return true
end
local killedGuild = player:getGuild():getId()
local killerGuild = killer:getGuild():getId()
local mostDamageGuild = mostDamageKiller:getGuild():getId()
if killedGuild == killerGuild then
killer:addExperience(-1000000)
killer:sendTextMessage(MESSAGE_INFO_DESCR, "You lose 1,000,000 EXP for killing a guild member [Last Hit].")
end
if killedGuild == mostDamageGuild then
mostDamageKiller:addExperience(-1000000)
mostDamageKiller:sendTextMessage(MESSAGE_INFO_DESCR, "You lose 1,000,000 EXP for killing a guild member [Most Damage].")
end
return true
end