• 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!

Lua Stop players healing from any source.

  • Thread starter Thread starter Xikini
  • Start date Start date
X

Xikini

Guest
TFS 0.3.7

onStatsChange only checks if a creature does something to another creature.

Wondering if anyone knows how to stop the rest of the (or all) healing sources.
This includes item regeneration, food regeneration, random scripts healing players.

For clarity's sake.

Code:
function areWeAllowedToHealYou?(cid)
    if getPlayerStorageValue(cid, 45001) == 1 then
        return stop_healing_me_plox
    end
    return true
end

Cheers,

Xikini
 
Use conditions to prevent hp/mana regeneration, e.g. CONDITION_REGENERATION
You can also prevent attacking/casting, melee or magic but this requires something much more complex well for melee it might.

Edit:
CONDITION_PACIFIED
Should prevent the player from physically attacking

CONDITION_HUNTING
prevents gaining experience i believe

CONDITION_EXHAUST
of course we know what that does

CONDITION_INFIGHT
this will prevent them from logging out or entering pz

CONDITION_MUTED
prevent them from speaking and i think casting

So you have a lot of options to test :)
 
Last edited:
Use conditions to prevent hp/mana regeneration, e.g. CONDITION_REGENERATION
You can also prevent attacking/casting, melee or magic but this requires something much more complex well for melee it might.

Edit:
CONDITION_PACIFIED
Should prevent the player from physically attacking

CONDITION_HUNTING
prevents gaining experience i believe

CONDITION_EXHAUST
of course we know what that does

CONDITION_INFIGHT
this will prevent them from logging out or entering pz

CONDITION_MUTED
prevent them from speaking and i think casting

So you have a lot of options to test :)
Unfortunately it's not a specific script I need it for.
I should have stated that more clearly in my first post.
I need a player specific option to literally disable healing, and that's it. :p
If not, I have a rather unpleasant work-around to achieve the same effect.
 
Back
Top