leandroluck
New Member
- Joined
- Dec 24, 2010
- Messages
- 104
- Reaction score
- 1
to kill the boss 1 the boss two will appear the problem that if 5 people kill the boss 1 appears the boss two 5x
Code:
local bossPositions = {
Position(32800, 32829, 14),
Position(32796, 32832, 14),
Position(32804, 32834, 14),
Position(32793, 32835, 14),
Position(32809, 32830, 14),
Position(32805, 32829, 14)
}
function onKill(creature, target)
local targetMonster = target:getMonster()
if not targetMonster or targetMonster:getName():lower() ~= 'demonone' then
return true
end
local boss =Game.createMonster('demontwo', bossPositions[math.random(#bossPositions)])
if boss then
boss:setReward(false)
end
return true
end