local damagePercent = {
{"Troll","Monk"}, -- this happens at 90% health
{"rat","rift scythe"}, -- this happens at 80% health
{"rift scythe","rift scythe"}, -- this happens at 70% health
{"rift scythe","rift scythe"}, -- this happens at 60% health
{"rift scythe","rift scythe"}, -- this happens at 50% health
{"rift scythe","rift scythe"}, -- this happens at 40% health
{"rift scythe","rift scythe"}, -- this happens at 30% health
{"rift scythe","rift scythe"}, -- this happens at 20% health
{"rift scythe","rift scythe"}, -- this happens at 10% health
}
function onThink(cid, interval)
if isCreature(cid) then
local current = getPlayerStorageValue(cid, "current")
if current == -1 then current = 1 end
if current <= #damagePercent then
local SummonsList = damagePercent[current]
if getCreatureHealth(cid) <= (getCreatureMaxHealth(cid) - ((getCreatureMaxHealth(cid)/10)*current)) then
for _, tid in ipairs(SummonsList) do
--FIXED----FIXED----FIXED----FIXED----FIXED----FIXED----FIXED----FIXED----FIXED----FIXED--
doCreateMonster(tid, getCreaturePosition(cid)) ------------------------Fixed--
--FIXED----FIXED----FIXED----FIXED----FIXED----FIXED----FIXED----FIXED----FIXED----FIXED--
end
doPlayerSetStorageValue(cid, "current", current+1)
end
end
end
return true
end