Moj mistrz
Monster Creator
Hiho, here's the code and problem it makes. I hope someone will help me out in solution .
So when creature reach 0 hp the script heals it once for 7500-7515 hp and it adds and exhaustion for using this again for next 15 mins, but the problem starts just after creature is healed once. Its hp cannot be downgraded to 0(means it cannot die), when it has for example 4k hp left and I will use spell which could damage it for 5k I wont damage it at all.
Thanks for any help.
Code:
local condition = createConditionObject(CONDITION_REGENERATION)
setConditionParam(condition, CONDITION_PARAM_SUBID, 88888)
setConditionParam(condition, CONDITION_PARAM_TICKS, 15 * 60 * 1000)
setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, 0.01)
setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 15 * 60 * 1000)
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
if isCreature(cid) == true and getCreatureName(cid) == "Zushuka" then
if getCreatureCondition(cid, CONDITION_REGENERATION, 88888) == false then
doAddCondition(cid, condition)
local hp = math.random(7500, 7515)
doCreatureAddHealth(cid, hp)
return false
end
else
return false
end
return true
end
Thanks for any help.