leandroluck
New Member
- Joined
- Dec 24, 2010
- Messages
- 104
- Reaction score
- 1
Code:
function onKill(creature, target)
local targetMonster = target:getMonster()
if not targetMonster or targetMonster:getName():lower() ~= 'ghost' then
return true
end
--clean arena of monsters
local spectators, spectator = Game.getSpectators(Position(32800, 32829, 14), false, false, 15, 15, 15, 15)
for i = 1, #spectators do
spectator = spectators
if spectator:isMonster() then
spectator:getPosition():sendMagicEffect(CONST_ME_POFF)
spectator:remove()
end
end
Game.createMonster('boss', Position(32800, 32829, 14))
return true
end
Well it is working after the player kills the ghost appears the boss.
plus the boss is not giving loot is appearing a msg talking that the player can not open because he did not kill the boss
note: no have error in console
Last edited: