I have a Boss NPC on my server
The function to set it up works fine with add_npc(x,y,mob id, count)
But everytime when i killed the boss, i have to contact the npc to spawn the same boss again.
I sit on my function for several time and now, i think im blind "like matrix" to find the right value / command by myselfe.
The Boss should respawn after death (like delay 5 seconds)
i shearch for several solutions like respawn(x,y...) but everything i try, the boss doesn't respawn after he is death.
Here is my last not working function version (values not specifyed x,y ....)
function boss_spawn(monster_ID)
local gold = get_value("gold")
if gold >= 10000000 then
add_npc(x, y, monster_ID, 1)
else
dlg_menu("No money")
end
if get_target_value("hp") ~= 0 then
respawn(x, y, monster_ID, 1)
-- add_npc(x, y, monster_ID, 1)
sv("gold", gold-10000000)
update_gold_chaos()
boss_spawn()
end
end