ConAn Edujawa
Member
- Joined
- Feb 23, 2015
- Messages
- 457
- Reaction score
- 17
im use this script its work fine but have one problem when boss spawn and after time spawn normal monster spawn again in same spot anyone can fix it if boss spawn normal monster don't spawn again??
the problem in example
if hunter2 spawned after 60 sec {time to spawn in map} normal hunter spawn again
tfs 0.4
the problem in example
if hunter2 spawned after 60 sec {time to spawn in map} normal hunter spawn again
tfs 0.4
Code:
local config = {
chance = 40,
bosses = {
["Hunter"] = "Hunter2",
},
}
function onSpawn(cid)
if isMonster(cid) then
addEvent(function()
if isCreature(cid) then
local boss = config.bosses[getCreatureName(cid)]
if boss and math.random(1, 100) <= config.chance then
local pos = getThingPos(cid)
doRemoveCreature(cid)
doCreateMonster(boss, pos)
end
end
end, 5)
end
return true
end