• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved Monsters Heal Bug

juansanchez

Advanced OT User
Joined
Apr 2, 2015
Messages
223
Reaction score
160
Hey otland people, i'm having a problem with my server, and it's pissing me off.

I had this creaturescripts script:

function onStatsChange(cid, attacker, type, combat, value)
if isMonster(attacker) then
return false
end
return true
end

So the monsters wouldn't hit each other. It works. But now, whenever a monster has this script on it, the heal of it wont work, it shows the blueshimer, but it wont heal it. Could anyone help me? And if i take the tag:

<script>
<event name="Test"/>
</script>

Off the creature script, the heal works again. Anyone can help me?
 
Code:
function onStatsChange(cid, attacker, type, combat, value)
   if isMonster(attacker) and type == STATSCHANGE_HEALTHLOSS then
     return false
   end
return true
end
When a monster uses a large area attack, and another monster is hit with that area attack it will execute this script because there is a possible stat change.

If the stat change is decreasing the health stat, then it will 'return false' or cancel the action against it.
If the stat change is anything else, then it will 'return true' and continue as normal.

Hope that helps explain it.


Xikini
 
Last edited by a moderator:
Back
Top