New_Age
FoxWorld New Age
- Joined
- Jan 27, 2016
- Messages
- 24
- Reaction score
- 0
personal hello someone may need to help me know if this script is right
It is to see whether the player or summon it gave the last hit
It is to see whether the player or summon it gave the last hit
Code:
function onDeath(cid, corpse, killer)
local p = Player(cid) if p == nil then return false end
if isPlayer(killer) == TRUE then
killer = p:getId()
elseif isCreature(killer) == TRUE then -- caso quem deu o last hit foi o summon de um jogador
local c = Creature(cid) if c == nil then return false end
local summoner = c:getMaster()
if summoner ~= killer then
killer = summoner
else
killer = FALSE
end
else
killer = FALSE
end